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.
This commit is contained in:
Anthony Rodriguez 2024-11-15 19:44:59 +01:00
parent ea922eb16d
commit d0c4c6da05
Signed by: nezia
GPG key ID: EE3BE97C040A86CE
6 changed files with 23 additions and 23 deletions

View file

@ -13,7 +13,6 @@
eachSystem = f: nixpkgs.lib.genAttrs (import systems) (system: f nixpkgs.legacyPackages.${system}); eachSystem = f: nixpkgs.lib.genAttrs (import systems) (system: f nixpkgs.legacyPackages.${system});
treefmtEval = eachSystem (pkgs: treefmt-nix.lib.evalModule pkgs ./treefmt.nix); treefmtEval = eachSystem (pkgs: treefmt-nix.lib.evalModule pkgs ./treefmt.nix);
in { in {
imports = [./modules];
devShells = eachSystem (pkgs: { devShells = eachSystem (pkgs: {
default = pkgs.mkShell { default = pkgs.mkShell {
packages = [ packages = [
@ -30,7 +29,8 @@
in in
import ./hosts {inherit inputs lib';}; import ./hosts {inherit inputs lib';};
packages = eachSystem (pkgs: import ./pkgs {inherit inputs pkgs;}); 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 = { inputs = {
# nix related # nix related

View file

@ -1,9 +1,5 @@
{ {inputs, ...}: let
self, system = "${inputs.self}/system";
inputs,
...
}: let
mod = "${self}/system";
in { in {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
@ -11,9 +7,9 @@ in {
inputs.agenix.nixosModules.default inputs.agenix.nixosModules.default
"${mod}/services/forgejo.nix" "${system}/services/forgejo.nix"
"${mod}/services/searx.nix" "${system}/services/searx.nix"
"${mod}/services/portfolio.nix" "${system}/services/portfolio.nix"
]; ];
boot.tmp.cleanOnBoot = true; boot.tmp.cleanOnBoot = true;

View file

@ -1,6 +1,10 @@
{specialArgs, ...}: let {
system = ../../system; inputs,
home = ../../home; specialArgs,
...
}: let
system = "${inputs.self}/system";
home = "${inputs.self}/home";
in { in {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix

View file

@ -1,6 +1,10 @@
{specialArgs, ...}: let {
system = ../../system; inputs,
home = ../../home; specialArgs,
...
}: let
system = "${inputs.self}/system";
home = "${inputs.self}/home";
in { in {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix

View file

@ -1,14 +1,10 @@
{ {inputs, ...}: {
self,
inputs,
...
}: {
anastacia = { anastacia = {
hostname = "2a01:4f8:1c1c:8495::1"; hostname = "2a01:4f8:1c1c:8495::1";
profiles.system = { profiles.system = {
sshUser = "root"; sshUser = "root";
user = "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;
}; };
}; };
} }

Binary file not shown.