From d0c4c6da0561c2486f45d47ccd045625b15c66e8 Mon Sep 17 00:00:00 2001 From: Anthony Rodriguez Date: Fri, 15 Nov 2024 19:44:59 +0100 Subject: [PATCH] treewide: fix deploy issues Using absolute path imports is apparently a horrible idea since that just messes up the store, and will bring a lot of issues since that copies it to the store separately. --- flake.nix | 4 ++-- hosts/anastacia/default.nix | 14 +++++--------- hosts/solaire/default.nix | 10 +++++++--- hosts/vamos/default.nix | 10 +++++++--- nodes/default.nix | 8 ++------ secrets/searx-env-file.age | Bin 274 -> 274 bytes 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/flake.nix b/flake.nix index 08e63d0..2e30233 100644 --- a/flake.nix +++ b/flake.nix @@ -13,7 +13,6 @@ eachSystem = f: nixpkgs.lib.genAttrs (import systems) (system: f nixpkgs.legacyPackages.${system}); treefmtEval = eachSystem (pkgs: treefmt-nix.lib.evalModule pkgs ./treefmt.nix); in { - imports = [./modules]; devShells = eachSystem (pkgs: { default = pkgs.mkShell { packages = [ @@ -30,7 +29,8 @@ in import ./hosts {inherit inputs lib';}; packages = eachSystem (pkgs: import ./pkgs {inherit inputs pkgs;}); - deploy.nodes = import ./nodes {inherit self inputs;}; + deploy.nodes = import ./nodes {inherit inputs;}; + checks = builtins.mapAttrs (_: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib; }; inputs = { # nix related diff --git a/hosts/anastacia/default.nix b/hosts/anastacia/default.nix index 444020b..66498c2 100644 --- a/hosts/anastacia/default.nix +++ b/hosts/anastacia/default.nix @@ -1,9 +1,5 @@ -{ - self, - inputs, - ... -}: let - mod = "${self}/system"; +{inputs, ...}: let + system = "${inputs.self}/system"; in { imports = [ ./hardware-configuration.nix @@ -11,9 +7,9 @@ in { inputs.agenix.nixosModules.default - "${mod}/services/forgejo.nix" - "${mod}/services/searx.nix" - "${mod}/services/portfolio.nix" + "${system}/services/forgejo.nix" + "${system}/services/searx.nix" + "${system}/services/portfolio.nix" ]; boot.tmp.cleanOnBoot = true; diff --git a/hosts/solaire/default.nix b/hosts/solaire/default.nix index f19bfcd..4d08433 100644 --- a/hosts/solaire/default.nix +++ b/hosts/solaire/default.nix @@ -1,6 +1,10 @@ -{specialArgs, ...}: let - system = ../../system; - home = ../../home; +{ + inputs, + specialArgs, + ... +}: let + system = "${inputs.self}/system"; + home = "${inputs.self}/home"; in { imports = [ ./hardware-configuration.nix diff --git a/hosts/vamos/default.nix b/hosts/vamos/default.nix index 5ad95f4..b36b2c7 100644 --- a/hosts/vamos/default.nix +++ b/hosts/vamos/default.nix @@ -1,6 +1,10 @@ -{specialArgs, ...}: let - system = ../../system; - home = ../../home; +{ + inputs, + specialArgs, + ... +}: let + system = "${inputs.self}/system"; + home = "${inputs.self}/home"; in { imports = [ ./hardware-configuration.nix diff --git a/nodes/default.nix b/nodes/default.nix index 8ed1e95..56396b2 100644 --- a/nodes/default.nix +++ b/nodes/default.nix @@ -1,14 +1,10 @@ -{ - self, - inputs, - ... -}: { +{inputs, ...}: { anastacia = { hostname = "2a01:4f8:1c1c:8495::1"; profiles.system = { sshUser = "root"; user = "root"; - path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.anastacia; + path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos inputs.self.nixosConfigurations.anastacia; }; }; } diff --git a/secrets/searx-env-file.age b/secrets/searx-env-file.age index 8ede9591e75cce658aba966aea81a248a4203ace..1aaa42fbff5a6b65799985a931ee4304f0f461e0 100644 GIT binary patch delta 238 zcmV6T0&z=Vr^wpaY1x?RyAu-R!KocY-&|zRclu>Q$k}` zVKhouO$t>(ZewpkIYU@OPd7$PYjAXWbZKsEZfQ_tV?<(dMp#I8D=SWPZDmPuI0`K- zEg)ntbU9EsGjdETc{F!gLNYmJQdVL`R5MLcb4XEbRe3=-8E`Uq-?>_a4q?U?p?i4mbDa+&l omS;}%0K?}S9kWdGnUNQ2BVrc-BCv89Q*(~6RQPf$hNWNhz9nZ{-T(jq delta 238 zcmVwV&M>q