My unified nix flake for all configuration management.
Find a file
2023-09-05 23:51:32 -05:00
fish Fully modularized the thinker config 2023-09-05 23:11:14 -05:00
modules Modular stuff now working on thinker! 2023-09-05 23:51:32 -05:00
nixos Modular stuff now working on thinker! 2023-09-05 23:51:32 -05:00
old Cleanup and some modularization 2023-09-05 22:39:17 -05:00
scripts/bin Move 2023-09-05 15:15:43 -05:00
secrets Initial commit 2023-09-04 11:40:30 -05:00
.sops.yaml Initial commit 2023-09-04 11:40:30 -05:00
daniel.nix Modular stuff now working on thinker! 2023-09-05 23:51:32 -05:00
disko.nix Merge remote-tracking branch 'origin/main' 2023-09-05 15:49:05 -05:00
flake.lock Integrate rtx 2023-09-05 15:58:13 -05:00
flake.nix Cleanup and some modularization 2023-09-05 22:39:17 -05:00
home.nix Unify nixos configs 2023-09-05 21:46:55 -05:00
nixos.nix Modular stuff now working on thinker! 2023-09-05 23:51:32 -05:00
readme.md Move big fish scripts to their own files 2023-09-05 10:33:20 -05:00

zomg nixos

TODO: overhaul this readme

$ ssh -t beefcake 'cdd && pwd && g pl && cd os/linux/nix && sudo nixos-rebuild switch --flake .# && echo DONE'

Or for pushing:

# do once to setup
$ ssh -t beefcake 'cdd && git config receive.denyCurrentBranch updateInstead'

# probably regenerate and commit flake.lock from this directory
nix flake lock

# push and rebuild+switch
$ git push beefcake:~/.config/lytedev-dotfiles
$ ssh -t beefcake 'cd ~/.config/lytedev-dotfiles/os/linux/nix && sudo nixos-rebuild switch --flake .# && echo DONE'

Install For Home Manager

home-manager switch --flake .#daniel

Install From NixOS Bootable Media

Documented below is my process for standing up a new NixOS node configured and managed by this flake.

Network Access

Boot the ISO (via Ventoy USB drive) and establish network access:

# plug in ethernet or do the wpa_cli song and dance
# scan if needed
wpa_cli scan
wpa_cli scan_results

wpa_cli add_network 0
wpa_cli set_network 0 ssid "MY_SSID"
wpa_cli set_network 0 psk "MY_WIFI_PASSWORD"
wpa_cli enable_network 0
wpa_cli save_config

Partition and mount disk(s) however you like. Preferably, though, use a disko configuration from this flake like so:

sudo nix-shell --packages git --run "
  nix run \
    --extra-experimental-features nix-command \
    --extra-experimental-features flakes \
    github:nix-community/disko -- \
      --flake 'git+https://git.lyte.dev/lytedev/nix#diskoConfigOfChoice' \
      --mode disko \
      --arg disks '[ \"/dev/your_disk\" ]'
"

And finally install NixOS as specified by this flake:

nix-shell --packages git \
  --run "
    sudo nixos-install \
      --flake 'git+https://git.lyte.dev/lytedev/nix#yourNixosConfig'
  "

NOTE: This takes a while, mostly due to building Helix myself on each box. I really need to figure out a good local caching setup.

Ops stuff

Other To Dos

  • TODO: check stuff during receive with a hook?