diff --git a/flake.nix b/flake.nix index db74320..b1babdf 100644 --- a/flake.nix +++ b/flake.nix @@ -49,7 +49,7 @@ { self, nixpkgs, ... }@inputs: let inherit (nixpkgs) lib; - my = import ./lib { inherit lib inputs self; }; + my = import ./lib.nix { inherit lib inputs self; }; in { # Helper functions for discovering and building hosts. diff --git a/lib/default.nix b/lib.nix similarity index 77% rename from lib/default.nix rename to lib.nix index 3fa5dc1..6447e30 100644 --- a/lib/default.nix +++ b/lib.nix @@ -46,17 +46,15 @@ let inherit inputs; my = self.lib; }; - modules = - (collectNixFiles (self + "/modules")) - ++ [ - inputs.home-manager.nixosModules.home-manager - inputs.chaotic.nixosModules.default - inputs.disko.nixosModules.disko - inputs.sops-nix.nixosModules.sops - (self + "/system") - (self + "/hosts/${hostName}") - { networking.hostName = hostName; } - ]; + modules = (collectNixFiles (self + "/modules")) ++ [ + inputs.home-manager.nixosModules.home-manager + inputs.chaotic.nixosModules.default + inputs.disko.nixosModules.disko + inputs.sops-nix.nixosModules.sops + (self + "/system.nix") + (self + "/hosts/${hostName}") + { networking.hostName = hostName; } + ]; }; # Discover every host (a subdirectory of `hostsDir`) and build each one. diff --git a/system/default.nix b/system.nix similarity index 98% rename from system/default.nix rename to system.nix index f638be6..9fd38dd 100644 --- a/system/default.nix +++ b/system.nix @@ -93,7 +93,7 @@ in # satisfy the secret below. # Clearing both `sshKeyPaths` defaults keeps the SSH host keys out of the # decryption path. - sops.defaultSopsFile = ../secrets/shared.yaml; + sops.defaultSopsFile = ./secrets/shared.yaml; sops.age.keyFile = "/var/lib/sops-nix/key.txt"; sops.age.sshKeyPaths = [ ]; sops.gnupg.sshKeyPaths = [ ];