mirror of
https://github.com/tuxdotrs/tawm.git
synced 2025-07-05 20:56:33 +05:30
feat: add deploy-rs for remote deploying
This commit is contained in:
22
flake.nix
22
flake.nix
@ -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";
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user