mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-12 01:50:44 +08:00
home-manager: respect NIX_STATE_DIR
This allows to install home-manager on a system without root access. PR #1196
This commit is contained in:
committed by
Robert Helgesson
parent
7682eb88c4
commit
dc227b579d
@@ -1,8 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
function setupVars() {
|
||||
local profilesPath="/nix/var/nix/profiles/per-user/$USER"
|
||||
local gcPath="/nix/var/nix/gcroots/per-user/$USER"
|
||||
local nixStateDir="${NIX_STATE_DIR:-/nix/var/nix}"
|
||||
local profilesPath="$nixStateDir/profiles/per-user/$USER"
|
||||
local gcPath="$nixStateDir/gcroots/per-user/$USER"
|
||||
|
||||
genProfilePath="$profilesPath/home-manager"
|
||||
newGenPath="@GENERATION_DIR@";
|
||||
|
||||
Reference in New Issue
Block a user