about summary refs log tree commit diff
path: root/hosts/tahoe/default.nix
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2023-05-12 11:23:15 -0700
committerFranck Cuny <franck@fcuny.net>2023-05-12 11:24:09 -0700
commit70481fab46f4ef07f0638f9c03a0f6a7f98324de (patch)
tree0b4f74537f98628b82427c0a0fe7d6b87f04b63f /hosts/tahoe/default.nix
parentops: remove everything under ops (diff)
downloadworld-70481fab46f4ef07f0638f9c03a0f6a7f98324de.tar.gz
profiles/backup: configure the backup server
It creates the user, ensure sftp is configured correctly, and rsync the
backups to rsync.net once a day.
Diffstat (limited to 'hosts/tahoe/default.nix')
-rw-r--r--hosts/tahoe/default.nix16
1 files changed, 1 insertions, 15 deletions
diff --git a/hosts/tahoe/default.nix b/hosts/tahoe/default.nix
index 0f5dec0..ae4bef8 100644
--- a/hosts/tahoe/default.nix
+++ b/hosts/tahoe/default.nix
@@ -1,7 +1,4 @@
 { config, pkgs, hostname, self, ... }:
-let
-  sshPub = builtins.fromTOML (builtins.readFile ../../configs/ssh-pubkeys.toml);
-in
 {
   imports = [
     ./boot.nix
@@ -14,23 +11,12 @@ in
     "${self}/profiles/nginx.nix"
     "${self}/profiles/unifi.nix"
     "${self}/profiles/samba.nix"
+    "${self}/profiles/backup.nix"
     "${self}/profiles/git-server.nix"
     "${self}/profiles/music-server.nix"
     "${self}/profiles/hardware/amd.nix"
   ];
 
-  # a user used only for backups
-  users.users.backup = {
-    createHome = false;
-    uid = 991;
-    isSystemUser = true;
-    group = "users";
-    home = "/data/slow/backups/hosts";
-    openssh.authorizedKeys.keys = with sshPub; [
-      restic
-    ];
-  };
-
   # This value determines the NixOS release from which the default
   # settings for stateful data, like file locations and database versions
   # on your system were taken. It‘s perfectly fine and recommended to leave