diff --git a/.gitattributes b/.gitattributes index 8db1ad0..39d2d68 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,2 @@ **/private/** filter=git-crypt diff=git-crypt +encrypted-test filter=git-crypt diff=git-crypt \ No newline at end of file diff --git a/configurations/host/materusPC/secrets/default.nix b/configurations/host/materusPC/secrets/default.nix index dccd044..b2408f2 100644 --- a/configurations/host/materusPC/secrets/default.nix +++ b/configurations/host/materusPC/secrets/default.nix @@ -1,8 +1,8 @@ -{ config, pkgs, lib, ... }: +{ config, pkgs, lib, materusCfg, ... }: { imports = [ - ./private + (if (materusCfg.materusFlake.encrypted == "decrypted") then ./private else "") ]; sops.age.generateKey = false; diff --git a/encrypted-test b/encrypted-test new file mode 100644 index 0000000..0169775 Binary files /dev/null and b/encrypted-test differ diff --git a/flake.nix b/flake.nix index fcf6b47..a72e12a 100644 --- a/flake.nix +++ b/flake.nix @@ -54,9 +54,10 @@ outputs = inputs @ { self, nixpkgs, home-manager, nur, ... }: - { + rec { nixosConfigurations = import ./configurations/host { inherit inputs; materusFlake = self; }; homeConfigurations = import ./configurations/home { inherit inputs; materusFlake = self; }; selfPath = ./.; + encrypted = builtins.readFile (selfPath + "/encrypted-test"); }; }