diff options
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/flake.nix b/flake.nix index a4ba578..6ff085f 100644 --- a/flake.nix +++ b/flake.nix @@ -15,6 +15,11 @@ }; deploy-rs = { url = "github:serokell/deploy-rs"; + inputs = { + flake-compat.follows = "flake-compat"; + nixpkgs.follows = "nixpkgs"; + utils.follows = "flake-utils"; + }; }; # inputs for following @@ -98,9 +103,23 @@ ... } @ attrs: let system = "x86_64-linux"; - pkgs = nixpkgs.legacyPackages.${system}; nixos-lib = import (nixpkgs + "/nixos/lib") {}; + pkgs = nixpkgs.legacyPackages.${system}; pkgsUnstable = nixpkgs-unstable.legacyPackages.${system}; + deployPackage = + (import nixpkgs { + inherit system; + overlays = [ + deploy-rs.overlays.default + (self: super: { + deploy-rs = { + inherit (pkgs) deploy-rs; + inherit (super.deploy-rs) lib; + }; + }) + ]; + }) + .deploy-rs; specialArgs = attrs @@ -118,19 +137,17 @@ tests = import ./tests {inherit pkgs specialArgs nixLib;}; vhackPackages = import ./pkgs {inherit pkgs nixLib;}; - hosts = import ./hosts {inherit pkgs nixLib nixpkgs specialArgs extraModules;}; + hosts = import ./hosts {inherit pkgs nixLib nixpkgs specialArgs extraModules deployPackage;}; inherit (library) nixLib; treefmtEval = import ./treefmt.nix {inherit treefmt-nix pkgs;}; in { - nixosConfigurations = hosts; - checks."${system}" = nixLib.warnMerge (nixLib.warnMerge tests { formatting = treefmtEval.config.build.check self; } "the flake checks and formatting") - (deploy-rs.lib."${system}".deployChecks self.deploy) + (deployPackage.lib.deployChecks self.deploy) "the flake checks and deploy-rs"; packages."${system}" = vhackPackages; @@ -152,12 +169,6 @@ }; }; - deploy.nodes.server2 = { - hostname = "server2.vhack.eu"; - profiles.system = { - user = "root"; - path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.server2; - }; - }; + inherit (hosts) nixosConfigurations deploy; }; } |