文書の表示以前のリビジョンバックリンク文書の先頭へ この文書は読取専用です。文書のソースを閲覧することは可能ですが、変更はできません。もし変更したい場合は管理者に連絡してください。 ====== Nix ====== ===== インストール ===== ==== マルチユーザー ==== <WRAP color_term> <WRAP color_command><html><pre> <font color="#0087FF"><b>$</b></font> <font color="#26A269">curl</font> <font color="#A347BA">-L</font> https://nixos.org/nix/install <font color="#12488B"><b>|</b></font> <font color="#26A269">sh</font> <font color="#A347BA">-s</font> <font color="#A347BA">--</font> <font color="#A347BA">--daemon</font> </pre></html></WRAP> <WRAP color_result_long><html><pre> % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0 100 4267 100 4267 0 0 1622 0 0:00:02 0:00:02 --:--:-- 7147 downloading Nix 2.32.4 binary tarball for x86_64-linux from 'https://releases.nixos.org/nix/nix-2.32.4/nix-2.32.4-x86_64-linux.tar.xz' to '/tmp/nix-binary-tarball-unpack.t6xBSMNsyb'... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 24.8M 100 24.8M 0 0 797k 0 0:00:31 0:00:31 --:--:-- 786k Note: a multi-user installation is possible. See https://nix.dev/manual/nix/stable/installation/installing-binary.html#multi-user-installation <font color="#C01C28"><b>Switching to the Multi-user Installer</b></font> <font color="#26A269">Welcome to the Multi-User Nix Installation</font> This installation tool will set up your computer with the Nix package manager. This will happen in a few stages: 1. Make sure your computer doesn't already have Nix. If it does, I will show you instructions on how to clean up your old install. 2. Show you what I am going to install and where. Then I will ask if you are ready to continue. 3. Create the system users <font color="#12488B">(uids [30001..30032])</font> and groups <font color="#12488B">(gid 30000)</font> that the Nix daemon uses to run builds. To create system users in a different range, exit and run this tool again with NIX_FIRST_BUILD_UID set. 4. Perform the basic installation of the Nix files daemon. 5. Configure your shell to import special Nix Profile files, so you can use Nix. 6. Start the Nix daemon. <font color="#26A269"><u style="text-decoration-style:solid">Would you like to see a more detailed list of what I will do?</u></font> No TTY, assuming you would say yes :) I will: - make sure your computer doesn't already have Nix files (if it does, I will tell you how to clean them up.) - create local users (see the list above for the users I'll make) - create a local group (nixbld) - install Nix in /nix - create a configuration file in /etc/nix - set up the "default profile" by creating some Nix-related files in /root - back up /etc/bashrc to /etc/bashrc.backup-before-nix - update /etc/bashrc to include some Nix configuration - back up /etc/zshrc to /etc/zshrc.backup-before-nix - update /etc/zshrc to include some Nix configuration - load and start a service (at /etc/systemd/system/nix-daemon.service and /etc/systemd/system/nix-daemon.socket) for nix-daemon <font color="#26A269"><u style="text-decoration-style:solid">Ready to continue?</u></font> No TTY, assuming you would say yes :) <font color="#12488B">---- let's talk about sudo -----------------------------------------------------</font> This script is going to call sudo a lot. Normally, it would show you exactly what commands it is running and why. However, the script is run in a headless fashion, like this: $ curl -L https://nixos.org/nix/install | sh or maybe in a CI pipeline. Because of that, I'm going to skip the verbose output in the interest of brevity. If you would like to see the output, try like this: $ curl -L -o install-nix https://nixos.org/nix/install $ sh ./install-nix <font color="#26A269">~~> Checking for artifacts of previous installs</font> Before I try to install, I'll check for signs Nix already is or has been installed on this system. <font color="#12488B">---- Nix config report ---------------------------------------------------------</font> <b> Temp Dir</b>: /tmp/tmp.eibIFRLfWt <b> Nix Root</b>: /nix <b> Build Users</b>: 32 <b> Build Group ID</b>: 30000 <b>Build Group Name</b>: nixbld <font color="#12488B"><u style="text-decoration-style:solid">build users:</u></font> <b> Username</b>: UID <b> nixbld1</b>: 30001 <b> nixbld2</b>: 30002 <b> nixbld3</b>: 30003 <b> nixbld4</b>: 30004 <b> nixbld5</b>: 30005 <b> nixbld6</b>: 30006 <b> nixbld7</b>: 30007 <b> nixbld8</b>: 30008 <b> nixbld9</b>: 30009 <b> nixbld10</b>: 30010 <b> nixbld11</b>: 30011 <b> nixbld12</b>: 30012 <b> nixbld13</b>: 30013 <b> nixbld14</b>: 30014 <b> nixbld15</b>: 30015 <b> nixbld16</b>: 30016 <b> nixbld17</b>: 30017 <b> nixbld18</b>: 30018 <b> nixbld19</b>: 30019 <b> nixbld20</b>: 30020 <b> nixbld21</b>: 30021 <b> nixbld22</b>: 30022 <b> nixbld23</b>: 30023 <b> nixbld24</b>: 30024 <b> nixbld25</b>: 30025 <b> nixbld26</b>: 30026 <b> nixbld27</b>: 30027 <b> nixbld28</b>: 30028 <b> nixbld29</b>: 30029 <b> nixbld30</b>: 30030 <b> nixbld31</b>: 30031 <b> nixbld32</b>: 30032 <font color="#26A269"><u style="text-decoration-style:solid">Ready to continue?</u></font> No TTY, assuming you would say yes :) <font color="#26A269">~~> Setting up the build group nixbld</font> [sudo] tomoyan のパスワード: <b> Created</b>: Yes <font color="#26A269">~~> Setting up the build user nixbld1</font> useradd warning: nixbld1's uid 30001 is greater than SYS_UID_MAX 999 <b> Created</b>: Yes <b> Hidden</b>: Yes <b> Home Directory</b>: /var/empty <b> Note</b>: Nix build user 1 <b> Logins Disabled</b>: Yes <b> Member of nixbld</b>: Yes <b> PrimaryGroupID</b>: 30000 <font color="#26A269">~~> Setting up the build user nixbld2</font> useradd warning: nixbld2's uid 30002 is greater than SYS_UID_MAX 999 <b> Created</b>: Yes <b> Hidden</b>: Yes <b> Home Directory</b>: /var/empty <b> Note</b>: Nix build user 2 <b> Logins Disabled</b>: Yes <b> Member of nixbld</b>: Yes <b> PrimaryGroupID</b>: 30000 <font color="#26A269">~~> Setting up the build user nixbld3</font> useradd warning: nixbld3's uid 30003 is greater than SYS_UID_MAX 999 <b> Created</b>: Yes <b> Hidden</b>: Yes <b> Home Directory</b>: /var/empty <b> Note</b>: Nix build user 3 <b> Logins Disabled</b>: Yes <b> Member of nixbld</b>: Yes <b> PrimaryGroupID</b>: 30000 <font color="#26A269">~~> Setting up the build user nixbld4</font> useradd warning: nixbld4's uid 30004 is greater than SYS_UID_MAX 999 <b> Created</b>: Yes <b> Hidden</b>: Yes <b> Home Directory</b>: /var/empty <b> Note</b>: Nix build user 4 <b> Logins Disabled</b>: Yes <b> Member of nixbld</b>: Yes <b> PrimaryGroupID</b>: 30000 <font color="#26A269">~~> Setting up the build user nixbld5</font> useradd warning: nixbld5's uid 30005 is greater than SYS_UID_MAX 999 <b> Created</b>: Yes <b> Hidden</b>: Yes <b> Home Directory</b>: /var/empty <b> Note</b>: Nix build user 5 <b> Logins Disabled</b>: Yes <b> Member of nixbld</b>: Yes <b> PrimaryGroupID</b>: 30000 <font color="#26A269">~~> Setting up the build user nixbld6</font> useradd warning: nixbld6's uid 30006 is greater than SYS_UID_MAX 999 <b> Created</b>: Yes <b> Hidden</b>: Yes <b> Home Directory</b>: /var/empty <b> Note</b>: Nix build user 6 <b> Logins Disabled</b>: Yes <b> Member of nixbld</b>: Yes <b> PrimaryGroupID</b>: 30000 <font color="#26A269">~~> Setting up the build user nixbld7</font> useradd warning: nixbld7's uid 30007 is greater than SYS_UID_MAX 999 <b> Created</b>: Yes <b> Hidden</b>: Yes <b> Home Directory</b>: /var/empty <b> Note</b>: Nix build user 7 <b> Logins Disabled</b>: Yes <b> Member of nixbld</b>: Yes <b> PrimaryGroupID</b>: 30000 <font color="#26A269">~~> Setting up the build user nixbld8</font> useradd warning: nixbld8's uid 30008 is greater than SYS_UID_MAX 999 <b> Created</b>: Yes <b> Hidden</b>: Yes <b> Home Directory</b>: /var/empty <b> Note</b>: Nix build user 8 <b> Logins Disabled</b>: Yes <b> Member of nixbld</b>: Yes <b> PrimaryGroupID</b>: 30000 <font color="#26A269">~~> Setting up the build user nixbld9</font> useradd warning: nixbld9's uid 30009 is greater than SYS_UID_MAX 999 <b> Created</b>: Yes <b> Hidden</b>: Yes <b> Home Directory</b>: /var/empty <b> Note</b>: Nix build user 9 <b> Logins Disabled</b>: Yes <b> Member of nixbld</b>: Yes <b> PrimaryGroupID</b>: 30000 <font color="#26A269">~~> Setting up the build user nixbld10</font> useradd warning: nixbld10's uid 30010 is greater than SYS_UID_MAX 999 <b> Created</b>: Yes <b> Hidden</b>: Yes <b> Home Directory</b>: /var/empty <b> Note</b>: Nix build user 10 <b> Logins Disabled</b>: Yes <b> Member of nixbld</b>: Yes <b> PrimaryGroupID</b>: 30000 <font color="#26A269">~~> Setting up the build user nixbld11</font> useradd warning: nixbld11's uid 30011 is greater than SYS_UID_MAX 999 <b> Created</b>: Yes <b> Hidden</b>: Yes <b> Home Directory</b>: /var/empty <b> Note</b>: Nix build user 11 <b> Logins Disabled</b>: Yes <b> Member of nixbld</b>: Yes <b> PrimaryGroupID</b>: 30000 <font color="#26A269">~~> Setting up the build user nixbld12</font> useradd warning: nixbld12's uid 30012 is greater than SYS_UID_MAX 999 <b> Created</b>: Yes <b> Hidden</b>: Yes <b> Home Directory</b>: /var/empty <b> Note</b>: Nix build user 12 <b> Logins Disabled</b>: Yes <b> Member of nixbld</b>: Yes <b> PrimaryGroupID</b>: 30000 <font color="#26A269">~~> Setting up the build user nixbld13</font> useradd warning: nixbld13's uid 30013 is greater than SYS_UID_MAX 999 <b> Created</b>: Yes <b> Hidden</b>: Yes <b> Home Directory</b>: /var/empty <b> Note</b>: Nix build user 13 <b> Logins Disabled</b>: Yes <b> Member of nixbld</b>: Yes <b> PrimaryGroupID</b>: 30000 <font color="#26A269">~~> Setting up the build user nixbld14</font> useradd warning: nixbld14's uid 30014 is greater than SYS_UID_MAX 999 <b> Created</b>: Yes <b> Hidden</b>: Yes <b> Home Directory</b>: /var/empty <b> Note</b>: Nix build user 14 <b> Logins Disabled</b>: Yes <b> Member of nixbld</b>: Yes <b> PrimaryGroupID</b>: 30000 <font color="#26A269">~~> Setting up the build user nixbld15</font> useradd warning: nixbld15's uid 30015 is greater than SYS_UID_MAX 999 <b> Created</b>: Yes <b> Hidden</b>: Yes <b> Home Directory</b>: /var/empty <b> Note</b>: Nix build user 15 <b> Logins Disabled</b>: Yes <b> Member of nixbld</b>: Yes <b> PrimaryGroupID</b>: 30000 <font color="#26A269">~~> Setting up the build user nixbld16</font> useradd warning: nixbld16's uid 30016 is greater than SYS_UID_MAX 999 <b> Created</b>: Yes <b> Hidden</b>: Yes <b> Home Directory</b>: /var/empty <b> Note</b>: Nix build user 16 <b> Logins Disabled</b>: Yes <b> Member of nixbld</b>: Yes <b> PrimaryGroupID</b>: 30000 <font color="#26A269">~~> Setting up the build user nixbld17</font> useradd warning: nixbld17's uid 30017 is greater than SYS_UID_MAX 999 <b> Created</b>: Yes <b> Hidden</b>: Yes <b> Home Directory</b>: /var/empty <b> Note</b>: Nix build user 17 <b> Logins Disabled</b>: Yes <b> Member of nixbld</b>: Yes <b> PrimaryGroupID</b>: 30000 <font color="#26A269">~~> Setting up the build user nixbld18</font> useradd warning: nixbld18's uid 30018 is greater than SYS_UID_MAX 999 <b> Created</b>: Yes <b> Hidden</b>: Yes <b> Home Directory</b>: /var/empty <b> Note</b>: Nix build user 18 <b> Logins Disabled</b>: Yes <b> Member of nixbld</b>: Yes <b> PrimaryGroupID</b>: 30000 <font color="#26A269">~~> Setting up the build user nixbld19</font> useradd warning: nixbld19's uid 30019 is greater than SYS_UID_MAX 999 <b> Created</b>: Yes <b> Hidden</b>: Yes <b> Home Directory</b>: /var/empty <b> Note</b>: Nix build user 19 <b> Logins Disabled</b>: Yes <b> Member of nixbld</b>: Yes <b> PrimaryGroupID</b>: 30000 <font color="#26A269">~~> Setting up the build user nixbld20</font> useradd warning: nixbld20's uid 30020 is greater than SYS_UID_MAX 999 <b> Created</b>: Yes <b> Hidden</b>: Yes <b> Home Directory</b>: /var/empty <b> Note</b>: Nix build user 20 <b> Logins Disabled</b>: Yes <b> Member of nixbld</b>: Yes <b> PrimaryGroupID</b>: 30000 <font color="#26A269">~~> Setting up the build user nixbld21</font> useradd warning: nixbld21's uid 30021 is greater than SYS_UID_MAX 999 <b> Created</b>: Yes <b> Hidden</b>: Yes <b> Home Directory</b>: /var/empty <b> Note</b>: Nix build user 21 <b> Logins Disabled</b>: Yes <b> Member of nixbld</b>: Yes <b> PrimaryGroupID</b>: 30000 <font color="#26A269">~~> Setting up the build user nixbld22</font> useradd warning: nixbld22's uid 30022 is greater than SYS_UID_MAX 999 <b> Created</b>: Yes <b> Hidden</b>: Yes <b> Home Directory</b>: /var/empty <b> Note</b>: Nix build user 22 <b> Logins Disabled</b>: Yes <b> Member of nixbld</b>: Yes <b> PrimaryGroupID</b>: 30000 <font color="#26A269">~~> Setting up the build user nixbld23</font> useradd warning: nixbld23's uid 30023 is greater than SYS_UID_MAX 999 <b> Created</b>: Yes <b> Hidden</b>: Yes <b> Home Directory</b>: /var/empty <b> Note</b>: Nix build user 23 <b> Logins Disabled</b>: Yes <b> Member of nixbld</b>: Yes <b> PrimaryGroupID</b>: 30000 <font color="#26A269">~~> Setting up the build user nixbld24</font> useradd warning: nixbld24's uid 30024 is greater than SYS_UID_MAX 999 <b> Created</b>: Yes <b> Hidden</b>: Yes <b> Home Directory</b>: /var/empty <b> Note</b>: Nix build user 24 <b> Logins Disabled</b>: Yes <b> Member of nixbld</b>: Yes <b> PrimaryGroupID</b>: 30000 <font color="#26A269">~~> Setting up the build user nixbld25</font> useradd warning: nixbld25's uid 30025 is greater than SYS_UID_MAX 999 <b> Created</b>: Yes <b> Hidden</b>: Yes <b> Home Directory</b>: /var/empty <b> Note</b>: Nix build user 25 <b> Logins Disabled</b>: Yes <b> Member of nixbld</b>: Yes <b> PrimaryGroupID</b>: 30000 <font color="#26A269">~~> Setting up the build user nixbld26</font> useradd warning: nixbld26's uid 30026 is greater than SYS_UID_MAX 999 <b> Created</b>: Yes <b> Hidden</b>: Yes <b> Home Directory</b>: /var/empty <b> Note</b>: Nix build user 26 <b> Logins Disabled</b>: Yes <b> Member of nixbld</b>: Yes <b> PrimaryGroupID</b>: 30000 <font color="#26A269">~~> Setting up the build user nixbld27</font> useradd warning: nixbld27's uid 30027 is greater than SYS_UID_MAX 999 <b> Created</b>: Yes <b> Hidden</b>: Yes <b> Home Directory</b>: /var/empty <b> Note</b>: Nix build user 27 <b> Logins Disabled</b>: Yes <b> Member of nixbld</b>: Yes <b> PrimaryGroupID</b>: 30000 <font color="#26A269">~~> Setting up the build user nixbld28</font> useradd warning: nixbld28's uid 30028 is greater than SYS_UID_MAX 999 <b> Created</b>: Yes <b> Hidden</b>: Yes <b> Home Directory</b>: /var/empty <b> Note</b>: Nix build user 28 <b> Logins Disabled</b>: Yes <b> Member of nixbld</b>: Yes <b> PrimaryGroupID</b>: 30000 <font color="#26A269">~~> Setting up the build user nixbld29</font> useradd warning: nixbld29's uid 30029 is greater than SYS_UID_MAX 999 <b> Created</b>: Yes <b> Hidden</b>: Yes <b> Home Directory</b>: /var/empty <b> Note</b>: Nix build user 29 <b> Logins Disabled</b>: Yes <b> Member of nixbld</b>: Yes <b> PrimaryGroupID</b>: 30000 <font color="#26A269">~~> Setting up the build user nixbld30</font> useradd warning: nixbld30's uid 30030 is greater than SYS_UID_MAX 999 <b> Created</b>: Yes <b> Hidden</b>: Yes <b> Home Directory</b>: /var/empty <b> Note</b>: Nix build user 30 <b> Logins Disabled</b>: Yes <b> Member of nixbld</b>: Yes <b> PrimaryGroupID</b>: 30000 <font color="#26A269">~~> Setting up the build user nixbld31</font> useradd warning: nixbld31's uid 30031 is greater than SYS_UID_MAX 999 <b> Created</b>: Yes <b> Hidden</b>: Yes <b> Home Directory</b>: /var/empty <b> Note</b>: Nix build user 31 <b> Logins Disabled</b>: Yes <b> Member of nixbld</b>: Yes <b> PrimaryGroupID</b>: 30000 <font color="#26A269">~~> Setting up the build user nixbld32</font> useradd warning: nixbld32's uid 30032 is greater than SYS_UID_MAX 999 <b> Created</b>: Yes <b> Hidden</b>: Yes <b> Home Directory</b>: /var/empty <b> Note</b>: Nix build user 32 <b> Logins Disabled</b>: Yes <b> Member of nixbld</b>: Yes <b> PrimaryGroupID</b>: 30000 <font color="#26A269">~~> Setting up the basic directory structure</font> install: ディレクトリ '/nix' を作成しています install: ディレクトリ '/nix/var' を作成しています install: ディレクトリ '/nix/var/log' を作成しています install: ディレクトリ '/nix/var/log/nix' を作成しています install: ディレクトリ '/nix/var/log/nix/drvs' を作成しています install: ディレクトリ '/nix/var/nix' を作成しています install: ディレクトリ '/nix/var/nix/db' を作成しています install: ディレクトリ '/nix/var/nix/gcroots' を作成しています install: ディレクトリ '/nix/var/nix/profiles' を作成しています install: ディレクトリ '/nix/var/nix/temproots' を作成しています install: ディレクトリ '/nix/var/nix/userpool' を作成しています install: ディレクトリ '/nix/var/nix/daemon-socket' を作成しています install: ディレクトリ '/nix/var/nix/gcroots/per-user' を作成しています install: ディレクトリ '/nix/var/nix/profiles/per-user' を作成しています install: ディレクトリ '/nix/store' を作成しています install: ディレクトリ '/etc/nix' を作成しています <font color="#26A269">~~> Installing Nix</font> Alright! We have our first nix at /nix/store/69hp828rcfmc32bnbxnkkavl7idpp5ns-nix-2.32.4 Just finished getting the nix database ready. <font color="#26A269">~~> Setting up shell profiles: /etc/bashrc /etc/profile.d/nix.sh /etc/zshrc /etc/bash.bashrc /etc/zsh/zshrc</font> # 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 # /etc/bashrc # System wide functions and aliases # Environment stuff goes in /etc/profile # It's NOT a good idea to change this file unless you know what you # are doing. It's much better to create a custom.sh shell script in # /etc/profile.d/ to make custom changes to your environment, as this # will prevent the need for merging in future updates. # Prevent doublesourcing if [ -z "$BASHRCSOURCED" ]; then BASHRCSOURCED="Y" # are we an interactive shell? if [ "$PS1" ]; then if [ -z "$PROMPT_COMMAND" ]; then declare -a PROMPT_COMMAND case $TERM in xterm*) if [ -e /etc/sysconfig/bash-prompt-xterm ]; then PROMPT_COMMAND=/etc/sysconfig/bash-prompt-xterm else PROMPT_COMMAND='printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"' fi ;; screen*) if [ -e /etc/sysconfig/bash-prompt-screen ]; then PROMPT_COMMAND=/etc/sysconfig/bash-prompt-screen else PROMPT_COMMAND='printf "\033k%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"' fi ;; *) [ -e /etc/sysconfig/bash-prompt-default ] && PROMPT_COMMAND=/etc/sysconfig/bash-prompt-default ;; esac fi # Turn on parallel history shopt -s histappend # Turn on checkwinsize shopt -s checkwinsize # Change the default prompt string [ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ " # You might want to have e.g. tty in prompt (e.g. more virtual machines) # and console windows # If you want to do so, just add e.g. # if [ "$PS1" ]; then # PS1="[\u@\h:\l \W]\\$ " # fi # to your custom modification shell script in /etc/profile.d/ directory fi if ! shopt -q login_shell ; then # We're not a login shell # Need to redefine pathmunge, it gets undefined at the end of /etc/profile pathmunge () { case ":${PATH}:" in *:"$1":*) ;; *) if [ "$2" = "after" ] ; then PATH=$PATH:$1 else PATH=$1:$PATH fi esac } # Set default umask for non-login shell only if it is set to 0 [ `umask` -eq 0 ] && umask 022 SHELL=/bin/bash # Only display echos from profile.d scripts if we are no login shell # and interactive - otherwise just process them to set envvars for i in /etc/profile.d/*.sh; do if [ -r "$i" ]; then if [ "$PS1" ]; then . "$i" else . "$i" >/dev/null fi fi done unset i unset -f pathmunge fi fi # vim:ts=4:sw=4 # 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 # 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 # # /etc/zshrc is sourced in interactive shells. It # should contain commands to set up aliases, functions, # options, key bindings, etc. # ## shell functions #setenv() { export $1=$2 } # csh compatibility # Set prompts [[ "$PROMPT" = "%m%# " ]] && PROMPT='[%n@%m]%~%# ' # default prompt #RPROMPT=' %~' # prompt for right side of screen # bindkey -v # vi key bindings # bindkey -e # emacs key bindings bindkey ' ' magic-space # also do history expansion on space # Provide pathmunge for /etc/profile.d scripts pathmunge() { if ! echo $PATH | /bin/grep -qE "(^|:)$1($|:)" ; then if [ "$2" = "after" ] ; then PATH=$PATH:$1 else PATH=$1:$PATH fi fi } _src_etc_profile_d() { # Make the *.sh things happier, and have possible ~/.zshenv options like # NOMATCH ignored. emulate -L ksh # from bashrc, with zsh fixes if [[ ! -o login ]]; then # We're not a login shell for i in /etc/profile.d/*.sh; do if [ -r "$i" ]; then . $i fi done unset i fi } _src_etc_profile_d unset -f pathmunge _src_etc_profile_d # 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 <font color="#26A269">~~> Setting up shell profiles for Fish with conf.d/nix.fish inside /etc/fish /usr/local/etc/fish /opt/homebrew/etc/fish /opt/local/etc/fish</font> <font color="#26A269">~~> Setting up the default profile</font> installing 'nix-2.32.4' building '/nix/store/rb229iwnnwdg1frkn8v0jdl9sc1f55gq-user-environment.drv'... installing 'nss-cacert-3.115' building '/nix/store/jry58j2n07hnbjz6s0bzxzdkb8kf5ayf-user-environment.drv'... unpacking 1 channels... <font color="#26A269">~~> Setting up the nix-daemon systemd service</font> Created symlink '/etc/systemd/system/nix-daemon.service' → '/nix/var/nix/profiles/default/lib/systemd/system/nix-daemon.service'. Created symlink '/etc/systemd/system/nix-daemon.socket' → '/nix/var/nix/profiles/default/lib/systemd/system/nix-daemon.socket'. Created symlink '/etc/systemd/system/sockets.target.wants/nix-daemon.socket' → '/nix/var/nix/profiles/default/lib/systemd/system/nix-daemon.socket'. <font color="#26A269">Alright! We're done!</font> Try it! Open a new terminal, and type: $ nix-shell -p nix-info --run "nix-info -m" Thank you for using this installer. If you have any feedback or need help, don't hesitate: You can open an issue at https://github.com/NixOS/nix/issues/new?labels=installer&template=installer.md Or get in touch with the community: https://nixos.org/community <font color="#12488B">---- Reminders -----------------------------------------------------------------</font> <font color="#12488B">[ 1 ]</font> Nix won't work in active shell sessions until you restart them. </pre></html></WRAP> </WRAP> ==== マルチ/シングル判定 ==== マルチユーザー\\ <WRAP color_term> <WRAP color_command><html><pre> <font color="#0087FF"><b>$</b></font> <font color="#26A269">which</font><font color="#999999"> nix</font> </pre></html></WRAP> <WRAP color_result><html><pre> /nix/var/nix/profiles/default/bin/nix </pre></html></WRAP> <WRAP color_command><html><pre> <font color="#0087FF"><b>$</b></font> <font color="#26A269">ps</font> aux <font color="#12488B"><b>|</b></font> <font color="#26A269">grep</font> nix-daemon </pre></html></WRAP> <WRAP color_result><html><pre> root 740755 0.0 0.1 498432 30668 ? Ssl 02:07 0:00 <font color="#C01C28"><b>nix-daemon</b></font> --daemon </pre></html></WRAP> </WRAP> rust/nix.txt 最終更新: 2025/11/13 02:32by ともやん