From 85ca624a2c277420ee963210e213e0e52683b8be Mon Sep 17 00:00:00 2001 From: insert Date: Tue, 16 Jul 2024 09:30:57 -0400 Subject: [PATCH] laptop config changes, create backups for laptop --- configuration.nix | 2 -- special/insertlaptop.nix | 57 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 56 insertions(+), 3 deletions(-) diff --git a/configuration.nix b/configuration.nix index 826c116..e228080 100644 --- a/configuration.nix +++ b/configuration.nix @@ -303,8 +303,6 @@ systemd.user.services.waybar.enable = false; xdg.portal.wlr.settings = { screencast = { - output_name = "HDMI-A-1"; - max_fps = 30; chooser_type = "simple"; chooser_cmd = "${pkgs.slurp}/bin/slurp -f %o -or"; }; diff --git a/special/insertlaptop.nix b/special/insertlaptop.nix index aab737d..7916947 100644 --- a/special/insertlaptop.nix +++ b/special/insertlaptop.nix @@ -1,6 +1,6 @@ { inputs, config, lib, pkgs, ... }: { - networking.hostName = "insertlaptop"; + networking.hostName = "insertlaptop"; environment.systemPackages = [ pkgs.acpi @@ -11,6 +11,61 @@ hardware.bluetooth.enable = true; hardware.bluetooth.powerOnBoot = true; services.blueman.enable = true; + + services.borgbackup.jobs.insertlaptop = { + paths = "/home/insert"; + encryption.mode = "repokey-blake2"; + encryption.passCommand = "cat ${config.age.secrets.borg.path}"; + compression = "auto,zstd"; + prune.keep = { + daily = 10; + weekly = 4; + monthly = 2; + yearly = 1; + }; + readWritePaths = [ "/mnt/NAS-backup/insertlaptop-insert" ]; + repo = "/mnt/NAS-backup/insertlaptop-insert"; + user = "insert"; + startAt = "daily"; + doInit = true; + exclude = [ + "^data.img$" + "^.Trash-100$" + "*/node.repl_history" + "*/.oldprofile" + "*/.steampath" + "*/mnt" + "*/.steampid" + "*/.zshenv" + "*/.zshrc" + "*/.android" + "*/.compose-cache" + "*/.docker" + "*/.gradle" + "*/.hyprland" + "*/.java" + "*/.kube" + "*/.minecraft-bta" + "*/.mozilla" + "*/.pki" + "*/.nix-defexpr" + "*/.nix-profile" + "*/.nv" + "*/.thunderbird" + "*/.zsh" + "*/Downloads" + "*/.cache" + "*/.var/app/*/cache" + "*/.local/share/flatpak/repo/" + "*/.local/share/Trash" + "*/.local/share/libvirt" + "*/.local/share/containers" + "*/.local/share/flatpak/overrides" + "*/.var/app/*/config/cache" + "*/.var/app/*/config" + ]; + }; + home-manager.users.insert.wayland.windowManager.sway.config.modifier = "Mod4"; home-manager.users.insert.home.file.".config/hypr/hyprland.conf" = { text = ''autogenerated = 0 # remove this line to remove the warning