1 { pkgs, lib, config, inputs, ... }:
3 inherit (builtins) readFile;
4 inherit (config.users) users groups;
9 shell = users.root.shell;
10 group = groups.disk.name;
11 openssh.authorizedKeys.keys = [
12 (readFile (inputs.secrets + "/hosts/losurdo/ssh/backup.ssh-ed25519.pub"))
13 ] ++ users."julm".openssh.authorizedKeys.keys;
15 systemd.tmpfiles.rules = [
16 "z /dev/zfs 0660 - ${groups."disk".name} -"
18 system.activationScripts.backup = ''
19 ${pkgs.zfs}/bin/zfs allow -u ${users.backup.name} bookmark,hold,send rpool
20 ${pkgs.zfs}/bin/zfs allow -u ${users.backup.name} receive,create,mount,rollback rpool/backup
23 systemd.services.sanoid.serviceConfig.SupplementaryGroups = [ groups."disk".name ];
43 "rpool/backup/losurdo/var/postgresql" = {
44 use_template = [ "remote" ];
47 "rpool/backup/losurdo/var/cryptpad" = {
48 use_template = [ "remote" ];