- Nix 92.2%
- Shell 7.8%
| .forgejo/workflows | ||
| hosts | ||
| modules | ||
| .gitignore | ||
| CHEATSHEET.md | ||
| flake.lock | ||
| flake.nix | ||
| README.md | ||
| rebuild | ||
nixos-config
My Nixos flake configs. Not much to say, for now it's fairly self explanatory if you know NixOS.
I have a terrible memory, day-to-day commands are in CHEATSHEET.md.
Reinstalling an existing host
-
Install minimal NixOS, clone this repo and
cdinto it. -
Overwrite the host's hardware scan with the one the installer just generated (picks up any disk-layout changes, or new hardware):
HOST=gammelerik cp /etc/nixos/hardware-configuration.nix hosts/$HOST/ -
Build:
./rebuild switch $HOST -
Reboot, then commit if the hardware scan changed.
Adding a new host
-
Install minimal NixOS, then clone this repo and
cdinto it. -
Copy the install's hardware scan and an existing host as a starting point:
HOST=mynewbox mkdir -p hosts/$HOST cp /etc/nixos/hardware-configuration.nix hosts/$HOST/ cp hosts/gammelerik/configuration.nix hosts/$HOST/configuration.nixEdit
configuration.nix— at least setnetworking.hostName. -
Add a
nixosConfigurations.$HOSTentry in flake.nix with the modules you want (alwayscommon.nix, thendesktop,sway,hyprland,virtualizationetc. as needed). -
git addthe new files (Nix ignores untracked files), then build:git add hosts/$HOST flake.nix ./rebuild switch $HOST -
Reboot, then commit.
Dotfiles
Go to https://code.kesu.no/mrkesu/work-config (private for now, TODO: public)