diff options
author | Lin Jian <me@linj.tech> | 2022-11-30 23:49:35 +0800 |
---|---|---|
committer | Lin Jian <me@linj.tech> | 2022-12-01 00:49:46 +0800 |
commit | 0c70035f24bc5fd72d7bd1684aefe86e0d9e12bb (patch) | |
tree | ac8b34cf1be45c71ec1d5a05f2d7f0171b12c09d /nixos/lib/utils.nix | |
parent | 227de2b3bbec142f912c09d5e8a1b4e778aa54fb (diff) | |
download | nixlib-0c70035f24bc5fd72d7bd1684aefe86e0d9e12bb.tar nixlib-0c70035f24bc5fd72d7bd1684aefe86e0d9e12bb.tar.gz nixlib-0c70035f24bc5fd72d7bd1684aefe86e0d9e12bb.tar.bz2 nixlib-0c70035f24bc5fd72d7bd1684aefe86e0d9e12bb.tar.lz nixlib-0c70035f24bc5fd72d7bd1684aefe86e0d9e12bb.tar.xz nixlib-0c70035f24bc5fd72d7bd1684aefe86e0d9e12bb.tar.zst nixlib-0c70035f24bc5fd72d7bd1684aefe86e0d9e12bb.zip |
nixos/lib: add /home to pathsNeededForBoot
Before this patch, if we: 1. add a new user in the config, 2. mount /home seperately, 3. not set neededForBoot for /home, 4. and run `nixos-rebuild boot`, the newly added user's home will not be created after a reboot. This is because when nixos/modules/config/update-users-groups.pl is running in stage 2 to setup users, /home is not mounted. This patch fixes this issue.
Diffstat (limited to 'nixos/lib/utils.nix')
-rw-r--r-- | nixos/lib/utils.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/lib/utils.nix b/nixos/lib/utils.nix index 9eefa80d1c8b..7639a525f60e 100644 --- a/nixos/lib/utils.nix +++ b/nixos/lib/utils.nix @@ -10,7 +10,7 @@ rec { # Check whenever fileSystem is needed for boot. NOTE: Make sure # pathsNeededForBoot is closed under the parent relationship, i.e. if /a/b/c # is in the list, put /a and /a/b in as well. - pathsNeededForBoot = [ "/" "/nix" "/nix/store" "/var" "/var/log" "/var/lib" "/var/lib/nixos" "/etc" "/usr" ]; + pathsNeededForBoot = [ "/" "/nix" "/nix/store" "/var" "/var/log" "/var/lib" "/var/lib/nixos" "/etc" "/usr" "/home" ]; fsNeededForBoot = fs: fs.neededForBoot || elem fs.mountPoint pathsNeededForBoot; # Check whenever `b` depends on `a` as a fileSystem |