aboutsummaryrefslogtreecommitdiff
path: root/scripts/nix-profile-daemon.sh.in
AgeCommit message (Collapse)Author
2023-03-01Merge pull request #7925 from cole-h/fixup-xdg-nix-envEelco Dolstra
Check if NIX_LINK_NEW exists instead of checking that NIX_LINK doesn't exist
2023-02-28Check if NIX_LINK_NEW exists instead of checking that NIX_LINK doesn't existCole Helbling
For brand new installations, neither NIX_LINK_NEW (`$XDG_STATE_HOME/nix/profile` or `~/.local/state/nix/profile`), nor NIX_LINK (`~/.nix-profile`) will exist. This restores functionality to nix-env, which is relied upon by GitHub Actions such as https://github.com/cachix/cachix-action and the Nixpkgs EditorConfig (and other) CI.
2023-02-28nix-profile{,-daemon}.sh.in: Allow XDG_STATE_HOME to be unsetCole Helbling
One of our CI machines installs Nix via the official script and then sources the nix-profile.sh script to setup the environment. However, it doesn't have XDG_STATE_HOME set, which causes sourcing the script to fail.
2023-02-10A setting to follow XDG Base Directory standardAlexander Bantyev
XDG Base Directory is a standard for locations for storing various files. Nix has a few files which seem to fit in the standard, but currently use a custom location directly in the user's ~, polluting it: - ~/.nix-profile - ~/.nix-defexpr - ~/.nix-channels This commit adds a config option (use-xdg-base-directories) to follow the XDG spec and instead use the following locations: - $XDG_STATE_HOME/nix/profile - $XDG_STATE_HOME/nix/defexpr - $XDG_STATE_HOME/nix/channels If $XDG_STATE_HOME is not set, it is assumed to be ~/.local/state. Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com> Co-authored-by: Tim Fenney <kodekata@gmail.com> Co-authored-by: pasqui23 <pasqui23@users.noreply.github.com> Co-authored-by: Artturin <Artturin@artturin.com> Co-authored-by: John Ericson <Ericson2314@Yahoo.com>
2021-11-19Apply some shellcheck suggestionsSandro Jäckel
2020-10-21Fix iterating over $NIX_PROFILES in ZshYuriy Taraday
NIX_PROFILES is space separated list of directories, and passing it into for as is is considered to be 1-element list with the whole string. With shwordsplit option Zsh emulates other shells in this regard ans implicitely splits unquoted strings into words. Fixes #4167.
2019-11-22Provide a default value for NIX_PATHEelco Dolstra
2019-11-22Remove $NIX_USER_PROFILE_DIREelco Dolstra
This is not used anywhere.
2019-10-09nix-env: Create ~/.nix-defexpr automaticallyEelco Dolstra
2019-10-09nix-env: Create ~/.nix-profile automaticallyEelco Dolstra
2019-10-09nix-profile.sh: Don't create .nix-channelsEelco Dolstra
This is already done by the installer, so no need to do it again.
2019-10-09Remove world-writability from per-user directoriesEelco Dolstra
'nix-daemon' now creates subdirectories for users when they first connect. Fixes #509 (CVE-2019-17365). Should also fix #3127.
2019-05-15Don’t set NIX_REMOTE=daemon in daemon profileMatthew Bauer
This is now autodetected. There is no need to put it in the profile.
2018-11-15Merge pull request #2432 from luke-clifton/fixsslEelco Dolstra
SSL certificate search failed to find user profile certificates.
2018-10-01nix-profile-daemon: remove cruftMatthew Bauer
This removes part of the PATH that were being added automatically in multi-user installs: - $HOME/.nix-profile/lib/kde4/libexec - shouldn't be needed anymore, we are now using kde5 - @localstatedir@/nix/profiles/default/lib/kde4/libexec - same as above - @localstatedir@/nix/profiles/default - shouldn't ever contain binaries
2018-09-20Search NIX_PROFILE for SSL CALuke Clifton
2018-09-19Look inside the user profileLuke Clifton
2018-05-30nix-daemon.sh profile script: operate under `set -u`Graham Christensen
If the profile is sourced inside a script with `set -u`, the check for __ETC_PROFILE_NIX_SOURCED and NIX_SSL_CERT_FILE would raise an error. A simple guard around this check allows the script to operate under standard environments (where it is fairly reasonable to assume USER and HOME are set.)
2018-05-25multi-user profile: borrow single user profiles' NIX_SSL_CERT_FILE finding logicGraham Christensen
2018-04-04Setup nix_path correctly in nix-profile-daemonMatthew Justin Bauer
We need nixpkgs to be set in NIX_PATH for Nix 1.12 to work correctly
2017-10-16Pull nix-profile-daemon from 1.11Shea Levy