Files
lix/tests/functional/daemon-trust.sh
T
eldritch horrors 9eb3c1be80 daemon: restore daemon-trust-override
apparently this feature got lost in the migration to exec'ing daemons.

Change-Id: Iac9425cf6d20781bb49e5cf12f2056f4a3ec23ba
2025-07-22 12:33:49 +00:00

34 lines
628 B
Bash

source common.sh
clearStore
withDaemonTrusting() {
local trusting="$1"
shift
trap killDaemon EXIT
NIX_CONFIG="
extra-experimental-features = daemon-trust-override
trusted-users = $trusting
" startDaemon "$@"
}
(
withDaemonTrusting "" --default-trust
nix store ping --json | jq -e '.trusted | not'
)
(
withDaemonTrusting "" --force-trusted
nix store ping --json | jq -e '.trusted'
)
(
withDaemonTrusting "$(whoami)" --default-trust
nix store ping --json | jq -e '.trusted'
)
(
withDaemonTrusting "$(whoami)" --force-untrusted
nix store ping --json | jq -e '.trusted | not'
)