Update
This commit is contained in:
parent
1d48a2a77d
commit
a70e52388c
7 changed files with 326 additions and 54 deletions
16
enlace_final.md
Normal file
16
enlace_final.md
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# Repositorio
|
||||
https://git.peprolinbot.com/peprolinbot/charla-gpul-nixos
|
||||
|
||||
# Referencias
|
||||
- https://nixos-and-flakes.thiscute.world/nixos-with-flakes/start-using-home-manager (**recomendado** como guia general a seguir)
|
||||
- https://nix.dev/tutorials/nix-language (documentación oficial)
|
||||
- https://bmcgee.ie/posts/2023/01/nix-and-nixos-a-retrospective/
|
||||
- https://medium.com/@Erik_Krieg/what-is-nix-nixos-aab5610f0d7f
|
||||
|
||||
# Otras recomendaciones
|
||||
- [Manual de Nix](https://nix.dev/manual/nix/2.28/)
|
||||
- [Manual de Nixpkgs](https://nixos.org/manual/nixpkgs/stable/)
|
||||
- [Manual de NixOs](https://nixos.org/manual/nixos/stable/)
|
||||
- [nixos.wiki](https://nixos.wiki/)
|
||||
- [Wiki Oficial](https://wiki.nixos.org/)
|
||||
- [awesome-nix](https://github.com/nix-community/awesome-nix)
|
||||
27
flake.nix
27
flake.nix
|
|
@ -3,10 +3,12 @@
|
|||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
supportedSystems = [
|
||||
"x86_64-linux"
|
||||
];
|
||||
|
|
@ -14,19 +16,24 @@
|
|||
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||
|
||||
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; });
|
||||
in {
|
||||
packages = forAllSystems (system: let
|
||||
in
|
||||
{
|
||||
packages = forAllSystems (
|
||||
system:
|
||||
let
|
||||
pkgs = nixpkgsFor.${system};
|
||||
src = ./src;
|
||||
slides = "${src}/slides.md";
|
||||
presenterm_config = ./presenterm_config.yaml;
|
||||
in rec {
|
||||
in
|
||||
rec {
|
||||
run-presentation = pkgs.writeShellApplication {
|
||||
name = "run-presentation";
|
||||
|
||||
runtimeInputs = with pkgs; [
|
||||
presenterm
|
||||
nix # For snippet execution
|
||||
qrencode
|
||||
];
|
||||
|
||||
text = ''
|
||||
|
|
@ -46,16 +53,20 @@
|
|||
kitty --config=NONE run-presentation
|
||||
'';
|
||||
};
|
||||
});
|
||||
}
|
||||
);
|
||||
devShells = forAllSystems (
|
||||
system: let
|
||||
system:
|
||||
let
|
||||
pkgs = nixpkgsFor.${system};
|
||||
in {
|
||||
in
|
||||
{
|
||||
default = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
presenterm
|
||||
python3Packages.weasyprint
|
||||
markdown-oxide
|
||||
qrencode
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 97 KiB |
BIN
src/images/nix-onion.png
Normal file
BIN
src/images/nix-onion.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 134 KiB |
120
src/images/nix-onion.svg
Normal file
120
src/images/nix-onion.svg
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="941.13696"
|
||||
height="941.13696"
|
||||
viewBox="0 0 941.13696 941.13696"
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
inkscape:version="1.4.2 (ebf0e940d0, 2025-05-08)"
|
||||
sodipodi:docname="nix-onion.svg"
|
||||
inkscape:export-filename="nix-onion.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<sodipodi:namedview
|
||||
id="namedview1"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:document-units="px"
|
||||
showguides="false"
|
||||
inkscape:zoom="0.46256569"
|
||||
inkscape:cx="206.45716"
|
||||
inkscape:cy="164.30099"
|
||||
inkscape:window-width="1916"
|
||||
inkscape:window-height="1024"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="layer1" />
|
||||
<defs
|
||||
id="defs1" />
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-334.14117,-7.1610028)">
|
||||
<circle
|
||||
style="fill:#836cea;fill-opacity:1;stroke:#000000;stroke-width:1.95662"
|
||||
id="circle3"
|
||||
cx="804.70966"
|
||||
cy="477.72949"
|
||||
r="469.59018" />
|
||||
<circle
|
||||
style="fill:#98ea6c;fill-opacity:1;stroke:#000000;stroke-width:1.691"
|
||||
id="circle2"
|
||||
cx="804.70966"
|
||||
cy="477.72949"
|
||||
r="405.84091" />
|
||||
<circle
|
||||
style="fill:#eac06c;fill-opacity:1;stroke:#000000;stroke-width:1.36382"
|
||||
id="circle1"
|
||||
cx="804.70966"
|
||||
cy="477.72949"
|
||||
r="327.31812" />
|
||||
<circle
|
||||
style="fill:#ea6c71;stroke:#000000;stroke-width:1.04628"
|
||||
id="path1"
|
||||
cx="804.70966"
|
||||
cy="477.72949"
|
||||
r="251.10602" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:64px;text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#ea6c71;stroke:#000000"
|
||||
x="616.70966"
|
||||
y="494.27637"
|
||||
id="text1"><tspan
|
||||
id="tspan1"
|
||||
x="616.70966"
|
||||
y="494.27637"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:64px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#000000;fill-opacity:1"
|
||||
sodipodi:role="line">Nix language</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:64px;text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#ea6c71;stroke:#000000"
|
||||
x="756.20966"
|
||||
y="214.47119"
|
||||
id="text2"><tspan
|
||||
id="tspan2"
|
||||
x="756.20966"
|
||||
y="214.47119"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:64px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#000000;fill-opacity:1"
|
||||
sodipodi:role="line">Nix</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:55.9353px;text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#ea6c71;stroke:#000000;stroke-width:0.87399"
|
||||
x="703.95502"
|
||||
y="133.29323"
|
||||
id="text3"><tspan
|
||||
id="tspan3"
|
||||
x="703.95502"
|
||||
y="133.29323"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:55.9353px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#000000;fill-opacity:1;stroke-width:0.87399"
|
||||
sodipodi:role="line">Nixpkgs</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:55.9353px;text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#ea6c71;stroke:#000000;stroke-width:0.87399"
|
||||
x="722.896"
|
||||
y="61.516926"
|
||||
id="text4"><tspan
|
||||
id="tspan4"
|
||||
x="722.896"
|
||||
y="61.516926"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:55.9353px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#000000;fill-opacity:1;stroke-width:0.87399"
|
||||
sodipodi:role="line">NixOS</tspan><tspan
|
||||
x="722.896"
|
||||
y="131.43605"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:55.9353px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#000000;fill-opacity:1;stroke-width:0.87399"
|
||||
sodipodi:role="line"
|
||||
id="tspan5" /></text>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.7 KiB |
BIN
src/images/repology.png
Normal file
BIN
src/images/repology.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 169 KiB |
131
src/slides.md
131
src/slides.md
|
|
@ -29,13 +29,18 @@ La _temida_ curva de aprendizaje de Nix(OS)
|
|||
|
||||
<!-- pause -->
|
||||
|
||||

|
||||

|
||||
|
||||
<!-- end_slide -->
|
||||
|
||||
Nix
|
||||
===
|
||||
|
||||
<!-- column_layout: [2, 3] -->
|
||||
<!-- column: 1 -->
|
||||
```bash +exec
|
||||
nix run nixpkgs#cowsay -- Soy un paquete de Nix
|
||||
```
|
||||
<!-- column: 0 -->
|
||||
- Gestor de paquetes
|
||||
- Declarativo
|
||||
- Reproducible
|
||||
|
|
@ -54,7 +59,9 @@ Nix, el lenguaje
|
|||
===
|
||||
<!-- column_layout: [3, 2] -->
|
||||
<!-- column: 0 -->
|
||||
> Sólo existe por y para Nix, el gestor de paquetes: para describir paquetes y configuraciones, así como sus variantes y composiciones. **No está pensado para casos de uso generales**.
|
||||
> Sólo existe por y para Nix, el gestor de paquetes:
|
||||
> para describir paquetes y configuraciones, así como sus variantes y composiciones.
|
||||
> **No está pensado para casos de uso generales**.
|
||||
|
||||
- Sencillo
|
||||
- Funcional
|
||||
|
|
@ -76,11 +83,23 @@ in
|
|||
```
|
||||
<!-- end_slide -->
|
||||
|
||||
Nixpkgs
|
||||
===
|
||||
- Repositorio de paquetes en Nix (y módulos de NixOS)
|
||||
- Incluye tests, funciones de ayuda, etc.
|
||||
- Compilado y probado con Hydra
|
||||
- Subido a `cache.nixos.org`
|
||||
|
||||

|
||||
[De repology.org](https://repology.org)
|
||||
<!-- end_slide -->
|
||||
|
||||
NixOS
|
||||
===
|
||||
<!-- column_layout: [1, 4] -->
|
||||
<!-- column: 0 -->
|
||||

|
||||
_Logo de NixOS 25.11 "Xantusia"_ por _Yohann Boniface_
|
||||
|
||||
<!-- column: 1 -->
|
||||
- Nix como gestor de paquetes
|
||||
|
|
@ -483,6 +502,88 @@ Configurar NixOS con Flakes
|
|||
|
||||
<!-- end_slide -->
|
||||
|
||||
Anatomía de un modulo
|
||||
===
|
||||
<!-- column_layout: [2, 3] -->
|
||||
<!-- column: 0 -->
|
||||
```nix
|
||||
{lib, config, options, pkgs, ...}:
|
||||
{
|
||||
# Importar otros modulos
|
||||
imports = [
|
||||
# ...
|
||||
./xxx.nix
|
||||
];
|
||||
|
||||
for.bar.enable = true;
|
||||
# Otras declaraciones de opciones
|
||||
# ...
|
||||
}
|
||||
```
|
||||
<!-- pause -->
|
||||
<!-- column: 1 -->
|
||||
|
||||
```nix {all|7|8}
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(import ./special-fonts-1.nix {inherit config pkgs;})
|
||||
./special-fonts-2.nix
|
||||
];
|
||||
|
||||
fontconfig.enable = true;
|
||||
}
|
||||
```
|
||||
<!-- end_slide -->
|
||||
|
||||
<!-- column_layout: [1, 1] -->
|
||||
<!-- column: 0 -->
|
||||
`lib.mkOverride`, `lib.mkDefault`, and `lib.mkForce`
|
||||
===
|
||||
```nix {4-7|10|12|all}
|
||||
{
|
||||
# ......
|
||||
|
||||
mkOverride = priority: content:
|
||||
{ _type = "override";
|
||||
inherit priority content;
|
||||
};
|
||||
|
||||
mkOptionDefault = mkOverride 1500;
|
||||
mkDefault = mkOverride 1000;
|
||||
mkImageMediaOverride = mkOverride 60;
|
||||
mkForce = mkOverride 50;
|
||||
mkVMOverride = mkOverride 10;
|
||||
|
||||
# ......
|
||||
}
|
||||
```
|
||||
|
||||
<!-- column: 1 -->
|
||||
<!-- pause -->
|
||||
|
||||
`lib.mkOrder`, `lib.mkBefore`, and `lib.mkAfter`
|
||||
===
|
||||
```nix
|
||||
{
|
||||
# ......
|
||||
|
||||
mkOrder = priority: content:
|
||||
{ _type = "order";
|
||||
inherit priority content;
|
||||
};
|
||||
|
||||
mkBefore = mkOrder 500;
|
||||
defaultOrderPriority = 1000;
|
||||
mkAfter = mkOrder 1500;
|
||||
|
||||
# ......
|
||||
}
|
||||
```
|
||||
<!-- end_slide -->
|
||||
|
||||
<!-- jump_to_middle -->
|
||||
Vamos a probar algunas cosas 🙃
|
||||
|
|
@ -519,3 +620,27 @@ Tips & tricks
|
|||
|
||||
Muchas Gracias ❤️
|
||||
===
|
||||
<!-- end_slide -->
|
||||
<!-- column_layout: [3, 2] -->
|
||||
<!-- column: 0 -->
|
||||
# Repositorio
|
||||
https://git.peprolinbot.com/peprolinbot/charla-gpul-nixos
|
||||
|
||||
# Referencias
|
||||
- https://nixos-and-flakes.thiscute.world/ (**recomendado** como guia general a seguir)
|
||||
- https://nix.dev/tutorials/nix-language (documentación oficial)
|
||||
- https://bmcgee.ie/posts/2023/01/nix-and-nixos-a-retrospective/
|
||||
- https://medium.com/@Erik_Krieg/what-is-nix-nixos-aab5610f0d7f
|
||||
|
||||
# Otras recomendaciones
|
||||
- [Manual de Nix](https://nix.dev/manual/nix/2.28/)
|
||||
- [Manual de Nixpkgs](https://nixos.org/manual/nixpkgs/stable/)
|
||||
- [Manual de NixOs](https://nixos.org/manual/nixos/stable/)
|
||||
- [nixos.wiki](https://nixos.wiki/)
|
||||
- [Wiki Oficial](https://wiki.nixos.org/)
|
||||
- [awesome-nix](https://github.com/nix-community/awesome-nix)
|
||||
|
||||
<!-- column: 1 -->
|
||||
```bash +image
|
||||
qrencode -t png -m 2 -s 30 -o - "https://git.peprolinbot.com/peprolinbot/charla-gpul-nixos/src/branch/main/enlace_final.md"
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue