diff --git a/hosts/faunus-ater/modules/media.nix b/hosts/faunus-ater/modules/media.nix index 18f8f7b..f88ccea 100644 --- a/hosts/faunus-ater/modules/media.nix +++ b/hosts/faunus-ater/modules/media.nix @@ -74,9 +74,16 @@ in { enable = true; description = "Fix media permissions and ownership"; wantedBy = ["multi-user.target"]; + script = '' + #!/bin/sh + + set -exuo pipefail + + chown -R media:media /data/media + chmod -R g+rw,o-rwx /data/media + ''; serviceConfig = { Type = "simple"; - ExecStart = "chown -R media:media /data/media && chmod -R g+rw,o-rwx /data/media"; WorkingDirectory = "/data/media"; Restart = "always"; };