diff --git a/README.md b/README.md index 57916e35..97c546e8 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ nix develop -c /etc/nixos/git/docs/setup.sh | warsaw-ovh-01 | Server | Warsaw OVH server, backup for framework-server | ✔️ | ✔️ | | nuc-server | Server | Server at my brothers house | ✔️ | ✔️ | | nixos-desktop | Personal | My main desktop | ✔️ | ❌ | -| nixos-framework | Personal | My AMD Framework 13 laptop | ✔️ | ❌ | +| framework13 | Personal | My AMD Framework 13 laptop | ✔️ | ❌ | | framework16 | Personal | My AMD Framework 16 laptop | ✔️ | ❌ | | steamdeck | Personal | Valve Steam Deck gaming console | ✔️ | ✔️ | | piaware-rpi4 | Raspberry Pi | Raspberry Pi for FlightAware flight tracking software | ✔️ | ✔️ | diff --git a/docs/complete.md b/docs/complete.md index 0ead0c07..229c5219 100644 --- a/docs/complete.md +++ b/docs/complete.md @@ -155,7 +155,7 @@ * [x] Try starship.rs - A powerline replacement - [Link](https://starship.rs/guide/#%F0%9F%9A%80-installation) * [x] Replace fuzzel with rofi * [x] Update disko configs away from 'table' - * See ./nixos/hosts/nixos-framework/disks-gpt.nix + * See ./nixos/hosts/framework13/disks-gpt.nix * [x] rofi - rbw integration * [x] Set up PyRadio with Nightride.FM * [x] Update desktop Hyprland config with new monitor setup diff --git a/flake.nix b/flake.nix index bfc10c03..36def0f8 100644 --- a/flake.nix +++ b/flake.nix @@ -63,7 +63,7 @@ # User Machines nixos-desktop = libx.mkHost { hostname = "nixos-desktop"; unfree = true; desktop = "plasma6"; }; - nixos-framework = libx.mkHost { hostname = "nixos-framework"; unfree = true; desktop = "gnome"; }; + framework13 = libx.mkHost { hostname = "framework13"; unfree = true; desktop = "gnome"; }; framework16 = libx.mkHost { hostname = "framework16"; unfree = true; desktop = "plasma6"; }; steamdeck = libx.mkDeck { hostname = "steamdeck"; desktop = "plasma6"; }; @@ -85,8 +85,8 @@ "albert@nuc-server" = libx.mkHome { hostname = "nuc-server"; }; # User Machines - "albert@nixos-desktop" = libx.mkHome { hostname = "nixos-desktop"; desktop = "plasma6"; theme = "gruvbox"; }; - "albert@nixos-framework" = libx.mkHome { hostname = "nixos-framework"; desktop = "gnome"; }; + "albert@nixos-desktop" = libx.mkHome { hostname = "nixos-desktop"; desktop = "plasma6"; }; + "albert@framework13" = libx.mkHome { hostname = "framework13"; desktop = "gnome"; }; "albert@framework16" = libx.mkHome { hostname = "framework16"; desktop = "plasma6"; }; "albert@steamdeck" = libx.mkHome { hostname = "steamdeck"; desktop = "plasma6"; }; diff --git a/home-manager/hosts/nixos-framework/desktops/gnome/default.nix b/home-manager/hosts/nixos-framework/desktops/gnome/default.nix deleted file mode 100644 index 077404aa..00000000 --- a/home-manager/hosts/nixos-framework/desktops/gnome/default.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - -} \ No newline at end of file diff --git a/home-manager/hosts/nixos-framework/desktops/hyprland/default.nix b/home-manager/hosts/nixos-framework/desktops/hyprland/default.nix deleted file mode 100644 index 2b78186b..00000000 --- a/home-manager/hosts/nixos-framework/desktops/hyprland/default.nix +++ /dev/null @@ -1,63 +0,0 @@ -{ theme, ... }: { - wayland.windowManager.hyprland = { - settings = { - monitor = ",highrr,auto,1.175"; - bind = [ - '', XF86AudioMute, exec, swayosd --output-volume=mute-toggle'' - '', XF86AudioPrev, exec, playerctl previous'' - '', XF86AudioNext, exec, playerctl next'' - ]; - binde = [ - '', XF86AudioPlay, exec, playerctl play-pause'' - '', XF86AudioNext, exec, playerctl next'' - '', XF86MonBrightnessDown, exec, swayosd-client --brightness=lower'' - '', XF86MonBrightnessUp, exec, swayosd-client --brightness=raise'' - '', XF86AudioMute, exec, swayosd-client --output-volume=mute-toggle'' - '', XF86AudioLowerVolume, exec, swayosd-client --output-volume=lower'' - '', XF86AudioRaiseVolume, exec, swayosd-client --output-volume=raise'' - ]; - bindl = [ - '',switch:on:1241ec0,exec,hyprctl keyword monitor "eDP-1, 2560x1600, 0x0, 1"'' - '',switch:off:1241ec0,exec,hyprctl keyword monitor "eDP-1, disable"'' - ]; - }; - }; - - home.file = { - # Set the custom launcher script - ".config/hypr/start.sh" = { - enable = true; - executable = true; - text = '' - #!/usr/bin/env bash - # https://wiki.hyprland.org/FAQ/#some-of-my-apps-take-a-really-long-time-to-open - dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP & - - # Set the wallpaper - swww init - - # Waybar - waybar & - - # Set up the idle management daemon - swayidle -w \ - timeout 120 'swaylock -f && playerctl pause' \ - timeout 180 'hyprctl dispatch dpms off' \ - timeout 300 'systemctl suspend-then-hibernate' \ - resume 'hyprctl dispatch dpms on' \ - before-sleep 'swaylock -f' \ - before-sleep 'playerctl pause' & - - # Automatic device mounting - udiskie & - - DIR=/etc/nixos/git/wallpapers/${theme} - IMG=`ls $DIR | shuf -n 1` - swww img $DIR/$IMG -t random & - - # Notification listener - mako - ''; - }; - }; -} diff --git a/home-manager/hosts/nixos-framework/desktops/plasma6/default.nix b/home-manager/hosts/nixos-framework/desktops/plasma6/default.nix deleted file mode 100644 index 4a5322fd..00000000 --- a/home-manager/hosts/nixos-framework/desktops/plasma6/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ ... }: { - programs.plasma = { - configFile = { - "kcminputrc"."Libinput/2362/628/PIXA3854:00 093A:0274 Touchpad" = { - "NaturalScroll" = true; - "TapDragLock" = true; - }; - }; - }; -} diff --git a/keys/hosts/nixos-framework.asc b/keys/hosts/nixos-framework.asc deleted file mode 100644 index bdc8ef71..00000000 --- a/keys/hosts/nixos-framework.asc +++ /dev/null @@ -1,28 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- - -xsFNBAAAAAABEADSWXdt9bOJ7YjtdBJX5R643JYY/3U2shvCApodMuKD3uWiAPuO -lxCXaZCGOEDVdWVenrpIHUcZOyjI5vH3ocu3EFTwNXBbH2eeHKVJCKU7JNxOKXol -pHscC05LpceBzMGwaAbqIvLxJ3eohYiE9APSUtHyWHHRm3T5fg/15gdefWXXDZzH -2cY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0wW4hDUfzWF+2qv6kmHLy/fuY1Wpsji2ITS -TDdFa+3JJvXkF109k3cYUFYanVLGM2qqtdKfqqEcazN8qmkl2N34TRE8X8gqvxqi -QFvPIFQAAdEUxDky+VUf6bMvUr42kujNjefbtOEF2RB9LBgzijuyIsXwF+ZlwGD5 -KbDdE1nofEpFXqCevEmpxhZRcImqakA96GBpiGNkPTuD5ot3QoI+AwKM8e368AZO -2JVSu7bwpk3rDLOG0+x/qYzLKoaH0vQaig== -=rZHS ------END PGP PUBLIC KEY BLOCK----- \ No newline at end of file diff --git a/keys/ssh/keys.txt b/keys/ssh/keys.txt index dd6efced..bee086ef 100644 --- a/keys/ssh/keys.txt +++ b/keys/ssh/keys.txt @@ -35,8 +35,8 @@ ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINR8PCfKOTArLemqmnHom4vWJ6u8wrlpG6/gSqeYo/qD # (Fri Dec 15 11:40:53 AM UTC 2023) albert@backups-rpi4 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGNkKoS32K487JaFza9TUFwrjwe9P7SNIHbVNxhzmRcI albert@backups-rpi4 -# (Tue Feb 20 09:20:39 PM JST 2024) albert@nixos-framework -ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMAJLaC+NJQYfrWlerUj8yMkAIofBGMOWQB4mU/ncDpz albert@nixos-framework +# (Tue Feb 20 09:20:39 PM JST 2024) albert@framework13 +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMAJLaC+NJQYfrWlerUj8yMkAIofBGMOWQB4mU/ncDpz albert@framework13 # (Sun Mar 03 18:13:09 PM JST 2024) albert@guacamole ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKUYuglSxzHMfKHBS06MaMm174W6EnxNyFXLXLheWSLb albert@guacamole diff --git a/nixos/common/modules/ssh-luks.nix b/nixos/common/modules/ssh-luks.nix index c4a88842..df2518ea 100644 --- a/nixos/common/modules/ssh-luks.nix +++ b/nixos/common/modules/ssh-luks.nix @@ -23,8 +23,8 @@ ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINR8PCfKOTArLemqmnHom4vWJ6u8wrlpG6/gSqeYo/qD albert@piaware-rpi4'' # (Fri Dec 15 11:40:53 AM UTC 2023) albert@backups-rpi4 ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGNkKoS32K487JaFza9TUFwrjwe9P7SNIHbVNxhzmRcI albert@backups-rpi4'' - # (Tue Feb 20 09:20:39 PM JST 2024) albert@nixos-framework - ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMAJLaC+NJQYfrWlerUj8yMkAIofBGMOWQB4mU/ncDpz albert@nixos-framework'' + # (Tue Feb 20 09:20:39 PM JST 2024) albert@framework13 + ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMAJLaC+NJQYfrWlerUj8yMkAIofBGMOWQB4mU/ncDpz albert@framework13'' # (Sat Apr 27 05:28:13 PM PDT 2024) albert@bakersfield-rpi4 ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJm3bTcalJgoZt7t5FqFrJl7ZYlC09ew2QWUVF6w1Iih albert@bakersfield-rpi4'' # (Sat Jul 27 12:34:43 PM JST 2024) albert@nixos-desktop diff --git a/nixos/common/services/syncthing-desktop.nix b/nixos/common/services/syncthing-desktop.nix index c4a23bf3..68c1b65d 100644 --- a/nixos/common/services/syncthing-desktop.nix +++ b/nixos/common/services/syncthing-desktop.nix @@ -5,39 +5,39 @@ "kenshi-saves" = { id = "kenshi"; path = "/home/${username}/.steam/steam/steamapps/compatdata/233860/pfx/drive_c/users/steamuser/AppData/Local/kenshi/"; - devices = [ "framework-server" "nixos-desktop" "nixos-framework" ]; + devices = [ "framework-server" "nixos-desktop" "framework13" "framework16" ]; }; # WoW Addons "wow-classic-addons" = { id = "wow-classic-addons"; path = "/home/${username}/Games/battlenet/drive_c/Program Files (x86)/World of Warcraft/_classic_/Interface/"; - devices = [ "framework-server" "nixos-desktop" "nixos-framework" ]; + devices = [ "framework-server" "nixos-desktop" "framework13" "framework16" ]; }; "wow-cata-addons" = { id = "wow-cata-addons"; path = "/home/${username}/Games/battlenet/drive_c/Program Files (x86)/World of Warcraft/_classic_era_/Interface/"; - devices = [ "framework-server" "nixos-desktop" "nixos-framework" ]; + devices = [ "framework-server" "nixos-desktop" "framework13" "framework16" ]; }; "wow-retail-addons" = { id = "wow-retail-addons"; path = "/home/${username}/Games/battlenet/drive_c/Program Files (x86)/World of Warcraft/_retail_/Interface/"; - devices = [ "framework-server" "nixos-desktop" "nixos-framework" ]; + devices = [ "framework-server" "nixos-desktop" "framework13" "framework16" ]; }; # WoW WTF "wow-classic-wtf" = { id = "wow-classic-wtf"; path = "/home/${username}/Games/battlenet/drive_c/Program Files (x86)/World of Warcraft/_classic_/WTF/"; - devices = [ "framework-server" "nixos-desktop" "nixos-framework" ]; + devices = [ "framework-server" "nixos-desktop" "framework13" "framework16" ]; }; "wow-cata-wtf" = { id = "wow-cata-wtf"; path = "/home/${username}/Games/battlenet/drive_c/Program Files (x86)/World of Warcraft/_classic_era_/WTF/"; - devices = [ "framework-server" "nixos-desktop" "nixos-framework" ]; + devices = [ "framework-server" "nixos-desktop" "framework13" "framework16" ]; }; "wow-retail-wtf" = { id = "wow-retail-wtf"; path = "/home/${username}/Games/battlenet/drive_c/Program Files (x86)/World of Warcraft/_retail_/WTF/"; - devices = [ "framework-server" "nixos-desktop" "nixos-framework" ]; + devices = [ "framework-server" "nixos-desktop" "framework13" "framework16" ]; }; }; }; diff --git a/nixos/common/services/syncthing.nix b/nixos/common/services/syncthing.nix index c493f70f..ced155e7 100644 --- a/nixos/common/services/syncthing.nix +++ b/nixos/common/services/syncthing.nix @@ -38,10 +38,14 @@ autoAcceptFolders = true; id = "ULRNA7N-Q7WTZR3-PDQW52W-IWT4UOG-ABF5RCT-W6XJXOW-WQTJIWR-GBFUJQR"; }; - "nixos-framework" = { + "framework13" = { autoAcceptFolders = true; id = "TT3EHRG-U6MMJUC-S3UPF2F-TRUMBPI-TC37RMI-BQ7TT5W-N7DIIWK-653TFAU"; }; + "framework16" = { + autoAcceptFolders = true; + id = "BBKCP3D-EUCYKQK-TLXEVZ6-D55TF43-IQIFJX5-3V2PNGA-7YDQZSP-QA42TQU"; + }; "nixos-desktop" = { autoAcceptFolders = true; id = "5VWSC5F-UKNQK7L-5XDJORY-SJXJUFC-D5QCNYX-YPQBJ4J-AFSVHWY-CXO3MQT"; @@ -61,7 +65,7 @@ id = "logseq"; path = "/home/${username}/.logseq"; versioning.type = "trashcan"; - devices = [ "framework-server" "nixos-desktop" "nixos-framework" "rdesktop" "google-pixel-8" ]; + devices = [ "framework-server" "nixos-desktop" "framework13" "rdesktop" "google-pixel-8" ]; }; }; }; diff --git a/nixos/hosts/nixos-framework/default.nix b/nixos/hosts/nixos-framework/default.nix deleted file mode 100644 index 7fc7efdf..00000000 --- a/nixos/hosts/nixos-framework/default.nix +++ /dev/null @@ -1,91 +0,0 @@ -{ inputs, config, lib, pkgs, modulesPath, ... }: { - imports = [ - inputs.nixos-hardware.nixosModules.framework-13-7040-amd - (modulesPath + "/installer/scan/not-detected.nix") - ./disks.nix - ../../common/services/tailscale-autoconnect.nix - ../../common/modules/secureboot.nix - # ../../common/modules/boot.nix - ../../common/modules/udev-rules.nix - # ../../common/modules/yubikey-auth.nix - ../../common/modules/builder.nix - ../../common/services/podman.nix - ../../common/services/geoclue.nix - ../../common/services/syncthing.nix - ../../common/services/ollama.nix - ]; - - services.ollama.acceleration = "rocm"; - services.ollama.package = pkgs.ollama-rocm; - - hardware.bluetooth.enable = true; # enables support for Bluetooth - hardware.bluetooth.powerOnBoot = true; # powers up the default Bluetooth controller on boot - - services.fwupd.enable = true; - # we need fwupd 1.9.7 to downgrade the fingerprint sensor firmware - services.fwupd.package = (import (builtins.fetchTarball { - url = "https://github.com/NixOS/nixpkgs/archive/bb2009ca185d97813e75736c2b8d1d8bb81bde05.tar.gz"; - sha256 = "sha256:003qcrsq5g5lggfrpq31gcvj82lb065xvr7bpfa8ddsw8x4dnysk"; - }) { inherit (pkgs) system;}).fwupd; - - boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "uas" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; - boot.extraModulePackages = [ ]; - # boot.kernelPackages = pkgs.linuxPackages_latest; - boot.kernelParams = [ "boot.shell_on_fail" ]; - # boot.extraModulePackages = with config.boot.kernelPackages; [ acpi_call ]; - boot.kernelPackages = pkgs.linuxPackages_latest; - - networking.useDHCP = lib.mkDefault true; - powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand"; - hardware.keyboard.zsa.enable = true; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; - # Set your time zone. - # time.timeZone = "Europe/Warsaw"; - - - # Set the networking hostname: - networking.hostName = "nixos-framework"; - hardware = { - graphics.enable = true; - amdgpu.opencl.enable = true; - }; - - - programs.gamemode = { - enable = true; - enableRenice = true; - settings = { - general = { - renice = 10; - }; - # Warning: GPU optimisations have the potential to damage hardware - gpu = { - # apply_gpu_optimisations = "accept-responsibility"; - gpu_device = 0; - amd_performance_level = "high"; - }; - custom = { - start = "${pkgs.libnotify}/bin/notify-send 'GameMode started'"; - end = "${pkgs.libnotify}/bin/notify-send 'GameMode ended'"; - }; - }; - }; - - environment.systemPackages = with pkgs; [ - # Game related things - gamemode - # WINE - wineWowPackages.stable - winetricks - wineWowPackages.waylandFull - nvtopPackages.amd - # RGB stuff - openrgb-with-all-plugins - rivalcfg - - # Other - distrobox - ]; -} diff --git a/nixos/hosts/nixos-framework/disks.nix b/nixos/hosts/nixos-framework/disks.nix deleted file mode 100644 index 265a0503..00000000 --- a/nixos/hosts/nixos-framework/disks.nix +++ /dev/null @@ -1,87 +0,0 @@ -{ - imports = [ ../../common/services/snapper.nix ]; - - services.cron = { - systemCronJobs = [ - "0 17 * * * root sudo btrfs-backup root" - "0 17 * * * root sudo btrfs-backup nix" - # "0 17 * * * root sudo btrfs-backup home" - ]; - }; - - services.btrfs.autoScrub.enable = true; - services.btrfs.autoScrub.interval = "weekly"; - - boot.resumeDevice = "/dev/mapper/ROOT"; - # https://sawyershepherd.org/post/hibernating-to-an-encrypted-swapfile-on-btrfs-with-nixos/ - boot.kernelParams = [ "resume_offset=533760" ]; - - disko.devices.disk.nvme0n1 = { - type = "disk"; - device = "/dev/nvme0n1"; - content = { - type = "gpt"; - partitions = { - BOOT = { - priority = 1; - name = "BOOT"; - start = "0%"; - end = "550MiB"; - type = "EF00"; - content = { - type = "filesystem"; - format = "vfat"; - # https://github.com/nix-community/disko/issues/527 - mountOptions = [ "umask=0077" ]; - mountpoint = "/boot"; - }; - }; # partition 1 (ESP) - LUKS-ROOT = { - start = "550MiB"; - end = "100%"; - content = { - type = "luks"; - name = "ROOT"; - extraOpenArgs = [ "--allow-discards" ]; - content = { - type = "btrfs"; - extraArgs = [ "-f" ]; - subvolumes = { - "/root" = { - mountpoint = "/"; - mountOptions = [ "compress=zstd" "noatime" ]; - }; # root - "/home" = { - mountpoint = "/home"; - mountOptions = [ "compress=zstd" "noatime" ]; - }; # home - "/nix" = { - mountpoint = "/nix"; - mountOptions = [ "compress=zstd" "noatime" ]; - }; # nix - # SNAPSHOT SUBVOLS - "/root/.snapshots" = { - mountpoint = "/.snapshots"; - mountOptions = [ "compress=zstd" "noatime" ]; - }; # root - "/home/.snapshots" = { - mountpoint = "/home/.snapshots"; - mountOptions = [ "compress=zstd" "noatime" ]; - }; # home - "/nix/.snapshots" = { - mountpoint = "/nix/.snapshots"; - mountOptions = [ "compress=zstd" "noatime" ]; - }; # nix - # Swap partition - "/swap" = { - mountpoint = "/swap"; - swap.swapfile.size = "64G"; - }; # swap - }; # subvolumes - }; # content.content - }; # content - }; # partition 2 (/ BTRFS) - }; # partitions - }; # content - }; # disko.devices.disk.nvme0 -} # nix diff --git a/nixos/hosts/nixos-framework/hibernate.nix b/nixos/hosts/nixos-framework/hibernate.nix deleted file mode 100644 index 2875a022..00000000 --- a/nixos/hosts/nixos-framework/hibernate.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ config, pkgs, ... }: - -let - hibernateEnvironment = { - HIBERNATE_SECONDS = "10"; - HIBERNATE_LOCK = "/var/run/autohibernate.lock"; - }; -in { - - systemd.services."awake-after-suspend-for-a-time" = { - description = "Sets up the suspend so that it'll wake for hibernation only if not on AC power"; - wantedBy = [ "suspend.target" ]; - before = [ "systemd-suspend.service" ]; - environment = hibernateEnvironment; - script = '' - if [ $(cat /sys/class/power_supply/ACAD/online) -eq 0 ]; then - curtime=$(date +%s) - echo "$curtime $1" >> /tmp/autohibernate.log - echo "$curtime" > $HIBERNATE_LOCK - ${pkgs.utillinux}/bin/rtcwake -m no -s $HIBERNATE_SECONDS - else - echo "System is on AC power, skipping wake-up scheduling for hibernation." >> /tmp/autohibernate.log - fi - ''; - serviceConfig.Type = "simple"; - }; - - systemd.services."hibernate-after-recovery" = { - description = "Hibernates after a suspend recovery due to timeout"; - wantedBy = [ "suspend.target" ]; - after = [ "systemd-suspend.service" ]; - environment = hibernateEnvironment; - script = '' - curtime=$(date +%s) - sustime=$(cat $HIBERNATE_LOCK) - rm $HIBERNATE_LOCK - if [ $(($curtime - $sustime)) -ge $HIBERNATE_SECONDS ] ; then - systemctl hibernate - else - ${pkgs.utillinux}/bin/rtcwake -m no -s 1 - fi - ''; - serviceConfig.Type = "simple"; - }; - -} \ No newline at end of file diff --git a/secrets/hosts/nixos-framework.yaml b/secrets/hosts/nixos-framework.yaml deleted file mode 100644 index b489fe54..00000000 --- a/secrets/hosts/nixos-framework.yaml +++ /dev/null @@ -1,54 +0,0 @@ -tailscale_key: ENC[AES256_GCM,data:n7/oetTmHh3LHnIN8YlhbLloL7MVKJt/IfPHycFNvVBp9zuyVScsJV/FhZW43TJn,iv:QaLZ6Loo/T7m2DuKAJaBagsezEFC87EDKp2zR/SfdFw=,tag:d/u2oCEKtb/W/uDk9fnM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CM7mDj2PgQZcfDt1hM3feBLsvldN/DfYsOM=,iv:/D51qUbeXo1kh7kuhWPAvReMuGJHI9uV9veCp1Ll2aQ=,tag:RYY2sEF6l+LLZjoYznEWtw==,type:str] -syncthing_key: ENC[AES256_GCM,data:j51d4K4gmtlJWmC6ZAUzMou9EByc+8jLGA0Azu0fNMDL1KYo7aRsR8knImIDpcs6fi2Po3slWUr80rozninxYqi621vA7c4cmmXWjCzMDBRWDihvjwRSgwFpaNaAZO26fWbcGDo/wfHlraLGuSIHq8leFcP2P9yr4tEg8R4IdwtsXm6QQJn5MPTVqfBvkjrA2edgygJhcsPnL2msPvkqZ/Wn0FnOVoF4TkHrgByg0H6U1y1lYj2i1UpHQQIPLJbX31RyM1xCHISoaFjKX781PYXWaIX7Mg8uOEuvrfzS4gQm3iX4EJly/Hc34BM2otngfyOHRN+Rqi0T3bqjYrsGIiP1UCqPYeXCLzlPc4Y4mprcxtC6pWRBW94lHsd7Dzb+,iv:CRHl0hYqGMfAJdNiMoO6kAsK6oeTpR1VQ2S5vFY+k30=,tag:9pfPDz8iUSNeJWRC3hVzZg==,type:str] -sops: - kms: [] - gcp_kms: [] - azure_kv: [] - hc_vault: [] - age: [] - lastmodified: "2024-07-02T08:55:45Z" - mac: ENC[AES256_GCM,data:c2cH2q2uzC41zzhImO6xot1b0iGhhz2DwLB43i4l5DXBMISANxr03+Y7HhcKJfr2+WVGG5ECp9VxnNg3Kpb0wz34ict8sMHJ3d/wbERAXg2KvnfaKWNVGYQU5dZR+CfE/w1T6ZYASNzTMxbAC5DSYciSCXVWb9iY5TytlI8kXnk=,iv:yclUj2ARmVxGHCiBbFzn/aFlXR3jS+Lq9AtO7uDbQlY=,tag:9I8YwqhctRmkN5a690IL9Q==,type:str] - pgp: - - created_at: "2024-07-07T03:19:59Z" - enc: |- - -----BEGIN PGP MESSAGE----- - - hQIMAwAAAAAAAAAAAQ/+KhPcp5OdcOjWxWsLZh3j6IkoYW0p3fBh7txyHH/5ziUN - QubMWWKnnbW3EZ/4TBGIOx0thwkfY8xyDUckjgQsTQ1CmQLa4RkLhMxBUvXmRI3y - gdeDghK2saqw0Yfe3HUxHcGDlbH3C+VOD17769yAkmEc3CtcT8WAssNwk4X7/2q/ - 1Fyj31wCZP009VovdDt6Ra3wA6jv/EdVbdZf+7u9jCA1wamxk8+I3pGH5u9Qa8JX - emi75/kkHFTG4nejVYx4bKiAdUZOgN4ciDnBPbH1jm2eLQWTQGudXfXyIuWhJeIW - Ck2f+Lh/2cMask15njQi/bbtTOCOhpQdxl8io+wPFTGVeL9dDy1uBMgXedRcwKha - 1oeq1LKRHJP2Dr80MDwJai9Dl69D5NoE1aop3iMQg6ob0BLHA3nUX+ZHraFA8La4 - uDBHw5A0dgfls0xz9KBfA/iZ4M/Ee7EkPIw4NkaLdeD2xwWvaegLaNQX/O4tW87d - A6yUDKfKOFe4cxOq9HgjyG2246/qHnnHAwe+dzFeU0rOfWJfG4ci/bO7/wDtlT9n - vusWZzRxti8s3evF2rd7AzkodB+pMyZFbArLJ2lB8yLBOyohjzXGzN2nqnQSfMgL - mb5qHJ9+nGMjiRcMPYwtg4R2EhApRmx0OJVIOwqO4maMWQbwpJ2+71rXnK4apDHS - XgHaHo4V+rqAN1WcanAj0TVD7NwFP6za2etSDQfLxRlFQHYf/6HZS/bvr/kFXew9 - ADON3pHDUFt+NuO1j2igfzLgh7ZXdPZp2I49WPNAzfcS6n5wDTHlLza2V981RKw= - =WG6W - -----END PGP MESSAGE----- - fp: 4A89D6B44B7E423B647C7AE848FBC3335A26DED6 - - created_at: "2024-07-07T03:19:59Z" - enc: |- - -----BEGIN PGP MESSAGE----- - - hQIMAwAAAAAAAAAAAQ//SsVO/p0Eex9J2ojKvEUS3RE2AujS+tR7uSJsfD5NjKTf - w0/HfqEwzSTpwNsbwLkNb+Zd/H/mO/kR0hgoQwX9/JfqV4nSN0Ok1gQ7FeOU/E11 - SfOU3saDRpKQasEYi6+faFNEDbRVDFwGql/nbl/JnwJPfeJzqVRq5ZF0xfb2MCim - FSLLFqHuRVNRhkeZiC1HNFV6lgmyy7dNwnJsmi4evAsRVuqAps4tw39sOxl4XG61 - RxF3oIN2ta2Zsa7ZTW4EM5pCRVwpEwj2jubYnr8VjS1d3mJZQ+f6RSXmdACuvsWi - DHzSUG9SZGEMe3i2Y4Lp7d9OblYYTJJBQCvBqHqFRb3HYH49W/54778TuoYIzST8 - xbv/KchsEueli19CY1FZnDDx9Ex4YnzP4zmGyYEzrlmSArwcZrhxasTuPWS7+9rM - XfLAenTyDsliJrXsjWQEFwk2uIagbF95P9wfnhtY6jWAxHmlCJzBjx6B516dq91l - hU7loZI4GODCQqpDn9ZtAnkKYLjKEgmPFz0kaueFvC+0f4Z8BKvNnlwWpC3Hj+rj - 8yPNveqNeTJ2Szc5KA0xCEy0YHp+bR7svQY9O/AHm2wEupFIpy2EpVNSamKAlnGo - K1ZrEUT2Nd01Ti5hhn67ILL5DKUh57xTU/m50QTUI6NYE1r+MYte6X1P3Tnej1jS - WAFM/ufIYQJfnBcb5TNp7qGw6qM5nqoWy3NbIen3YqiIP1+57rUoOItAW2CTTvz4 - 1oWpCWxmpqWzqucHYVEWmqsxQ+z0/2R8f+jLMv3jnNQLqlgbJ933zLU= - =+08T - -----END PGP MESSAGE----- - fp: aaec681e4fb9dcdd15d0d367a86615d17653d819 - unencrypted_suffix: _unencrypted - version: 3.8.1