1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-11 07:10:39 +02:00

chore: remove nix-plugin definition from dev systems

This commit is contained in:
oddlama 2023-08-14 22:25:25 +02:00
parent 16c9d8bb5e
commit 13eb38d8fc
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
2 changed files with 1 additions and 20 deletions

View file

@ -5,5 +5,4 @@
]; ];
environment.enableDebugInfo = true; environment.enableDebugInfo = true;
repo.defineNixExtraBuiltins = true;
} }

View file

@ -27,7 +27,7 @@
# Try to access the extra builtin we loaded via nix-plugins. # Try to access the extra builtin we loaded via nix-plugins.
# Throw an error if that doesn't exist. # 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; builtins.extraBuiltins.rageImportEncrypted;
# This "imports" an encrypted .nix.age file by evaluating the decrypted content. # This "imports" an encrypted .nix.age file by evaluating the decrypted content.
@ -41,15 +41,6 @@
cfg = config.repo; cfg = config.repo;
in { in {
options.repo = { 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 { secretFiles = mkOption {
default = {}; default = {};
type = types.attrsOf types.path; type = types.attrsOf types.path;
@ -82,13 +73,4 @@ in {
description = "Exposes the loaded repo secrets. This option is read-only."; 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
'';
};
} }