From cf78dd369eebff7b8a6a94aa8e69316e498d1afe Mon Sep 17 00:00:00 2001 From: materus Date: Sun, 3 Mar 2024 00:03:02 +0100 Subject: [PATCH] materusPC: secrets test --- .gitattributes | 1 + configurations/host/materusPC/secrets/default.nix | 4 ++-- encrypted-test | Bin 0 -> 31 bytes flake.nix | 3 ++- 4 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 encrypted-test 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 0000000000000000000000000000000000000000..0169775ff83b5ec87a17038158bc80b2c801f804 GIT binary patch literal 31 ncmZQ@_Y83kiVO&0c;Q`T{p^fZH}ky12J-7!Bfpl2EPo0Bu+|KZ literal 0 HcmV?d00001 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"); }; }