From 8293c9ff4466b3f46780ddb0a2f183026b6e2131 Mon Sep 17 00:00:00 2001 From: materus Date: Sun, 3 Mar 2024 02:50:46 +0100 Subject: [PATCH] hosts: add hostPath; home: add homePath --- configurations/home/genHomes.nix | 3 ++- configurations/host/default.nix | 1 + configurations/host/materusPC/secrets/default.nix | 6 ++---- .../host/materusPC/secrets/{users.yaml => secrets.yaml} | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) rename configurations/host/materusPC/secrets/{users.yaml => secrets.yaml} (83%) diff --git a/configurations/home/genHomes.nix b/configurations/home/genHomes.nix index 964b193..3707736 100644 --- a/configurations/home/genHomes.nix +++ b/configurations/home/genHomes.nix @@ -14,7 +14,7 @@ let value = let host = builtins.elemAt hosts i; in materusFlake.nixosConfigurations.${host}.materusCfg.hm.lib.homeManagerConfiguration { pkgs = materusFlake.nixosConfigurations.${host}.pkgs; - extraSpecialArgs = { materusCfg = materusFlake.nixosConfigurations.${host}.materusCfg // {isHm = true;}; }; + extraSpecialArgs = { materusCfg = materusFlake.nixosConfigurations.${host}.materusCfg // {homePath = materusFlake.selfPath + "/configurations/home/${username}"; isHm = true;}; }; modules = [ ./${username} ../host/${host}/extraHome.nix @@ -38,6 +38,7 @@ let nixerus = inputs.configInputs.nixerus; configInputs = inputs.configInputs; path = materusFlake.selfPath; + homePath = materusFlake.selfPath + "/configurations/home/${username}"; isHm = true; }; in inputs.configInputs.home-manager.lib.homeManagerConfiguration { diff --git a/configurations/host/default.nix b/configurations/host/default.nix index be79c51..aaea0b4 100644 --- a/configurations/host/default.nix +++ b/configurations/host/default.nix @@ -15,6 +15,7 @@ let nixerus = if stable then inputs.configInputs-stable.nixerus else inputs.configInputs.nixerus; configInputs = if stable then inputs.configInputs-stable else inputs.configInputs; path = materusFlake.selfPath; + hostPath = materusFlake.selfPath + "/configurations/host/${host}"; isHm = false; }; in diff --git a/configurations/host/materusPC/secrets/default.nix b/configurations/host/materusPC/secrets/default.nix index 89bee92..03f1dfd 100644 --- a/configurations/host/materusPC/secrets/default.nix +++ b/configurations/host/materusPC/secrets/default.nix @@ -8,10 +8,8 @@ sops.age.generateKey = false; sops.gnupg.home = null; sops.gnupg.sshKeyPaths = []; - sops.secrets."users/materus" = { - format = "yaml"; - sopsFile = ./users.yaml; - }; + sops.defaultSopsFile = materusCfg.hostPath + "/secrets/secrets.yaml"; + sops.secrets."users/materus" = {}; services.openssh.hostKeys = [ { diff --git a/configurations/host/materusPC/secrets/users.yaml b/configurations/host/materusPC/secrets/secrets.yaml similarity index 83% rename from configurations/host/materusPC/secrets/users.yaml rename to configurations/host/materusPC/secrets/secrets.yaml index fcc0918..7d32540 100644 --- a/configurations/host/materusPC/secrets/users.yaml +++ b/configurations/host/materusPC/secrets/secrets.yaml @@ -16,8 +16,8 @@ sops: dWVzbzUyakxXUGpTQjNsYzcyVG1aRDgKXVa8tIAbmggw1vSt3NJYRLgXhbagpNrX RNXyndPaeQXVPVXuJWmHgRCYbwPTcfAFpGwFlX2IxVLlmC914Zklhw== -----END AGE ENCRYPTED FILE----- - lastmodified: "2024-03-02T22:12:15Z" - mac: ENC[AES256_GCM,data:h7iDHiyVoW9fAi5Gmitrlw01rXBC92UL5PGywV3tx6gdfSsqigX8aecuFnaYrP8ijLzABoXRG6QSLJzn7odJP0e9xXRkoVkMrBZHqRuroN+ouzYjqLJ0DrH2EGb8O/EcwoS9cHuusZTsBnfAfc9l6TuqGu9f8HIwzlcg+jEA2X4=,iv:m0acbZsaqhJ4/kQJ4tGeAiws0r8gJuX8OKp2xSRzkEg=,tag:f6Kh73EBZ4TBbohQozXzog==,type:str] + lastmodified: "2024-03-03T01:46:25Z" + mac: ENC[AES256_GCM,data:6YlLYKUzG2rorS22B6s4P6wJHCU1BWfEazXoEfEITB/qe3Ek3ITafX+RZI7pYLMiatIt9GHPb3YzDt6tOb91EakodC9pBTmW1E6NRzCZDr96nBQ+oIEmGBOOBwq/ysAeJRga0Sz5Xfx6rjRVCTARSLOmbouW5EF/bCKFVowgPYU=,iv:iZkBEIXreVic57ishmziIDNw6H6cNqA32ZxjTa8mjzA=,tag:ws3bj3T4xEGlq7YoB4RH1A==,type:str] pgp: - created_at: "2024-03-02T22:10:50Z" enc: |-