README (1502B)
1 Flake 2 ===== 3 4 Francesco Saccone's Nix flake. 5 6 NixOS configurations 7 -------------------- 8 9 - laptop: Designed for my laptop. 10 - main-server: Designed for my main server. 11 - git-server: Designed for my Git server. 12 13 Home Manager configurations 14 --------------------------- 15 16 - francesco: Designed for my daily needs, very minimalist and lightweight. 17 18 Installation 19 ------------ 20 21 When installing a configuration, I prefer to use different methods based on the 22 target machine. 23 24 When I want to install a server, my choice is nixos-anywhere: 25 26 $ nixos-anywhere --generate-hardware-config nixos-generate-config \ 27 hardware/server/default.nix --flake .#server <root@url> 28 29 See <https://nix-community.github.io/nixos-anywhere> for more information. 30 31 When instead I want to install my laptop configuration I would retrieve the 32 official minimal ISO image from <https://nixos.org/download>, clone this 33 repository, generate the hardware configuration file and use nixos-install: 34 35 $ nixos-generate-config --show-hardware-config > hardware/laptop/default.nix 36 # nixos-install --root /mnt --flake .#laptop --no-root-password --option \ 37 extra-experimental-features 'nix-command flakes pipe-operators' 38 39 Usage 40 ----- 41 42 When the server configuration changes, I rebuild the machine using 43 nixos-rebuild through SSH: 44 45 $ nixos-rebuild switch --flake .#server --target-host <root@url> 46 47 When the laptop configuration changes, I rebuild my laptop using nixos-rebuild: 48 49 # nixos-rebuild switch --flake .#laptop 50