about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2018-02-05 21:12:17 +0100
committerEelco Dolstra <edolstra@gmail.com>2018-02-05 22:12:18 +0100
commitcc0caac098b56b67300778c8a1738f8a16e08442 (patch)
tree8ea3c185e4948a28090a41eb493d0268b725672b /nixos
parentf9e64dbe764745f05ccf5ac458e804044196f571 (diff)
downloadnixlib-cc0caac098b56b67300778c8a1738f8a16e08442.tar
nixlib-cc0caac098b56b67300778c8a1738f8a16e08442.tar.gz
nixlib-cc0caac098b56b67300778c8a1738f8a16e08442.tar.bz2
nixlib-cc0caac098b56b67300778c8a1738f8a16e08442.tar.lz
nixlib-cc0caac098b56b67300778c8a1738f8a16e08442.tar.xz
nixlib-cc0caac098b56b67300778c8a1738f8a16e08442.tar.zst
nixlib-cc0caac098b56b67300778c8a1738f8a16e08442.zip
Move creation of /root to the activation script
...so it appears in a new installation before rebooting the system.
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/config/users-groups.nix2
-rw-r--r--nixos/modules/system/boot/stage-2-init.sh1
2 files changed, 2 insertions, 1 deletions
diff --git a/nixos/modules/config/users-groups.nix b/nixos/modules/config/users-groups.nix
index c1102d558101..92670ba31f50 100644
--- a/nixos/modules/config/users-groups.nix
+++ b/nixos/modules/config/users-groups.nix
@@ -533,6 +533,8 @@ in {
           -I${pkgs.perlPackages.FileSlurp}/lib/perl5/site_perl \
           -I${pkgs.perlPackages.JSON}/lib/perl5/site_perl \
           ${./update-users-groups.pl} ${spec}
+
+        install -m 0700 -d /root
       '';
 
     # for backwards compatibility
diff --git a/nixos/modules/system/boot/stage-2-init.sh b/nixos/modules/system/boot/stage-2-init.sh
index 46aed44bf10f..9d2c580d62a7 100644
--- a/nixos/modules/system/boot/stage-2-init.sh
+++ b/nixos/modules/system/boot/stage-2-init.sh
@@ -82,7 +82,6 @@ ln -s /proc/mounts /etc/mtab
 mkdir -m 01777 -p /tmp
 mkdir -m 0755 -p /var/{log,lib,db} /nix/var /etc/nixos/ \
     /run/lock /home /bin # for the /bin/sh symlink
-install -m 0700 -d /root
 
 
 # Miscellaneous boot time cleanup.