tune nix deploy parameters (specifically for moby)

this is experimental; hard to understand immediately how significant are the effects
This commit is contained in:
Colin 2024-02-02 00:50:25 +00:00
parent efcaef2c35
commit 2824671bde
2 changed files with 7 additions and 0 deletions

View File

@ -260,6 +260,10 @@
nix build '.#nixosConfigurations.${host}.config.system.build.toplevel' --out-link ./result-${host} "$@"
sudo nix sign-paths -r -k /run/secrets/nix_serve_privkey $(readlink ./result-${host})
# add more `-v` for more verbosity (up to 5).
# i copy the closure here separately from the nixos-rebuild mostly for the sake of introspectability.
nix-copy-closure -v --gzip --to "${host}" ./result-${host}
# XXX: this triggers another config eval & (potentially) build.
# if the config changed between these invocations, the above signatures might not apply to the deployed config.
# let the user handle that edge case by re-running this whole command.

View File

@ -47,6 +47,9 @@
keep-outputs = true # default: false
# how many lines to show from failed build
log-lines = 30 # default: 10
# how many substitution downloads to perform in parallel.
# i wonder if parallelism is causing moby's substitutions to fail?
max-substitution-jobs = 6 # default: 16
# narinfo-cache-negative-ttl = 3600 # default: 3600
# whether to use ~/.local/state/nix/profile instead of ~/.nix-profile, etc
use-xdg-base-directories = true # default: false