mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 14:01:34 +01:00
Improve formatting
This commit is contained in:
parent
108a308c25
commit
d0bf0084f4
4 changed files with 39 additions and 30 deletions
|
|
@ -107,6 +107,6 @@ in
|
|||
in
|
||||
lib.mkAfter collectionsScript;
|
||||
|
||||
custom.persist.directories = [ config.services.crowdsec.settings.config_paths.data_dir ];
|
||||
custom.persist.directories = [ "/var/lib/crowdsec" ];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -130,11 +130,13 @@ in
|
|||
fi
|
||||
'';
|
||||
|
||||
custom.services.resticBackups.forgejo = lib.mkIf cfg.doBackups {
|
||||
conflictingService = "forgejo.service";
|
||||
paths = [ config.services.forgejo.stateDir ];
|
||||
};
|
||||
custom = {
|
||||
services.resticBackups.forgejo = lib.mkIf cfg.doBackups {
|
||||
conflictingService = "forgejo.service";
|
||||
paths = [ config.services.forgejo.stateDir ];
|
||||
};
|
||||
|
||||
custom.persist.directories = [ config.services.forgejo.stateDir ];
|
||||
persist.directories = [ config.services.forgejo.stateDir ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
}:
|
||||
let
|
||||
cfg = config.custom.services.hedgedoc;
|
||||
dataDir = "/var/lib/hedgedoc";
|
||||
in
|
||||
{
|
||||
options.custom.services.hedgedoc = {
|
||||
|
|
@ -57,7 +58,7 @@ in
|
|||
|
||||
# Ensure session-secret
|
||||
systemd.services.hedgedoc.preStart = lib.mkBefore ''
|
||||
secret_file="/var/lib/hedgedoc/session-secret"
|
||||
secret_file="${dataDir}/session-secret"
|
||||
|
||||
if [ ! -f $secret_file ]; then
|
||||
${lib.getExe pkgs.pwgen} -s 64 1 > $secret_file
|
||||
|
|
@ -67,14 +68,16 @@ in
|
|||
export SESSION_SECRET
|
||||
'';
|
||||
|
||||
custom.services.resticBackups.hedgedoc = lib.mkIf cfg.doBackups {
|
||||
conflictingService = "hedgedoc.service";
|
||||
paths = with config.services.hedgedoc.settings; [
|
||||
uploadsPath
|
||||
db.storage
|
||||
];
|
||||
};
|
||||
custom = {
|
||||
services.resticBackups.hedgedoc = lib.mkIf cfg.doBackups {
|
||||
conflictingService = "hedgedoc.service";
|
||||
paths = with config.services.hedgedoc.settings; [
|
||||
uploadsPath
|
||||
db.storage
|
||||
];
|
||||
};
|
||||
|
||||
custom.persist.directories = [ "/var/lib/hedgedoc" ];
|
||||
persist.directories = [ dataDir ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,9 +6,6 @@
|
|||
}:
|
||||
let
|
||||
cfg = config.custom.services.outline;
|
||||
|
||||
dataDir = "/var/lib/outline";
|
||||
inherit (config.services.outline) user;
|
||||
in
|
||||
{
|
||||
options.custom.services.outline = {
|
||||
|
|
@ -70,18 +67,25 @@ in
|
|||
|
||||
systemd.services.outline.enableStrictShellChecks = false;
|
||||
|
||||
custom.services.resticBackups.outline = lib.mkIf cfg.doBackups {
|
||||
conflictingService = "outline.service";
|
||||
paths = [ dataDir ];
|
||||
extraConfig.backupPrepareCommand = ''
|
||||
${lib.getExe pkgs.sudo} --user=${user} ${lib.getExe' config.services.postgresql.package "pg_dump"} outline --format=custom --file=${dataDir}/db.dump
|
||||
'';
|
||||
restoreCommand.postRestore = "sudo --user=${user} pg_restore --clean --if-exists --dbname outline ${dataDir}/db.dump";
|
||||
};
|
||||
custom =
|
||||
let
|
||||
dataDir = "/var/lib/outline";
|
||||
inherit (config.services.outline) user;
|
||||
in
|
||||
{
|
||||
services.resticBackups.outline = lib.mkIf cfg.doBackups {
|
||||
conflictingService = "outline.service";
|
||||
paths = [ dataDir ];
|
||||
extraConfig.backupPrepareCommand = ''
|
||||
${lib.getExe pkgs.sudo} --user=${user} ${lib.getExe' config.services.postgresql.package "pg_dump"} outline --format=custom --file=${dataDir}/db.dump
|
||||
'';
|
||||
restoreCommand.postRestore = "sudo --user=${user} pg_restore --clean --if-exists --dbname outline ${dataDir}/db.dump";
|
||||
};
|
||||
|
||||
custom.persist.directories = [
|
||||
dataDir
|
||||
config.services.postgresql.dataDir
|
||||
];
|
||||
persist.directories = [
|
||||
dataDir
|
||||
config.services.postgresql.dataDir
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue