Use the atticd.user as a variable
This commit is contained in:
parent
1f5d58f691
commit
6c56e76f1c
|
@ -70,6 +70,8 @@ in
|
||||||
services.atticd = {
|
services.atticd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
credentialsFile = config.age.secrets.atticEnv.path;
|
credentialsFile = config.age.secrets.atticEnv.path;
|
||||||
|
user = "atticd";
|
||||||
|
group = "atticd";
|
||||||
settings = {
|
settings = {
|
||||||
listen = "[::]:${toString atticPort}";
|
listen = "[::]:${toString atticPort}";
|
||||||
api-endpoint = "https://${atticDomain}/";
|
api-endpoint = "https://${atticDomain}/";
|
||||||
|
@ -87,7 +89,7 @@ in
|
||||||
# The preferred maximum size of a chunk, in bytes
|
# The preferred maximum size of a chunk, in bytes
|
||||||
max-size = 256 * 1024; # 256 KiB
|
max-size = 256 * 1024; # 256 KiB
|
||||||
};
|
};
|
||||||
database.url = "postgresql:///atticd?host=/run/postgresql";
|
database.url = "postgresql:///${config.services.atticd.user}?host=/run/postgresql";
|
||||||
garbage-collection = {
|
garbage-collection = {
|
||||||
interval = "0h";
|
interval = "0h";
|
||||||
default-retention-period = "6 months";
|
default-retention-period = "6 months";
|
||||||
|
@ -99,11 +101,11 @@ in
|
||||||
package = pkgs.postgresql_15;
|
package = pkgs.postgresql_15;
|
||||||
ensureUsers = [
|
ensureUsers = [
|
||||||
{
|
{
|
||||||
name = "atticd";
|
name = "${config.services.atticd.user}";
|
||||||
ensureDBOwnership = true;
|
ensureDBOwnership = true;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
ensureDatabases = [ "atticd" ];
|
ensureDatabases = [ "${config.services.atticd.user}" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue