Subject: Re: [PATCH v3 2/2] gnu: nix: Update to 2.16.1
From: "jgart" <[email-masked]>
To: [email-masked], "Zhu Zihao" <[email-masked]>
Cc: [email-masked]
Date: Wed, 12 Jul 2023 04:00:33 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi Zhu,

Thanks for the contribution. APPLIED. Sorry for the delay.

I tested this patch series in the following Guix container:

(use-modules (gnu))
(use-package-modules certs package-management)
(use-service-modules nix)

(define %simple-os
  (operating-system
    (host-name "komputilo")
    (timezone "Europe/Berlin")
    (locale "en_US.UTF-8")
    (bootloader (bootloader-configuration
                 (bootloader grub-bootloader)
                 (targets '("/dev/sdX"))))
    (file-systems (cons (file-system
                          (device (file-system-label "my-root"))
                          (mount-point "/")
                          (type "ext4"))
                        %base-file-systems))
    (firmware '())
    (packages (cons nss-certs %base-packages))
    (users (cons (user-account
                  (name "alice")
                  (comment "Bob's sister")
                  (group "users")
                  (supplementary-groups '("wheel" "audio" "video")))
                 %base-user-accounts))))

(define-syntax-rule (simple-operating-system user-services ...)
  "Return an operating system that includes USER-SERVICES in addition to
%BASE-SERVICES."
  (operating-system (inherit %simple-os)
                    (services (cons* user-services ... %base-services))))

(simple-operating-system (service nix-service-type))

Session:

root@komputilo /# nnn
bash: nnn: command not found
root@komputilo /# ls .
./  ../ 
root@komputilo /# ls -a
./  ../  bin/  dev/  etc/  gnu/  home/	nix/  proc/  root/  run/  tmp/	usr/  var/
root@komputilo /# cd root
root@komputilo /root# ls
root@komputilo /root# ls -a
./  ../  .Xdefaults  .bash_profile  .bashrc  .cache/  .config/	.guile	.nix-channels  .nix-defexpr/  .nix-profile  .zprofile
root@komputilo /root# ls .nix-profile
bin  manifest.nix  share
root@komputilo /root# ls .nix-profile/bin/
nnn
root@komputilo /root# .nix-profile/bin/nnn   
set HOME
root@komputilo /root# ./.nix-profile/bin/nnn
set HOME
root@komputilo /root# export HOME=/home/root
root@komputilo /root# ./.nix-profile/bin/nnn
root@komputilo /root# nix-env -q
WARNING: terminal is not fully functional
Press RETURN to continue 
nnn-4.8
root@komputilo /root# nix-env --version
nix-env (Nix) 2.16.1