fix: bad references for server linux

This commit is contained in:
Noah Masur
2022-12-22 00:31:25 +00:00
parent d021baa1bb
commit b4ddb149cc
14 changed files with 30 additions and 20 deletions

View File

@ -0,0 +1,5 @@
{ ... }: {
imports = [ ./calibre.nix ];
}

View File

@ -21,7 +21,7 @@
package = pkgs."${config.gtk.theme.package}";
};
in lib.mkIf (pkgs.stdenv.isLinux && config.gui.enable) {
in lib.mkIf config.gui.enable {
# Enable the X11 windowing system.
services.xserver = {

View File

@ -1,8 +1,5 @@
{ config, pkgs, lib, ... }: {
# Timezone required for Redshift schedule
imports = [ ../nixos/timezone.nix ];
config =
lib.mkIf (config.gui.enable && config.physical && pkgs.stdenv.isLinux) {

View File

@ -44,14 +44,14 @@
systemd.services.litestream = {
after = [ "backup-secret.service" ];
requires = [ "backup-secret.service" ];
environment.AWS_ACCESS_KEY_ID = config.backupS3.accessKeyId;
environment.AWS_ACCESS_KEY_ID = config.backup.s3.accessKeyId;
};
# # Backup library to object storage
# services.restic.backups.calibre = {
# user = "calibre-web";
# repository =
# "s3://${config.backupS3.endpoint}/${config.backupS3.bucket}/calibre";
# "s3://${config.backup.s3.endpoint}/${config.backup.s3.bucket}/calibre";
# paths = [
# "/var/books"
# "/var/lib/calibre-web/app.db"
@ -59,7 +59,7 @@
# ];
# initialize = true;
# timerConfig = { OnCalendar = "00:05:00"; };
# environmentFile = backupS3File;
# environmentFile = backup.s3File;
# };
};

View File

@ -53,7 +53,7 @@
let libraryPath = "/var/lib/calibre-web"; # Default location
in {
description = "Backup Calibre data";
environment.AWS_ACCESS_KEY_ID = config.backupS3.accessKeyId;
environment.AWS_ACCESS_KEY_ID = config.backup.s3.accessKeyId;
serviceConfig = {
Type = "oneshot";
User = "calibre-web";
@ -63,8 +63,8 @@
script = ''
${pkgs.awscli2}/bin/aws s3 sync \
${libraryPath}/ \
s3://${config.backupS3.bucket}/calibre/ \
--endpoint-url=https://${config.backupS3.endpoint}
s3://${config.backup.s3.bucket}/calibre/ \
--endpoint-url=https://${config.backup.s3.endpoint}
'';
};

View File

@ -75,7 +75,7 @@ in {
path = "${giteaPath}/data/gitea.db";
replicas = [{
url =
"s3://${config.backupS3.bucket}.${config.backupS3.endpoint}/gitea";
"s3://${config.backup.s3.bucket}.${config.backup.s3.endpoint}/gitea";
}];
}];
};

View File

@ -2,7 +2,7 @@
options = {
n8nServer = lib.mkOption {
type = lib.types.str;
type = lib.types.nullOr lib.types.str;
description = "Hostname for n8n automation";
default = null;
};

View File

@ -69,7 +69,7 @@
path = "${config.services.nextcloud.datadir}/data/nextcloud.db";
replicas = [{
url =
"s3://${config.backupS3.bucket}.${config.backupS3.endpoint}/nextcloud";
"s3://${config.backup.s3.bucket}.${config.backup.s3.endpoint}/nextcloud";
}];
}];
};

View File

@ -77,7 +77,7 @@ in {
path = "${vaultwardenPath}/db.sqlite3";
replicas = [{
url =
"s3://${config.backupS3.bucket}.${config.backupS3.endpoint}/vaultwarden";
"s3://${config.backup.s3.bucket}.${config.backup.s3.endpoint}/vaultwarden";
}];
}];
};
@ -101,7 +101,7 @@ in {
# Backup other Vaultwarden data to object storage
systemd.services.vaultwarden-backup = {
description = "Backup Vaultwarden files";
environment.AWS_ACCESS_KEY_ID = config.backupS3.accessKeyId;
environment.AWS_ACCESS_KEY_ID = config.backup.s3.accessKeyId;
serviceConfig = {
Type = "oneshot";
User = "vaultwarden";
@ -111,8 +111,8 @@ in {
script = ''
${pkgs.awscli2}/bin/aws s3 sync \
${vaultwardenPath}/ \
s3://${config.backupS3.bucket}/vaultwarden/ \
--endpoint-url=https://${config.backupS3.endpoint} \
s3://${config.backup.s3.bucket}/vaultwarden/ \
--endpoint-url=https://${config.backup.s3.endpoint} \
--exclude "*db.sqlite3*" \
--exclude ".db.sqlite3*"
'';