From e702504deee06ecbc2b2613cd8366f62d77e6b51 Mon Sep 17 00:00:00 2001 From: materus Date: Sun, 3 Mar 2024 01:23:53 +0100 Subject: [PATCH] git-crypt: more tests --- configurations/host/materusPC/secrets/default.nix | 4 ++-- configurations/profile/common/default.nix | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/configurations/host/materusPC/secrets/default.nix b/configurations/host/materusPC/secrets/default.nix index 146c965..89bee92 100644 --- a/configurations/host/materusPC/secrets/default.nix +++ b/configurations/host/materusPC/secrets/default.nix @@ -2,8 +2,8 @@ { imports = [ - (if (materusCfg.materusFlake.decrypted == true) then ./private else "") - ]; + + ] ++ (if (materusCfg.materusFlake.decrypted) then [ ./private ] else [] ); sops.age.generateKey = false; sops.gnupg.home = null; diff --git a/configurations/profile/common/default.nix b/configurations/profile/common/default.nix index f502390..be0abc7 100644 --- a/configurations/profile/common/default.nix +++ b/configurations/profile/common/default.nix @@ -13,4 +13,5 @@ in ]; options.materus.materusArg = lib.mkOption {default = {};}; config._module.args.materusArg = config.materus.materusArg // materusArg; + config.warnings = lib.mkIf (!materusCfg.materusFlake.decrypted) ["Repository not decrytped, private configs not loaded, use crypt.sh to decrypt"]; }