diff options
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 47 |
1 files changed, 42 insertions, 5 deletions
diff --git a/flake.nix b/flake.nix index d0853ec4..bb326751 100644 --- a/flake.nix +++ b/flake.nix @@ -17,14 +17,12 @@ 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"; }; - searchix = { - url = "git+https://git.alanpearce.eu/searchix"; - inputs.nixpkgs.follows = "nixpkgs-small"; - }; + searchix.url = "git+https://git.alanpearce.eu/searchix"; golink = { url = "github:tailscale/golink"; inputs.nixpkgs.follows = "nixpkgs-small"; @@ -45,6 +43,7 @@ , secrets , agenix , personal + , deploy-rs , searchix , golink , ... @@ -101,6 +100,7 @@ specialArgs = { inherit inputs; }; modules = [ agenix.nixosModules.default + nixos-hardware.nixosModules.friendlyarm-nanopi-r5s ./system/nanopi.nix ]; }; @@ -158,7 +158,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" |