diff options
author | stuebinm | 2024-06-04 21:17:38 +0200 |
---|---|---|
committer | stuebinm | 2024-06-04 21:17:38 +0200 |
commit | daeee8711bfdb4eb635307a184d4c0c7eee61756 (patch) | |
tree | 6bcdc12eaa86af7e5cd94a658019000b007df1e8 /pkgs/apply-config | |
parent | 7a56e1eca0dc28422bd4bd78d430bf1be2b109d4 (diff) |
pkgs/apply-config: fixups
the nix-env logic was still broken. It seems to have extremely weird
failure modes under which it does not report errors when doing
nix-env --set, or else the switch-to-configuration.pl script does not
properly install the boot loader entry when it was installed via --set
instead of --install.
I'm not entirely clear on why yet, will need some investigating.
Diffstat (limited to 'pkgs/apply-config')
-rwxr-xr-x | pkgs/apply-config/apply-config | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/pkgs/apply-config/apply-config b/pkgs/apply-config/apply-config index c827823..c411ce1 100755 --- a/pkgs/apply-config/apply-config +++ b/pkgs/apply-config/apply-config @@ -33,18 +33,19 @@ Options: ")) -(define (run-command cmd) - (when verbose - (display cmd (standard-error-port))) - (do-process! cmd)) - (define (log-msg msg) - (display msg (standard-error-port))) + (display (format "apply-config: ~a\n" msg) (standard-error-port))) (define (log-verbose msg) (when verbose (log-msg msg))) +(define (run-command cmd) + (when verbose + (log-msg (format "running ~a" cmd))) + (do-process! cmd)) + + (define (main args) (let-args (cdr args) @@ -102,7 +103,7 @@ Options: (define (install-in-env built-config) (define cmd - `(nix-env -p /nix/var/nix/profiles/system --set ,built-config)) + `(sudo nix-env -p /nix/var/nix/profiles/system --install ,built-config)) (if (or (equal? action 'switch) (equal? action 'boot)) (run-command cmd) |