diff --git a/flake.nix b/flake.nix index c56436c..ba5e01f 100644 --- a/flake.nix +++ b/flake.nix @@ -56,7 +56,7 @@ } ) allPkgs; - in rec { + in { nixosConfigurations = import ./hosts {inherit lib tlib inputs;}; packages = lib.mapAttrs (_: pkgs: pkgs._exported) allPkgs; diff --git a/hosts/wolumonde/default.nix b/hosts/wolumonde/default.nix index bd732e5..6c7bec3 100644 --- a/hosts/wolumonde/default.nix +++ b/hosts/wolumonde/default.nix @@ -6,20 +6,11 @@ ... }: { imports = let - files = - lib.filterAttrs - (name: type: type == "regular" && name != "default.nix") - (builtins.readDir (toString ./.)); + b = builtins; + modules = toString ./modules; + files = b.readDir modules; filesToImport = - builtins.map - ( - name: - builtins.path { - inherit name; - path = "${toString ./.}/${name}"; - } - ) - (builtins.attrNames files); + b.map (name: "${modules}/${name}") (b.attrNames files); in filesToImport; diff --git a/hosts/wolumonde/bernbot.nix b/hosts/wolumonde/modules/bernbot.nix similarity index 100% rename from hosts/wolumonde/bernbot.nix rename to hosts/wolumonde/modules/bernbot.nix diff --git a/hosts/wolumonde/blog.nix b/hosts/wolumonde/modules/blog.nix similarity index 100% rename from hosts/wolumonde/blog.nix rename to hosts/wolumonde/modules/blog.nix diff --git a/hosts/wolumonde/gitea.nix b/hosts/wolumonde/modules/gitea.nix similarity index 100% rename from hosts/wolumonde/gitea.nix rename to hosts/wolumonde/modules/gitea.nix diff --git a/hosts/wolumonde/hardware-configuration.nix b/hosts/wolumonde/modules/hardware-configuration.nix similarity index 100% rename from hosts/wolumonde/hardware-configuration.nix rename to hosts/wolumonde/modules/hardware-configuration.nix diff --git a/hosts/wolumonde/nginx.nix b/hosts/wolumonde/modules/nginx.nix similarity index 100% rename from hosts/wolumonde/nginx.nix rename to hosts/wolumonde/modules/nginx.nix diff --git a/hosts/wolumonde/nixinate.nix b/hosts/wolumonde/modules/nixinate.nix similarity index 100% rename from hosts/wolumonde/nixinate.nix rename to hosts/wolumonde/modules/nixinate.nix diff --git a/hosts/wolumonde/ssh.nix b/hosts/wolumonde/modules/ssh.nix similarity index 100% rename from hosts/wolumonde/ssh.nix rename to hosts/wolumonde/modules/ssh.nix