diff options
author | Matthew Justin Bauer <mjbauer95@gmail.com> | 2018-05-02 15:40:38 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-02 15:40:38 -0500 |
commit | eeb016e8f0d8934dc33db7666d841e4b85713c9a (patch) | |
tree | 4a99561053ba51db60a75389e483784543b105ff /nixos/modules/services/misc | |
parent | b4d9113fbf7ad3a09f5caa8f8fc4a9229128f1e5 (diff) | |
parent | 3513034208aac88004e4798020cb66540a77ddad (diff) | |
download | nixlib-eeb016e8f0d8934dc33db7666d841e4b85713c9a.tar nixlib-eeb016e8f0d8934dc33db7666d841e4b85713c9a.tar.gz nixlib-eeb016e8f0d8934dc33db7666d841e4b85713c9a.tar.bz2 nixlib-eeb016e8f0d8934dc33db7666d841e4b85713c9a.tar.lz nixlib-eeb016e8f0d8934dc33db7666d841e4b85713c9a.tar.xz nixlib-eeb016e8f0d8934dc33db7666d841e4b85713c9a.tar.zst nixlib-eeb016e8f0d8934dc33db7666d841e4b85713c9a.zip |
Merge branch 'staging' into fix-ncurses-darwin-extensions
Diffstat (limited to 'nixos/modules/services/misc')
-rw-r--r-- | nixos/modules/services/misc/nix-daemon.nix | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix index 277ae9e292ce..6aa6d9b271ff 100644 --- a/nixos/modules/services/misc/nix-daemon.nix +++ b/nixos/modules/services/misc/nix-daemon.nix @@ -33,7 +33,7 @@ let sh = pkgs.runtimeShell; binshDeps = pkgs.writeReferencesToFile sh; in - pkgs.runCommand "nix.conf" { extraOptions = cfg.extraOptions; } '' + pkgs.runCommand "nix.conf" { extraOptions = cfg.extraOptions; } ('' ${optionalString (!isNix20) '' extraPaths=$(for i in $(cat ${binshDeps}); do if test -d $i; then echo $i; fi; done) ''} @@ -62,7 +62,11 @@ let ''} $extraOptions END - ''; + '' + optionalString cfg.checkConfig '' + echo "Checking that Nix can read nix.conf..." + ln -s $out ./nix.conf + NIX_CONF_DIR=$PWD ${cfg.package}/bin/nix show-config >/dev/null + ''); in @@ -351,6 +355,13 @@ in ''; }; + checkConfig = mkOption { + type = types.bool; + default = true; + description = '' + If enabled (the default), checks that Nix can parse the generated nix.conf. + ''; + }; }; }; |