1
0
Fork 0
mirror of https://github.com/zhaofengli/attic.git synced 2025-03-05 16:27:06 +00:00

Merge pull request #32 from poscat0x04/nixos-module-user-group-name

nixos: Make the group and user name under which attic runs configurable
This commit is contained in:
Zhaofeng Li 2023-03-05 11:37:47 -07:00 committed by GitHub
commit 1a3b6513b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -84,6 +84,20 @@ in
type = types.nullOr types.path; type = types.nullOr types.path;
default = null; default = null;
}; };
user = lib.mkOption {
description = ''
The group under which attic runs.
'';
type = types.str;
default = "atticd";
};
group = lib.mkOption {
description = ''
The user under which attic runs.
'';
type = types.str;
default = "atticd";
};
settings = lib.mkOption { settings = lib.mkOption {
description = '' description = ''
Structured configurations of atticd. Structured configurations of atticd.
@ -158,6 +172,8 @@ in
EnvironmentFile = cfg.credentialsFile; EnvironmentFile = cfg.credentialsFile;
StateDirectory = "atticd"; # for usage with local storage and sqlite StateDirectory = "atticd"; # for usage with local storage and sqlite
DynamicUser = true; DynamicUser = true;
User = cfg.user;
Group = cfg.group;
ProtectHome = true; ProtectHome = true;
ProtectHostname = true; ProtectHostname = true;
ProtectKernelLogs = true; ProtectKernelLogs = true;