From 13eb38d8fce86bc634f8f55d8432fd9927e632c8 Mon Sep 17 00:00:00 2001 From: oddlama Date: Mon, 14 Aug 2023 22:25:25 +0200 Subject: [PATCH] chore: remove nix-plugin definition from dev systems --- modules/optional/dev/default.nix | 1 - modules/repo/secrets.nix | 20 +------------------- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/modules/optional/dev/default.nix b/modules/optional/dev/default.nix index ee9af68..4e2f576 100644 --- a/modules/optional/dev/default.nix +++ b/modules/optional/dev/default.nix @@ -5,5 +5,4 @@ ]; environment.enableDebugInfo = true; - repo.defineNixExtraBuiltins = true; } diff --git a/modules/repo/secrets.nix b/modules/repo/secrets.nix index 811f883..e17cc34 100644 --- a/modules/repo/secrets.nix +++ b/modules/repo/secrets.nix @@ -27,7 +27,7 @@ # Try to access the extra builtin we loaded via nix-plugins. # Throw an error if that doesn't exist. - rageImportEncrypted = assert assertMsg (builtins ? extraBuiltins.rageImportEncrypted) "The extra builtin 'rageImportEncrypted' is not available, so repo.secrets cannot be decrypted. Did you forget to use `defineNixExtraBuiltins` or use the appropriate ad-hoc command line arguments?"; + rageImportEncrypted = assert assertMsg (builtins ? extraBuiltins.rageImportEncrypted) "The extra builtin 'rageImportEncrypted' is not available, so repo.secrets cannot be decrypted. Did you forget to add nix-plugins and point it to `./nix/extra-builtins.nix` ?"; builtins.extraBuiltins.rageImportEncrypted; # This "imports" an encrypted .nix.age file by evaluating the decrypted content. @@ -41,15 +41,6 @@ cfg = config.repo; in { options.repo = { - defineNixExtraBuiltins = mkOption { - default = false; - type = types.bool; - description = mdDoc '' - Add nix-plugins and the correct extra-builtin-files definition to this host's - nix configuration, so that it can be used to decrypt the secrets in this repository. - ''; - }; - secretFiles = mkOption { default = {}; type = types.attrsOf types.path; @@ -82,13 +73,4 @@ in { description = "Exposes the loaded repo secrets. This option is read-only."; }; }; - - config = { - # Make sure not to reference the extra-builtins file directly but - # at least via its parent folder so it can access relative files. - nix.extraOptions = mkIf cfg.defineNixExtraBuiltins '' - plugin-files = ${pkgs.nix-plugins}/lib/nix/plugins - extra-builtins-file = ${inputs.self.outPath}/nix/extra-builtins.nix - ''; - }; }