mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-05-31 20:00:51 +02:00
refactor: Use haumea for filesystem-based module system for flake outputs
refactor: Use hyphen(`-`) for variable names & folder names(except Python), replace all unserscore(`_`) with hyphen(`-`).
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
{
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
} @ args: let
|
||||
inherit (inputs) haumea;
|
||||
|
||||
# Contains all the flake outputs of this system architecture.
|
||||
data = haumea.lib.load {
|
||||
src = ./src;
|
||||
inputs = args;
|
||||
};
|
||||
# nix file names is redundant, so we remove it.
|
||||
dataWithoutPaths = builtins.attrValues data;
|
||||
|
||||
# Merge all the machine's data into a single attribute set.
|
||||
outputs = {
|
||||
nixosConfigurations = lib.attrsets.mergeAttrsList (map (it: it.nixosConfigurations or {}) dataWithoutPaths);
|
||||
packages = lib.attrsets.mergeAttrsList (map (it: it.packages or {}) dataWithoutPaths);
|
||||
# colmena contains some meta info, which need to be merged carefully.
|
||||
colmena-meta = {
|
||||
nodeNixpkgs = lib.attrsets.mergeAttrsList (map (it: it.colmena-meta.nodeNixpkgs or {}) dataWithoutPaths);
|
||||
nodeSpecialArgs = lib.attrsets.mergeAttrsList (map (it: it.colmena-meta.nodeSpecialArgs or {}) dataWithoutPaths);
|
||||
};
|
||||
colmena = lib.attrsets.mergeAttrsList (map (it: it.colmena or {}) dataWithoutPaths);
|
||||
};
|
||||
in
|
||||
outputs
|
||||
// {
|
||||
inherit data; # for debugging purposes
|
||||
|
||||
# NixOS's unit tests.
|
||||
# unit-tests = haumea.lib.loadEvalTests {
|
||||
# src = ./tests;
|
||||
# inputs = args;
|
||||
# };
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
{
|
||||
# NOTE: the args not used in this file CAN NOT be removed!
|
||||
# because haumea pass argument lazily,
|
||||
# and these arguments are used in the functions like `mylib.nixosSystem`, `mylib.colmenaSystem`, etc.
|
||||
inputs,
|
||||
lib,
|
||||
myvars,
|
||||
mylib,
|
||||
system,
|
||||
genSpecialArgs,
|
||||
...
|
||||
} @ args: let
|
||||
# Shoukei (祥瓊, Shōkei)
|
||||
name = "shoukei";
|
||||
base-modules = {
|
||||
nixos-modules = map mylib.relativeToRoot [
|
||||
# common
|
||||
"secrets/nixos.nix"
|
||||
"modules/nixos/desktop.nix"
|
||||
# host specific
|
||||
"hosts/12kingdoms-${name}"
|
||||
];
|
||||
home-module.imports = map mylib.relativeToRoot [
|
||||
# common
|
||||
"home/linux/desktop.nix"
|
||||
# host specific
|
||||
"hosts/12kindoms-${name}/home.nix"
|
||||
];
|
||||
};
|
||||
|
||||
modules-i3 = {
|
||||
nixos-modules =
|
||||
[
|
||||
{
|
||||
modules.desktop.xorg.enable = true;
|
||||
modules.secrets.desktop.enable = true;
|
||||
modules.secrets.impermanence.enable = true;
|
||||
}
|
||||
]
|
||||
++ base-modules.nixos-modules;
|
||||
home-module.imports =
|
||||
[
|
||||
{modules.desktop.i3.enable = true;}
|
||||
]
|
||||
++ base-modules.home-module.imports;
|
||||
};
|
||||
|
||||
modules-hyprland = {
|
||||
nixos-modules =
|
||||
[
|
||||
{
|
||||
modules.desktop.wayland.enable = true;
|
||||
modules.secrets.desktop.enable = true;
|
||||
modules.secrets.impermanence.enable = true;
|
||||
}
|
||||
]
|
||||
++ base-modules.nixos-modules;
|
||||
home-module.imports =
|
||||
[
|
||||
{modules.desktop.hyprland.enable = true;}
|
||||
]
|
||||
++ base-modules.home-module.imports;
|
||||
};
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
# with i3 window manager
|
||||
"${name}-i3" = mylib.nixosSystem (modules-i3 // args);
|
||||
# host with hyprland compositor
|
||||
"${name}-hyprland" = mylib.nixosSystem (modules-hyprland // args);
|
||||
};
|
||||
|
||||
# generate iso image for hosts with desktop environment
|
||||
packages = {
|
||||
"${name}-i3" = inputs.self.nixosConfigurations."${name}-i3".config.formats.iso;
|
||||
"${name}-hyprland" = inputs.self.nixosConfigurations."${name}-hyprland".config.formats.iso;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
{
|
||||
# NOTE: the args not used in this file CAN NOT be removed!
|
||||
# because haumea pass argument lazily,
|
||||
# and these arguments are used in the functions like `mylib.nixosSystem`, `mylib.colmenaSystem`, etc.
|
||||
inputs,
|
||||
lib,
|
||||
mylib,
|
||||
myvars,
|
||||
system,
|
||||
genSpecialArgs,
|
||||
...
|
||||
} @ args: let
|
||||
name = "tailscale-gw";
|
||||
tags = [name "homelab-network"];
|
||||
ssh-user = "root";
|
||||
|
||||
modules = {
|
||||
nixos-modules = map mylib.relativeToRoot [
|
||||
# common
|
||||
"secrets/nixos.nix"
|
||||
"modules/nixos/server/server.nix"
|
||||
"modules/nixos/server/proxmox-hardware-configuration.nix"
|
||||
# host specific
|
||||
"hosts/homelab-${name}"
|
||||
];
|
||||
};
|
||||
|
||||
systemArgs = modules // args;
|
||||
in {
|
||||
nixosConfigurations.${name} = mylib.nixosSystem systemArgs;
|
||||
|
||||
colmena.${name} =
|
||||
mylib.colmenaSystem (systemArgs // {inherit tags ssh-user;});
|
||||
|
||||
# generate proxmox image for virtual machines without desktop environment
|
||||
packages.${name} = inputs.self.nixosConfigurations.${name}.config.formats.proxmox;
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
{
|
||||
# NOTE: the args not used in this file CAN NOT be removed!
|
||||
# because haumea pass argument lazily,
|
||||
# and these arguments are used in the functions like `mylib.nixosSystem`, `mylib.colmenaSystem`, etc.
|
||||
inputs,
|
||||
lib,
|
||||
myvars,
|
||||
mylib,
|
||||
system,
|
||||
genSpecialArgs,
|
||||
...
|
||||
} @ args: let
|
||||
# 星野 アイ, Hoshino Ai
|
||||
name = "ai";
|
||||
base-modules = {
|
||||
nixos-modules = map mylib.relativeToRoot [
|
||||
# common
|
||||
"secrets/nixos.nix"
|
||||
"modules/nixos/desktop.nix"
|
||||
# host specific
|
||||
"hosts/idols-${name}"
|
||||
];
|
||||
home-module.imports = map mylib.relativeToRoot [
|
||||
# common
|
||||
"home/linux/desktop.nix"
|
||||
# host specific
|
||||
"hosts/idols-${name}/home.nix"
|
||||
];
|
||||
};
|
||||
|
||||
modules-i3 = {
|
||||
nixos-modules =
|
||||
[
|
||||
{
|
||||
modules.desktop.xorg.enable = true;
|
||||
modules.secrets.desktop.enable = true;
|
||||
modules.secrets.impermanence.enable = true;
|
||||
}
|
||||
]
|
||||
++ base-modules.nixos-modules;
|
||||
home-module.imports =
|
||||
[
|
||||
{modules.desktop.i3.enable = true;}
|
||||
]
|
||||
++ base-modules.home-module.imports;
|
||||
};
|
||||
|
||||
modules-hyprland = {
|
||||
nixos-modules =
|
||||
[
|
||||
{
|
||||
modules.desktop.wayland.enable = true;
|
||||
modules.secrets.desktop.enable = true;
|
||||
modules.secrets.impermanence.enable = true;
|
||||
}
|
||||
]
|
||||
++ base-modules.nixos-modules;
|
||||
home-module.imports =
|
||||
[
|
||||
{modules.desktop.hyprland.enable = true;}
|
||||
]
|
||||
++ base-modules.home-module.imports;
|
||||
};
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
# with i3 window manager
|
||||
"${name}-i3" = mylib.nixosSystem (modules-i3 // args);
|
||||
# host with hyprland compositor
|
||||
"${name}-hyprland" = mylib.nixosSystem (modules-hyprland // args);
|
||||
};
|
||||
|
||||
# generate iso image for hosts with desktop environment
|
||||
packages = {
|
||||
"${name}-i3" = inputs.self.nixosConfigurations."${name}-i3".config.formats.iso;
|
||||
"${name}-hyprland" = inputs.self.nixosConfigurations."${name}-hyprland".config.formats.iso;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
# NOTE: the args not used in this file CAN NOT be removed!
|
||||
# because haumea pass argument lazily,
|
||||
# and these arguments are used in the functions like `mylib.nixosSystem`, `mylib.colmenaSystem`, etc.
|
||||
inputs,
|
||||
lib,
|
||||
mylib,
|
||||
myvars,
|
||||
system,
|
||||
genSpecialArgs,
|
||||
...
|
||||
} @ args: let
|
||||
# 星野 愛久愛海, Hoshino Akuamarin
|
||||
name = "aquamarine";
|
||||
tags = ["aqua" "homelab-network"];
|
||||
ssh-user = "root";
|
||||
|
||||
modules = {
|
||||
nixos-modules =
|
||||
(map mylib.relativeToRoot [
|
||||
# common
|
||||
"secrets/nixos.nix"
|
||||
"modules/nixos/server/server.nix"
|
||||
"modules/nixos/server/proxmox-hardware-configuration.nix"
|
||||
# host specific
|
||||
"hosts/idols-${name}"
|
||||
])
|
||||
++ [
|
||||
{modules.secrets.server.network.enable = true;}
|
||||
];
|
||||
};
|
||||
|
||||
systemArgs = modules // args;
|
||||
in {
|
||||
nixosConfigurations.${name} = mylib.nixosSystem systemArgs;
|
||||
|
||||
colmena.${name} =
|
||||
mylib.colmenaSystem (systemArgs // {inherit tags ssh-user;});
|
||||
|
||||
# generate proxmox image for virtual machines without desktop environment
|
||||
packages.${name} = inputs.self.nixosConfigurations.${name}.config.formats.proxmox;
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
# NOTE: the args not used in this file CAN NOT be removed!
|
||||
# because haumea pass argument lazily,
|
||||
# and these arguments are used in the functions like `mylib.nixosSystem`, `mylib.colmenaSystem`, etc.
|
||||
inputs,
|
||||
lib,
|
||||
mylib,
|
||||
myvars,
|
||||
system,
|
||||
genSpecialArgs,
|
||||
...
|
||||
} @ args: let
|
||||
# 有馬 かな, Arima Kana
|
||||
name = "kana";
|
||||
tags = [name "homelab-app"];
|
||||
ssh-user = "root";
|
||||
|
||||
modules = {
|
||||
nixos-modules =
|
||||
(map mylib.relativeToRoot [
|
||||
# common
|
||||
"secrets/nixos.nix"
|
||||
"modules/nixos/server/server.nix"
|
||||
"modules/nixos/server/proxmox-hardware-configuration.nix"
|
||||
# host specific
|
||||
"hosts/idols-${name}"
|
||||
])
|
||||
++ [
|
||||
{modules.secrets.server.application.enable = true;}
|
||||
];
|
||||
};
|
||||
|
||||
systemArgs = modules // args;
|
||||
in {
|
||||
nixosConfigurations.${name} = mylib.nixosSystem systemArgs;
|
||||
|
||||
colmena.${name} =
|
||||
mylib.colmenaSystem (systemArgs // {inherit tags ssh-user;});
|
||||
|
||||
# generate proxmox image for virtual machines without desktop environment
|
||||
packages.${name} = inputs.self.nixosConfigurations.${name}.config.formats.proxmox;
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
{
|
||||
# NOTE: the args not used in this file CAN NOT be removed!
|
||||
# because haumea pass argument lazily,
|
||||
# and these arguments are used in the functions like `mylib.nixosSystem`, `mylib.colmenaSystem`, etc.
|
||||
inputs,
|
||||
lib,
|
||||
mylib,
|
||||
myvars,
|
||||
system,
|
||||
genSpecialArgs,
|
||||
...
|
||||
} @ args: let
|
||||
# 星野 瑠美衣, Hoshino Rubii
|
||||
name = "ruby";
|
||||
tags = [name "homelab-operation"];
|
||||
ssh-user = "root";
|
||||
|
||||
modules = {
|
||||
nixos-modules =
|
||||
(map mylib.relativeToRoot [
|
||||
# common
|
||||
"secrets/nixos.nix"
|
||||
"modules/nixos/server/server.nix"
|
||||
"modules/nixos/server/proxmox-hardware-configuration.nix"
|
||||
# host specific
|
||||
"hosts/idols-${name}"
|
||||
])
|
||||
++ [
|
||||
{modules.secrets.server.operation.enable = true;}
|
||||
];
|
||||
home-modules.imports = map mylib.relativeToRoot [
|
||||
"home/linux/server.nix"
|
||||
];
|
||||
};
|
||||
|
||||
systemArgs = modules // args;
|
||||
in {
|
||||
nixosConfigurations.${name} = mylib.nixosSystem systemArgs;
|
||||
|
||||
colmena.${name} =
|
||||
mylib.colmenaSystem (systemArgs // {inherit tags ssh-user;});
|
||||
|
||||
# generate proxmox image for virtual machines without desktop environment
|
||||
packages.${name} = inputs.self.nixosConfigurations.${name}.config.formats.proxmox;
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
{
|
||||
# NOTE: the args not used in this file CAN NOT be removed!
|
||||
# because haumea pass argument lazily,
|
||||
# and these arguments are used in the functions like `mylib.nixosSystem`, `mylib.colmenaSystem`, etc.
|
||||
inputs,
|
||||
lib,
|
||||
mylib,
|
||||
myvars,
|
||||
system,
|
||||
genSpecialArgs,
|
||||
...
|
||||
} @ args: let
|
||||
name = "k3s-prod-1-master-1";
|
||||
tags = [name];
|
||||
ssh-user = "root";
|
||||
|
||||
modules = {
|
||||
nixos-modules =
|
||||
(map mylib.relativeToRoot [
|
||||
# common
|
||||
"secrets/nixos.nix"
|
||||
"modules/nixos/server/server.nix"
|
||||
"modules/nixos/server/proxmox-hardware-configuration.nix"
|
||||
# host specific
|
||||
"hosts/k8s/${name}"
|
||||
])
|
||||
++ [
|
||||
{modules.secrets.server.kubernetes.enable = true;}
|
||||
];
|
||||
home-modules.imports = map mylib.relativeToRoot [
|
||||
"home/linux/server.nix"
|
||||
];
|
||||
};
|
||||
|
||||
systemArgs = modules // args;
|
||||
in {
|
||||
nixosConfigurations.${name} = mylib.nixosSystem systemArgs;
|
||||
|
||||
colmena.${name} =
|
||||
mylib.colmenaSystem (systemArgs // {inherit tags ssh-user;});
|
||||
|
||||
# generate proxmox image for virtual machines without desktop environment
|
||||
packages.${name} = inputs.self.nixosConfigurations.${name}.config.formats.proxmox;
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
{
|
||||
# NOTE: the args not used in this file CAN NOT be removed!
|
||||
# because haumea pass argument lazily,
|
||||
# and these arguments are used in the functions like `mylib.nixosSystem`, `mylib.colmenaSystem`, etc.
|
||||
inputs,
|
||||
lib,
|
||||
mylib,
|
||||
myvars,
|
||||
system,
|
||||
genSpecialArgs,
|
||||
...
|
||||
} @ args: let
|
||||
name = "k3s-prod-1-master-2";
|
||||
tags = [name];
|
||||
ssh-user = "root";
|
||||
|
||||
modules = {
|
||||
nixos-modules =
|
||||
(map mylib.relativeToRoot [
|
||||
# common
|
||||
"secrets/nixos.nix"
|
||||
"modules/nixos/server/server.nix"
|
||||
"modules/nixos/server/proxmox-hardware-configuration.nix"
|
||||
# host specific
|
||||
"hosts/k8s/${name}"
|
||||
])
|
||||
++ [
|
||||
{modules.secrets.server.kubernetes.enable = true;}
|
||||
];
|
||||
};
|
||||
|
||||
systemArgs = modules // args;
|
||||
in {
|
||||
nixosConfigurations.${name} = mylib.nixosSystem systemArgs;
|
||||
|
||||
colmena.${name} =
|
||||
mylib.colmenaSystem (systemArgs // {inherit tags ssh-user;});
|
||||
|
||||
# generate proxmox image for virtual machines without desktop environment
|
||||
packages.${name} = inputs.self.nixosConfigurations.${name}.config.formats.proxmox;
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
{
|
||||
# NOTE: the args not used in this file CAN NOT be removed!
|
||||
# because haumea pass argument lazily,
|
||||
# and these arguments are used in the functions like `mylib.nixosSystem`, `mylib.colmenaSystem`, etc.
|
||||
inputs,
|
||||
lib,
|
||||
mylib,
|
||||
myvars,
|
||||
system,
|
||||
genSpecialArgs,
|
||||
...
|
||||
} @ args: let
|
||||
name = "k3s-prod-1-master-3";
|
||||
tags = [name];
|
||||
ssh-user = "root";
|
||||
|
||||
modules = {
|
||||
nixos-modules =
|
||||
(map mylib.relativeToRoot [
|
||||
# common
|
||||
"secrets/nixos.nix"
|
||||
"modules/nixos/server/server.nix"
|
||||
"modules/nixos/server/proxmox-hardware-configuration.nix"
|
||||
# host specific
|
||||
"hosts/k8s/${name}"
|
||||
])
|
||||
++ [
|
||||
{modules.secrets.server.kubernetes.enable = true;}
|
||||
];
|
||||
};
|
||||
|
||||
systemArgs = modules // args;
|
||||
in {
|
||||
nixosConfigurations.${name} = mylib.nixosSystem systemArgs;
|
||||
|
||||
colmena.${name} =
|
||||
mylib.colmenaSystem (systemArgs // {inherit tags ssh-user;});
|
||||
|
||||
# generate proxmox image for virtual machines without desktop environment
|
||||
packages.${name} = inputs.self.nixosConfigurations.${name}.config.formats.proxmox;
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
{
|
||||
# NOTE: the args not used in this file CAN NOT be removed!
|
||||
# because haumea pass argument lazily,
|
||||
# and these arguments are used in the functions like `mylib.nixosSystem`, `mylib.colmenaSystem`, etc.
|
||||
inputs,
|
||||
lib,
|
||||
mylib,
|
||||
myvars,
|
||||
system,
|
||||
genSpecialArgs,
|
||||
...
|
||||
} @ args: let
|
||||
name = "k3s-prod-1-worker-1";
|
||||
tags = [name];
|
||||
ssh-user = "root";
|
||||
|
||||
modules = {
|
||||
nixos-modules =
|
||||
(map mylib.relativeToRoot [
|
||||
# common
|
||||
"secrets/nixos.nix"
|
||||
"modules/nixos/server/server.nix"
|
||||
"modules/nixos/server/proxmox-hardware-configuration.nix"
|
||||
# host specific
|
||||
"hosts/k8s/${name}"
|
||||
])
|
||||
++ [
|
||||
{modules.secrets.server.kubernetes.enable = true;}
|
||||
];
|
||||
};
|
||||
|
||||
systemArgs = modules // args;
|
||||
in {
|
||||
nixosConfigurations.${name} = mylib.nixosSystem systemArgs;
|
||||
|
||||
colmena.${name} =
|
||||
mylib.colmenaSystem (systemArgs // {inherit tags ssh-user;});
|
||||
|
||||
# generate proxmox image for virtual machines without desktop environment
|
||||
packages.${name} = inputs.self.nixosConfigurations.${name}.config.formats.proxmox;
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
{
|
||||
# NOTE: the args not used in this file CAN NOT be removed!
|
||||
# because haumea pass argument lazily,
|
||||
# and these arguments are used in the functions like `mylib.nixosSystem`, `mylib.colmenaSystem`, etc.
|
||||
inputs,
|
||||
lib,
|
||||
mylib,
|
||||
myvars,
|
||||
system,
|
||||
genSpecialArgs,
|
||||
...
|
||||
} @ args: let
|
||||
name = "k3s-prod-1-worker-2";
|
||||
tags = [name];
|
||||
ssh-user = "root";
|
||||
|
||||
modules = {
|
||||
nixos-modules =
|
||||
(map mylib.relativeToRoot [
|
||||
# common
|
||||
"secrets/nixos.nix"
|
||||
"modules/nixos/server/server.nix"
|
||||
"modules/nixos/server/proxmox-hardware-configuration.nix"
|
||||
# host specific
|
||||
"hosts/k8s/${name}"
|
||||
])
|
||||
++ [
|
||||
{modules.secrets.server.kubernetes.enable = true;}
|
||||
];
|
||||
};
|
||||
|
||||
systemArgs = modules // args;
|
||||
in {
|
||||
nixosConfigurations.${name} = mylib.nixosSystem systemArgs;
|
||||
|
||||
colmena.${name} =
|
||||
mylib.colmenaSystem (systemArgs // {inherit tags ssh-user;});
|
||||
|
||||
# generate proxmox image for virtual machines without desktop environment
|
||||
packages.${name} = inputs.self.nixosConfigurations.${name}.config.formats.proxmox;
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
{
|
||||
# NOTE: the args not used in this file CAN NOT be removed!
|
||||
# because haumea pass argument lazily,
|
||||
# and these arguments are used in the functions like `mylib.nixosSystem`, `mylib.colmenaSystem`, etc.
|
||||
inputs,
|
||||
lib,
|
||||
mylib,
|
||||
myvars,
|
||||
system,
|
||||
genSpecialArgs,
|
||||
...
|
||||
} @ args: let
|
||||
name = "k3s-prod-1-worker-3";
|
||||
tags = [name];
|
||||
ssh-user = "root";
|
||||
|
||||
modules = {
|
||||
nixos-modules =
|
||||
(map mylib.relativeToRoot [
|
||||
# common
|
||||
"secrets/nixos.nix"
|
||||
"modules/nixos/server/server.nix"
|
||||
"modules/nixos/server/proxmox-hardware-configuration.nix"
|
||||
# host specific
|
||||
"hosts/k8s/${name}"
|
||||
])
|
||||
++ [
|
||||
{modules.secrets.server.kubernetes.enable = true;}
|
||||
];
|
||||
};
|
||||
|
||||
systemArgs = modules // args;
|
||||
in {
|
||||
nixosConfigurations.${name} = mylib.nixosSystem systemArgs;
|
||||
|
||||
colmena.${name} =
|
||||
mylib.colmenaSystem (systemArgs // {inherit tags ssh-user;});
|
||||
|
||||
# generate proxmox image for virtual machines without desktop environment
|
||||
packages.${name} = inputs.self.nixosConfigurations.${name}.config.formats.proxmox;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
{
|
||||
# NOTE: the args not used in this file CAN NOT be removed!
|
||||
# because haumea pass argument lazily,
|
||||
# and these arguments are used in the functions like `mylib.nixosSystem`, `mylib.colmenaSystem`, etc.
|
||||
inputs,
|
||||
lib,
|
||||
mylib,
|
||||
myvars,
|
||||
system,
|
||||
genSpecialArgs,
|
||||
...
|
||||
} @ args: let
|
||||
name = "kubevirt-shoryu";
|
||||
tags = [name "virt-shoryu"];
|
||||
ssh-user = "root";
|
||||
|
||||
modules = {
|
||||
nixos-modules =
|
||||
(map mylib.relativeToRoot [
|
||||
# common
|
||||
"secrets/nixos.nix"
|
||||
"modules/nixos/server/server.nix"
|
||||
"modules/nixos/server/proxmox-hardware-configuration.nix"
|
||||
# host specific
|
||||
"hosts/k8s/${name}"
|
||||
])
|
||||
++ [
|
||||
# {modules.secrets.server.kubernetes.enable = true;}
|
||||
];
|
||||
};
|
||||
|
||||
systemArgs = modules // args;
|
||||
in {
|
||||
nixosConfigurations.${name} = mylib.nixosSystem systemArgs;
|
||||
|
||||
colmena.${name} =
|
||||
mylib.colmenaSystem (systemArgs // {inherit tags ssh-user;});
|
||||
|
||||
packages.${name} = inputs.self.nixosConfigurations.${name}.config.formats.iso;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
{
|
||||
# NOTE: the args not used in this file CAN NOT be removed!
|
||||
# because haumea pass argument lazily,
|
||||
# and these arguments are used in the functions like `mylib.nixosSystem`, `mylib.colmenaSystem`, etc.
|
||||
inputs,
|
||||
lib,
|
||||
mylib,
|
||||
myvars,
|
||||
system,
|
||||
genSpecialArgs,
|
||||
...
|
||||
} @ args: let
|
||||
name = "kubevirt-shushou";
|
||||
tags = [name "virt-shushou"];
|
||||
ssh-user = "root";
|
||||
|
||||
modules = {
|
||||
nixos-modules =
|
||||
(map mylib.relativeToRoot [
|
||||
# common
|
||||
"secrets/nixos.nix"
|
||||
"modules/nixos/server/server.nix"
|
||||
"modules/nixos/server/proxmox-hardware-configuration.nix"
|
||||
# host specific
|
||||
"hosts/k8s/${name}"
|
||||
])
|
||||
++ [
|
||||
# {modules.secrets.server.kubernetes.enable = true;}
|
||||
];
|
||||
};
|
||||
|
||||
systemArgs = modules // args;
|
||||
in {
|
||||
nixosConfigurations.${name} = mylib.nixosSystem systemArgs;
|
||||
|
||||
colmena.${name} =
|
||||
mylib.colmenaSystem (systemArgs // {inherit tags ssh-user;});
|
||||
|
||||
packages.${name} = inputs.self.nixosConfigurations.${name}.config.formats.iso;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
{
|
||||
# NOTE: the args not used in this file CAN NOT be removed!
|
||||
# because haumea pass argument lazily,
|
||||
# and these arguments are used in the functions like `mylib.nixosSystem`, `mylib.colmenaSystem`, etc.
|
||||
inputs,
|
||||
lib,
|
||||
mylib,
|
||||
myvars,
|
||||
system,
|
||||
genSpecialArgs,
|
||||
...
|
||||
} @ args: let
|
||||
name = "kubevirt-youko";
|
||||
tags = [name "virt-youko"];
|
||||
ssh-user = "root";
|
||||
|
||||
modules = {
|
||||
nixos-modules =
|
||||
(map mylib.relativeToRoot [
|
||||
# common
|
||||
"secrets/nixos.nix"
|
||||
"modules/nixos/server/server.nix"
|
||||
"modules/nixos/server/proxmox-hardware-configuration.nix"
|
||||
# host specific
|
||||
"hosts/k8s/${name}"
|
||||
])
|
||||
++ [
|
||||
# {modules.secrets.server.kubernetes.enable = true;}
|
||||
];
|
||||
};
|
||||
|
||||
systemArgs = modules // args;
|
||||
in {
|
||||
nixosConfigurations.${name} = mylib.nixosSystem systemArgs;
|
||||
|
||||
colmena.${name} =
|
||||
mylib.colmenaSystem (systemArgs // {inherit tags ssh-user;});
|
||||
|
||||
packages.${name} = inputs.self.nixosConfigurations.${name}.config.formats.iso;
|
||||
}
|
||||
Reference in New Issue
Block a user