2024-10-13 15:16:39 -05:00
|
|
|
{inputs, ...}: let
|
|
|
|
systems = {
|
|
|
|
eidola = import ./eidola {inherit inputs;};
|
|
|
|
silver = import ./silver {inherit inputs;};
|
|
|
|
};
|
|
|
|
|
|
|
|
inherit (inputs.nixpkgs) lib;
|
|
|
|
|
|
|
|
makeNixosConfigurations = systems:
|
|
|
|
lib.mapAttrs
|
|
|
|
(name: system:
|
|
|
|
lib.nixosSystem {
|
|
|
|
inherit (system) system;
|
|
|
|
|
|
|
|
modules =
|
|
|
|
system.modules
|
|
|
|
++ [
|
|
|
|
{
|
|
|
|
_module.args = {
|
|
|
|
inherit inputs;
|
|
|
|
};
|
|
|
|
}
|
2024-10-17 17:32:14 -05:00
|
|
|
|
|
|
|
../modules
|
|
|
|
];
|
2024-10-13 15:16:39 -05:00
|
|
|
})
|
|
|
|
systems;
|
|
|
|
|
|
|
|
makeDeployRsNodes = systems:
|
|
|
|
lib.mapAttrs
|
|
|
|
(name: system: {
|
|
|
|
hostname = system.deployment.host;
|
|
|
|
|
|
|
|
profiles.system = {
|
|
|
|
sshUser = system.deployment.user;
|
|
|
|
sshOpts = ["-p" "${toString system.deployment.port}"];
|
|
|
|
remoteBuild = system.deployment.buildOnTarget;
|
|
|
|
|
|
|
|
magicRollback = true;
|
|
|
|
|
|
|
|
path =
|
|
|
|
inputs.deploy-rs.lib.${system.system}.activate.nixos
|
|
|
|
inputs.self.nixosConfigurations.${name};
|
|
|
|
};
|
|
|
|
})
|
|
|
|
systems;
|
|
|
|
in {
|
|
|
|
nixosConfigurations = makeNixosConfigurations systems;
|
|
|
|
deploy.nodes = makeDeployRsNodes systems;
|
|
|
|
}
|