feat: add deploy-rs for remote deploying

This commit is contained in:
tux
2025-01-09 22:44:32 +05:30
parent 08f225cf87
commit bbb179b7da
4 changed files with 130 additions and 36 deletions

View File

@ -5,6 +5,7 @@
self,
nixpkgs,
home-manager,
deploy-rs,
...
} @ inputs: let
inherit (self) outputs;
@ -21,6 +22,14 @@
specialArgs = {inherit inputs outputs username email;};
modules = [./hosts/${host}];
};
mkNode = hostname: {
inherit hostname;
profiles.system = {
user = "root";
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.${hostname};
};
};
in {
packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
@ -53,6 +62,18 @@
];
};
};
deploy = {
nodes = {
arcturus = mkNode "arcturus";
canopus = mkNode "canopus";
alpha = mkNode "alpha";
sirius = mkNode "sirius";
vega = mkNode "vega";
capella = mkNode "capella";
homelab = mkNode "homelab";
};
};
};
inputs = {
@ -84,5 +105,6 @@
nur.url = "github:nix-community/nur";
sops-nix.url = "github:Mic92/sops-nix";
impermanence.url = "github:nix-community/impermanence";
deploy-rs.url = "github:serokell/deploy-rs";
};
}