try harmonia instead of attic

This commit is contained in:
cy 2025-01-05 18:21:20 -05:00
parent d893b06a82
commit f72e9c511d
12 changed files with 67 additions and 155 deletions

View file

@ -63,5 +63,5 @@ element.cything.io {
cache.cything.io {
import common
reverse_proxy localhost:8090
reverse_proxy localhost:5000
}

View file

@ -24,7 +24,7 @@
./conduwuit.nix
./immich.nix
./element.nix
./attic.nix
./harmonia.nix
];
sops.age.keyFile = "/root/.config/sops/age/keys.txt";
@ -82,8 +82,8 @@
"rsyncnet/id_ed25519" = {
sopsFile = ../../secrets/de3911/chunk.yaml;
};
"attic/env" = {
sopsFile = ../../secrets/services/attic.yaml;
"harmonia/key" = {
sopsFile = ../../secrets/services/harmonia.yaml;
};
};

9
hosts/chunk/harmonia.nix Normal file
View file

@ -0,0 +1,9 @@
{ config, ... }: {
services.harmonia = {
enable = true;
signKeyPaths = [ config.sops.secrets."harmonia/key".path ];
settings = {
real_nix_store = "/mnt/harmonia";
};
};
}

View file

@ -10,13 +10,6 @@
enableTCPIP = true;
ensureDatabases = [
"hedgedoc"
"atticd"
];
ensureUsers = [
{
name = "atticd";
ensureDBOwnership = true;
}
];
};
services.postgresqlBackup = {

View file

@ -22,20 +22,20 @@
};
};
systemd.services.attic-mount = {
systemd.services.harmonia-mount = {
enable = true;
description = "Mount the attic data remote";
description = "Mount the harmonia data remote";
requires = [ "network-online.target" ];
after = [ "network-online.target" ];
requiredBy = [ "atticd.service" ];
before = [ "atticd.service" ];
requiredBy = [ "harmonia.service" ];
before = [ "harmonia.service" ];
serviceConfig = {
Type = "notify";
ExecStartPre = "/usr/bin/env mkdir -p /mnt/attic";
ExecStartPre = "/usr/bin/env mkdir -p /mnt/harmonia";
ExecStart = "${lib.getExe pkgs.rclone} mount --config ${
config.sops.secrets."rclone/config".path
} --cache-dir /var/cache/rclone --transfers=32 --allow-other rsyncnet:attic /mnt/attic ";
ExecStop = "${lib.getExe' pkgs.fuse "fusermount"} -u /mnt/photos";
} --cache-dir /var/cache/rclone --transfers=32 --allow-other rsyncnet:harmonia /mnt/harmonia ";
ExecStop = "${lib.getExe' pkgs.fuse "fusermount"} -u /mnt/harmonia";
};
};
programs.fuse.userAllowOther = true;

View file

@ -6,8 +6,8 @@
auto-optimise-store = true;
flake-registry = "";
trusted-users = [ "root" "@wheel" ];
trusted-public-keys = [ "central:cuiJMi+5BFUGeBPNMNWiKO6dlVTOHbHizFY+t7UW12w=" ];
substituters = [ "https://cache.cything.io/central" ];
trusted-public-keys = [ "cache.cything.io:4NhyCpZuroY7+JP18m1wkAgJGb6WL0jrtx2Bgrvdtow=" ];
substituters = [ "https://cache.cything.io/" ];
};
channel.enable = false;
optimise = {