feat: expanded all lists

This commit is contained in:
Nick 2025-01-08 19:06:14 -06:00
parent 59cc199722
commit bb0b55b011
144 changed files with 1798 additions and 507 deletions

View file

@ -1,6 +1,12 @@
{flake, ...}: let
inherit (flake.config.machines.devices) server;
inherit (flake.config.services.instances) postgresql;
inherit
(flake.config.machines.devices)
server
;
inherit
(flake.config.services.instances)
postgresql
;
service = postgresql;
in {
@ -8,7 +14,13 @@ in {
postgresqlBackup = {
enable = true;
location = service.paths.path0;
databases = ["mastodon" "nextcloud" "peertube" "forgejo" "wiki"];
databases = [
"mastodon"
"nextcloud"
"peertube"
"forgejo"
"wiki"
];
};
postgresql = {
enable = true;
@ -25,13 +37,23 @@ in {
fileSystems."/var/lib/postgresql" = {
device = service.paths.path0;
fsType = "none";
options = ["bind"];
depends = [server.storage0.mount];
options = [
"bind"
];
depends = [
server.storage0.mount
];
};
systemd.tmpfiles.rules = ["Z ${service.paths.path0} 700 ${service.name} ${service.name} -"];
systemd.tmpfiles.rules = [
"Z ${service.paths.path0} 700 ${service.name} ${service.name} -"
];
users.users.${service.name}.extraGroups = ["nextcloud" "mastodon" "forgejo"];
users.users.${service.name}.extraGroups = [
"nextcloud"
"mastodon"
"forgejo"
];
system.activationScripts.postgresCommands = ''
chown -R ${service.name}:${service.name} ${service.paths.path0}