Files
nix-config/outputs/x86_64-linux/src/idols-ruby.nix
T
Ryan Yin 60c59543b3 refactor: rename the KubeVirt hardware config to qemu-guest
The file is not KubeVirt-specific: it is the hardware configuration for
any QEMU guest that boots from a disk (KubeVirt or libvirt). All it does
is pull in qemu-guest.nix and set fileSystems."/" from the disk labeled
nixos.
2026-09-21 16:48:47 +08:00

52 lines
1.2 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/qemu-guest-hardware-configuration.nix"
# host specific
"hosts/idols-${name}"
])
++ [
];
home-modules = map mylib.relativeToRoot [
# host specific
"home/hosts/linux/idols-${name}.nix"
];
};
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.system.build.images.kubevirt;
# nixos tests
packages."${name}-nixos-tests" = import ../nixos-tests/idols-ruby.nix systemArgs;
}