Merge remote-tracking branch 'ni/master'
This commit is contained in:
commit
cd6c5e1311
@ -35,7 +35,7 @@ with import <stockholm/lib>;
|
|||||||
|
|
||||||
config = let
|
config = let
|
||||||
plans = attrValues config.krebs.permown;
|
plans = attrValues config.krebs.permown;
|
||||||
in mkIf (plans != {}) {
|
in mkIf (plans != []) {
|
||||||
|
|
||||||
system.activationScripts.permown = let
|
system.activationScripts.permown = let
|
||||||
mkdir = plan: /* sh */ ''
|
mkdir = plan: /* sh */ ''
|
||||||
@ -61,7 +61,7 @@ with import <stockholm/lib>;
|
|||||||
ExecStart = pkgs.writeDash "permown" ''
|
ExecStart = pkgs.writeDash "permown" ''
|
||||||
set -efu
|
set -efu
|
||||||
|
|
||||||
find "$ROOT_PATH" -exec chown "$OWNER_GROUP" {} +
|
find "$ROOT_PATH" -exec chown -h "$OWNER_GROUP" {} +
|
||||||
find "$ROOT_PATH" -type d -exec chmod "$DIR_MODE" {} +
|
find "$ROOT_PATH" -type d -exec chmod "$DIR_MODE" {} +
|
||||||
find "$ROOT_PATH" -type f -exec chmod "$FILE_MODE" {} +
|
find "$ROOT_PATH" -type f -exec chmod "$FILE_MODE" {} +
|
||||||
|
|
||||||
@ -70,8 +70,10 @@ with import <stockholm/lib>;
|
|||||||
if test -d "$path"; then
|
if test -d "$path"; then
|
||||||
exec "$0" "$@"
|
exec "$0" "$@"
|
||||||
fi
|
fi
|
||||||
chown "$OWNER_GROUP" "$path"
|
chown -h "$OWNER_GROUP" "$path"
|
||||||
|
if test -f "$path"; then
|
||||||
chmod "$FILE_MODE" "$path"
|
chmod "$FILE_MODE" "$path"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
|
Loading…
Reference in New Issue
Block a user