"Failed to link unit: Too many levels of symbolic links" when installing using muti-user installation script

I tried to install nix using the muti-user installation script, and the following is the output:

My environment is Ubuntu 22.04 LTS.

---- Nix config report ---------------------------------------------------------
        Temp Dir:       /tmp/tmp.QPl2JZTn1R
        Nix Root:       /nix
     Build Users:       32
  Build Group ID:       30000
Build Group Name:       nixbld

build users:
    Username:   UID
     nixbld1:   30001
     nixbld2:   30002
     nixbld3:   30003
     nixbld4:   30004
     nixbld5:   30005
     nixbld6:   30006
     nixbld7:   30007
     nixbld8:   30008
     nixbld9:   30009
     nixbld10:  30010
     nixbld11:  30011
     nixbld12:  30012
     nixbld13:  30013
     nixbld14:  30014
     nixbld15:  30015
     nixbld16:  30016
     nixbld17:  30017
     nixbld18:  30018
     nixbld19:  30019
     nixbld20:  30020
     nixbld21:  30021
     nixbld22:  30022
     nixbld23:  30023
     nixbld24:  30024
     nixbld25:  30025
     nixbld26:  30026
     nixbld27:  30027
     nixbld28:  30028
     nixbld29:  30029
     nixbld30:  30030
     nixbld31:  30031
     nixbld32:  30032

Ready to continue?
[y/n] y


~~> Setting up the build group nixbld
            Exists:     Yes

~~> Setting up the build user nixbld1
            Exists:     Yes
            Hidden:     Yes
    Home Directory:     /var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 1 nixbld1

in order to give nixbld1 a useful comment

usermod: no changes
              Note:     Nix build user 1
   Logins Disabled:     Yes
  Member of nixbld:     Yes
    PrimaryGroupID:     30000

~~> Setting up the build user nixbld2
            Exists:     Yes
            Hidden:     Yes
    Home Directory:     /var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 2 nixbld2

in order to give nixbld2 a useful comment

usermod: no changes
              Note:     Nix build user 2
   Logins Disabled:     Yes
  Member of nixbld:     Yes
    PrimaryGroupID:     30000

~~> Setting up the build user nixbld3
            Exists:     Yes
            Hidden:     Yes
    Home Directory:     /var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 3 nixbld3

in order to give nixbld3 a useful comment

usermod: no changes
              Note:     Nix build user 3
   Logins Disabled:     Yes
  Member of nixbld:     Yes
    PrimaryGroupID:     30000

~~> Setting up the build user nixbld4
            Exists:     Yes
            Hidden:     Yes
    Home Directory:     /var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 4 nixbld4

in order to give nixbld4 a useful comment

usermod: no changes
              Note:     Nix build user 4
   Logins Disabled:     Yes
  Member of nixbld:     Yes
    PrimaryGroupID:     30000

~~> Setting up the build user nixbld5
            Exists:     Yes
            Hidden:     Yes
    Home Directory:     /var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 5 nixbld5

in order to give nixbld5 a useful comment

usermod: no changes
              Note:     Nix build user 5
   Logins Disabled:     Yes
  Member of nixbld:     Yes
    PrimaryGroupID:     30000

~~> Setting up the build user nixbld6
            Exists:     Yes
            Hidden:     Yes
    Home Directory:     /var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 6 nixbld6

in order to give nixbld6 a useful comment

usermod: no changes
              Note:     Nix build user 6
   Logins Disabled:     Yes
  Member of nixbld:     Yes
    PrimaryGroupID:     30000

~~> Setting up the build user nixbld7
            Exists:     Yes
            Hidden:     Yes
    Home Directory:     /var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 7 nixbld7

in order to give nixbld7 a useful comment

usermod: no changes
              Note:     Nix build user 7
   Logins Disabled:     Yes
  Member of nixbld:     Yes
    PrimaryGroupID:     30000

~~> Setting up the build user nixbld8
            Exists:     Yes
            Hidden:     Yes
    Home Directory:     /var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 8 nixbld8

in order to give nixbld8 a useful comment

usermod: no changes
              Note:     Nix build user 8
   Logins Disabled:     Yes
  Member of nixbld:     Yes
    PrimaryGroupID:     30000

~~> Setting up the build user nixbld9
            Exists:     Yes
            Hidden:     Yes
    Home Directory:     /var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 9 nixbld9

in order to give nixbld9 a useful comment

usermod: no changes
              Note:     Nix build user 9
   Logins Disabled:     Yes
  Member of nixbld:     Yes
    PrimaryGroupID:     30000

