Files
nix-config-ryan4yin/outputs/x86_64-linux/src/idols-ruby.nix
2024-03-13 23:02:28 +08:00

49 lines
1.3 KiB
Nix

{
# 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 = 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;
# nixos tests
packages."${name}-nixos-tests" = import ../nixos-tests/idols-ruby.nix systemArgs;
}