Hosts
The flake builds two NixOS hosts. Both import conf/shared.nix and then add
machine-specific options from conf/machines/{machine}/configuration.nix.
nix-haxorus
ThinkPad configuration.
Files:
conf/machines/thinkpad/configuration.nixconf/machines/thinkpad/hardware-configuration.nix
Flake target:
sudo nixos-rebuild test --flake .#nix-haxorus
sudo nixos-rebuild switch --flake .#nix-haxorus
Host-specific settings:
- hostname:
nix-haxorus - thermal daemon enabled
- TLP enabled
power-profiles-daemondisabled- default TLP mode set to battery
- CPU governor set to
performanceon AC andpowersaveon battery - fingerprint daemon enabled
owais-nix-hp
HP configuration.
Files:
conf/machines/hp/configuration.nixconf/machines/hp/hardware-configuration.nix
Flake target:
sudo nixos-rebuild test --flake .#owais-nix-hp
sudo nixos-rebuild switch --flake .#owais-nix-hp
Host-specific settings:
- hostname:
owais-nix-hp
The HP file currently only imports shared config and hardware config.
Add another host
-
Create
conf/machines/{machine}/. -
Generate hardware config:
sudo nixos-generate-config --show-hardware-config \ > conf/machines/{machine}/hardware-configuration.nix -
Add
configuration.nixthat imports hardware config and(import ../../shared.nix).nixos. -
Set
networking.hostName. -
Add a
nixosConfigurations.{hostname}entry inflake.nix. -
Test before switching:
sudo nixos-rebuild test --flake .#{hostname}