Commit 8e14b45
Changed files (4)
modules
modules/flake/meta.nix
@@ -6,7 +6,7 @@
prefix = mkOption {
type = types.str;
default = "host/";
- description = "Prefix for the host";
+ description = "Prefix for hosts";
};
hosts = mkOption {
type = types.attrsOf perHostOption;
@@ -28,12 +28,21 @@
};
};
};
+
+ servicesOption = {
+ prefix = mkOption {
+ type = types.str;
+ default = "service/";
+ description = "Prefix for services";
+ };
+ };
in
mkOption {
type = types.submodule {
freeformType = types.lazyAttrsOf types.anything;
options = {
host = hostsOption;
+ service = servicesOption;
};
};
};
modules/hosts/chaser-kevin/default.nix
@@ -16,6 +16,12 @@
user-root
user-hpcesia
])
+ ++ (
+ map
+ (n: config.flake.modules.nixos."${config.flake.meta.service.prefix}${n}")
+ [
+ ]
+ )
++ [
{
home-manager.users.hpcesia = {
modules/hosts/chaser-pardofelis/default.nix
@@ -4,9 +4,16 @@
hostPubKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEuT/WkeA7btTeATmWJ2O9f/A6FI0Gl/1KjPGfHbWD5C root@pardofelis";
};
flake.modules.nixos."hosts/pardofelis" = {
- imports = with config.flake.modules.nixos; [
- core
- user-root
- ];
+ imports =
+ (with config.flake.modules.nixos; [
+ core
+ user-root
+ ])
+ ++ (
+ map
+ (n: config.flake.modules.nixos."${config.flake.meta.service.prefix}${n}")
+ [
+ ]
+ );
};
}
modules/services/prefix.nix
@@ -0,0 +1,3 @@
+{
+ flake.meta.service.prefix = "services/";
+}