~~> Setting up the build user nixbld10
            Exists:     Yes
            Hidden:     Yes
    Home Directory:     /var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 10 nixbld10

in order to give nixbld10 a useful comment

usermod: no changes
              Note:     Nix build user 10
   Logins Disabled:     Yes
  Member of nixbld:     Yes
    PrimaryGroupID:     30000

~~> Setting up the build user nixbld11
            Exists:     Yes
            Hidden:     Yes
    Home Directory:     /var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 11 nixbld11

in order to give nixbld11 a useful comment

usermod: no changes
              Note:     Nix build user 11
   Logins Disabled:     Yes
  Member of nixbld:     Yes
    PrimaryGroupID:     30000

~~> Setting up the build user nixbld12
            Exists:     Yes
            Hidden:     Yes
    Home Directory:     /var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 12 nixbld12

in order to give nixbld12 a useful comment

usermod: no changes
              Note:     Nix build user 12
   Logins Disabled:     Yes
  Member of nixbld:     Yes
    PrimaryGroupID:     30000

~~> Setting up the build user nixbld13
            Exists:     Yes
            Hidden:     Yes
    Home Directory:     /var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 13 nixbld13

in order to give nixbld13 a useful comment

usermod: no changes
              Note:     Nix build user 13
   Logins Disabled:     Yes
  Member of nixbld:     Yes
    PrimaryGroupID:     30000

~~> Setting up the build user nixbld14
            Exists:     Yes
            Hidden:     Yes
    Home Directory:     /var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 14 nixbld14

in order to give nixbld14 a useful comment

usermod: no changes
              Note:     Nix build user 14
   Logins Disabled:     Yes
  Member of nixbld:     Yes
    PrimaryGroupID:     30000

~~> Setting up the build user nixbld15
            Exists:     Yes
            Hidden:     Yes
    Home Directory:     /var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 15 nixbld15

in order to give nixbld15 a useful comment

usermod: no changes
              Note:     Nix build user 15
   Logins Disabled:     Yes
  Member of nixbld:     Yes
    PrimaryGroupID:     30000

~~> Setting up the build user nixbld16
            Exists:     Yes
            Hidden:     Yes
    Home Directory:     /var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 16 nixbld16

in order to give nixbld16 a useful comment

usermod: no changes
              Note:     Nix build user 16
   Logins Disabled:     Yes
  Member of nixbld:     Yes
    PrimaryGroupID:     30000

~~> Setting up the build user nixbld17
            Exists:     Yes
            Hidden:     Yes
    Home Directory:     /var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 17 nixbld17

in order to give nixbld17 a useful comment

usermod: no changes
              Note:     Nix build user 17
   Logins Disabled:     Yes
  Member of nixbld:     Yes
    PrimaryGroupID:     30000

~~> Setting up the build user nixbld18
            Exists:     Yes
            Hidden:     Yes
    Home Directory:     /var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 18 nixbld18

in order to give nixbld18 a useful comment

usermod: no changes
              Note:     Nix build user 18
   Logins Disabled:     Yes
  Member of nixbld:     Yes
    PrimaryGroupID:     30000

~~> Setting up the build user nixbld19
            Exists:     Yes
            Hidden:     Yes
    Home Directory:     /var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 19 nixbld19

in order to give nixbld19 a useful comment

usermod: no changes
              Note:     Nix build user 19
   Logins Disabled:     Yes
  Member of nixbld:     Yes
    PrimaryGroupID:     30000

~~> Setting up the build user nixbld20
            Exists:     Yes
            Hidden:     Yes
    Home Directory:     /var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 20 nixbld20

in order to give nixbld20 a useful comment

usermod: no changes
              Note:     Nix build user 20
   Logins Disabled:     Yes
  Member of nixbld:     Yes
    PrimaryGroupID:     30000

~~> Setting up the build user nixbld21
            Exists:     Yes
            Hidden:     Yes
    Home Directory:     /var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 21 nixbld21

in order to give nixbld21 a useful comment

usermod: no changes
              Note:     Nix build user 21
   Logins Disabled:     Yes
  Member of nixbld:     Yes
    PrimaryGroupID:     30000

~~> Setting up the build user nixbld22
            Exists:     Yes
            Hidden:     Yes
    Home Directory:     /var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 22 nixbld22

in order to give nixbld22 a useful comment

usermod: no changes
              Note:     Nix build user 22
   Logins Disabled:     Yes
  Member of nixbld:     Yes
    PrimaryGroupID:     30000

~~> Setting up the build user nixbld23
            Exists:     Yes
            Hidden:     Yes
    Home Directory:     /var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 23 nixbld23

