fix branches
This commit is contained in:
parent
7169694d41
commit
902191d91c
|
@ -114,6 +114,7 @@
|
||||||
% id = "emoji/rarog"
|
% id = "emoji/rarog"
|
||||||
- :rarog: - that's that bird from where I work yep
|
- :rarog: - that's that bird from where I work yep
|
||||||
|
|
||||||
|
% id = "01J31356QCXVACQKPEVRHD0WMZ"
|
||||||
- it's actually called a raróg, not a rarog, but not having to handle Unicode in your parser is actually kind of nice.
|
- it's actually called a raróg, not a rarog, but not having to handle Unicode in your parser is actually kind of nice.
|
||||||
|
|
||||||
% id = "01HA4HJKQ7FKV8JJ70Q2CY9R86"
|
% id = "01HA4HJKQ7FKV8JJ70Q2CY9R86"
|
||||||
|
|
|
@ -1,57 +1,76 @@
|
||||||
%% title = "derive me some Nix"
|
%% title = "derive me some Nix"
|
||||||
|
|
||||||
|
% id = "01J31356Q1A4Z54F3G7THB1C81"
|
||||||
- chances are you've heard about Nix or NixOS from somewhere and would like to learn more about it.
|
- chances are you've heard about Nix or NixOS from somewhere and would like to learn more about it.
|
||||||
|
|
||||||
|
% id = "01J31356Q1AQE7ZBE2P7FG03G4"
|
||||||
- if that is the case, welcome to the club!
|
- if that is the case, welcome to the club!
|
||||||
we're pretty much in the same bucket.
|
we're pretty much in the same bucket.
|
||||||
I literally just started using Nix a couple days ago, and I found the documentation *really* unclear.
|
I literally just started using Nix a couple days ago, and I found the documentation *really* unclear.
|
||||||
so here's my shot at a more pedagogical approach.
|
so here's my shot at a more pedagogical approach.
|
||||||
|
|
||||||
|
% id = "01J31356Q1N80MYK77MP3BMJ1E"
|
||||||
- if that's not the case - Nix is a package manager and system configuration language.
|
- if that's not the case - Nix is a package manager and system configuration language.
|
||||||
basically, you specify how you want your system to look using config files stored in one place, and Nix _derives_ the system from that config file for you!
|
basically, you specify how you want your system to look using config files stored in one place, and Nix _derives_ the system from that config file for you!
|
||||||
|
|
||||||
|
% id = "01J31356Q13VHG7EN0Q24A6GSM"
|
||||||
- I emphasized the word _derives_, because _derivation_ is the fundamental operation of Nix the package manager.
|
- I emphasized the word _derives_, because _derivation_ is the fundamental operation of Nix the package manager.
|
||||||
your entire config is specified declaratively, and the entire folder structure and all configuration files are _derived_ from that config.
|
your entire config is specified declaratively, and the entire folder structure and all configuration files are _derived_ from that config.
|
||||||
but we'll get to that shortly.
|
but we'll get to that shortly.
|
||||||
|
|
||||||
|
% id = "01J31356Q1G1X5X9Q7BPDT41R5"
|
||||||
- people seem to be excited about Nix for many reasons.
|
- people seem to be excited about Nix for many reasons.
|
||||||
I'm excited because it helps me achieve *online independence.*
|
I'm excited because it helps me achieve *online independence.*
|
||||||
|
|
||||||
|
% id = "01J31356Q12T9Z1WE300PD7J79"
|
||||||
- did you know that since last weekend (since this was written) this website runs on NixOS?
|
- did you know that since last weekend (since this was written) this website runs on NixOS?
|
||||||
|
|
||||||
|
% id = "01J31356Q1KM0TT28D4PHZTAR9"
|
||||||
- being able to take your VPS's configuration elsewhere and let Nix cook your system up automatically is extremely cool.
|
- being able to take your VPS's configuration elsewhere and let Nix cook your system up automatically is extremely cool.
|
||||||
it's something that's always frustrated me with how Linux software is configured -
|
it's something that's always frustrated me with how Linux software is configured -
|
||||||
lots of little configuration files scattered across `/etc` and sometimes other directories, which ends up being extremely hard to replicate if you ever want to switch server providers.
|
lots of little configuration files scattered across `/etc` and sometimes other directories, which ends up being extremely hard to replicate if you ever want to switch server providers.
|
||||||
|
|
||||||
|
% id = "01J31356Q1D0SJPJB1V4MYPNX9"
|
||||||
- *and* your system config will end up identical to the one you had before!
|
- *and* your system config will end up identical to the one you had before!
|
||||||
isn't that awesome?
|
isn't that awesome?
|
||||||
|
|
||||||
|
% id = "01J31356Q1BNSAF75KDE4PN2PJ"
|
||||||
- word of warning though: I wouldn't recommend running NixOS on a home PC.
|
- word of warning though: I wouldn't recommend running NixOS on a home PC.
|
||||||
|
|
||||||
|
% id = "01J31356Q1C13GSD9KSXETWW1B"
|
||||||
- I use :btw: on my home PC for a very simple reason.
|
- I use :btw: on my home PC for a very simple reason.
|
||||||
it's just _really darn simple_ to change anything about my system.
|
it's just _really darn simple_ to change anything about my system.
|
||||||
|
|
||||||
|
% id = "01J31356Q1JZ13FY2XAVVKAN97"
|
||||||
- need to install a new package? `pacman -S`.
|
- need to install a new package? `pacman -S`.
|
||||||
|
|
||||||
|
% id = "01J31356Q1VJ0HFQYVS1AE7CZB"
|
||||||
- need to edit system config?
|
- need to edit system config?
|
||||||
well first of all no you don't, because other than fundamental config you change during installation, we both know Arch works pretty much works out of the box on your PC,
|
well first of all no you don't, because other than fundamental config you change during installation, we both know Arch works pretty much works out of the box on your PC,
|
||||||
but even if you _do_ end up needing to change some config for a workaround, it's generally only because you need a _workaround_ - which may not be needed by the time you reinstall your system.
|
but even if you _do_ end up needing to change some config for a workaround, it's generally only because you need a _workaround_ - which may not be needed by the time you reinstall your system.
|
||||||
|
|
||||||
|
% id = "01J31356Q162ACZG4S6M9YNQX2"
|
||||||
- and reinstall your OS pretty rarely.
|
- and reinstall your OS pretty rarely.
|
||||||
|
|
||||||
|
% id = "01J31356Q1ZXDA6QX5P978FTPS"
|
||||||
- most of your _important_ configuration is stored in `$HOME` y'know, and that's easy to keep between reinstalls - you have a separate `/home` partition after all.
|
- most of your _important_ configuration is stored in `$HOME` y'know, and that's easy to keep between reinstalls - you have a separate `/home` partition after all.
|
||||||
|
|
||||||
|
% id = "01J31356Q1KYMMG64D3TNXH3C5"
|
||||||
- :btw: is also Really Darn Fast.
|
- :btw: is also Really Darn Fast.
|
||||||
I can't say that about NixOS.
|
I can't say that about NixOS.
|
||||||
the package manager is excruciatingly slow to update your system config.
|
the package manager is excruciatingly slow to update your system config.
|
||||||
the initial install took _really_ long for how barebones of a system I specified in my config.
|
the initial install took _really_ long for how barebones of a system I specified in my config.
|
||||||
|
|
||||||
|
% id = "01J31356Q1CA21R7GM9MXGQ7Q4"
|
||||||
- let's derive us a system! as I mentioned before, everything in Nix is achieved by means of _derivations_.
|
- let's derive us a system! as I mentioned before, everything in Nix is achieved by means of _derivations_.
|
||||||
|
|
||||||
|
% id = "01J31356Q191D3J645CT75YFEJ"
|
||||||
- from a programming perspective, a derivation is simply a function `options -> path`, where `options` is an attribute set specifying how the output `path` should be derived.
|
- from a programming perspective, a derivation is simply a function `options -> path`, where `options` is an attribute set specifying how the output `path` should be derived.
|
||||||
|
|
||||||
|
% id = "01J31356Q1PRWPYD0EGGY1ZK3W"
|
||||||
- and that's *it*.
|
- and that's *it*.
|
||||||
|
|
||||||
|
% id = "01J31356Q1445NB18CNBE91CZP"
|
||||||
- suppose you'd like to download a file from the Internet.
|
- suppose you'd like to download a file from the Internet.
|
||||||
that's what the `pkgs.fetchurl` function is for.
|
that's what the `pkgs.fetchurl` function is for.
|
||||||
|
|
||||||
|
@ -65,4 +84,5 @@ I'm excited because it helps me achieve *online independence.*
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
% id = "01J31356Q1HEW2HCTG27BDFJM2"
|
||||||
- but where does `pkgs` even come from?
|
- but where does `pkgs` even come from?
|
||||||
|
|
Loading…
Reference in a new issue