From 89eb25ca7d5932f064aabdc361927349ff4e4e6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Rivera?= Date: Sun, 14 Jun 2026 11:01:11 +0200 Subject: [PATCH 01/18] snapshot pre-autoupdate-2026-06-14T09-01-11Z From 3b89cf7b359efb0e9b7e62e583d5d959fe1bf1be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Rivera?= Date: Sun, 14 Jun 2026 11:04:07 +0200 Subject: [PATCH 02/18] flake.lock: autoupdate-2026-06-14T09-01-11Z --- flake.lock | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/flake.lock b/flake.lock index f68edf3..199c245 100644 --- a/flake.lock +++ b/flake.lock @@ -11,11 +11,11 @@ ] }, "locked": { - "lastModified": 1780375472, - "narHash": "sha256-Q8RAJoYlakA6B2I5DVcuxzNbhCNU1nnIjqQZYP1KGrM=", + "lastModified": 1781239472, + "narHash": "sha256-WFL8jZMWNH1tx3UwaJ9aa9NN25uOEJ9mbKPRNQJY/xM=", "owner": "caelestia-dots", "repo": "cli", - "rev": "d1c8c8fc09738d1b40576e97c274b4a11a2e0ac7", + "rev": "3f3229aed4f36752a02fd870fd6cad94bd76555f", "type": "github" }, "original": { @@ -34,11 +34,11 @@ "quickshell": "quickshell" }, "locked": { - "lastModified": 1781178648, - "narHash": "sha256-z6V1T7MHShM7TfFIMCDp94Bi1Wk9LJfK96vm8YFGY5M=", + "lastModified": 1781408632, + "narHash": "sha256-kYVf3Jye4UhyBrtubYcSrmVyFv9uqOY2JvjmElFiZHE=", "owner": "caelestia-dots", "repo": "shell", - "rev": "a16c957a8bd13e0cfd09928ca0a22fecd3681e44", + "rev": "f86c359cd90530bacc800e94e35ffbebecd3f58f", "type": "github" }, "original": { @@ -164,11 +164,11 @@ ] }, "locked": { - "lastModified": 1780928816, - "narHash": "sha256-s4wU4nfs8xsXvwPtD0yebTPaOgmtDesmEvWuKFES6cE=", + "lastModified": 1781373243, + "narHash": "sha256-CpZ5FEU1BtW6K4FywtCCE2wJs6R/Ifps3etRDh8NJ9w=", "owner": "tomasriveral", "repo": "nix-git-cherry-picker", - "rev": "785b747ebca67f3e11b49ef5a85f9d3635bfe85d", + "rev": "9865dba535620831ae7cab395bf404f8f464df0e", "type": "github" }, "original": { @@ -179,11 +179,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1780902259, - "narHash": "sha256-q8yYEC5f1mFlQO9RGna4LTc9QrcvWunX6FYp83munkQ=", + "lastModified": 1781216227, + "narHash": "sha256-9mUW6gNwoN2SWc/l0fW4svPNOulXLl8ijqKyeSOGgJE=", "owner": "nixos", "repo": "nixpkgs", - "rev": "bd0ff2d3eac24699c3664d5966b9ef36f388e2ca", + "rev": "a0374025a863d007d98e3297f6aa46cc3141c2f0", "type": "github" }, "original": { @@ -233,11 +233,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1781268102, - "narHash": "sha256-Zn5KTggEmUB3lXn/ccERNcBdddE6IaOFber9dWViWDg=", + "lastModified": 1781328464, + "narHash": "sha256-j9uBlHI0eJ9zWU9IlF6SlBBPdeJu30hcvar31IRKHpw=", "owner": "nixos", "repo": "nixpkgs", - "rev": "49a4bd0573c376468dd7996ddb6f9fa31d8c4d97", + "rev": "5a722a7155bfc9fbe657f28d26b71860d95324bc", "type": "github" }, "original": { @@ -302,11 +302,11 @@ ] }, "locked": { - "lastModified": 1780303737, - "narHash": "sha256-7HgdJBG4BgAPDyHKKxWtxj7nziqsQo6zQCXtwy+L9fs=", + "lastModified": 1781053488, + "narHash": "sha256-P4WEBaKgl8flRckHxXGHzT0potPvB3x8ZFIp9gLEAMY=", "ref": "refs/heads/master", - "rev": "b66495fcc5022681b56b61f928c7acbe910e722c", - "revCount": 821, + "rev": "d99d87d5e5ec4e696815348692fdaaf0b6be1b2c", + "revCount": 822, "type": "git", "url": "https://git.outfoxxed.me/outfoxxed/quickshell" }, From 8088f78f051220e03307bb48b7ea9261cbd9f753 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Rivera?= Date: Sun, 14 Jun 2026 11:05:39 +0200 Subject: [PATCH 03/18] tlp:replace by powerprofilesdaemon --- modules/hardware/battery.nix | 120 ++++++++++++++++++++++++++++------- 1 file changed, 96 insertions(+), 24 deletions(-) diff --git a/modules/hardware/battery.nix b/modules/hardware/battery.nix index 13e27b2..096d37d 100644 --- a/modules/hardware/battery.nix +++ b/modules/hardware/battery.nix @@ -1,9 +1,9 @@ -_: { - flake.nixosModules.battery-laptop = { - lib, - config, - ... - }: +{ + self, + inputs, + ... +}: { + flake.nixosModules.battery-laptop = {pkgs, ...}: # https://discourse.nixos.org/t/what-is-the-best-option-for-power-management/63406/2 # we just activate tlp unconditonally #let @@ -22,7 +22,8 @@ _: { # }; # config = lib.mkIf cfg.battery.enable { - powerManagement.powertop.enable = true; # enable powertop auto tuning on startup. + /* + powerManagement.powertop.enable = true; # enable powertop auto tuning on startup. # Acording to https://community.frame.work/t/solved-keys-stick-and-repeat-after-being-released/51153/12 # Some powertop bug is responsable for the problem of the random keypress being stuck # fix: from https://git.gabbie.blue/blue/nixconf/src/commit/2d1bc6dad4684c019b6b3e894408e76e2734806c/hosts/gabbielaptop/configuration.nix#L68 @@ -31,10 +32,11 @@ _: { # Retrigger macropad udev rules ${lib.getExe' config.systemd.package "udevadm"} trigger -c bind -s usb -a idVendor=32ac -a idProduct=0013 ''; + */ services.system76-scheduler.settings.cfsProfiles.enable = true; # Better scheduling for CPU cycles - thanks System76!!! - services.thermald.enable = true; # Enable thermald, the temperature management daemon. (only necessary if on Intel CPUs) - services.power-profiles-daemon.enable = false; # Disable GNOMEs power management - services.tlp = { + services.thermald.enable = false; # Enable thermald, the temperature management daemon. (only necessary if on Intel CPUs) + services.power-profiles-daemon.enable = true; # ppd is recommended over tlp for framework 16 + /*services.tlp = { enable = true; # Enable TLP (better than gnomes internal power manager) settings = { CPU_BOOST_ON_AC = 1; @@ -47,11 +49,12 @@ _: { CPU_ENERGY_PERF_POLICY_ON_BAT = "powersave"; PLATFORM_PROFILE_ON_AC = "balanced"; PLATFORM_PROFILE_ON_BAT = "powersave"; - START_CHARGE_THRESH_BAT1 = 40; STOP_CHARGE_THRESH_BAT1 = 80; }; - }; - # }; + };*/ + environment.systemPackages = [ + self.packages.${pkgs.system}.custom-performance + ]; }; perSystem = {pkgs, ...}: let NotifySound = ../../assets/battery_notify.mp3; @@ -336,28 +339,97 @@ _: { name = "custom-performance"; runtimeInputs = with pkgs; [ hyprland - gawk + brightnessctl + swaynotificationcenter + self.packages.${pkgs.system}.custom-wallpaper libnotify + inputs.caelestia-shell.packages.${pkgs.system}.default ]; text = '' - HYPRGAMEMODE=$(hyprctl getoption animations:enabled | awk 'NR==1{print $2}') - if [ "$HYPRGAMEMODE" = 1 ] ; then + STATE="$HOME/.cache/hypr-battery-saver" + + enable() { + mkdir -p "$(dirname "$STATE")" + + echo "Enabling battery saver mode..." + + # Save brightness + brightnessctl get > "''${STATE}.brightness" 2>/dev/null || true + + # Kill heavy UI components + pkill -f caelestia-shell || true + pkill -f caelestia || true + pkill shell || true + pkill -f custom-wallpaper || true + + # Start lightweight notifications + pkill swaync || true + swaync & disown + + # Start lightweight waybar + pkill waybar || true + waybar & disown + + # Lower refresh rate (BIGGEST win) + hyprctl keyword monitor "eDP-1,2560x1600@60,0x0,1" + + # Core performance toggles hyprctl --batch "\ keyword animations:enabled 0;\ - keyword animation borderangle,0; \ + keyword animation borderangle,0;\ keyword decoration:shadow:enabled 0;\ keyword decoration:blur:enabled 0;\ - keyword decoration:fullscreen_opacity 1;\ + keyword decoration:rounding 0;\ + keyword decoration:fullscreen_opacity 1;\ keyword general:gaps_in 0;\ keyword general:gaps_out 0;\ keyword general:border_size 1;\ - keyword decoration:rounding 0" - notify-send -u critical -t 5000 "Performance mode [ON]" - exit - else - notify-send -u critical -t 5000 "Performance mode [OFF]" + keyword decoration:active_opacity 1;\ + keyword decoration:inactive_opacity 1;\ + keyword misc:vfr true" + + # Lower brightness + brightnessctl set 5% 2>/dev/null || true + + touch "$STATE" + + notify-send "Battery Saver" "Enabled" + } + + disable() { + echo "Disabling battery saver mode..." + + # Restore refresh rate + hyprctl keyword monitor "eDP-1,2560x1600@165,0x0,1" + + # Restore Caelestia + pkill swaync || true + pkill waybar || true + caelestia shell -d >/dev/null 2>&1 & + disown + + + # Restart wallpaper + custom-wallpaper >/dev/null 2>&1 & + disown + + # Restore full UI via reload (safe here on exit) hyprctl reload - exit 0 + + # Restore brightness + if [[ -f "''${STATE}.brightness" ]]; then + brightnessctl set "$(cat "''${STATE}.brightness")" 2>/dev/null || true + fi + + rm -f "$STATE" "''${STATE}.brightness" + + notify-send "Battery Saver" "Disabled" + } + + if [[ -f "$STATE" ]]; then + disable + else + enable fi ''; }; From 3b73438d4f082fefcc16c1189a023d0e76aec7d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Rivera?= Date: Sun, 14 Jun 2026 11:10:56 +0200 Subject: [PATCH 04/18] custom-performance: reset on startup --- modules/applications/hyprland.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/applications/hyprland.nix b/modules/applications/hyprland.nix index d2c3c4a..5581deb 100644 --- a/modules/applications/hyprland.nix +++ b/modules/applications/hyprland.nix @@ -279,6 +279,8 @@ #"QS-notifycache" # builds the cache that will be used for the notification history "sleep 4 & caelestia-shell" #works better if it sleeps a bit before "sleep 20 && ngcp pull --automatic" # see github.com/tomasriveral/nix-git-cherry-picker + "rm ~/.cache/hypr-battery-saver" + "rm ~/.cache/hypr-battery-saver.brightness" /* We stopped using that ######################### maybe we should desactivate those scripts # login autostart From 88eb91c78009c369c78553fc405f2b0b45098054 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Rivera?= Date: Sun, 14 Jun 2026 11:14:48 +0200 Subject: [PATCH 05/18] desktop: ported custom-performance --- modules/hardware/performance.nix | 7 +++++++ modules/hosts/desktop.nix | 1 + 2 files changed, 8 insertions(+) create mode 100644 modules/hardware/performance.nix diff --git a/modules/hardware/performance.nix b/modules/hardware/performance.nix new file mode 100644 index 0000000..868124f --- /dev/null +++ b/modules/hardware/performance.nix @@ -0,0 +1,7 @@ +{self, ...}: { + flake.nixosModules.performance-desktop = {pkgs,...}: { + environment.systemPackages = [ + self.packages.${pkgs.system}.custom-performance + ]; + }; +} diff --git a/modules/hosts/desktop.nix b/modules/hosts/desktop.nix index b56cb9d..4596a34 100644 --- a/modules/hosts/desktop.nix +++ b/modules/hosts/desktop.nix @@ -44,6 +44,7 @@ office #ollama otherUtils + performance-desktop printer rss udev From 246412ae4b1c3d329e45ebc2fd5a1758b3bded5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Rivera?= Date: Sat, 13 Jun 2026 11:56:27 +0200 Subject: [PATCH 06/18] custom-performance: entire rewrite Now kills caelestia, change monitor hz and launches lightweight alternative to calestia (waybar and swaync) --- .gitignore | 9 +++++++++ modules/applications/hyprland.nix | 8 +++++--- modules/applications/waybar.nix | 28 ++++++++++++++++++++++++++++ modules/applications/zsh.nix | 21 +++++++++++++++++++-- modules/hardware/battery.nix | 13 +++++++------ modules/hosts/desktop.nix | 7 ++++++- modules/hosts/laptop.nix | 2 ++ 7 files changed, 76 insertions(+), 12 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a357584 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +# Ignore build outputs from performing a nix-build or `nix build` command +result +result-* + +# Ignore automatically generated direnv output +.direnv + +# Ignore NixOS interactive test driver history +**/.nixos-test-history diff --git a/modules/applications/hyprland.nix b/modules/applications/hyprland.nix index 5581deb..83bb176 100644 --- a/modules/applications/hyprland.nix +++ b/modules/applications/hyprland.nix @@ -198,8 +198,8 @@ "$mod_SHIFT, S, exec, caelestia shell picker open" # framework 16 rgb macropad "Ctrl+$mod, 6, exec, custom-killall" # pos 1 1 killall apps except focused one - #"Ctrl+Alt, 7, exec, custom-performance" # pos 2 1 start performance mode - "Ctrl+Alt, 7, exec, caelestia shell gameMode toggle" + "Ctrl+Alt, 7, exec, custom-performance" # pos 2 1 start performance mode + #"Ctrl+Alt, 7, exec, caelestia shell gameMode toggle" # reloads the autostart programs # pos 3 1 # we passed to caelestia-shell and stoped using that /* @@ -211,7 +211,9 @@ #"Ctrl+Alt, 1, exec, swaync-client -t" # pos 4 1 notification center "Ctrl+Alt, 1, exec, qs ipc call notifications toggle" */ - "Ctrl+Alt, 1, exec, caelestia shell drawers toggle sidebar" + # pos 4 1 notification center. + "Ctrl+Alt, 1, exec, caelestia shell drawers toggle sidebar" + "Ctrl+Alt, 1, exec, [[ -f ~/.cache/hypr-battery-saver ]] || swaync-client -t" "Ctrl+$mod, 4, exec, caelestia shell notifs toggleDnd" "Ctrl+$mod, 3, exec, pavucontrol" # pos 1 2 audiocontrol "Ctrl+Shift+Alt, 0, exec, kitty --hold --class \"custom-changeAudioOutput\" --name \"Select audio output\" zsh -c \"custom-changeAudioOutput\"" # pos 2 2 change audio output fzf diff --git a/modules/applications/waybar.nix b/modules/applications/waybar.nix index 3fbe247..9af7bcd 100644 --- a/modules/applications/waybar.nix +++ b/modules/applications/waybar.nix @@ -1,4 +1,32 @@ _: { + flake.homeModules.waybar-minimal = _: { + programs.waybar = { + enable = true; + settings = [ + { + layer = "top"; + modules-left = []; + modules-center = []; + modules-right = [ + "battery" + "clock" + ]; + + battery = { + format = "{capacity}% {icon}"; + states = { + warning = 30; + critical = 15; + }; + }; + + clock = { + format = "{:%H:%M}"; + }; + } + ]; + }; + }; flake.homeModules.waybar = _: { # replaced by caelestia programs.waybar = { diff --git a/modules/applications/zsh.nix b/modules/applications/zsh.nix index c58545b..01b5c0e 100644 --- a/modules/applications/zsh.nix +++ b/modules/applications/zsh.nix @@ -2,8 +2,25 @@ _: { flake.homeModules.zsh-laptop = _: { programs.zsh = { shellAliases = { - snrt = "git -C ~/nixos add -A && time sudo nixos-rebuild test --flake ~/nixos/#laptop && pkill shell || true && pkill caelestia-shell || true && caelestia-shell -n > /dev/null 2>&1 & disown"; - snrs = "git -C ~/nixos add -A && time sudo nixos-rebuild switch --flake ~/nixos/#laptop && pkill shell || true && pkill caelestia-shell || true && caelestia-shell -n > /dev/null 2>&1 & disown"; + snrt = '' + git -C ~/nixos add -A && + time sudo nixos-rebuild test --flake ~/nixos/#laptop && + pkill shell || true && + if [ ! -f ~/.cache/hypr-battery-saver ]; then + pkill caelestia-shell || true && + caelestia-shell -n > /dev/null 2>&1 & disown + fi + ''; + + snrs = '' + git -C ~/nixos add -A && + time sudo nixos-rebuild switch --flake ~/nixos/#laptop && + pkill shell || true && + if [ ! -f ~/.cache/hypr-battery-saver ]; then + pkill caelestia-shell || true && + caelestia-shell -n > /dev/null 2>&1 & disown + fi + ''; }; }; }; diff --git a/modules/hardware/battery.nix b/modules/hardware/battery.nix index 096d37d..c7e7663 100644 --- a/modules/hardware/battery.nix +++ b/modules/hardware/battery.nix @@ -51,11 +51,12 @@ PLATFORM_PROFILE_ON_BAT = "powersave"; STOP_CHARGE_THRESH_BAT1 = 80; }; +<<<<<<< HEAD };*/ environment.systemPackages = [ self.packages.${pkgs.system}.custom-performance ]; - }; + }; perSystem = {pkgs, ...}: let NotifySound = ../../assets/battery_notify.mp3; in { @@ -361,7 +362,7 @@ pkill -f caelestia || true pkill shell || true pkill -f custom-wallpaper || true - + # Start lightweight notifications pkill swaync || true swaync & disown @@ -372,7 +373,7 @@ # Lower refresh rate (BIGGEST win) hyprctl keyword monitor "eDP-1,2560x1600@60,0x0,1" - + # Core performance toggles hyprctl --batch "\ keyword animations:enabled 0;\ @@ -420,12 +421,12 @@ if [[ -f "''${STATE}.brightness" ]]; then brightnessctl set "$(cat "''${STATE}.brightness")" 2>/dev/null || true fi - + rm -f "$STATE" "''${STATE}.brightness" - + notify-send "Battery Saver" "Disabled" } - + if [[ -f "$STATE" ]]; then disable else diff --git a/modules/hosts/desktop.nix b/modules/hosts/desktop.nix index 4596a34..6dbf7bf 100644 --- a/modules/hosts/desktop.nix +++ b/modules/hosts/desktop.nix @@ -75,15 +75,17 @@ rofi sbb-tui ssh + swaync # used in performance mode thunderbird tomasr vivify + waybar-minimal # used in performance mode zoxide zsh zsh-desktop ]; }; - flake.nixosModules.desktop = _: { + flake.nixosModules.desktop = {pkgs, ...}: { # 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 @@ -95,6 +97,9 @@ "nix-command" "flakes" ]; + environment.systemPackages = [ + self.packages.${pkgs.system}.custom-performance + ]; }; flake.nixosModules.home-manager-desktop = {pkgs, ...}: { imports = [ diff --git a/modules/hosts/laptop.nix b/modules/hosts/laptop.nix index 13553ba..7ea7ced 100644 --- a/modules/hosts/laptop.nix +++ b/modules/hosts/laptop.nix @@ -76,9 +76,11 @@ rofi sbb-tui ssh + swaync # used in performance mode thunderbird tomasr vivify + waybar-minimal # used in performance mode zoxide zsh zsh-laptop From 23a9fdd4e8b0b7dc0431cb3a7cc04dec4ad1a7b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Rivera?= Date: Sun, 14 Jun 2026 17:11:35 +0200 Subject: [PATCH 07/18] snapshot pre-cleanup-2026-06-14T15-11-35Z From 2a0c85275f9cd64cf413c85de941b52f905361fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Rivera?= Date: Sun, 14 Jun 2026 17:26:03 +0200 Subject: [PATCH 08/18] snapshot pre-cleanup-2026-06-14T15-26-03Z From 2d16f3893bb0f110ea54611b84e6012bc62999bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Rivera?= Date: Sun, 14 Jun 2026 17:26:24 +0200 Subject: [PATCH 09/18] Auto: cleanup-2026-06-14T15-26-03Z --- flake.nix | 2 +- modules/applications/hyprland.nix | 4 +-- modules/applications/mathematics.nix | 2 +- modules/applications/waybar.nix | 4 +-- modules/applications/zsh.nix | 4 +-- modules/hardware/battery.nix | 48 +++++++++++++++------------- modules/hardware/performance.nix | 2 +- modules/utilities/nixUtils.nix | 6 +++- 8 files changed, 39 insertions(+), 33 deletions(-) diff --git a/flake.nix b/flake.nix index ffcc356..96e28ad 100644 --- a/flake.nix +++ b/flake.nix @@ -4,7 +4,7 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-26.05"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable"; # used for some packages - + # Only uncomment when needed. This uses a lot of space and compute ressources for sometimes not that much. If not used, make it follow unstable nixpkgs-master.follows = "nixpkgs-unstable"; #nixpkgs-master.url = "github:nixos/nixpkgs/master"; # used with precaution as they are untested and not cached diff --git a/modules/applications/hyprland.nix b/modules/applications/hyprland.nix index 83bb176..d851950 100644 --- a/modules/applications/hyprland.nix +++ b/modules/applications/hyprland.nix @@ -211,8 +211,8 @@ #"Ctrl+Alt, 1, exec, swaync-client -t" # pos 4 1 notification center "Ctrl+Alt, 1, exec, qs ipc call notifications toggle" */ - # pos 4 1 notification center. - "Ctrl+Alt, 1, exec, caelestia shell drawers toggle sidebar" + # pos 4 1 notification center. + "Ctrl+Alt, 1, exec, caelestia shell drawers toggle sidebar" "Ctrl+Alt, 1, exec, [[ -f ~/.cache/hypr-battery-saver ]] || swaync-client -t" "Ctrl+$mod, 4, exec, caelestia shell notifs toggleDnd" "Ctrl+$mod, 3, exec, pavucontrol" # pos 1 2 audiocontrol diff --git a/modules/applications/mathematics.nix b/modules/applications/mathematics.nix index 2d8ce6e..e5cded2 100644 --- a/modules/applications/mathematics.nix +++ b/modules/applications/mathematics.nix @@ -3,5 +3,5 @@ _: { environment.systemPackages = with pkgs; [ elan ]; - }; + }; } diff --git a/modules/applications/waybar.nix b/modules/applications/waybar.nix index 9af7bcd..4567825 100644 --- a/modules/applications/waybar.nix +++ b/modules/applications/waybar.nix @@ -11,7 +11,7 @@ _: { "battery" "clock" ]; - + battery = { format = "{capacity}% {icon}"; states = { @@ -19,7 +19,7 @@ _: { critical = 15; }; }; - + clock = { format = "{:%H:%M}"; }; diff --git a/modules/applications/zsh.nix b/modules/applications/zsh.nix index 01b5c0e..cc40343 100644 --- a/modules/applications/zsh.nix +++ b/modules/applications/zsh.nix @@ -11,7 +11,7 @@ _: { caelestia-shell -n > /dev/null 2>&1 & disown fi ''; - + snrs = '' git -C ~/nixos add -A && time sudo nixos-rebuild switch --flake ~/nixos/#laptop && @@ -50,7 +50,7 @@ _: { command cat "$@" fi } - + custom-eza() { # behaves differently if we just call it or if we pipe initContent if [[ -t 1 ]]; then eza -hlF -aa --color=always --hyperlink --group-directories-first --show-symlinks --icons=always --git --no-permissions "$@" diff --git a/modules/hardware/battery.nix b/modules/hardware/battery.nix index c7e7663..b40bdce 100644 --- a/modules/hardware/battery.nix +++ b/modules/hardware/battery.nix @@ -36,27 +36,29 @@ services.system76-scheduler.settings.cfsProfiles.enable = true; # Better scheduling for CPU cycles - thanks System76!!! services.thermald.enable = false; # Enable thermald, the temperature management daemon. (only necessary if on Intel CPUs) services.power-profiles-daemon.enable = true; # ppd is recommended over tlp for framework 16 - /*services.tlp = { - enable = true; # Enable TLP (better than gnomes internal power manager) - settings = { - CPU_BOOST_ON_AC = 1; - CPU_BOOST_ON_BAT = 1; - CPU_HWP_DYN_BOOST_ON_AC = 1; - CPU_HWP_DYN_BOOST_ON_BAT = 1; - CPU_SCALING_GOVERNOR_ON_AC = "balanced"; - CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; - CPU_ENERGY_PERF_POLICY_ON_AC = "balanced"; - CPU_ENERGY_PERF_POLICY_ON_BAT = "powersave"; - PLATFORM_PROFILE_ON_AC = "balanced"; - PLATFORM_PROFILE_ON_BAT = "powersave"; - STOP_CHARGE_THRESH_BAT1 = 80; - }; -<<<<<<< HEAD - };*/ + /* + services.tlp = { + enable = true; # Enable TLP (better than gnomes internal power manager) + settings = { + CPU_BOOST_ON_AC = 1; + CPU_BOOST_ON_BAT = 1; + CPU_HWP_DYN_BOOST_ON_AC = 1; + CPU_HWP_DYN_BOOST_ON_BAT = 1; + CPU_SCALING_GOVERNOR_ON_AC = "balanced"; + CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; + CPU_ENERGY_PERF_POLICY_ON_AC = "balanced"; + CPU_ENERGY_PERF_POLICY_ON_BAT = "powersave"; + PLATFORM_PROFILE_ON_AC = "balanced"; + PLATFORM_PROFILE_ON_BAT = "powersave"; + STOP_CHARGE_THRESH_BAT1 = 80; + }; + <<<<<<< HEAD + }; + */ environment.systemPackages = [ self.packages.${pkgs.system}.custom-performance ]; - }; + }; perSystem = {pkgs, ...}: let NotifySound = ../../assets/battery_notify.mp3; in { @@ -362,7 +364,7 @@ pkill -f caelestia || true pkill shell || true pkill -f custom-wallpaper || true - + # Start lightweight notifications pkill swaync || true swaync & disown @@ -373,7 +375,7 @@ # Lower refresh rate (BIGGEST win) hyprctl keyword monitor "eDP-1,2560x1600@60,0x0,1" - + # Core performance toggles hyprctl --batch "\ keyword animations:enabled 0;\ @@ -421,12 +423,12 @@ if [[ -f "''${STATE}.brightness" ]]; then brightnessctl set "$(cat "''${STATE}.brightness")" 2>/dev/null || true fi - + rm -f "$STATE" "''${STATE}.brightness" - + notify-send "Battery Saver" "Disabled" } - + if [[ -f "$STATE" ]]; then disable else diff --git a/modules/hardware/performance.nix b/modules/hardware/performance.nix index 868124f..c238e4b 100644 --- a/modules/hardware/performance.nix +++ b/modules/hardware/performance.nix @@ -1,5 +1,5 @@ {self, ...}: { - flake.nixosModules.performance-desktop = {pkgs,...}: { + flake.nixosModules.performance-desktop = {pkgs, ...}: { environment.systemPackages = [ self.packages.${pkgs.system}.custom-performance ]; diff --git a/modules/utilities/nixUtils.nix b/modules/utilities/nixUtils.nix index 36964b6..5078834 100644 --- a/modules/utilities/nixUtils.nix +++ b/modules/utilities/nixUtils.nix @@ -1,4 +1,8 @@ -{inputs, self, ...}: { +{ + inputs, + self, + ... +}: { flake.nixosModules.nixUtils-laptop = _: { # nixpkgs-review crashed my laptop multiple times. We must reduce how much ressources it can take. # for reference, my laptop is a 12 core ryzen 7 From b8d8ef1aa8832a8fbe47df9d7c3c5a4d821fc7f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Rivera?= Date: Sat, 13 Jun 2026 22:11:53 +0200 Subject: [PATCH 10/18] treesitter: add sparql --- modules/applications/neovim.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/applications/neovim.nix b/modules/applications/neovim.nix index c405449..9c7eca9 100644 --- a/modules/applications/neovim.nix +++ b/modules/applications/neovim.nix @@ -52,6 +52,7 @@ _: { pkgs-unstable.vimPlugins.nvim-treesitter-parsers.nix pkgs-unstable.vimPlugins.nvim-treesitter-parsers.printf pkgs-unstable.vimPlugins.nvim-treesitter-parsers.python + pkgs-unstable.vimPlugins.nvim-treesitter-parsers.sparql pkgs-unstable.vimPlugins.telescope-nvim pkgs-unstable.vimPlugins.nvim-scrollbar pkgs-unstable.vimPlugins.promise-async From 67d21671c59ce8a2570ad5d02b17969976a582a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Rivera?= Date: Sat, 13 Jun 2026 22:11:53 +0200 Subject: [PATCH 11/18] treesitter: add sparql From 1c600dbf3c935dd50d9402b42ae55d28db5f7fa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Rivera?= Date: Tue, 16 Jun 2026 22:45:00 +0200 Subject: [PATCH 12/18] gitBackup: add ngcp and ReSSPublica --- modules/utilities/gitBackup.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/utilities/gitBackup.nix b/modules/utilities/gitBackup.nix index 08f9070..8ab2f45 100644 --- a/modules/utilities/gitBackup.nix +++ b/modules/utilities/gitBackup.nix @@ -54,7 +54,9 @@ "https://github.com/tomasriveral/notewrapper.git" "https://github.com/tomasriveral/fractal-cli.git" "https://github.com/tomasriveral/boids.git" - "https://github.com/tomasriveral/Nixpkgs-tracker-notifier.git" + "https://github.com/tomasriveral/nixpkgs-notifier.git" + "https://github.com/tomasriveral/Nix-Git-Cherry-Picker.git" + "https://github.com/tomasriveral/nixpkgs-notifier" ) LOCAL_BACKUP_DIR="$HOME/.gitBackups" From 752957818bb7f7c941ecffea5b783f038b0cfc48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Rivera?= Date: Tue, 16 Jun 2026 22:45:00 +0200 Subject: [PATCH 13/18] gitBackup: add ngcp and ReSSPublica --- modules/utilities/gitBackup.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/utilities/gitBackup.nix b/modules/utilities/gitBackup.nix index 8ab2f45..09561be 100644 --- a/modules/utilities/gitBackup.nix +++ b/modules/utilities/gitBackup.nix @@ -56,7 +56,7 @@ "https://github.com/tomasriveral/boids.git" "https://github.com/tomasriveral/nixpkgs-notifier.git" "https://github.com/tomasriveral/Nix-Git-Cherry-Picker.git" - "https://github.com/tomasriveral/nixpkgs-notifier" + "https://github.com/tomasriveral/ReSSPublica.git" ) LOCAL_BACKUP_DIR="$HOME/.gitBackups" From e2b7fd8a6420bd0cf4a6fee2c96bdff75dfbc97d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Rivera?= Date: Thu, 18 Jun 2026 17:00:20 +0200 Subject: [PATCH 14/18] kdrive: setup sync with desktop --- modules/applications/kdrive.nix | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/modules/applications/kdrive.nix b/modules/applications/kdrive.nix index d432f13..3522eb7 100644 --- a/modules/applications/kdrive.nix +++ b/modules/applications/kdrive.nix @@ -34,15 +34,13 @@ CPUWeight = 1; # minimum relative CPU share }; }; - /* systemd.user.timers.kdrive-sync = { wantedBy = [ "timers.target" ]; timerConfig = { - OnBootSec = "1m"; - OnUnitActiveSec = "5m"; + OnBootSec = "10m"; + OnUnitActiveSec = "1h"; }; }; - */ }; perSystem = {pkgs, ...}: { packages.custom-checkKdrive = pkgs.writeShellApplication { @@ -115,18 +113,25 @@ runtimeInputs = with pkgs; [ rclone libnotify + ripgrep ]; text = '' REMOTE_NAME="kdrive" MOUNT_POINT="/home/tomasr/hdd/kdrive" - - if rclone listremotes | rg "^''${REMOTE_NAME}:"; then + LOGFILE="/tmp/rclone-bisync.log" + rm LOGFILE && touch LOGFILE + if rclone --config "$HOME/.config/rclone/rclone.conf" listremotes | rg "^''${REMOTE_NAME}:"; then echo "Syncing ''${REMOTE_NAME}..." - rclone bisync "''${REMOTE_NAME}:" "$MOUNT_POINT" & + if ! rclone --config "$HOME/.config/rclone/rclone.conf" bisync "$MOUNT_POINT" "$REMOTE_NAME:" --recover > "$LOGFILE" 2>&1; then + notify-send "rclone bisync failed" "$(cat $LOGFILE)" + echo "rclone bisync failed" + cat $LOGFILE + cp $LOGFILE "$HOME/hdd/kdrive/logs/$(date +%Y-%m-%d-%H-%M-%S).log" + fi else notify-send "rclone sync failed" \ "Remote ''${REMOTE_NAME} not found.\nConfigure rclone and create the dir ~/kdrive/ or comment out the exec line in hyprland.nix." - echo "Remote ''${REMOTE_NAME} not found. Configure rclone or comment out the exec line in hyprland.nix." + echo "Remote ''${REMOTE_NAME} not found. Configure rclone or fix in ~/nixos/modules/applications/kdrive.nix" fi ''; }; From 876ec4ce214e66193d9035b8e6a2bbaca81b17c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Rivera?= Date: Thu, 18 Jun 2026 19:47:29 +0200 Subject: [PATCH 15/18] icloud backup with kdrive --- modules/applications/hyprland.nix | 13 +++++++++++++ modules/applications/kdrive.nix | 13 +++++++------ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/modules/applications/hyprland.nix b/modules/applications/hyprland.nix index d851950..99685ed 100644 --- a/modules/applications/hyprland.nix +++ b/modules/applications/hyprland.nix @@ -53,6 +53,19 @@ monitor = [ ", highres@highrr, auto, 0.75" ]; + exec-once = [ + "if [ -e \"/home/tomasr/icloudSync.sh\" ]; then /home/tomasr/icloudSync.sh; else notify-send \"icloudSync.sh doesn't exist\" \"See ~/nixos/modules/applications/hyprland.nix for more information\"; fi" + # my icloud account uses an email that I don't want to make public. So the script isnt pushed to github. The script looks like: + /* + #!/etc/profiles/per-user/tomasr/bin/zsh + if ! icloudpd --auth-only --username tomas.rivera_2009@icloud.com --dry-run; then + notify-send "icloudpd is not logged in" "Please run icloudpd icloudpd --username my@email.address --password my_password --auth-only" + exit 1 + fi + icloudpd --directory ~/hdd/kdrive/Photo/IPhone/icloudpd-backup --username tomas.rivera_2009@icloud.com --watch-with-interval 3600 --no-progress-bar + */ + + ]; }; }; flake.homeModules.hyprland = {pkgs-unstable, ...}: let diff --git a/modules/applications/kdrive.nix b/modules/applications/kdrive.nix index 3522eb7..f34b115 100644 --- a/modules/applications/kdrive.nix +++ b/modules/applications/kdrive.nix @@ -11,11 +11,12 @@ enable = true; }; }; - flake.nixosModules.kdrive-desktop = {pkgs, ...}: { - environment.systemPackages = [ - pkgs.rclone - self.packages.${pkgs.system}.custom-checkKdrive - self.packages.${pkgs.system}.custom-synckdrive-desktop + flake.nixosModules.kdrive-desktop = {pkgs-unstable, ...}: { + environment.systemPackages = with pkgs-unstable; [ + rclone + icloudpd + self.packages.${pkgs-unstable.system}.custom-checkKdrive + self.packages.${pkgs-unstable.system}.custom-synckdrive-desktop ]; # removes rclone error programs.fuse = { @@ -24,7 +25,7 @@ }; systemd.user.services.kdrive-sync = { serviceConfig = { - ExecStart = "${self.packages.${pkgs.system}.custom-synckdrive-desktop}/bin/custom-synckdrive"; + ExecStart = "${self.packages.${pkgs-unstable.system}.custom-synckdrive-desktop}/bin/custom-synckdrive"; Nice = 19; # lowest CPU scheduling priority IOSchedulingClass = "idle"; From 9e862337ca04e24d4f091bd9b1b8eecba8a2a980 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Rivera?= Date: Sat, 20 Jun 2026 12:53:01 +0200 Subject: [PATCH 16/18] snapshot pre-autoupdate-2026-06-20T10-53-01Z From 2722840919e46d6d4fd1a2a86f35f06658785d80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Rivera?= Date: Sat, 20 Jun 2026 14:01:36 +0200 Subject: [PATCH 17/18] ollama: add desktop --- modules/hosts/desktop.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/hosts/desktop.nix b/modules/hosts/desktop.nix index 6dbf7bf..dc51f2e 100644 --- a/modules/hosts/desktop.nix +++ b/modules/hosts/desktop.nix @@ -42,7 +42,7 @@ notifications nvidia office - #ollama + ollama otherUtils performance-desktop printer From 05ef065d75c7204ed6bf27acb44630e7e297160c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Rivera?= Date: Sat, 20 Jun 2026 21:29:55 +0200 Subject: [PATCH 18/18] snapshot pre-cleanup-2026-06-20T19-29-55Z