Compare commits

..

1 commit

Author SHA1 Message Date
cy
a55a932a4d
flake update
Signed-off-by: cy <cy@cy7.sh>
2025-02-25 12:42:34 -05:00
5 changed files with 74 additions and 1 deletions

View file

@ -10,6 +10,7 @@ jobs:
machine: machine:
- chunk - chunk
- ytnix - ytnix
- titan
os: os:
- ubuntu-latest - ubuntu-latest
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}

View file

@ -19,6 +19,30 @@
}; };
programs.home-manager.enable = true; programs.home-manager.enable = true;
systemd.user.startServices = "sd-switch";
# keep this commented when using plasma
# otherwise "system settings" in KDE will not function
# qt = {
# enable = true;
# platformTheme.name = "kde";
# style.name = "breeze-dark";
# style.package = pkgs.kdePackages.breeze;
# };
# this one too
# gtk = {
# enable = true;
# theme = {
# package = pkgs.adw-gtk3;
# name = "adw-gtk3-dark";
# };
# iconTheme = {
# package = pkgs.adwaita-icon-theme;
# name = "Adwaita";
# };
# };
home.pointerCursor = { home.pointerCursor = {
package = pkgs.bibata-cursors; package = pkgs.bibata-cursors;
name = "Bibata-Modern-Classic"; name = "Bibata-Modern-Classic";
@ -32,6 +56,7 @@
ungoogled-chromium ungoogled-chromium
librewolf librewolf
bitwarden-desktop bitwarden-desktop
bitwarden-cli
fastfetch fastfetch
nwg-look nwg-look
kdePackages.gwenview kdePackages.gwenview
@ -42,6 +67,11 @@
signal-desktop signal-desktop
pavucontrol pavucontrol
btop btop
grim
slurp
rofi-wayland
rofimoji
cliphist
jq jq
bash-language-server bash-language-server
sqlite sqlite
@ -58,6 +88,7 @@
pwgen pwgen
lua-language-server lua-language-server
gnumake gnumake
foot
minisign minisign
unzip unzip
lm_sensors lm_sensors
@ -94,6 +125,7 @@
radare2 radare2
p7zip p7zip
qbittorrent qbittorrent
# vscodium
nil nil
pkg-config pkg-config
gtk2 gtk2
@ -115,16 +147,28 @@
localsend localsend
scrcpy scrcpy
syncthing syncthing
syncthingtray
obsidian obsidian
]; ];
programs.waybar.enable = true;
programs.feh.enable = true; programs.feh.enable = true;
xdg.configFile = { xdg.configFile = {
rofi.source = ../rofi;
waybar.source = ../waybar;
mpv.source = ../mpv; mpv.source = ../mpv;
}; };
programs.newsboat = {
enable = true;
extraConfig = ''
urls-source "miniflux"
miniflux-url "https://rss.cything.io/"
miniflux-login "cy"
miniflux-passwordfile /run/secrets/newsboat/miniflux
'';
};
programs.direnv = { programs.direnv = {
enable = true; enable = true;
nix-direnv.enable = true; nix-direnv.enable = true;

View file

@ -31,6 +31,9 @@
"borg/rsyncnet" = { "borg/rsyncnet" = {
sopsFile = ../../secrets/borg/chunk.yaml; sopsFile = ../../secrets/borg/chunk.yaml;
}; };
"services/ntfy" = {
sopsFile = ../../secrets/services/ntfy.yaml;
};
"rclone/config" = { "rclone/config" = {
sopsFile = ../../secrets/rclone.yaml; sopsFile = ../../secrets/rclone.yaml;
}; };

View file

@ -17,9 +17,16 @@
"borg/rsyncnet" = { "borg/rsyncnet" = {
sopsFile = ../../secrets/borg/yt.yaml; sopsFile = ../../secrets/borg/yt.yaml;
}; };
"services/ntfy" = {
sopsFile = ../../secrets/services/ntfy.yaml;
};
"rsyncnet/id_ed25519" = { "rsyncnet/id_ed25519" = {
sopsFile = ../../secrets/zh5061/yt.yaml; sopsFile = ../../secrets/zh5061/yt.yaml;
}; };
"newsboat/miniflux" = {
sopsFile = ../../secrets/newsboat.yaml;
owner = "yt";
};
"tailscale/auth" = { "tailscale/auth" = {
sopsFile = ../../secrets/services/tailscale.yaml; sopsFile = ../../secrets/services/tailscale.yaml;
}; };

View file

@ -6,6 +6,7 @@
}: }:
let let
cfg = config.my.backup; cfg = config.my.backup;
hostname = config.networking.hostName;
defaultPaths = [ defaultPaths = [
"/root" "/root"
"/home" "/home"
@ -96,6 +97,23 @@ in
]; ];
# warnings are often not that serious # warnings are often not that serious
failOnWarnings = false; failOnWarnings = false;
postHook = ''
invocationId=$(systemctl show -p InvocationID --value borgbackup-job-${cfg.jobName}.service)
title="${hostname}: backup completed with exit code: $exitStatus"
msg=$(journalctl -o cat _SYSTEMD_INVOCATION_ID=$invocationId)
if [ "$exitStatus" -eq 0 ]; then
tag="v"
else
tag="rotating_light"
fi
${pkgs.curl}/bin/curl -sL -u $(cat ${config.sops.secrets."services/ntfy".path}) \
-H "Title: $title" \
-H "Tags: $tag" \
-d "$msg" \
https://ntfy.cything.io/backups > /dev/null
'';
prune.keep = { prune.keep = {
within = "2d"; within = "2d";