summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xpkgs/apply-config/apply-config15
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)