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;
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;