mirror of
https://github.com/zhaofengli/attic.git
synced 2025-03-05 00:07:05 +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:
commit
1a3b6513b0
1 changed files with 16 additions and 0 deletions
|
@ -84,6 +84,20 @@ in
|
|||
type = types.nullOr types.path;
|
||||
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 {
|
||||
description = ''
|
||||
Structured configurations of atticd.
|
||||
|
@ -158,6 +172,8 @@ in
|
|||
EnvironmentFile = cfg.credentialsFile;
|
||||
StateDirectory = "atticd"; # for usage with local storage and sqlite
|
||||
DynamicUser = true;
|
||||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
ProtectHome = true;
|
||||
ProtectHostname = true;
|
||||
ProtectKernelLogs = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue