mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-11-13 20:23:45 +01:00
Drop the now-meaningless kubevirt- prefix and move the hosts out of hosts/k8s/, following the existing 12kingdoms-shoukei layout: the directory and output carry the theme prefix while the configuration, hostname and colmena target are the bare name (shoryu, shushou, youko). - hosts/k8s/kubevirt-* -> hosts/12kingdoms-*; the shared disko config becomes host-disko-fs.nix; the now-different relative imports are fixed - outputs, vars/networking.nix keys, the Justfile recipes/tags, the eval tests and the docs follow - colmena reaches these hosts by IP (a new targetHost override), since their DNS name changes with the hostname and is not resolvable until the router learns it
43 lines
1008 B
Nix
43 lines
1008 B
Nix
# colmena - Remote Deployment via SSH
|
|
{
|
|
lib,
|
|
inputs,
|
|
nixos-modules,
|
|
home-modules ? [ ],
|
|
myvars,
|
|
system,
|
|
tags,
|
|
ssh-user,
|
|
# optional override; defaults to the host name. Use an IP when the host's
|
|
# DNS name is not resolvable yet (e.g. right after a hostname change).
|
|
targetHost ? null,
|
|
genSpecialArgs,
|
|
specialArgs ? (genSpecialArgs system),
|
|
...
|
|
}:
|
|
let
|
|
inherit (inputs) home-manager;
|
|
in
|
|
{ name, ... }:
|
|
{
|
|
deployment = {
|
|
inherit tags;
|
|
targetUser = ssh-user;
|
|
targetHost = if targetHost != null then targetHost else name;
|
|
};
|
|
|
|
imports =
|
|
nixos-modules
|
|
++ (lib.optionals ((lib.lists.length home-modules) > 0) [
|
|
home-manager.nixosModules.home-manager
|
|
{
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
home-manager.backupFileExtension = "home-manager.backup";
|
|
|
|
home-manager.extraSpecialArgs = specialArgs;
|
|
home-manager.users."${myvars.username}".imports = home-modules;
|
|
}
|
|
]);
|
|
}
|