mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-22 00:21: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
|
in
|
||||||
lib.mkAfter collectionsScript;
|
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
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
custom.services.resticBackups.forgejo = lib.mkIf cfg.doBackups {
|
custom = {
|
||||||
|
services.resticBackups.forgejo = lib.mkIf cfg.doBackups {
|
||||||
conflictingService = "forgejo.service";
|
conflictingService = "forgejo.service";
|
||||||
paths = [ config.services.forgejo.stateDir ];
|
paths = [ config.services.forgejo.stateDir ];
|
||||||
};
|
};
|
||||||
|
|
||||||
custom.persist.directories = [ config.services.forgejo.stateDir ];
|
persist.directories = [ config.services.forgejo.stateDir ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
cfg = config.custom.services.hedgedoc;
|
cfg = config.custom.services.hedgedoc;
|
||||||
|
dataDir = "/var/lib/hedgedoc";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.custom.services.hedgedoc = {
|
options.custom.services.hedgedoc = {
|
||||||
|
|
@ -57,7 +58,7 @@ in
|
||||||
|
|
||||||
# Ensure session-secret
|
# Ensure session-secret
|
||||||
systemd.services.hedgedoc.preStart = lib.mkBefore ''
|
systemd.services.hedgedoc.preStart = lib.mkBefore ''
|
||||||
secret_file="/var/lib/hedgedoc/session-secret"
|
secret_file="${dataDir}/session-secret"
|
||||||
|
|
||||||
if [ ! -f $secret_file ]; then
|
if [ ! -f $secret_file ]; then
|
||||||
${lib.getExe pkgs.pwgen} -s 64 1 > $secret_file
|
${lib.getExe pkgs.pwgen} -s 64 1 > $secret_file
|
||||||
|
|
@ -67,7 +68,8 @@ in
|
||||||
export SESSION_SECRET
|
export SESSION_SECRET
|
||||||
'';
|
'';
|
||||||
|
|
||||||
custom.services.resticBackups.hedgedoc = lib.mkIf cfg.doBackups {
|
custom = {
|
||||||
|
services.resticBackups.hedgedoc = lib.mkIf cfg.doBackups {
|
||||||
conflictingService = "hedgedoc.service";
|
conflictingService = "hedgedoc.service";
|
||||||
paths = with config.services.hedgedoc.settings; [
|
paths = with config.services.hedgedoc.settings; [
|
||||||
uploadsPath
|
uploadsPath
|
||||||
|
|
@ -75,6 +77,7 @@ in
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
custom.persist.directories = [ "/var/lib/hedgedoc" ];
|
persist.directories = [ dataDir ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,6 @@
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
cfg = config.custom.services.outline;
|
cfg = config.custom.services.outline;
|
||||||
|
|
||||||
dataDir = "/var/lib/outline";
|
|
||||||
inherit (config.services.outline) user;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.custom.services.outline = {
|
options.custom.services.outline = {
|
||||||
|
|
@ -70,7 +67,13 @@ in
|
||||||
|
|
||||||
systemd.services.outline.enableStrictShellChecks = false;
|
systemd.services.outline.enableStrictShellChecks = false;
|
||||||
|
|
||||||
custom.services.resticBackups.outline = lib.mkIf cfg.doBackups {
|
custom =
|
||||||
|
let
|
||||||
|
dataDir = "/var/lib/outline";
|
||||||
|
inherit (config.services.outline) user;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
services.resticBackups.outline = lib.mkIf cfg.doBackups {
|
||||||
conflictingService = "outline.service";
|
conflictingService = "outline.service";
|
||||||
paths = [ dataDir ];
|
paths = [ dataDir ];
|
||||||
extraConfig.backupPrepareCommand = ''
|
extraConfig.backupPrepareCommand = ''
|
||||||
|
|
@ -79,9 +82,10 @@ in
|
||||||
restoreCommand.postRestore = "sudo --user=${user} pg_restore --clean --if-exists --dbname outline ${dataDir}/db.dump";
|
restoreCommand.postRestore = "sudo --user=${user} pg_restore --clean --if-exists --dbname outline ${dataDir}/db.dump";
|
||||||
};
|
};
|
||||||
|
|
||||||
custom.persist.directories = [
|
persist.directories = [
|
||||||
dataDir
|
dataDir
|
||||||
config.services.postgresql.dataDir
|
config.services.postgresql.dataDir
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue