diff options
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/flake.nix b/flake.nix index 07188f43..c0137b59 100644 --- a/flake.nix +++ b/flake.nix @@ -17,6 +17,7 @@ utils.url = "github:numtide/flake-utils"; agenix.url = "github:ryantm/agenix"; agenix.inputs.nixpkgs.follows = "nixpkgs"; + deploy-rs.url = "github:serokell/deploy-rs"; personal = { url = "git+file:packages"; inputs.nixpkgs.follows = "nixpkgs"; @@ -45,6 +46,7 @@ , secrets , agenix , personal + , deploy-rs , searchix , golink , ... @@ -65,6 +67,7 @@ pkgs = import nixpkgs { inherit system; overlays = readOverlays (toString ./overlays) ++ [ + agenix.overlays.default (self: super: { personal = personal.packages.${system}; enchant = super.enchant.override { @@ -157,7 +160,44 @@ (secrets + "/default.nix") ]; }; - }; + + checks = builtins.mapAttrs + (system: deployLib: + deployLib.deployChecks self.deploy) + deploy-rs.lib; + + deploy = { + remoteBuild = true; + interactiveSudo = true; + nodes.linde = { + hostname = "linde"; + profiles.system = { + path = deploy-rs.lib.${utils.lib.system.aarch64-linux}.activate.nixos + self.nixosConfigurations.linde; + }; + profiles.alan = { + user = "alan"; + path = deploy-rs.lib.${utils.lib.system.aarch64-linux}.activate.home-manager + self.homeConfigurations."alan@linde"; + }; + }; + }; + } // utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { inherit system; }; + in + { + devShells = { + default = pkgs.mkShell { + packages = [ + deploy-rs.packages.${system}.default + agenix.packages.${system}.default + ]; + }; + }; + }); + + nixConfig = { extra-substituters = [ "https://toyvo.cachix.org" |