in order to give nixbld23 a useful comment

usermod: no changes
              Note:     Nix build user 23
   Logins Disabled:     Yes
  Member of nixbld:     Yes
    PrimaryGroupID:     30000

~~> Setting up the build user nixbld24
            Exists:     Yes
            Hidden:     Yes
    Home Directory:     /var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 24 nixbld24

in order to give nixbld24 a useful comment

usermod: no changes
              Note:     Nix build user 24
   Logins Disabled:     Yes
  Member of nixbld:     Yes
    PrimaryGroupID:     30000

~~> Setting up the build user nixbld25
            Exists:     Yes
            Hidden:     Yes
    Home Directory:     /var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 25 nixbld25

in order to give nixbld25 a useful comment

usermod: no changes
              Note:     Nix build user 25
   Logins Disabled:     Yes
  Member of nixbld:     Yes
    PrimaryGroupID:     30000

~~> Setting up the build user nixbld26
            Exists:     Yes
            Hidden:     Yes
    Home Directory:     /var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 26 nixbld26

in order to give nixbld26 a useful comment

usermod: no changes
              Note:     Nix build user 26
   Logins Disabled:     Yes
  Member of nixbld:     Yes
    PrimaryGroupID:     30000

~~> Setting up the build user nixbld27
            Exists:     Yes
            Hidden:     Yes
    Home Directory:     /var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 27 nixbld27

in order to give nixbld27 a useful comment

usermod: no changes
              Note:     Nix build user 27
   Logins Disabled:     Yes
  Member of nixbld:     Yes
    PrimaryGroupID:     30000

~~> Setting up the build user nixbld28
            Exists:     Yes
            Hidden:     Yes
    Home Directory:     /var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 28 nixbld28

in order to give nixbld28 a useful comment

usermod: no changes
              Note:     Nix build user 28
   Logins Disabled:     Yes
  Member of nixbld:     Yes
    PrimaryGroupID:     30000

~~> Setting up the build user nixbld29
            Exists:     Yes
            Hidden:     Yes
    Home Directory:     /var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 29 nixbld29

in order to give nixbld29 a useful comment

usermod: no changes
              Note:     Nix build user 29
   Logins Disabled:     Yes
  Member of nixbld:     Yes
    PrimaryGroupID:     30000

~~> Setting up the build user nixbld30
            Exists:     Yes
            Hidden:     Yes
    Home Directory:     /var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 30 nixbld30

in order to give nixbld30 a useful comment

usermod: no changes
              Note:     Nix build user 30
   Logins Disabled:     Yes
  Member of nixbld:     Yes
    PrimaryGroupID:     30000

~~> Setting up the build user nixbld31
            Exists:     Yes
            Hidden:     Yes
    Home Directory:     /var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 31 nixbld31

in order to give nixbld31 a useful comment

usermod: no changes
              Note:     Nix build user 31
   Logins Disabled:     Yes
  Member of nixbld:     Yes
    PrimaryGroupID:     30000

~~> Setting up the build user nixbld32
            Exists:     Yes
            Hidden:     Yes
    Home Directory:     /var/empty

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo usermod --comment Nix build user 32 nixbld32

in order to give nixbld32 a useful comment

usermod: no changes
              Note:     Nix build user 32
   Logins Disabled:     Yes
  Member of nixbld:     Yes
    PrimaryGroupID:     30000

~~> Setting up the basic directory structure

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo /bin/chown -R root:nixbld /nix

to take root ownership of existing Nix store files


---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo install -dv -m 0755 /nix /nix/var /nix/var/log /nix/var/log/nix /nix/var/log/nix/drvs /nix/var/nix /nix/var/nix/db /nix/var/nix/gcroots /nix/var/nix/profiles /nix/var/nix/temproots /nix/var/nix/userpool /nix/var/nix/daemon-socket /nix/var/nix/gcroots/per-user /nix/var/nix/profiles/per-user

to make the basic directory structure of Nix (part 1)


---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo install -dv -g nixbld -m 1775 /nix/store

to make the basic directory structure of Nix (part 2)


---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo install -dv -m 0555 /etc/nix

to place the default nix daemon configuration (part 1)


---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo install -m 0664 /tmp/tmp.QPl2JZTn1R/.nix-channels /root/.nix-channels

to set up the default system channel (part 1)


