diff --git a/config/hosts/athame/meta.nix b/config/hosts/athame/meta.nix index 563c018a..ec9cfdf9 100644 --- a/config/hosts/athame/meta.nix +++ b/config/hosts/athame/meta.nix @@ -1,4 +1,4 @@ -{ lib, config, ... }: with lib; { +{ lib, config, profiles, ... }: with lib; { config = { deploy.targets.infra = { tf = { @@ -22,7 +22,10 @@ config = { }; }; network.nodes.athame = { - imports = lib.hostImport "athame"; + imports = lib.hostImport { + hostName = "athame"; + inherit profiles; + }; networking = { hostName = "athame"; }; diff --git a/config/hosts/beltane/meta.nix b/config/hosts/beltane/meta.nix index 4e89b637..c3e90919 100644 --- a/config/hosts/beltane/meta.nix +++ b/config/hosts/beltane/meta.nix @@ -1,4 +1,4 @@ -{ lib, config, ... }: with lib; { +{ lib, config, profiles, ... }: with lib; { config = { deploy.targets.beltane = { tf = { @@ -13,7 +13,10 @@ }; }; network.nodes.beltane = { - imports = lib.hostImport "beltane"; + imports = lib.hostImport { + hostName = "beltane"; + inherit profiles; + }; networking = { hostName = "beltane"; }; diff --git a/config/hosts/dummy/meta.nix b/config/hosts/dummy/meta.nix index 55e1c22d..f8942ded 100644 --- a/config/hosts/dummy/meta.nix +++ b/config/hosts/dummy/meta.nix @@ -1,7 +1,10 @@ -{ lib, config, ... }: with lib; { +{ lib, config, profiles, ... }: with lib; { deploy.targets.dummy.enable = false; network.nodes.dummy = { - imports = lib.hostImport "dummy"; + imports = lib.hostImport { + hostName = "dummy"; + inherit profiles; + }; networking = { hostName = "dummy"; }; diff --git a/config/hosts/ostara/meta.nix b/config/hosts/ostara/meta.nix new file mode 100644 index 00000000..bd2f2da4 --- /dev/null +++ b/config/hosts/ostara/meta.nix @@ -0,0 +1,25 @@ +{ lib, config, profiles, ... }: with lib; { + config = { + deploy.targets.ostara = { + tf = { + resources.ostara = { + provider = "null"; + type = "resource"; + connection = { + port = 62954; + host = "192.168.1.245"; + }; + }; + }; + }; + network.nodes.ostara = { + imports = lib.hostImport { + hostName = "ostara"; + inherit profiles; + }; + networking = { + hostName = "ostara"; + }; + }; + }; +} diff --git a/config/hosts/samhain/meta.nix b/config/hosts/samhain/meta.nix index 804d98bc..22fdf83e 100644 --- a/config/hosts/samhain/meta.nix +++ b/config/hosts/samhain/meta.nix @@ -1,4 +1,4 @@ -{ lib, config, ... }: with lib; { +{ lib, config, profiles, ... }: with lib; { config = { deploy.targets.personal = { tf = { @@ -13,7 +13,10 @@ }; }; network.nodes.samhain = { - imports = lib.hostImport "samhain"; + imports = lib.hostImport { + hostName = "samhain"; + inherit profiles; + }; networking = { hostName = "samhain"; }; diff --git a/config/hosts/yule/meta.nix b/config/hosts/yule/meta.nix index 29c8c063..6fc2b6d9 100644 --- a/config/hosts/yule/meta.nix +++ b/config/hosts/yule/meta.nix @@ -1,4 +1,4 @@ -{ lib, config, ... }: with lib; { +{ lib, config, profiles, ... }: with lib; { config = { deploy.targets.personal = { tf = { @@ -13,7 +13,10 @@ }; }; network.nodes.yule = { - imports = lib.hostImport "yule"; + imports = lib.hostImport { + hostName = "yule"; + inherit profiles; + }; networking = { hostName = "yule"; }; diff --git a/pkgs/lib/host-import.nix b/pkgs/lib/host-import.nix index f0d04251..04bf6dcb 100644 --- a/pkgs/lib/host-import.nix +++ b/pkgs/lib/host-import.nix @@ -1,15 +1,11 @@ -{ lib }: hostName: with lib; filter builtins.pathExists [ +{ lib }: { hostName, profiles }: with lib; filter builtins.pathExists [ (../../config/hosts + "/${hostName}/nixos.nix") (../../config/trusted/hosts + "/${hostName}/nixos.nix") - ../../config/trusted/profile - ../../config/profiles/base -] ++ singleton { - options.home-manager.users = mkOption { - type = types.attrsOf (types.submoduleWith { - modules = filter builtins.pathExists [ - (../../config/hosts + "/${hostName}/home.nix") - (../../config/trusted/hosts + "/${hostName}/home.nix") - ]; - }); +] ++ profiles.base.imports ++ singleton { + home-manager.users.kat = { + imports = filter builtins.pathExists [ + (../../config/hosts + "/${hostName}/home.nix") + (../../config/trusted/hosts + "/${hostName}/home.nix") + ]; }; }