Skip to content

Commit

Permalink
hardcode e2fsprogs, idempotent chmod, remove care condition
Browse files Browse the repository at this point in the history
  • Loading branch information
domenkozar committed Sep 7, 2016
1 parent 3877ec5 commit 8f95e6f
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions nixos/modules/system/activation/activation-script.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ let
glibc # needed for getent
shadow
nettools # needed for hostname
e2fsprogs # needed for chattr
];

in
Expand Down Expand Up @@ -140,13 +139,13 @@ in
mkdir -m 1777 -p /var/tmp
# Empty, immutable home directory of many system accounts.
mkdir -p /var/empty
# Make sure it's really empty
chattr -i /var/empty
rm -rf /var/empty
# Empty, read-only home directory of many system accounts.
mkdir -m 0555 -p /var/empty
chattr +i /var/empty
${pkgs.e2fsprogs}/bin/chattr -i /var/empty
find /var/empty -mindepth 1 -delete
chmod 0555 /var/empty
${pkgs.e2fsprogs}/bin/chattr +i /var/empty
'';

system.activationScripts.usrbinenv = if config.environment.usrbinenv != null
Expand Down

0 comments on commit 8f95e6f

Please sign in to comment.