~~> Installing Nix

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo cp -RPp ./store/0296qxvn30z9b2ah1g5p97k5wr9k8y78-busybox-static-x86_64-unknown-linux-musl-1.35.0 ./store/0v13vs0g3mfcxnw57ll8abjccgmkcydv-libarchive-3.6.1-lib ./store/0wzjyb53b5cyjdpg4fhkbihxg76j8nql-aws-c-common-0.7.0 ./store/297lkvbkxxsbw26yal0is899hd2aiqjy-libssh2-1.10.0 ./store/3h6mnqxvvd4l9c93q3waczigc6lhd2vj-libcpuid-0.5.1 ./store/3rmz64m00y3p6li30a3r5sv0x9wmma1r-aws-c-event-stream-0.2.7 ./store/55x9vyjbplnkrc0b2f060jqzdwqd13n4-sqlite-3.38.5 ./store/5idhc5rwc6x2khi5rrapfy71sydirqr1-libkrb5-1.19.3 ./store/63l0yvgig54h498v0d1sm7w2k15hn8c4-aws-c-sdkutils-0.1.2 ./store/6n4g81h2sxa4drqzp80zy043fmk6g4sb-aws-c-mqtt-0.7.10 ./store/7vj1h9s1yfkj66dh9645rk51pjpb0hkr-nss-cacert-3.80 ./store/8cbsr6jgw7zwhysm13139w1mff3wm1as-aws-sdk-cpp-1.9.238 ./store/96jckpr8dazx457ksv36laphp4n9z8p6-attr-2.5.1 ./store/9jnw3gnfyy1n83vvjfbaxyxc8xvw929f-aws-checksums-0.1.12 ./store/akfyfk3x3p4schkysfl7vbd6q4vdj8hb-boehm-gc-8.0.6 ./store/ay6siz8k5w39jr0mnvazzkcqq50x6yb5-aws-crt-cpp-0.17.28 ./store/c0mn074y2k6fxcmvfap3vf3wg0nc7xra-aws-c-io-0.11.0 ./store/cki6zalbpin96q7k33a1s26ffmbqvr4r-xz-5.2.5 ./store/csm1q8vl54pbjx2z3gda4h3gyq5xdgjw-aws-c-cal-0.5.17 ./store/cvjizmvf7bml9a9ppcbl4gxc2y8smbai-bzip2-1.0.6.0.2 ./store/fns6wcqslwj7zcr7w26hrfph76hc5i62-curl-7.83.1 ./store/g6r9mrw0gjdjf0mzradwwmdvarjzwa0n-aws-c-s3-0.1.39 ./store/ga9q4ikprn36wm32gqm4k521iv9kic5p-libsodium-1.0.18 ./store/iffl6dlplhv22i2xy7n1w51a5r631kmi-bash-5.1-p16 ./store/j132k1ncfn6gjfd2f5s1gz37170rch4h-gcc-11.3.0-lib ./store/jj5p0b6qhs0khkaj3426b3hq2kqf8ayl-aws-c-compression-0.2.14 ./store/kjg23ai2wb6p3sqpfkdd3xina8ci927z-libxml2-2.9.14 ./store/l7j222k357y8fbh9gj283mv7s1nh1vrx-zstd-1.5.2 ./store/mlbn02rnylynyx1xmrz3xk63b6wqalgx-aws-c-auth-0.6.13 ./store/mq45jndj8nadwiq3pb71y1af4ylmfq12-s2n-tls-1.3.12 ./store/nwf2y0nc48ybim56308cr5ccvwkabcqc-openssl-1.1.1q ./store/pgs9rvnmcl67p2cws6srx7p1bzbxpppd-acl-2.3.1 ./store/q7k32ydcqlram7f0l6b1y2c4cs07765y-zlib-1.2.12 ./store/qm9l62vy5cxiav1bax9gjbhp48751bwb-brotli-1.0.9-lib ./store/qrrn2l5gf21z4mwaizzsq4mn5mbv2gk3-keyutils-1.6.3-lib ./store/rp4dwxbw4vk590lrbcf9r198cdjwjhmd-libidn2-2.3.2 ./store/sb43q2bscllkq89i38v9p79gz256qy52-nghttp2-1.47.0-lib ./store/scd5n7xsn0hh0lvhhnycr9gx0h8xfzsl-glibc-2.34-210 ./store/sdf122qy7qd3j3j9ra0jnniawmyhsk7n-libseccomp-2.5.3-lib ./store/vk07fza1iv9hxj61l00bac8a5lml03pz-curl-7.83.1 ./store/wgb5lk0vlvdin5m8phhy5zmb86p9zlki-nlohmann_json-3.10.5 ./store/wj6j8lrdlind44n7vqn864ga7y802vc7-libunistring-1.0 ./store/x2f9x5q6qrs6cssx09ylxqyg9q2isi1z-aws-c-http-0.6.15 ./store/xdlpraypxdimjyfrr4k06narrv8nmfgh-nix-2.11.1 ./store/y3zqf6hyc719h78s90jrr2cypm4sj4qw-editline-1.17.1 /nix/store/

