mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
Making the host import system take profiles as an argument
This commit is contained in:
parent
8446e95a5f
commit
526d03d18e
7 changed files with 57 additions and 21 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, config, ... }: with lib; {
|
{ lib, config, profiles, ... }: with lib; {
|
||||||
config = {
|
config = {
|
||||||
deploy.targets.infra = {
|
deploy.targets.infra = {
|
||||||
tf = {
|
tf = {
|
||||||
|
|
@ -22,7 +22,10 @@ config = {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
network.nodes.athame = {
|
network.nodes.athame = {
|
||||||
imports = lib.hostImport "athame";
|
imports = lib.hostImport {
|
||||||
|
hostName = "athame";
|
||||||
|
inherit profiles;
|
||||||
|
};
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "athame";
|
hostName = "athame";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, config, ... }: with lib; {
|
{ lib, config, profiles, ... }: with lib; {
|
||||||
config = {
|
config = {
|
||||||
deploy.targets.beltane = {
|
deploy.targets.beltane = {
|
||||||
tf = {
|
tf = {
|
||||||
|
|
@ -13,7 +13,10 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
network.nodes.beltane = {
|
network.nodes.beltane = {
|
||||||
imports = lib.hostImport "beltane";
|
imports = lib.hostImport {
|
||||||
|
hostName = "beltane";
|
||||||
|
inherit profiles;
|
||||||
|
};
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "beltane";
|
hostName = "beltane";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,10 @@
|
||||||
{ lib, config, ... }: with lib; {
|
{ lib, config, profiles, ... }: with lib; {
|
||||||
deploy.targets.dummy.enable = false;
|
deploy.targets.dummy.enable = false;
|
||||||
network.nodes.dummy = {
|
network.nodes.dummy = {
|
||||||
imports = lib.hostImport "dummy";
|
imports = lib.hostImport {
|
||||||
|
hostName = "dummy";
|
||||||
|
inherit profiles;
|
||||||
|
};
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "dummy";
|
hostName = "dummy";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
25
config/hosts/ostara/meta.nix
Normal file
25
config/hosts/ostara/meta.nix
Normal file
|
|
@ -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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, config, ... }: with lib; {
|
{ lib, config, profiles, ... }: with lib; {
|
||||||
config = {
|
config = {
|
||||||
deploy.targets.personal = {
|
deploy.targets.personal = {
|
||||||
tf = {
|
tf = {
|
||||||
|
|
@ -13,7 +13,10 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
network.nodes.samhain = {
|
network.nodes.samhain = {
|
||||||
imports = lib.hostImport "samhain";
|
imports = lib.hostImport {
|
||||||
|
hostName = "samhain";
|
||||||
|
inherit profiles;
|
||||||
|
};
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "samhain";
|
hostName = "samhain";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, config, ... }: with lib; {
|
{ lib, config, profiles, ... }: with lib; {
|
||||||
config = {
|
config = {
|
||||||
deploy.targets.personal = {
|
deploy.targets.personal = {
|
||||||
tf = {
|
tf = {
|
||||||
|
|
@ -13,7 +13,10 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
network.nodes.yule = {
|
network.nodes.yule = {
|
||||||
imports = lib.hostImport "yule";
|
imports = lib.hostImport {
|
||||||
|
hostName = "yule";
|
||||||
|
inherit profiles;
|
||||||
|
};
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "yule";
|
hostName = "yule";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -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/hosts + "/${hostName}/nixos.nix")
|
||||||
(../../config/trusted/hosts + "/${hostName}/nixos.nix")
|
(../../config/trusted/hosts + "/${hostName}/nixos.nix")
|
||||||
../../config/trusted/profile
|
] ++ profiles.base.imports ++ singleton {
|
||||||
../../config/profiles/base
|
home-manager.users.kat = {
|
||||||
] ++ singleton {
|
imports = filter builtins.pathExists [
|
||||||
options.home-manager.users = mkOption {
|
(../../config/hosts + "/${hostName}/home.nix")
|
||||||
type = types.attrsOf (types.submoduleWith {
|
(../../config/trusted/hosts + "/${hostName}/home.nix")
|
||||||
modules = filter builtins.pathExists [
|
];
|
||||||
(../../config/hosts + "/${hostName}/home.nix")
|
|
||||||
(../../config/trusted/hosts + "/${hostName}/home.nix")
|
|
||||||
];
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue