2023-11-15 16:09:47 +00:00
|
|
|
##
|
|
|
|
# Nix Configuration
|
|
|
|
#
|
|
|
|
# @file
|
|
|
|
# @version 0.1
|
|
|
|
|
|
|
|
HOST ?= ziltis-desktop
|
|
|
|
DEVICE ?= nvme0n1
|
|
|
|
|
|
|
|
#configuration.nix: hosts/${HOST}.nix
|
|
|
|
# ln -s "$<" "$@"
|
|
|
|
|
|
|
|
disko: disko-config.nix
|
|
|
|
sed -i "s|.*DEVICE_NAME| device = \"/dev/$(DEVICE)\"; # DEVICE_NAME|g" disko-config.nix
|
|
|
|
nix run \
|
|
|
|
--extra-experimental-features nix-command \
|
|
|
|
--extra-experimental-features flakes \
|
|
|
|
github:nix-community/disko -- \
|
|
|
|
--mode disko \
|
|
|
|
./disko-config.nix
|
|
|
|
|
|
|
|
install-system: configuration.nix
|
|
|
|
sed -i "s|.*DEVICE_HOSTNAME| networking.hostName = \"$(HOST)\"; # DEVICE_HOSTNAME|g" configuration.nix
|
|
|
|
nixos-generate-config --no-filesystems --root /mnt
|
|
|
|
cp configuration.nix /mnt/etc/nixos
|
|
|
|
cp disko-config.nix /mnt/etc/nixos
|
|
|
|
nixos-install
|
|
|
|
|
2023-11-16 10:30:36 +00:00
|
|
|
install:
|
|
|
|
env NIXPKGS_ALLOW_BROKEN=1 nixos-rebuild switch --flake . --impure
|
|
|
|
|
2023-11-15 16:09:47 +00:00
|
|
|
# end
|