mirror of
https://github.com/tuxdotrs/nix-config.git
synced 2026-09-19 16:49:04 +05:30
feat(hosts): add deploy-rs nodes and checks
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
{
|
||||
self,
|
||||
inputs,
|
||||
outputs,
|
||||
config,
|
||||
@@ -66,17 +67,61 @@ let
|
||||
config.flake.modules.nixOnDroid.${hostName}
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
flake.nixosConfigurations = builtins.mapAttrs mkHost {
|
||||
alpha = { };
|
||||
arcturus = { };
|
||||
canopus = { };
|
||||
sirius = { };
|
||||
vps = { };
|
||||
|
||||
mkNixOSNode = hostname: {
|
||||
inherit hostname;
|
||||
profiles.system = {
|
||||
user = "root";
|
||||
path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.${hostname};
|
||||
};
|
||||
};
|
||||
|
||||
flake.nixOnDroidConfigurations = builtins.mapAttrs mkDroidHost {
|
||||
vega = { };
|
||||
activateNixOnDroid =
|
||||
configuration:
|
||||
inputs.deploy-rs.lib.aarch64-linux.activate.custom configuration.activationPackage "${configuration.activationPackage}/activate";
|
||||
|
||||
mkDroidNode = hostname: {
|
||||
inherit hostname;
|
||||
profiles.system = {
|
||||
sshUser = "nix-on-droid";
|
||||
user = "nix-on-droid";
|
||||
magicRollback = true;
|
||||
sshOpts = [
|
||||
"-p"
|
||||
"8033"
|
||||
];
|
||||
path = activateNixOnDroid self.nixOnDroidConfigurations.${hostname};
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
flake = {
|
||||
nixosConfigurations = builtins.mapAttrs mkHost {
|
||||
sirius = { };
|
||||
canopus = { };
|
||||
arcturus = { };
|
||||
alpha = { };
|
||||
vps = { };
|
||||
};
|
||||
|
||||
nixOnDroidConfigurations = builtins.mapAttrs mkDroidHost {
|
||||
vega = { };
|
||||
};
|
||||
|
||||
deploy.nodes = {
|
||||
sirius = mkNixOSNode "sirius";
|
||||
canopus = mkNixOSNode "canopus";
|
||||
arcturus = mkNixOSNode "arcturus";
|
||||
alpha = mkNixOSNode "alpha";
|
||||
vega = mkDroidNode "vega";
|
||||
};
|
||||
};
|
||||
|
||||
perSystem =
|
||||
{ ... }:
|
||||
{
|
||||
checks = builtins.mapAttrs (
|
||||
_: config: config.config.system.build.toplevel
|
||||
) self.nixosConfigurations;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user