diff --git a/kamoshi.nix b/hosts/kamoshi/configuration.nix similarity index 98% rename from kamoshi.nix rename to hosts/kamoshi/configuration.nix index 479ac0d..f907c47 100644 --- a/kamoshi.nix +++ b/hosts/kamoshi/configuration.nix @@ -7,7 +7,7 @@ { imports = [ # Include the results of the hardware scan. - ./hardware-configuration.nix + /etc/nixos/hardware-configuration.nix ]; # Use the GRUB 2 boot loader. diff --git a/symlink.sh b/symlink.sh new file mode 100644 index 0000000..d09e458 --- /dev/null +++ b/symlink.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +HOST=`hostname` +if [[ ! -z "$1" ]]; then + HOST=$1 +fi + +if [[ ! -e "hosts/$HOST/configuration.nix" ]]; then + echo "missing config file for $HOST" >&2 + exit 1 +fi + +ln -f "hosts/$HOST/configuration.nix" .