to copy the basic Nix files to the new store at /nix/store


---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo chmod -R ugo-w /nix/store/

to make the new store non-writable at /nix/store

      Alright! We have our first nix at /nix/store/xdlpraypxdimjyfrr4k06narrv8nmfgh-nix-2.11.1

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo /nix/store/xdlpraypxdimjyfrr4k06narrv8nmfgh-nix-2.11.1/bin/nix-store --load-db

to load data for the first time in to the Nix Database

      Just finished getting the nix database ready.

~~> Setting up shell profiles: /etc/bashrc /etc/profile.d/nix.sh /etc/zshrc /etc/bash.bashrc /etc/zsh/zshrc

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo cp /etc/bashrc /etc/bashrc.backup-before-nix

to back up your current /etc/bashrc to /etc/bashrc.backup-before-nix


---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo tee -a /etc/bashrc

extend your /etc/bashrc with nix-daemon settings


# Nix
if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
  . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
fi
# End Nix


---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo cp /etc/profile.d/nix.sh /etc/profile.d/nix.sh.backup-before-nix

to back up your current /etc/profile.d/nix.sh to /etc/profile.d/nix.sh.backup-before-nix

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo tee -a /etc/profile.d/nix.sh

extend your /etc/profile.d/nix.sh with nix-daemon settings


# Nix
if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
  . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
fi
# End Nix


---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo cp /etc/zshrc /etc/zshrc.backup-before-nix

to back up your current /etc/zshrc to /etc/zshrc.backup-before-nix


---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo tee -a /etc/zshrc

extend your /etc/zshrc with nix-daemon settings


# Nix
if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
  . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
fi
# End Nix


---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo cp /etc/bash.bashrc /etc/bash.bashrc.backup-before-nix

to back up your current /etc/bash.bashrc to /etc/bash.bashrc.backup-before-nix


---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo tee -a /etc/bash.bashrc

extend your /etc/bash.bashrc with nix-daemon settings


# Nix
if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
  . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
fi
# End Nix


---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo touch /etc/zsh/zshrc

to create a stub /etc/zsh/zshrc which will be updated


---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo tee -a /etc/zsh/zshrc

extend your /etc/zsh/zshrc with nix-daemon settings


# Nix
if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
  . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
fi
# End Nix


~~> Setting up shell profiles for Fish with with conf.d/nix.fish inside /etc/fish /usr/local/etc/fish /opt/homebrew/etc/fish /opt/local/etc/fish

~~> Setting up the default profile

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo HOME=/root /nix/store/xdlpraypxdimjyfrr4k06narrv8nmfgh-nix-2.11.1/bin/nix-env -i /nix/store/xdlpraypxdimjyfrr4k06narrv8nmfgh-nix-2.11.1

to install a bootstrapping Nix in to the default profile

replacing old 'nix-2.11.1'
installing 'nix-2.11.1'

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo HOME=/root NIX_SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt /nix/store/xdlpraypxdimjyfrr4k06narrv8nmfgh-nix-2.11.1/bin/nix-channel --update nixpkgs

to update the default channel in the default profile

unpacking channels...

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo install -m 0664 /tmp/tmp.QPl2JZTn1R/nix.conf /etc/nix/nix.conf

to place the default nix daemon configuration (part 2)


~~> Setting up the nix-daemon systemd service

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo ln -sfn /nix/var/nix/profiles/default//lib/tmpfiles.d/nix-daemon.conf /etc/tmpfiles.d/nix-daemon.conf

to create the nix-daemon tmpfiles config


---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo systemd-tmpfiles --create --prefix=/nix/var/nix

to run systemd-tmpfiles once to pick that path up


---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo systemctl link /nix/var/nix/profiles/default/lib/systemd/system/nix-daemon.service

to set up the nix-daemon service

Failed to link unit: Too many levels of symbolic links

---- oh no! --------------------------------------------------------------------
Jeeze, something went wrong. If you can take all the output and open
an issue, we'd love to fix the problem so nobody else has this issue.

:(

We'd love to help if you need it.

You can open an issue at https://github.com/nixos/nix/issues

Or feel free to contact the team:
 - Matrix: #nix:nixos.org
 - IRC: in #nixos on irc.libera.chat
 - twitter: @nixos_org
 - forum: https://discourse.nixos.org