···66These are my new dotfiles (migrating from arch over at https://github.com/42willow/dotfiles)
7788> [!WARNING]
99-> You should *not* look at this for inspiration until it's complete.
99+> You should _not_ look at this for inspiration until it's complete.
10101111## Resources
1212
+22-22
docs/cheetsheet.md
···2233## `nix-env` package management
4455-| action | Ubuntu | Nix | notes |
66-|:---|:---|:---|:---|
77-| update package list | `sudo apt update` | `sudo nix-channel --update` | |
88-| search | `apt search <query>` | `nix search <query>` | also try [search.nixos.org/packages](https://search.nixos.org/packages) |
99-| install | `sudo apt install <package>` | `nix-env -i <package>` | no root, atomic, per user |
1010-| upgrade installed | `sudo apt upgrade` | `nix-env -u` | no root, atomic, per user |
1111-| remove | `sudo apt remove <package>` | `nix-env -e <package>` | no root, atomic, per user |
1212-| undo last operation | ... | `nix-env --rollback` | no root, atomic, per user |
1313-| list installed | `dpkg -l`| `nix-env -q` | per user |
1414-| show generations | ... | `nix-env --list-generations` ||
55+| action | Ubuntu | Nix | notes |
66+| :------------------ | :--------------------------- | :--------------------------- | :---------------------------------------------------------------------- |
77+| update package list | `sudo apt update` | `sudo nix-channel --update` | |
88+| search | `apt search <query>` | `nix search <query>` | also try [search.nixos.org/packages](https://search.nixos.org/packages) |
99+| install | `sudo apt install <package>` | `nix-env -i <package>` | no root, atomic, per user |
1010+| upgrade installed | `sudo apt upgrade` | `nix-env -u` | no root, atomic, per user |
1111+| remove | `sudo apt remove <package>` | `nix-env -e <package>` | no root, atomic, per user |
1212+| undo last operation | ... | `nix-env --rollback` | no root, atomic, per user |
1313+| list installed | `dpkg -l` | `nix-env -q` | per user |
1414+| show generations | ... | `nix-env --list-generations` | |
15151616## `nix-shell` isolated build/dev/run environments
17171818-| command | result |
1919-|:---|:---|
2020-| `nix-shell -p <packages>` | start shell in env with `<packages>` |
2121-| `nix-shell` | start shell in the env defined by `shell.nix` or `default.nix` in current dir |
2222-| `nix-shell --pure` | same, but outside env is inaccessible |
1818+| command | result |
1919+| :------------------------ | :---------------------------------------------------------------------------- |
2020+| `nix-shell -p <packages>` | start shell in env with `<packages>` |
2121+| `nix-shell` | start shell in the env defined by `shell.nix` or `default.nix` in current dir |
2222+| `nix-shell --pure` | same, but outside env is inaccessible |
23232424## NixOS declarative operating system configuration management
25252626-| command | result | notes |
2727-|:---|:---|:---|
2828-| edit `/etc/nixos/configuration.nix` | define new system configuration | running system is unaffected |
2929-| `nixos-rebuild switch` | switch to the configuration defined in `/etc/nixos/configuration.nix` | atomic* |
3030-| `nixos-rebuild switch --rollback` | switch to previous configuration | atomic* |
3131-| `nixos-option <option>` | show option value and documentation | also try [search.nixos.org/options](https://search.nixos.org/options) |
2626+| command | result | notes |
2727+| :---------------------------------- | :-------------------------------------------------------------------- | :-------------------------------------------------------------------- |
2828+| edit `/etc/nixos/configuration.nix` | define new system configuration | running system is unaffected |
2929+| `nixos-rebuild switch` | switch to the configuration defined in `/etc/nixos/configuration.nix` | atomic\* |
3030+| `nixos-rebuild switch --rollback` | switch to previous configuration | atomic\* |
3131+| `nixos-option <option>` | show option value and documentation | also try [search.nixos.org/options](https://search.nixos.org/options) |
32323333-*services can fail to start
3333+\*services can fail to start