A configuration for NixOS that I personally daily drive
- Flakes + Home Manager
- Multiple configurations in a single config (see below)
- Dotfiles are packaged with the configurations and automatically symlinked using home manager
-
Clone the Repository on the New Machine:
git clone https://github.com/TheDenast/nixos-config.git /home/denast/.nixos-config
-
Select configuration to build. Currently available:
asus-ga401iu
framework-13
-
Rebuild the System with the New Configuration:
sudo nixos-rebuild switch --flake /home/denast/.nixos-config#{configuration}
Where
{configuration}
is your configuration of choice
Since the configuration uses flakes to overwrite pinned nixpkgs version, in order to complete the system update you have to update the flake.lock first
-
Update flake.lock
cd /home/denast/.nixos-config nix flake update
-
Rebuild the system with new flake.lock
sudo nixos-rebuild switch --flake /home/denast/.nixos-config#{configuration}
-
If the update went well, commit and push the changes
git add . git commit -m "Flake update" git push
-
Make changes to the configuration:
cd /home/denast/.nixos-config nvim configuration.nix # or any other editor
-
Rebuild the system to test the changes:
sudo nixos-rebuild switch --flake /home/denast/.nixos-config#{configuration}
-
If all went well, commit and push the changes:
git add . git commit -m "specify what you changed here" git push