diff --git a/roles/restic.nix b/roles/restic.nix index f5f435d..8ea4abe 100644 --- a/roles/restic.nix +++ b/roles/restic.nix @@ -1,38 +1,32 @@ { config, pkgs, ... }: { - services.restic.backups.system = { - paths = [ - "/home/.zfs/snapshot/restic" - "/var/.zfs/snapshot/restic" - ]; + services.restic.backups.home = { + paths = [ "/home/.zfs/snapshot/restic" ]; repository = "s3:s3.us-west-001.backblazeb2.com/nolans-nixos-backups/${config.networking.hostName}"; environmentFile = config.age.secrets."restic_b2_${config.networking.hostName}".path; passwordFile = config.age.secrets."restic_password_${config.networking.hostName}".path; initialize = true; - backupPrepareCommand = '' - #!${pkgs.bash}/bin/sh - ${pkgs.zfs}/bin/zfs snapshot zpool/home@restic - ${pkgs.zfs}/bin/zfs snapshot zpool/var@restic - ''; - backupCleanupCommand = '' - #!${pkgs.bash}/bin/sh - ${pkgs.zfs}/bin/zfs destroy zpool/home@restic - ${pkgs.zfs}/bin/zfs destroy zpool/var@restic - ''; - timerConfig.OnCalendar = "hourly"; - pruneOpts = [ - "--keep-daily 7" - "--keep-weekly 5" - "--keep-monthly 12" - "--keep-yearly 2" - ]; + backupPrepareCommand = "${pkgs.zfs}/bin/zfs snapshot zpool/home@restic"; + backupCleanupCommand = "${pkgs.zfs}/bin/zfs destroy zpool/home@restic"; + timerConfig = { + OnCalendar = "hourly"; + Persistent = true; + }; + }; + services.restic.backups.var = { + paths = [ "/var/.zfs/snapshot/restic" ]; + repository = "s3:s3.us-west-001.backblazeb2.com/nolans-nixos-backups/${config.networking.hostName}"; + environmentFile = config.age.secrets."restic_b2_${config.networking.hostName}".path; + passwordFile = config.age.secrets."restic_password_${config.networking.hostName}".path; + initialize = true; + backupPrepareCommand = "${pkgs.zfs}/bin/zfs snapshot zpool/var@restic"; + backupCleanupCommand = "${pkgs.zfs}/bin/zfs destroy zpool/var@restic"; + timerConfig = { + OnCalendar = "hourly"; + Persistent = true; + }; }; - - systemd.tmpfiles.rules = [ - "d /mnt/restic 0700 root root" - ]; - age.secrets."restic_b2_${config.networking.hostName}".file = ../secrets/restic_b2_${config.networking.hostName}.age; age.secrets."restic_password_${config.networking.hostName}".file = diff --git a/users/nolan/desktop-minimal.nix b/users/nolan/desktop-minimal.nix index 9ba8333..f192631 100644 --- a/users/nolan/desktop-minimal.nix +++ b/users/nolan/desktop-minimal.nix @@ -10,8 +10,6 @@ packages = with pkgs; [ unstable.firefoxpwa ]; }; - programs.localsend.enable = true; - home-manager.users.nolan = { programs = { firefox = { diff --git a/users/nolan/desktop.nix b/users/nolan/desktop.nix index 6f2e4e2..9adbe40 100644 --- a/users/nolan/desktop.nix +++ b/users/nolan/desktop.nix @@ -44,15 +44,15 @@ credential.helper = "${pkgs.git.override { withLibsecret = true; }}/bin/git-credential-libsecret"; }; }; - # jujutsu = { - # enable = true; - # settings = { - # user = { - # name = "Nolan Darilek"; - # email = "nolan@thewordnerd.info"; - # }; - # }; - # }; + jujutsu = { + enable = true; + settings = { + user = { + name = "Nolan Darilek"; + email = "nolan@thewordnerd.info"; + }; + }; + }; obs-studio = { enable = true; plugins = with pkgs.obs-studio-plugins; [ @@ -65,8 +65,4 @@ }; }; }; - - environment.sessionVariables = { - PATH = [ "$HOME/.local/bin" ]; - }; } diff --git a/users/root.nix b/users/root.nix index ab329e8..8d5c05e 100644 --- a/users/root.nix +++ b/users/root.nix @@ -1,20 +1,7 @@ { config, pkgs, ... }: { - users.users.root = { - openssh.authorizedKeys.keys = [ - "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDPk6C4eOYzTZ8XOuUA2tErGnSTLS/l9kRDl9+5Ql+m7VtaH/KRFbu6x+C0QAIKOrRcQOjpGYUjL1aIn0HCcoEW2PSihDmOHC+W8cy8ucScy4fPI5KpFFqTZU336Fje+NS4n587gcoaa5LjKcr2KZy/ljgzl4eNSRIqy85khfH4puxsj7LwTIqsZoqDhtD/jSqaKP1C2wuYSsijLF85UnRcT9jErnL757yUv/4xb4Is+gB0zan9GiBXRca4lzb0mY8rmMXmKhc2lm/mu8ogZRdYX5R2JP1AukzYGSdOFs4iUauihgvakuou9AugD2CC+ygYIEbWkUjwKfT9nRN93Qi9 id_rsa" - ]; - shell = pkgs.fish; - }; - - programs.fish.enable = true; - - home-manager.users.root.home = { - shellAliases = { - "systemctl" = "systemctl --no-ager -l"; - "journalctl" = "journalctl --no-pager -l"; - }; - stateVersion = "24.11"; - }; -} + users.users.root.openssh.authorizedKeys.keys = [ + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDPk6C4eOYzTZ8XOuUA2tErGnSTLS/l9kRDl9+5Ql+m7VtaH/KRFbu6x+C0QAIKOrRcQOjpGYUjL1aIn0HCcoEW2PSihDmOHC+W8cy8ucScy4fPI5KpFFqTZU336Fje+NS4n587gcoaa5LjKcr2KZy/ljgzl4eNSRIqy85khfH4puxsj7LwTIqsZoqDhtD/jSqaKP1C2wuYSsijLF85UnRcT9jErnL757yUv/4xb4Is+gB0zan9GiBXRca4lzb0mY8rmMXmKhc2lm/mu8ogZRdYX5R2JP1AukzYGSdOFs4iUauihgvakuou9AugD2CC+ygYIEbWkUjwKfT9nRN93Qi9 id_rsa" + ]; +} \ No newline at end of file