Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos/asf: fix home directory permissions, for real #176133

Merged
merged 5 commits into from
Jun 6, 2022
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions nixos/modules/services/games/asf.nix
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ in
users = {
users.asf = {
home = cfg.dataDir;
homeMode = "700";
isSystemUser = true;
group = "asf";
description = "Archis-Steam-Farm service user";
Expand All @@ -174,13 +173,17 @@ in
wantedBy = [ "multi-user.target" ];

serviceConfig = mkMerge [
(mkIf (cfg.dataDir == "/var/lib/asf") { StateDirectory = "asf"; })
(mkIf (cfg.dataDir == "/var/lib/asf") {
StateDirectory = "asf";
StateDirectoryMode = "700";
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if this should be 700 or 750 but I am really sure that the last bit must be a 0.

Copy link
Member

@mweinelt mweinelt Jun 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the last octet even

})
{
User = "asf";
Group = "asf";
WorkingDirectory = cfg.dataDir;
Type = "simple";
ExecStart = "${cfg.package}/bin/ArchiSteamFarm --path ${cfg.dataDir} --process-required --no-restart --service --no-config-migrate";
Restart = "always";

# mostly copied from the default systemd service
PrivateTmp = true;
Expand Down Expand Up @@ -243,6 +246,6 @@ in

meta = {
buildDocsInSandbox = false;
maintainers = with maintainers; [ lom ];
maintainers = with maintainers; [ lom SuperSandro2000 ];
};
}