Kieran's opinionated (and probably slightly dumb) nix config
at main 72 lines 1.6 kB view raw view rendered
1# Installation 2 3> **Warning:** This configuration will not work without changing the [secrets](https://github.com/taciturnaxolotl/dots/tree/main/secrets) since they are encrypted with agenix. 4 5## macOS with nix-darwin 6 71. Install Nix: 8 9```bash 10curl -fsSL https://install.determinate.systems/nix | sh -s -- install 11``` 12 132. Clone and apply: 14 15```bash 16git clone git@github.com:taciturnaxolotl/dots.git 17cd dots 18darwin-rebuild switch --flake .#atalanta 19``` 20 21## Home Manager 22 23Install Nix, copy SSH keys, then: 24 25```bash 26curl -fsSL https://install.determinate.systems/nix | sh -s -- install --determinate 27git clone git@github.com:taciturnaxolotl/dots.git 28cd dots 29nix-shell -p home-manager 30home-manager switch --flake .#nest 31``` 32 33Set up [atuin](https://atuin.sh/) for shell history sync: 34 35```bash 36atuin login 37atuin import 38``` 39 40## NixOS 41 42### Using nixos-anywhere (recommended for remote) 43 44> Only works with `prattle` and `terebithia` which have disko configs. 45 46```bash 47nix run github:nix-community/nixos-anywhere -- \ 48 --flake .#prattle \ 49 --generate-hardware-config nixos-facter ./machines/prattle/facter.json \ 50 --build-on-remote \ 51 root@<ip-address> 52``` 53 54### Using the install script 55 56```bash 57curl -L https://raw.githubusercontent.com/taciturnaxolotl/dots/main/install.sh -o install.sh 58chmod +x install.sh 59./install.sh 60``` 61 62### Post-install 63 64After first boot, log in with user `kierank` and the default password, then: 65 66```bash 67passwd kierank 68sudo mv /etc/nixos ~/dots 69sudo ln -s ~/dots /etc/nixos 70sudo chown -R $(id -un):users ~/dots 71atuin login && atuin sync 72```