Skip to content

Commit

Permalink
nixos/immich: restrict media filesystem permissions
Browse files Browse the repository at this point in the history
immich appears to create this directory with permissions 0755 by
default, which needlessly exposes user data to other processes.
  • Loading branch information
Ralith committed Dec 4, 2024
1 parent ee5452c commit d38f602
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions nixos/modules/services/web-apps/immich.nix
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,18 @@ in
};
};

systemd.tmpfiles.settings = {
"immich" = {
"${cfg.mediaLocation}" = {
d = {
user = cfg.user;
group = cfg.group;
mode = "0750";
};
};
};
};

users.users = mkIf (cfg.user == "immich") {
immich = {
name = "immich";
Expand Down

0 comments on commit d38f602

Please sign in to comment.