Home-manager and nixos system configuration using flakes!
Use it as a template for your nixos setup:)
Installation steps:
- Installation: Install NixOS.
- Clone repo
git clone git@github.com:spagnoloG/nixos-home.git ~/.config/home-manager
- Edit the username and hostname in
flake.nix
- Copy you
hardware-configuration.nix
file located at/etc/nixos/hardware-configuration.nix
to the host folder. - Enable Nix-Command and Flakes options: Edit your
configuration.nix
file located at /etc/nixos/configuration.nix adding this line ->nix.settings.experimental-features = [ "nix-command" "flakes" ];
. - Rebuild your system: run ->
sudo nixos-rebuild switch
. - Apply the flake: Open a terminal and inside
~/.config/home-manager/
runmake rebuild-os
.
When you modify any contents, you need to rebuild os. This will create a new nixos
generation.
Rebuilding:
make rebuild-os
Formatting all *nix
and *lua
files:
make format
Cleaning up old generations:
make clean-os