diff --git a/modules/nix/autoupdater.nix b/modules/nix/autoupdater.nix index 6d241727..b8dc10af 100644 --- a/modules/nix/autoupdater.nix +++ b/modules/nix/autoupdater.nix @@ -40,11 +40,11 @@ with lib; { script = '' #!${pkgs.bash}/bin/bash set -euxo pipefail - builds=$(${pkgs.curl}/bin/curl -H "accept: application/json" ${config.options.nix.auto-update.source} | ${pkgs.jq}/bin/jq -r '.evals[0].builds[]') + builds=$(${pkgs.curl}/bin/curl -H "accept: application/json" ${config.nix.auto-update.source} | ${pkgs.jq}/bin/jq -r '.evals[0].builds[]') for build in $builds; do - doc=$(${pkgs.curl}/bin/curl -H "accept: application/json" ${config.options.nix.auto-update-hydraServer}/build/$build) + doc=$(${pkgs.curl}/bin/curl -H "accept: application/json" ${config.nix.auto-update.hydraServer}/build/$build) jobname=$(echo $doc | ${pkgs.jq}/bin/jq -r '.job') - if [ "$jobname" = "${config.options.nix.auto-update.attr} ]; then + if [ "$jobname" = "${config.nix.auto-update.attr} ]; then drvname=$(echo $doc | ${pkgs.jq}/bin/jq -r '.drvpath') output=$(${pkgs.nix}/bin/nix-store -r $drvname) ${pkgs.nix}/bin/nix-env -p /nix/var/nix/profiles/system --set $output diff --git a/modules/nix/default.nix b/modules/nix/default.nix index 54bf347e..5fd12098 100644 --- a/modules/nix/default.nix +++ b/modules/nix/default.nix @@ -1,4 +1,4 @@ -{...}: { +{config, ...}: { imports = [ ./link-inputs.nix ./lix.nix @@ -18,7 +18,7 @@ experimental-features = "nix-command flakes ca-derivations"; }; nix.gc = { - automatic = true; + automatic = config.nix.enable; dates = "weekly"; options = "--delete-older-than 7d"; };