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:
commit
1a3b6513b0
1 changed files with 16 additions and 0 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Reference in a new issue