From 4d1565b7793644bf4d8fe5b525e595d968349ad4 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 14:45:49 +0200 Subject: [PATCH 01/34] hyprland: fix borders and splash --- modules/home-manager/hyprland.nix | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/modules/home-manager/hyprland.nix b/modules/home-manager/hyprland.nix index 9a92b51..bebd8de 100644 --- a/modules/home-manager/hyprland.nix +++ b/modules/home-manager/hyprland.nix @@ -237,7 +237,7 @@ in { ###################### */ ]; - splash = true; # remove default background on startup + splash = false; # remove default background on startup # gestures (also keybindings) gesture = [ "3, right, move, +col" @@ -328,6 +328,7 @@ in { # theme decoration = { dim_special = 0.3; + rounding = 18; blur = { special = true; enabled = true; @@ -338,8 +339,8 @@ in { }; }; general = { - gaps_in = 3; - gaps_out = 8; + gaps_in = 5; + gaps_out = 15; border_size = 4; "col.active_border" = "rgba(ca6702ff) rgba(ecd3a0ff) 45deg"; "col.inactive_border" = "rgba(f1dca7d9) rgba(ffe1a8d9) 45deg"; @@ -372,8 +373,8 @@ in { "2, layout:scrolling, layoutopt:direction:right" "name:special, layout:scrolling" # used for smart gaps along some windowrules - "w[tv1], gapsout:1, gapsin:1" - "f[1], gapsout:1, gapsin:1" + #"w[tv1], gapsout:1, gapsin:1" + #"f[1], gapsout:1, gapsin:1" ]; # █░█░█ █ █▄░█ █▀▄ █▀█ █░█░█   █▀█ █░█ █░░ █▀▀ █▀ @@ -435,10 +436,11 @@ in { "float on, size 400 175, match:class ^(custom-obsidianvaults)$" "float on, size 600 600, match:initial_class ^(custom-pomodoro)$" "float on, size 1500 800, match:initial_class ^(custom-bottom)$" - "border_size 2, match:float 0, match:workspace w[tv1]" - "rounding 1, match:float 0, match:workspace w[tv1]" - "border_size 2, match:float 0, match:workspace f[1]" - "rounding 1, match:float 0, match:workspace f[1]" + # smart gaps/border is ugly with caelestia-shell + #"border_size 2, match:float 0, match:workspace w[tv1]" + #"rounding 1, match:float 0, match:workspace w[tv1]" + #"border_size 2, match:float 0, match:workspace f[1]" + #"rounding 1, match:float 0, match:workspace f[1]" ]; # add a float for tomato when in kitty #"plugin:imgborders:noimgborders, tag:noborder" From 9fd49e798b60c17badd10b3b02010ea9040323a6 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 14:50:54 +0200 Subject: [PATCH 02/34] hyprland: fix borders and splash electric boogaloo --- modules/home-manager/caelestia.nix | 2 +- modules/home-manager/hyprland.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/home-manager/caelestia.nix b/modules/home-manager/caelestia.nix index c6ae216..6eeca71 100644 --- a/modules/home-manager/caelestia.nix +++ b/modules/home-manager/caelestia.nix @@ -516,7 +516,7 @@ in { }; theme = { enableTerm = false; # we do it manually by adapting our kitty config - enableHypr = true; + enableHypr = false; # this seems to add the splash enableDiscord = true; enableSpicetify = true; enableFuzzel = true; #what's that? diff --git a/modules/home-manager/hyprland.nix b/modules/home-manager/hyprland.nix index bebd8de..ab3cfd5 100644 --- a/modules/home-manager/hyprland.nix +++ b/modules/home-manager/hyprland.nix @@ -237,7 +237,7 @@ in { ###################### */ ]; - splash = false; # remove default background on startup + splash = true; # remove default background on startup # gestures (also keybindings) gesture = [ "3, right, move, +col" From 94d924a4946b9ea88bef55e2d8fb1a5e64b44ff1 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 14:52:18 +0200 Subject: [PATCH 03/34] birdtray: currently broken; removed from autostart --- modules/home-manager/hyprland.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/home-manager/hyprland.nix b/modules/home-manager/hyprland.nix index ab3cfd5..d01b7d2 100644 --- a/modules/home-manager/hyprland.nix +++ b/modules/home-manager/hyprland.nix @@ -212,7 +212,7 @@ in { #"wl-paste --type image --watch cliphist store" # clipboard store image data "custom-batterynotify" "custom-batterywarning" - "birdtray" # thunderbird tray app + #"birdtray" # thunderbird tray app # curently broken #wallpapers/b "swww img ${wallpaper}" "swww-daemon" From 7e4627c5c0468431db516bfc027910e5fa0c0db2 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 21:56:38 +0200 Subject: [PATCH 04/34] audio: add script to fzf change audio output --- modules/nixos/audioAndMedia.nix | 1 + modules/scripts/changeAudioOutput.nix | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 modules/scripts/changeAudioOutput.nix diff --git a/modules/nixos/audioAndMedia.nix b/modules/nixos/audioAndMedia.nix index f363e8b..f02b172 100644 --- a/modules/nixos/audioAndMedia.nix +++ b/modules/nixos/audioAndMedia.nix @@ -20,6 +20,7 @@ #media-session.enable = true; }; environment.systemPackages = with pkgs; [ + (pkgs.callPackage ../../modules/scripts/changeAudioOutput.nix {}) kdePackages.okular kdePackages.dolphin pulseaudio # sound server diff --git a/modules/scripts/changeAudioOutput.nix b/modules/scripts/changeAudioOutput.nix new file mode 100644 index 0000000..2b58146 --- /dev/null +++ b/modules/scripts/changeAudioOutput.nix @@ -0,0 +1,21 @@ +{ + writeShellApplication, + fzf, + pactl, + jq, + ... +}: +writeShellApplication { + name = "custom-changeAudioOutput"; + runtimeInputs = [ + fzf + pactl + jq + ]; + text = '' + $select=pactl -f json list sinks | jq -r '.[].name' | fzf + if [[ -n "$select" ]]; then + pactl set-default-sink $select + fi + ''; +} From 1996eeb77769a1e0db94c2fc67c8d9266c1f0325 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 22:34:30 +0200 Subject: [PATCH 05/34] audio: script added shortcut --- README.md | 18 +++++++++--------- modules/home-manager/hyprland.nix | 6 ++++-- modules/scripts/changeAudioOutput.nix | 9 +++++---- ...ramework_laptop_16_rgb_macropad.layout.json | 14 +++++++------- 4 files changed, 25 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index e0e4ca7..92bedb4 100644 --- a/README.md +++ b/README.md @@ -164,15 +164,15 @@ If you **don’t have the physical macropad**, the table below shows which keybi | Macropad Key | Linked Action (Hyprland keybinding) | | ------------ | -------------------------------------------- | | Row 1, Col 1 | Kill all apps except focused (`Ctrl+$mod+6`) | -| Row 2, Col 1 | Performance mode (`Ctrl+Alt+7`) | -| Row 3, Col 1 | Do not disturb (`Ctrl+$mod+4` | -| Row 4, Col 1 | Notification center (`Ctrl+Alt+1`) | -| Row 3, Col 2 | Special characters (`Ctrl+$mod+3`) | -| Row 3, Col 3 | Color picker (`Ctrl+Alt+8`) | -| Row 4, Col 1 | Notification center toggle (`Ctrl+Alt+1`) | -| Row 4, Col 2 | System monitor (`Ctrl+Alt+2`) | -| Row 4, Col 3 | Pomodoro timer (`Ctrl+Alt+0`) | -| Row 4, Col 6 | Launch Anki (`Ctrl+Alt+9`) | +| Row 1, Col 2 | Performance mode (`Ctrl+Alt+7`) | +| Row 1, Col 3 | Do not disturb (`Ctrl+$mod+4` | +| Row 1, Col 4 | Notification center (`Ctrl+Alt+1`) | +| Row 2, Col 1 | Pulseaudio control (`Ctrl+$mod+3`) | +| Row 2, Col 2 | Change audio output (`Ctrl+Alt+Shift+0`) | +| Row 2, Col 3 | Special characters (`Ctrl+$mod+3`) | +| Row 2, Col 4 | Color picker (`Ctrl+Alt+8`) | +| Row 3, Col 1 | Pomodoro timer (`Ctrl+Alt+0`) | +| Row 4, Col 1 | Launch Anki (`Ctrl+Alt+9`) | > Positions are labeled as `[row, column]` starting from top-left `[1,1]`. > Each macro calls a script or application from this configuration. diff --git a/modules/home-manager/hyprland.nix b/modules/home-manager/hyprland.nix index d01b7d2..02d1466 100644 --- a/modules/home-manager/hyprland.nix +++ b/modules/home-manager/hyprland.nix @@ -161,8 +161,9 @@ in { "Ctrl+Alt, 1, exec, caelestia shell drawers toggle sidebar" "Ctrl+$mod, 4, exec, caelestia shell notifs toggleDnd" "Ctrl+$mod, 3, exec, pavucontrol" # pos 1 2 audiocontrol - "Ctrl+$mod, 5, exec, gnome-characters" # pos 2 2 special chars - "Ctrl+Alt, 8, exec, hyprpicker | tee >(wl-copy) | cliphist store" # pos 3 2 colorpicker + "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 + "Ctrl+$mod, 5, exec, gnome-characters" # pos 3 2 special chars + "Ctrl+Alt, 8, exec, hyprpicker | tee >(wl-copy) | cliphist store" # pos 4 2 colorpicker "Ctrl+Alt, 0, exec, custom-tomato" # pos 1 3 pomodoro app "Ctrl+Alt, 2, exec, custom-bottom" # pos 2 3 btm (like htop but cleaner) "Ctrl+Alt, 9, exec, anki" @@ -433,6 +434,7 @@ in { "float on, match:class ^(vlc)$" "float on, match:class ^(eog)$" "float on, size 400 175, match:class ^(custom-librewolfprofiles)$" + "float on, size 1050 200, match:class ^(custom-changeAudioOutput)$" "float on, size 400 175, match:class ^(custom-obsidianvaults)$" "float on, size 600 600, match:initial_class ^(custom-pomodoro)$" "float on, size 1500 800, match:initial_class ^(custom-bottom)$" diff --git a/modules/scripts/changeAudioOutput.nix b/modules/scripts/changeAudioOutput.nix index 2b58146..3fda8cc 100644 --- a/modules/scripts/changeAudioOutput.nix +++ b/modules/scripts/changeAudioOutput.nix @@ -1,7 +1,7 @@ { writeShellApplication, fzf, - pactl, + pulseaudio, jq, ... }: @@ -9,13 +9,14 @@ writeShellApplication { name = "custom-changeAudioOutput"; runtimeInputs = [ fzf - pactl + pulseaudio jq ]; text = '' - $select=pactl -f json list sinks | jq -r '.[].name' | fzf + select=$(pactl -f json list sinks | jq -r '.[].name' | fzf) if [[ -n "$select" ]]; then - pactl set-default-sink $select + pactl set-default-sink "$select" + fi ''; } diff --git a/other/kblayouts/framework_laptop_16_rgb_macropad.layout.json b/other/kblayouts/framework_laptop_16_rgb_macropad.layout.json index dced4ef..e8350ee 100644 --- a/other/kblayouts/framework_laptop_16_rgb_macropad.layout.json +++ b/other/kblayouts/framework_laptop_16_rgb_macropad.layout.json @@ -12,7 +12,7 @@ "{+KC_LCTL}{+KC_LALT}7{-KC_LALT}{-KC_LCTL}", "{+KC_LCTL}{+KC_LALT}8{-KC_LALT}{-KC_LCTL}", "{+KC_LCTL}{+KC_LALT}9{-KC_LALT}{-KC_LCTL}", - "", + "{+KC_LCTL}{+KC_LSFT}{+KC_LALT}0{-KC_LALT}{-KC_LSFT}{-KC_LCTL}", "", "", "", @@ -25,19 +25,19 @@ "MACRO(0)", "MACRO(9)", "KC_NO", - "MACRO(5)", + "MACRO(10)", "MACRO(1)", "KC_NO", "KC_NO", "KC_NO", + "MACRO(5)", + "KC_NO", + "KC_NO", + "KC_NO", + "KC_NO", "MACRO(8)", "KC_NO", "KC_NO", - "KC_NO", - "KC_NO", - "KC_NO", - "KC_NO", - "KC_NO", "MACRO(6)", "MACRO(7)", "KC_NO", From 685151c9208fac253c0963c5cb93a1ffb093ca86 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 22:34:48 +0200 Subject: [PATCH 06/34] flake.lock: it changed. Why? --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 07f8afd..6112127 100755 --- a/flake.lock +++ b/flake.lock @@ -53,11 +53,11 @@ ] }, "locked": { - "lastModified": 1778606796, - "narHash": "sha256-P2krpSkFVYJ89bgsnAZ9RtQiGwiTW77sfSJp9SEDscM=", + "lastModified": 1778905220, + "narHash": "sha256-ox/5IHc8uwy6UTw6N7Shp6uCHIgu/S2PsWeuXsOHSo8=", "owner": "nix-community", "repo": "home-manager", - "rev": "e1fd7350f4410972bcb8c42a697d8c924ffe642a", + "rev": "d1686dc7d36cbd1234cb226ad6ef97e882716acb", "type": "github" }, "original": { From c862bf86662242530a1b1393c04e2c2db86a6ed0 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Mon, 18 May 2026 09:34:25 +0200 Subject: [PATCH 07/34] snapshot pre-autoupdate-2026-05-18T07-34-25Z --- modules/scripts/changeAudioOutput.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/scripts/changeAudioOutput.nix b/modules/scripts/changeAudioOutput.nix index 3fda8cc..3e1aadb 100644 --- a/modules/scripts/changeAudioOutput.nix +++ b/modules/scripts/changeAudioOutput.nix @@ -16,7 +16,7 @@ writeShellApplication { select=$(pactl -f json list sinks | jq -r '.[].name' | fzf) if [[ -n "$select" ]]; then pactl set-default-sink "$select" - fi + pkill -f "kitty.*Select audio output" ''; } From ec052b944aa6272abd9ea100da094457492bbb45 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Mon, 18 May 2026 09:42:32 +0200 Subject: [PATCH 08/34] flake.lock: autoupdate-2026-05-18T07-34-25Z --- flake.lock | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/flake.lock b/flake.lock index 6112127..a3fc25c 100755 --- a/flake.lock +++ b/flake.lock @@ -11,11 +11,11 @@ ] }, "locked": { - "lastModified": 1778125502, - "narHash": "sha256-QAAO9RCR6byVJi50l8RMVJWzrsNYbXonfR6tqU93vIQ=", + "lastModified": 1778644647, + "narHash": "sha256-iQIu4b5by8B3qKeigungSIgRoJg9HS1NiIZwqIbCGYk=", "owner": "caelestia-dots", "repo": "cli", - "rev": "7b8a4281aa8b2b12745de531cce0c65d87aea2e5", + "rev": "2ce6213698d1cfa15b4b067d35c3cda634f443dd", "type": "github" }, "original": { @@ -33,11 +33,11 @@ "quickshell": "quickshell" }, "locked": { - "lastModified": 1778381004, - "narHash": "sha256-JwIlrajiY74obxyTMu/Ym6wOEQaCjpHwfziPK+E5u3Q=", + "lastModified": 1778986249, + "narHash": "sha256-6vIBRLIy41LDrm/ahTcrEj6pBB+oji7bP/5RY9Or0GA=", "owner": "caelestia-dots", "repo": "shell", - "rev": "2ca4ad4a434e91e73504debd5225e66dc5ebb2b6", + "rev": "cf18cea3dad28ddda2f151b1b42a66f2fba1f84a", "type": "github" }, "original": { @@ -119,11 +119,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1778794387, - "narHash": "sha256-BL04pOS9453Awkeb9f90XBJXBSkWxN+vB7HIgnL0iMM=", + "lastModified": 1778869304, + "narHash": "sha256-30sZNZoA1cqF5JNO9fVX+wgiQYjB7HJqqJ4ztCDeBZE=", "owner": "nixos", "repo": "nixpkgs", - "rev": "8a1b0127302ea51e05bf4ea5a291743fac442406", + "rev": "d233902339c02a9c334e7e593de68855ad26c4cb", "type": "github" }, "original": { @@ -157,11 +157,11 @@ ] }, "locked": { - "lastModified": 1778222427, - "narHash": "sha256-6GFiP611nEJvtm+m03sMyfaVIJ9QOCi//hS+PPKyyPA=", + "lastModified": 1778488696, + "narHash": "sha256-QSWgYuZUCNUJ/cxmaq83WkcT7lHQDDfsPVgH+96kIl0=", "ref": "refs/heads/master", - "rev": "d1760ed1f31c02a95b37a9bf4084129c829ebe7f", - "revCount": 817, + "rev": "7d1c9a9c6721606b129829134d6f614f015621e2", + "revCount": 818, "type": "git", "url": "https://git.outfoxxed.me/outfoxxed/quickshell" }, From 90dba0e7c4c03a140122615098d36ad10bd70774 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Mon, 18 May 2026 09:44:25 +0200 Subject: [PATCH 09/34] snapshot pre-autoupdate-2026-05-18T07-44-25Z From fbc0aad05b98dd89903b1e2bfb24c3f96cb34992 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Mon, 18 May 2026 09:48:33 +0200 Subject: [PATCH 10/34] snapshot pre-autoupdate-2026-05-18T07-48-33Z --- hostsModules/laptop/scripts/autoUpdate.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hostsModules/laptop/scripts/autoUpdate.nix b/hostsModules/laptop/scripts/autoUpdate.nix index 5828ede..f4359b9 100644 --- a/hostsModules/laptop/scripts/autoUpdate.nix +++ b/hostsModules/laptop/scripts/autoUpdate.nix @@ -29,7 +29,7 @@ pkgs.writeShellApplication { # update lock only nix flake update --flake "$FLAKE_DIR" - if sudo nixos-rebuild switch --flake "$FLAKE" 2> "$ERROR_FILE"; then + if sudo /run/current/system/sw/bin/nixos-rebuild switch --flake "$FLAKE" 2> "$ERROR_FILE"; then # use /run/.../bin/ uses the sudoless rule if ! git -C "$FLAKE_DIR" diff --quiet -- flake.lock; then git -C "$FLAKE_DIR" add flake.lock From 1fb9eefea509e07943c04e71d4a37f6f5f2d6cf8 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Mon, 18 May 2026 09:50:15 +0200 Subject: [PATCH 11/34] snapshot pre-autoupdate-2026-05-18T07-50-15Z --- hostsModules/laptop/scripts/autoUpdate.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/hostsModules/laptop/scripts/autoUpdate.nix b/hostsModules/laptop/scripts/autoUpdate.nix index f4359b9..b25cdf3 100644 --- a/hostsModules/laptop/scripts/autoUpdate.nix +++ b/hostsModules/laptop/scripts/autoUpdate.nix @@ -29,6 +29,7 @@ pkgs.writeShellApplication { # update lock only nix flake update --flake "$FLAKE_DIR" + which nixos-rebuild if sudo /run/current/system/sw/bin/nixos-rebuild switch --flake "$FLAKE" 2> "$ERROR_FILE"; then # use /run/.../bin/ uses the sudoless rule if ! git -C "$FLAKE_DIR" diff --quiet -- flake.lock; then From 876f32b8c3b838c48f2a011813bbfda39ac0b9c7 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Mon, 18 May 2026 09:51:24 +0200 Subject: [PATCH 12/34] snapshot pre-autoupdate-2026-05-18T07-51-24Z --- hostsModules/laptop/scripts/autoUpdate.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/hostsModules/laptop/scripts/autoUpdate.nix b/hostsModules/laptop/scripts/autoUpdate.nix index b25cdf3..7b09aa5 100644 --- a/hostsModules/laptop/scripts/autoUpdate.nix +++ b/hostsModules/laptop/scripts/autoUpdate.nix @@ -30,6 +30,7 @@ pkgs.writeShellApplication { nix flake update --flake "$FLAKE_DIR" which nixos-rebuild + which /run/current/system/sw/bin/nixos-rebuild if sudo /run/current/system/sw/bin/nixos-rebuild switch --flake "$FLAKE" 2> "$ERROR_FILE"; then # use /run/.../bin/ uses the sudoless rule if ! git -C "$FLAKE_DIR" diff --quiet -- flake.lock; then From 6d236cab7138a139ed851e3765b5ffc6074b5a40 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Mon, 18 May 2026 09:54:44 +0200 Subject: [PATCH 13/34] snapshot pre-autoupdate-2026-05-18T07-54-44Z --- hostsModules/laptop/scripts/autoUpdate.nix | 2 -- modules/nixos/user.nix | 8 ++++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/hostsModules/laptop/scripts/autoUpdate.nix b/hostsModules/laptop/scripts/autoUpdate.nix index 7b09aa5..f4359b9 100644 --- a/hostsModules/laptop/scripts/autoUpdate.nix +++ b/hostsModules/laptop/scripts/autoUpdate.nix @@ -29,8 +29,6 @@ pkgs.writeShellApplication { # update lock only nix flake update --flake "$FLAKE_DIR" - which nixos-rebuild - which /run/current/system/sw/bin/nixos-rebuild if sudo /run/current/system/sw/bin/nixos-rebuild switch --flake "$FLAKE" 2> "$ERROR_FILE"; then # use /run/.../bin/ uses the sudoless rule if ! git -C "$FLAKE_DIR" diff --quiet -- flake.lock; then diff --git a/modules/nixos/user.nix b/modules/nixos/user.nix index 35cec27..2ceebeb 100644 --- a/modules/nixos/user.nix +++ b/modules/nixos/user.nix @@ -50,6 +50,14 @@ command = "/run/current-system/sw/bin/nixos-rebuild"; options = [ "NOPASSWD" ]; } + { + command = "${pkgs.nixos-rebuild}/bin/nixos-rebuild"; + options = [ "NOPASSWD" ]; + } + { + command = "${pkgs-unstable.nixos-rebuild}/bin/nixos-rebuild"; + options = [ "NOPASSWD" ]; + } ]; } ]; From 63e3076b2190f54bfaa81c09f95ed1b1e73b6c10 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Mon, 18 May 2026 09:55:13 +0200 Subject: [PATCH 14/34] snapshot pre-autoupdate-2026-05-18T07-55-13Z From 7a57f2c332262bf2ab6b84135812db9775a0ab24 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Mon, 18 May 2026 09:57:37 +0200 Subject: [PATCH 15/34] snapshot pre-autoupdate-2026-05-18T07-57-37Z --- hostsModules/laptop/scripts/autoUpdate.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hostsModules/laptop/scripts/autoUpdate.nix b/hostsModules/laptop/scripts/autoUpdate.nix index f4359b9..bace09e 100644 --- a/hostsModules/laptop/scripts/autoUpdate.nix +++ b/hostsModules/laptop/scripts/autoUpdate.nix @@ -29,7 +29,7 @@ pkgs.writeShellApplication { # update lock only nix flake update --flake "$FLAKE_DIR" - if sudo /run/current/system/sw/bin/nixos-rebuild switch --flake "$FLAKE" 2> "$ERROR_FILE"; then # use /run/.../bin/ uses the sudoless rule + if sudo /run/current-system/sw/bin/nixos-rebuild switch --flake "$FLAKE" 2> "$ERROR_FILE"; then # use /run/.../bin/ uses the sudoless rule if ! git -C "$FLAKE_DIR" diff --quiet -- flake.lock; then git -C "$FLAKE_DIR" add flake.lock From 11c6b634f00aa69e3cb066dc8712129f3886b259 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Mon, 18 May 2026 11:46:27 +0200 Subject: [PATCH 16/34] nix-index: added --- modules/home-manager/caelestia.nix | 7 +++++++ modules/nixos/nixUtils.nix | 1 + 2 files changed, 8 insertions(+) diff --git a/modules/home-manager/caelestia.nix b/modules/home-manager/caelestia.nix index 6eeca71..035539d 100644 --- a/modules/home-manager/caelestia.nix +++ b/modules/home-manager/caelestia.nix @@ -3,11 +3,18 @@ pkgs, pkgs-unstable, caelestia-shell, + lib, ... }: let sisyphe = ../../assets/sisyphe.gif; pepe-music = ../../assets/pepe-music.gif; in { + home.activation.reloadCaelestia = # reloads caelestia on rebuild + lib.hm.dag.entryAfter [ "reloadSystemd" ] '' + pkill caelestia-shell + pkill shell + caelestia-shell -n + ''; home.file.".local/state/caelestia/wallpaper/path.txt" = { # dummy file. Does nothing. Prevent an error enable = true; text = "${sisyphe}"; diff --git a/modules/nixos/nixUtils.nix b/modules/nixos/nixUtils.nix index fdf6108..b0f61c2 100644 --- a/modules/nixos/nixUtils.nix +++ b/modules/nixos/nixUtils.nix @@ -28,5 +28,6 @@ deadnix alejandra vimPluginsUpdater # used for building plugins + nix-index ]; } From e6470f71a23a96db039752e0df620c9171300a83 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Mon, 18 May 2026 12:21:12 +0200 Subject: [PATCH 17/34] caelestia: reload on rebuild --- hostsModules/laptop/home-manager/zsh.nix | 4 ++-- modules/home-manager/caelestia.nix | 21 ++++++--------------- 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/hostsModules/laptop/home-manager/zsh.nix b/hostsModules/laptop/home-manager/zsh.nix index cc383e7..f7a2362 100644 --- a/hostsModules/laptop/home-manager/zsh.nix +++ b/hostsModules/laptop/home-manager/zsh.nix @@ -5,8 +5,8 @@ }: { programs.zsh = { shellAliases = { - snrt = "git -C ~/nixos add -A && time sudo nixos-rebuild test --flake ~/nixos/#laptop"; - snrs = "git -C ~/nixos add -A && time sudo nixos-rebuild switch --flake ~/nixos/#laptop"; + 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"; }; }; } diff --git a/modules/home-manager/caelestia.nix b/modules/home-manager/caelestia.nix index 035539d..2f791f8 100644 --- a/modules/home-manager/caelestia.nix +++ b/modules/home-manager/caelestia.nix @@ -1,24 +1,15 @@ { - config, - pkgs, - pkgs-unstable, - caelestia-shell, - lib, - ... +config, +pkgs, +pkgs-unstable, +... }: let - sisyphe = ../../assets/sisyphe.gif; - pepe-music = ../../assets/pepe-music.gif; +sisyphe = ../../assets/sisyphe.gif; +pepe-music = ../../assets/pepe-music.gif; in { - home.activation.reloadCaelestia = # reloads caelestia on rebuild - lib.hm.dag.entryAfter [ "reloadSystemd" ] '' - pkill caelestia-shell - pkill shell - caelestia-shell -n - ''; home.file.".local/state/caelestia/wallpaper/path.txt" = { # dummy file. Does nothing. Prevent an error enable = true; text = "${sisyphe}"; - }; home.file.".face" = { # this is were caelestia will search for profiles pictures From 669d23f20307289c054078819cd3d7ad5376962d Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Mon, 18 May 2026 14:56:16 +0200 Subject: [PATCH 18/34] librewolf: ublocks take adnauseam place on youtube.com --- modules/home-manager/librewolf.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/home-manager/librewolf.nix b/modules/home-manager/librewolf.nix index 0097dd7..ef04665 100644 --- a/modules/home-manager/librewolf.nix +++ b/modules/home-manager/librewolf.nix @@ -138,7 +138,7 @@ }; "uBlock0@raymondhill.net" = { install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; - installation_mode = "blocked"; + installation_mode = "force_installed"; }; "{08d5243b-4236-4a27-984b-1ded22ce01c3}" = { install_url = "https://addons.mozilla.org/firefox/downloads/file/3729287/gruvboxgruvboxgruvboxgruvboxgr-1.0.xpi"; From 42dc5f879273fe2795e95c699e8704c52daa4ee0 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Mon, 18 May 2026 14:56:26 +0200 Subject: [PATCH 19/34] snapshot pre-autoupdate-2026-05-18T12-56-26Z From be9b95921280f57f527e0e944c77f65d24252914 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Mon, 18 May 2026 18:38:07 +0200 Subject: [PATCH 20/34] kdrive: wait for an internet connection before attempting to mount --- modules/home-manager/hyprland.nix | 422 +++++++++++++++--------------- modules/scripts/checkKdrive.nix | 8 + 2 files changed, 219 insertions(+), 211 deletions(-) diff --git a/modules/home-manager/hyprland.nix b/modules/home-manager/hyprland.nix index 02d1466..94cfaf0 100644 --- a/modules/home-manager/hyprland.nix +++ b/modules/home-manager/hyprland.nix @@ -6,219 +6,219 @@ }: let wallpaper = ../../assets/wallpaper1.jpg; in { - #refer to https://wiki.hypr.land/Nix/Hyprland-on-Home-Manager/ - wayland.windowManager.hyprland.enable = true; - wayland.windowManager.hyprland.package = pkgs-unstable.hyprland; - #hint Electron apps to use on wayland; - home.sessionVariables.NIXOS_OZONE_WL = "1"; - wayland.windowManager.hyprland.plugins = [ - #pkgs-unstable.hyprlandPlugins.hyprspace # currently broken - #pkgs-unstable.hyprlandPlugins.hypr-dynamic-cursors # currently broken - ]; - wayland.windowManager.hyprland.settings = { - "$mod" = "SUPER"; - "$term" = "kitty"; - "$editor" = "nvim"; - "$notes" = "kitty --class \"custom-obsidianvaults\" --name \"Select Obsidian vault\" --hold custom-obsidianvaults"; - "$file" = "dolphin"; - "$browser" = "kitty --class \"custom-librewolfprofiles\" --name \"Select LibreWolf profile\" --hold custom-librewolfprofiles"; - # ▄▀█ █▄░█ █ █▀▄▀█ ▄▀█ ▀█▀ █ █▀█ █▄░█ - # █▀█ █░▀█ █ █░▀░█ █▀█ ░█░ █ █▄█ █░▀█ - animations = { - enabled = true; - bezier = [ - "wind, 0.05, 0.9, 0.1, 1.05" - "winIn, 0.1, 1.1, 0.1, 1.1" - "winOut, 0.3, -0.3, 0, 1" - "liner, 1, 1, 1, 1" + #refer to https://wiki.hypr.land/Nix/Hyprland-on-Home-Manager/ + wayland.windowManager.hyprland.enable = true; + wayland.windowManager.hyprland.package = pkgs-unstable.hyprland; + #hint Electron apps to use on wayland; + home.sessionVariables.NIXOS_OZONE_WL = "1"; + wayland.windowManager.hyprland.plugins = [ + #pkgs-unstable.hyprlandPlugins.hyprspace # currently broken + #pkgs-unstable.hyprlandPlugins.hypr-dynamic-cursors # currently broken + ]; + wayland.windowManager.hyprland.settings = { + "$mod" = "SUPER"; + "$term" = "kitty"; + "$editor" = "nvim"; + "$notes" = "kitty --class \"custom-obsidianvaults\" --name \"Select Obsidian vault\" --hold custom-obsidianvaults"; + "$file" = "dolphin"; + "$browser" = "kitty --class \"custom-librewolfprofiles\" --name \"Select LibreWolf profile\" --hold custom-librewolfprofiles"; + # ▄▀█ █▄░█ █ █▀▄▀█ ▄▀█ ▀█▀ █ █▀█ █▄░█ + # █▀█ █░▀█ █ █░▀░█ █▀█ ░█░ █ █▄█ █░▀█ + animations = { + enabled = true; + bezier = [ + "wind, 0.05, 0.9, 0.1, 1.05" + "winIn, 0.1, 1.1, 0.1, 1.1" + "winOut, 0.3, -0.3, 0, 1" + "liner, 1, 1, 1, 1" + ]; + animation = [ + "windows, 1, 6, wind, slide" + "windowsIn, 1, 6, winIn, slide" + "windowsOut, 1, 5, winOut, slide" + "windowsMove, 1, 5, wind, slide" + "border, 1, 1, liner" + "borderangle, 1, 30, liner, loop" + "fade, 1, 10, default" + "workspaces, 1, 5, wind" + ]; + }; + + # █▀▀ █▄░█ █░█ + # ██▄ █░▀█ ▀▄▀ + + # See https://wiki.hyprland.org/Configuring/Environment-variables/ + env = [ + "PATH, $PATH:$scrPath" + "XDG_CURRENT_DESKTOP,Hyprland" + "XDG_SESSION_TYPE,wayland" + "XDG_SESSION_DESKTOP,Hyprland" + "QT_QPA_PLATFORM,wayland;xcb" + "QT_QPAPLATFORMTHEME,qt6ct" + "QT_WAYLAND_DISABLE_WINDOWDECORATION,1" + "MOZ_ENABLE_WAYLAND,1" + "GDK_SCALE,1" ]; - animation = [ - "windows, 1, 6, wind, slide" - "windowsIn, 1, 6, winIn, slide" - "windowsOut, 1, 5, winOut, slide" - "windowsMove, 1, 5, wind, slide" - "border, 1, 1, liner" - "borderangle, 1, 30, liner, loop" - "fade, 1, 10, default" - "workspaces, 1, 5, wind" + + # █ █▄░█ █▀█ █░█ ▀█▀ + # █ █░▀█ █▀▀ █▄█ ░█░ + + input = { + kb_layout = ["ch"]; + follow_mouse = 1; + sensitivity = 0; + force_no_accel = 1; + }; + + # █▄▀ █▀▀ █▄█ █▄▄ █ █▄░█ █▀▄ █ █▄░█ █▀▀ █▀ + # █░█ ██▄ ░█░ █▄█ █ █░▀█ █▄▀ █ █░▀█ █▄█ ▄█ + # caelestia shell drawers toggle dashboard + # caelestia shell drawers toggle utilities + + bind = [ + #hyprland/utility keybindings + "$mod, W, togglefloating" + "$mod, G, togglegroup" + "Alt, Return, fullscreen" + "$mod, Left, movefocus, l" + "$mod, Right, movefocus, r" + "$mod, Up, movefocus, u" + "$mod, Down, movefocus, d" + "Alt, Tab, movefocus, d" + "$mod, 1, workspace, 1" + "$mod, 2, workspace, 2" + "$mod, 3, workspace, 3" + "$mod, 4, workspace, 4" + "$mod, 5, workspace, 5" + "$mod, 6, workspace, 6" + "$mod, 7, workspace, 7" + "$mod, 8, workspace, 8" + "$mod, 9, workspace, 9" + "$mod, 0, workspace, 10" + "$mod+Ctrl, Right, workspace, r+1" + "$mod+Ctrl, Left, workspace, r-1" + "$mod+Ctrl, Doown, workspace, empty" + "$mod+Shift, 1, movetoworkspace, 1" + "$mod+Shift, 2, movetoworkspace, 2" + "$mod+Shift, 3, movetoworkspace, 3" + "$mod+Shift, 4, movetoworkspace, 4" + "$mod+Shift, 5, movetoworkspace, 5" + "$mod+Shift, 6, movetoworkspace, 6" + "$mod+Shift, 7, movetoworkspace, 7" + "$mod+Shift, 8, movetoworkspace, 8" + "$mod+Shift, 9, movetoworkspace, 9" + "$mod+Shift, 0, movetoworkspace, 10" + "$mod+Ctrl+Alt, Right, movetoworkspace, r+1" + "$mod+Ctrl+Alt, Left, movetoworkspace, r-1" + #"$mod, Backspace, exec, wlogout -b 4 -T 600 -B 600" + "$mod, Backspace, exec, caelestia shell drawers toggle session" + "$mod+Shift+Ctrl, Left, movewindow, l" + "$mod+Shift+Ctrl, Right, movewindow, r" + "$mod+Shift+Ctrl, Up, movewindow, u" + "$mod+Shift+Ctrl, Down, movewindow, d" + "$mod, mouse_down, workspace, e+1" + "$mod, mouse_up, workspace, e-1" + "$mod, V, exec, cliphist list | rofi -dmenu| cliphist decode | wl-copy" # copy paste + "$mod, B, exec, hyprkeys -bkr | rofi -dmenu" + #"$mod, A, tagwindow, noborder" # used to not apply image border + "$mod, S, togglespecialworkspace," + "Alt+$mod, S, movetoworkspace, special" + # for the scrolling layout + "$mod, A, layoutmsg, move -col" + "$mod, D, layoutmsg, move +col" + #apps keybindings + "$mod, T, exec, $term" + "$mod, E, exec, $file" + "$mod, F, exec, $browser" + "$mod, N, exec, $notes" + #"$mod+Shift, A, exec, rofi -show drun" + "$mod+Shift, A, exec, caelestia shell drawers toggle launcher" + "$mod, Q, exec, custom-dontkillsteam" + #"Ctrl+Alt, W, exec, pkill waybar || waybar" + "Ctrl+Alt, W, exec, caelestia shell drawers toggle sidebar" + #"$mod, L, exec, swaylock -eFLK -i ${wallpaper}" + "$mod, L, exec, caelestia shell lock lock" + #"$mod, F11, exec, hyprshot -m window" + ", F11, exec, caelestia screenshot" + #"$mod_SHIFT, S, exec, hyprshot -m region --clipboard only" + # "$mod_SHIFT, S, exec, qs ipc call screenshot toggle" + "$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" + # reloads the autostart programs # pos 3 1 + # we passed to caelestia-shell and stoped using that + /* + "Ctrl+$mod, 4, exec, sleep 1 && kitty -o font_size=16 -e sh -c 'custom-weather'" + "Ctrl+$mod, 4, exec, sleep 1 && kitty -o font_size=11 -e sh -c 'custom-cowsay'" + "Ctrl+$mod, 4, exec, kitty -e 'custom-launch'" + "Ctrl+$mod, 4, exec, sleep 1 && kitty -o font_size=5 -e btm --theme gruvbox --disable-click --disable_advanced_kill --enable_cache_memory -g -R -T " + "Ctrl+$mod, 4, exec, sleep 1 && kitty -o font_size=1 -e sh -c 'cmatrix -br'" + #"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" + "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 + "Ctrl+$mod, 5, exec, gnome-characters" # pos 3 2 special chars + "Ctrl+Alt, 8, exec, hyprpicker | tee >(wl-copy) | cliphist store" # pos 4 2 colorpicker + "Ctrl+Alt, 0, exec, custom-tomato" # pos 1 3 pomodoro app + "Ctrl+Alt, 2, exec, custom-bottom" # pos 2 3 btm (like htop but cleaner) + "Ctrl+Alt, 9, exec, anki" + # if hyprexpo plugin enabled bind = $mainMod, Space, hyprexpo:expo, toggle + # maybe exec sudo framework-tools-tui + + #plugins keybindings + #"$mod, SPACE, overview:toggle, " ]; - }; - - # █▀▀ █▄░█ █░█ - # ██▄ █░▀█ ▀▄▀ - - # See https://wiki.hyprland.org/Configuring/Environment-variables/ - env = [ - "PATH, $PATH:$scrPath" - "XDG_CURRENT_DESKTOP,Hyprland" - "XDG_SESSION_TYPE,wayland" - "XDG_SESSION_DESKTOP,Hyprland" - "QT_QPA_PLATFORM,wayland;xcb" - "QT_QPAPLATFORMTHEME,qt6ct" - "QT_WAYLAND_DISABLE_WINDOWDECORATION,1" - "MOZ_ENABLE_WAYLAND,1" - "GDK_SCALE,1" - ]; - - # █ █▄░█ █▀█ █░█ ▀█▀ - # █ █░▀█ █▀▀ █▄█ ░█░ - - input = { - kb_layout = ["ch"]; - follow_mouse = 1; - sensitivity = 0; - force_no_accel = 1; - }; - - # █▄▀ █▀▀ █▄█ █▄▄ █ █▄░█ █▀▄ █ █▄░█ █▀▀ █▀ - # █░█ ██▄ ░█░ █▄█ █ █░▀█ █▄▀ █ █░▀█ █▄█ ▄█ - # caelestia shell drawers toggle dashboard - # caelestia shell drawers toggle utilities - - bind = [ - #hyprland/utility keybindings - "$mod, W, togglefloating" - "$mod, G, togglegroup" - "Alt, Return, fullscreen" - "$mod, Left, movefocus, l" - "$mod, Right, movefocus, r" - "$mod, Up, movefocus, u" - "$mod, Down, movefocus, d" - "Alt, Tab, movefocus, d" - "$mod, 1, workspace, 1" - "$mod, 2, workspace, 2" - "$mod, 3, workspace, 3" - "$mod, 4, workspace, 4" - "$mod, 5, workspace, 5" - "$mod, 6, workspace, 6" - "$mod, 7, workspace, 7" - "$mod, 8, workspace, 8" - "$mod, 9, workspace, 9" - "$mod, 0, workspace, 10" - "$mod+Ctrl, Right, workspace, r+1" - "$mod+Ctrl, Left, workspace, r-1" - "$mod+Ctrl, Doown, workspace, empty" - "$mod+Shift, 1, movetoworkspace, 1" - "$mod+Shift, 2, movetoworkspace, 2" - "$mod+Shift, 3, movetoworkspace, 3" - "$mod+Shift, 4, movetoworkspace, 4" - "$mod+Shift, 5, movetoworkspace, 5" - "$mod+Shift, 6, movetoworkspace, 6" - "$mod+Shift, 7, movetoworkspace, 7" - "$mod+Shift, 8, movetoworkspace, 8" - "$mod+Shift, 9, movetoworkspace, 9" - "$mod+Shift, 0, movetoworkspace, 10" - "$mod+Ctrl+Alt, Right, movetoworkspace, r+1" - "$mod+Ctrl+Alt, Left, movetoworkspace, r-1" - #"$mod, Backspace, exec, wlogout -b 4 -T 600 -B 600" - "$mod, Backspace, exec, caelestia shell drawers toggle session" - "$mod+Shift+Ctrl, Left, movewindow, l" - "$mod+Shift+Ctrl, Right, movewindow, r" - "$mod+Shift+Ctrl, Up, movewindow, u" - "$mod+Shift+Ctrl, Down, movewindow, d" - "$mod, mouse_down, workspace, e+1" - "$mod, mouse_up, workspace, e-1" - "$mod, V, exec, cliphist list | rofi -dmenu| cliphist decode | wl-copy" # copy paste - "$mod, B, exec, hyprkeys -bkr | rofi -dmenu" - #"$mod, A, tagwindow, noborder" # used to not apply image border - "$mod, S, togglespecialworkspace," - "Alt+$mod, S, movetoworkspace, special" - # for the scrolling layout - "$mod, A, layoutmsg, move -col" - "$mod, D, layoutmsg, move +col" - #apps keybindings - "$mod, T, exec, $term" - "$mod, E, exec, $file" - "$mod, F, exec, $browser" - "$mod, N, exec, $notes" - #"$mod+Shift, A, exec, rofi -show drun" - "$mod+Shift, A, exec, caelestia shell drawers toggle launcher" - "$mod, Q, exec, custom-dontkillsteam" - #"Ctrl+Alt, W, exec, pkill waybar || waybar" - "Ctrl+Alt, W, exec, caelestia shell drawers toggle sidebar" - #"$mod, L, exec, swaylock -eFLK -i ${wallpaper}" - "$mod, L, exec, caelestia shell lock lock" - #"$mod, F11, exec, hyprshot -m window" - ", F11, exec, caelestia screenshot" - #"$mod_SHIFT, S, exec, hyprshot -m region --clipboard only" - # "$mod_SHIFT, S, exec, qs ipc call screenshot toggle" - "$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" - # reloads the autostart programs # pos 3 1 - # we passed to caelestia-shell and stoped using that - /* - "Ctrl+$mod, 4, exec, sleep 1 && kitty -o font_size=16 -e sh -c 'custom-weather'" - "Ctrl+$mod, 4, exec, sleep 1 && kitty -o font_size=11 -e sh -c 'custom-cowsay'" - "Ctrl+$mod, 4, exec, kitty -e 'custom-launch'" - "Ctrl+$mod, 4, exec, sleep 1 && kitty -o font_size=5 -e btm --theme gruvbox --disable-click --disable_advanced_kill --enable_cache_memory -g -R -T " - "Ctrl+$mod, 4, exec, sleep 1 && kitty -o font_size=1 -e sh -c 'cmatrix -br'" - #"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" - "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 - "Ctrl+$mod, 5, exec, gnome-characters" # pos 3 2 special chars - "Ctrl+Alt, 8, exec, hyprpicker | tee >(wl-copy) | cliphist store" # pos 4 2 colorpicker - "Ctrl+Alt, 0, exec, custom-tomato" # pos 1 3 pomodoro app - "Ctrl+Alt, 2, exec, custom-bottom" # pos 2 3 btm (like htop but cleaner) - "Ctrl+Alt, 9, exec, anki" - # if hyprexpo plugin enabled bind = $mainMod, Space, hyprexpo:expo, toggle - # maybe exec sudo framework-tools-tui - - #plugins keybindings - #"$mod, SPACE, overview:toggle, " - ]; - binde = [ - "$mod+Shift, Right, resizeactive, 30 0" - "$mod+Shift, Left, resizeactive, -30, 0" - "$mod+Shift, Up, resizeactive, 0 -30" - "$mod+Shift, Down, resizeactive,m 0 30" - ]; - bindl = [ - ", F1, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle" #toggle audio mute - ", F5, exec, playerctl play-pause" # media F4-F6 - ", F4, exec, playerctl previous" - ", F6, exec, playerctl next" - ]; - bindel = [ - ", F2, exec, pactl set-sink-volume @DEFAULT_SINK@ -10%" # decrease volume - ", F3, exec, pactl set-sink-volume @DEFAULT_SINK@ +10%" # increase volume - ", F7, exec, brightnessctl s 10%-" # decrease brightness - ", F8, exec, brightnessctl s +10%" # increase brightness - ]; - bindm = [ - "$mod, mouse:272, movewindow" - "$mod, mouse:273, resizewindow" - "$mod, Z, movewindow" - "$mod, X, resizewindow" - ]; - # █░░ ▄▀█ █░█ █▄░█ █▀▀ █░█ - # █▄▄ █▀█ █▄█ █░▀█ █▄▄ █▀█ - exec-once = [ - "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP" # for XDPH - "dbus-update-activation-environment --systemd --all" # for XDPH - "systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP" # for XDPH - "systemctl --user start xdg-desktop-portal-wlr.service" - "blueman-applet" # systray app for Bluetooth - "udiskie --no-automount --smart-tray" # front-end that allows to manage removable media - "nm-applet --indicator" # systray app for Network/wifi - #setups clipboard - "rm -rf ~/.cache/cliphist/ && wl-paste --type text --watch cliphist store & wl-paste --type image --watch cliphist store" - #"wl-paste --type text --watch cliphist store" # clipboard store text data - #"wl-paste --type image --watch cliphist store" # clipboard store image data - "custom-batterynotify" - "custom-batterywarning" - #"birdtray" # thunderbird tray app # curently broken - #wallpapers/b - "swww img ${wallpaper}" - "swww-daemon" - "sleep 1 && custom-wallpaper" - "sleep 5 && custom-checkKdrive && custom-mountkdrive" # checks if the remote works and mount it + binde = [ + "$mod+Shift, Right, resizeactive, 30 0" + "$mod+Shift, Left, resizeactive, -30, 0" + "$mod+Shift, Up, resizeactive, 0 -30" + "$mod+Shift, Down, resizeactive,m 0 30" + ]; + bindl = [ + ", F1, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle" #toggle audio mute + ", F5, exec, playerctl play-pause" # media F4-F6 + ", F4, exec, playerctl previous" + ", F6, exec, playerctl next" + ]; + bindel = [ + ", F2, exec, pactl set-sink-volume @DEFAULT_SINK@ -10%" # decrease volume + ", F3, exec, pactl set-sink-volume @DEFAULT_SINK@ +10%" # increase volume + ", F7, exec, brightnessctl s 10%-" # decrease brightness + ", F8, exec, brightnessctl s +10%" # increase brightness + ]; + bindm = [ + "$mod, mouse:272, movewindow" + "$mod, mouse:273, resizewindow" + "$mod, Z, movewindow" + "$mod, X, resizewindow" + ]; + # █░░ ▄▀█ █░█ █▄░█ █▀▀ █░█ + # █▄▄ █▀█ █▄█ █░▀█ █▄▄ █▀█ + exec-once = [ + "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP" # for XDPH + "dbus-update-activation-environment --systemd --all" # for XDPH + "systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP" # for XDPH + "systemctl --user start xdg-desktop-portal-wlr.service" + "blueman-applet" # systray app for Bluetooth + "udiskie --no-automount --smart-tray" # front-end that allows to manage removable media + "nm-applet --indicator" # systray app for Network/wifi + #setups clipboard + "rm -rf ~/.cache/cliphist/ && wl-paste --type text --watch cliphist store & wl-paste --type image --watch cliphist store" + #"wl-paste --type text --watch cliphist store" # clipboard store text data + #"wl-paste --type image --watch cliphist store" # clipboard store image data + "custom-batterynotify" + "custom-batterywarning" + #"birdtray" # thunderbird tray app # curently broken + #wallpapers/b + "swww img ${wallpaper}" + "swww-daemon" + "sleep 1 && custom-wallpaper" + "custom-checkKdrive && custom-mountkdrive" # checks if the remote works and mount it #"waybar" "custom-gitnotify" "custom-checkMatrix" # checks if matrix-commander-rs is connected which is important for other stuff diff --git a/modules/scripts/checkKdrive.nix b/modules/scripts/checkKdrive.nix index a7160a0..d2df01b 100644 --- a/modules/scripts/checkKdrive.nix +++ b/modules/scripts/checkKdrive.nix @@ -13,6 +13,14 @@ writeShellApplication { libnotify ]; text = '' + +# waits for an internet connection. It pings both Google DNS and Cloudfare dns in case one of them is down +until ping -c1 -W1 1.1.1.1 >/dev/null 2>&1 || \ + ping -c1 -W1 8.8.8.8 >/dev/null 2>&1 +do + sleep 1 +done + set +e output=$(rclone lsd kdrive: 2>&1) From 2262e91b5aeb699310a3a0c08dfddc37f41c437f Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Mon, 18 May 2026 18:56:01 +0200 Subject: [PATCH 21/34] nix: add script to clean up my system --- hostsModules/laptop/scripts/cleanNix.nix | 68 ++++++++++++++++++++++++ modules/nixos/nixUtils.nix | 3 ++ 2 files changed, 71 insertions(+) create mode 100644 hostsModules/laptop/scripts/cleanNix.nix diff --git a/hostsModules/laptop/scripts/cleanNix.nix b/hostsModules/laptop/scripts/cleanNix.nix new file mode 100644 index 0000000..d493c0f --- /dev/null +++ b/hostsModules/laptop/scripts/cleanNix.nix @@ -0,0 +1,68 @@ +{ + pkgs, + ... +}: +pkgs.writeShellApplication { + name = "custom-cleanNix"; + + runtimeInputs = with pkgs; [ + git + nixos-rebuild + matrix-commander-rs + libnotify + alejandra + deadnix + ]; + + text = '' + set -e + + FLAKE_DIR="/home/tomasr/nixos" + FLAKE="$FLAKE_DIR#laptop" + TIME=$(date -u +"%Y-%m-%dT%H-%M-%SZ") + + ERROR_FILE=$(mktemp) + + # snapshot current state + git -C "$FLAKE_DIR" add -A + git -C "$FLAKE_DIR" commit --allow-empty -m "snapshot pre-cleanup-$TIME" + git -C "$FLAKE_DIR" tag "pre-cleanup-$TIME" HEAD + + # removes dead code + deadnix --edit "$FLAKE_DIR" # removes unused code + statix fix "$FLAKE_DIR" # check other linting issues + alejandra "$FLAKE_DIR" # formats the config + + if sudo /run/current-system/sw/bin/nixos-rebuild switch --flake "$FLAKE" 2> "$ERROR_FILE"; then # use /run/.../bin/ uses the sudoless rule + + if ! git -C "$FLAKE_DIR" diff --quiet HEAD; then + git -C "$FLAKE_DIR" add -A + git -C "$FLAKE_DIR" commit -m "Auto: cleanup-$TIME" + git -C "$FLAKE_DIR" push + + notify-send "Nix auto cleanup" "Everything OK" + + matrix-commander-rs --verbose -m "Nix auto cleanup. Everything OK.
@notificationbot_0000" \ + --html \ + -r "\!7j-78_02dHROeLj4Ns8F12eo4IiZGv4zNsQ_1-WlyIU" + else + notify-send "Nix auto cleanup" "No changes" + git -C "$FLAKE_DIR" push + fi + + else + ERROR_MSG=$(cat "$ERROR_FILE") + + notify-send -u critical "Nix auto cleanup" "FAILED" + + matrix-commander-rs --verbose -m "Nix auto cleanup failed.
Error:
$ERROR_MSG

@notificationbot_0000" \ + --html \ + -r "\!7j-78_02dHROeLj4Ns8F12eo4IiZGv4zNsQ_1-WlyIU" + + git -C "$FLAKE_DIR" reset --hard "pre-cleanup-$TIME" + fi + git -C "$FLAKE_DIR" tag -d "pre-cleanup-$TIME" # removes the tag + + rm -f "$ERROR_FILE" + ''; +} diff --git a/modules/nixos/nixUtils.nix b/modules/nixos/nixUtils.nix index b0f61c2..bfb2cfa 100644 --- a/modules/nixos/nixUtils.nix +++ b/modules/nixos/nixUtils.nix @@ -1,5 +1,6 @@ # some options are in ../../hostsModules/laptop/nixos/nixUtils.nix { + pkgs, pkgs-unstable, inputs, ... @@ -29,5 +30,7 @@ alejandra vimPluginsUpdater # used for building plugins nix-index + statix + (pkgs.callPackage ../../hostsModules/laptop/scripts/cleanNix.nix {}) ]; } From 21ee9df5fe92f45cb2e69fb8d7e04f41e97f08a6 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Mon, 18 May 2026 18:56:07 +0200 Subject: [PATCH 22/34] snapshot pre-cleanup-2026-05-18T16-56-07Z From e2d79fe94ceaac2e5ac9ba8c7c6edcd681465b00 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Mon, 18 May 2026 18:56:47 +0200 Subject: [PATCH 23/34] Auto: cleanup-2026-05-18T16-56-07Z --- flake.nix | 11 +- hosts/laptop/configuration.nix | 15 +- hosts/laptop/hardware-configuration.nix | 1 - hosts/laptop/home.nix | 7 +- hostsModules/laptop/home-manager/hyprland.nix | 9 +- hostsModules/laptop/home-manager/zsh.nix | 6 +- hostsModules/laptop/nixos/autoUpdate.nix | 8 +- hostsModules/laptop/nixos/battery.nix | 3 +- hostsModules/laptop/nixos/bootloader.nix | 3 +- hostsModules/laptop/nixos/disk.nix | 12 +- hostsModules/laptop/nixos/hardwareUtils.nix | 6 +- hostsModules/laptop/nixos/networking.nix | 15 +- hostsModules/laptop/nixos/nixUtils.nix | 5 +- hostsModules/laptop/nixos/ollama.nix | 16 +- hostsModules/laptop/nixos/udev.nix | 6 +- hostsModules/laptop/nixos/user.nix | 5 +- hostsModules/laptop/qt/qtbatticon.nix | 1 - hostsModules/laptop/scripts/autoUpdate.nix | 9 +- hostsModules/laptop/scripts/checkMatrix.nix | 3 +- hostsModules/laptop/scripts/cleanNix.nix | 9 +- modules/home-manager/.OLDneovim.nix | 1 - modules/home-manager/anki.nix | 6 +- modules/home-manager/batsignal.nix | 6 +- modules/home-manager/caelestia.nix | 14 +- modules/home-manager/cbatticon.nix | 6 +- modules/home-manager/cursor.nix | 6 +- modules/home-manager/eza.nix | 6 +- modules/home-manager/fastfetch.nix | 6 +- modules/home-manager/git.nix | 6 +- modules/home-manager/gtk.nix | 6 +- modules/home-manager/hypridle.nix | 6 +- modules/home-manager/hyprland.nix | 421 +++++++++--------- modules/home-manager/kitty.nix | 6 +- modules/home-manager/librewolf.nix | 12 +- modules/home-manager/micro.nix | 36 +- modules/home-manager/mullvad.nix | 4 +- modules/home-manager/neovim.nix | 23 +- modules/home-manager/obsidian.nix | 6 +- modules/home-manager/oh-my-posh.nix | 6 +- modules/home-manager/oh-my-zsh.nix | 6 +- modules/home-manager/other/desktopEntries.nix | 6 +- modules/home-manager/other/user.nix | 5 +- modules/home-manager/quickshell.nix | 6 +- modules/home-manager/rclone.nix | 5 +- modules/home-manager/ripgrep.nix | 6 +- modules/home-manager/rofi.nix | 6 +- modules/home-manager/sbb-tui.nix | 47 +- modules/home-manager/ssh.nix | 6 +- modules/home-manager/swaylock.nix | 6 +- modules/home-manager/swaync.nix | 6 +- modules/home-manager/thunderbird.nix | 6 +- modules/home-manager/vivify.nix | 39 +- modules/home-manager/waybar.nix | 6 +- modules/home-manager/wlogout.nix | 6 +- modules/home-manager/zoxide.nix | 6 +- modules/home-manager/zsh.nix | 6 +- modules/nixos/.lyBROKEN.nix | 2 +- modules/nixos/IO.nix | 6 +- modules/nixos/anki.nix | 6 +- modules/nixos/audioAndMedia.nix | 9 +- modules/nixos/bluetooth.nix | 6 +- modules/nixos/browser.nix | 3 +- modules/nixos/development.nix | 5 +- modules/nixos/disk.nix | 8 +- modules/nixos/documentation.nix | 9 +- modules/nixos/fonts.nix | 6 +- modules/nixos/latex.nix | 6 +- modules/nixos/ly.nix | 2 +- modules/nixos/mullvad.nix | 5 +- modules/nixos/nixUtils.nix | 20 +- modules/nixos/notifications.nix | 7 +- modules/nixos/office.nix | 6 +- modules/nixos/otherUtils.nix | 3 +- modules/nixos/printer.nix | 34 +- modules/nixos/theme.nix | 8 +- modules/nixos/user.nix | 13 +- modules/nixos/windowManager.nix | 5 +- modules/packages/labplot.nix | 7 +- modules/packages/plint.nix | 12 +- modules/packages/sbb-tui.nix | 11 +- modules/packages/vivify.nix | 15 +- modules/packages/z13ctl.nix | 5 +- modules/scripts/checkKdrive.nix | 38 +- modules/scripts/librewolfprofiles.nix | 1 - modules/scripts/performance-mode.nix | 8 +- modules/scripts/syllabes.nix | 44 +- 86 files changed, 481 insertions(+), 736 deletions(-) diff --git a/flake.nix b/flake.nix index 5e98fe8..0ba02c0 100644 --- a/flake.nix +++ b/flake.nix @@ -15,17 +15,13 @@ inputs.nixpkgs.follows = "nixpkgs-unstable"; }; microPlugins-vivify = { - url = "git+https://codeberg.org/gibbert/micro-vivify"; - flake = false; + url = "git+https://codeberg.org/gibbert/micro-vivify"; + flake = false; }; }; outputs = { - self, nixpkgs, nixpkgs-unstable, - home-manager, - nixos-grub-themes, - caelestia-shell, ... } @ inputs: let system = "x86_64-linux"; @@ -41,10 +37,9 @@ pkgs-unstable = import nixpkgs-unstable { inherit system; - + config.allowUnfreePredicate = mkUnfreePredicate; }; - in { nixosConfigurations = { laptop = nixpkgs.lib.nixosSystem { diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index ecd1f49..f8ae7e2 100755 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -3,10 +3,6 @@ # and in the NixOS manual (accessible by running ‘nixos-help’). { # nixd says that those attributes are not used. The are used in the imported file. Do not remove. - config, - pkgs, - pkgs-unstable, - libs, inputs, ... }: { @@ -18,9 +14,11 @@ #../../modules/nixos/ly.nix ../../modules/nixos/ly.nix ../../modules/nixos/anki.nix - ../../modules/nixos/nixUtils.nix ../../hostsModules/laptop/nixos/nixUtils.nix + ../../modules/nixos/nixUtils.nix + ../../hostsModules/laptop/nixos/nixUtils.nix ../../hostsModules/laptop/nixos/udev.nix - ../../modules/nixos/disk.nix ../../hostsModules/laptop/nixos/disk.nix + ../../modules/nixos/disk.nix + ../../hostsModules/laptop/nixos/disk.nix ../../modules/nixos/printer.nix ../../hostsModules/laptop/nixos/ollama.nix # llm config ../../modules/nixos/mullvad.nix # vpn config @@ -35,7 +33,8 @@ ../../modules/nixos/fonts.nix ../../modules/nixos/latex.nix ../../modules/nixos/development.nix - ../../modules/nixos/user.nix ../../hostsModules/laptop/nixos/user.nix + ../../modules/nixos/user.nix + ../../hostsModules/laptop/nixos/user.nix ../../modules/nixos/notifications.nix ../../modules/nixos/browser.nix ../../modules/nixos/theme.nix # install theming packages and some quickshell stuff @@ -43,7 +42,7 @@ ../../modules/nixos/otherUtils.nix ../../modules/nixos/office.nix ]; - + # 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 diff --git a/hosts/laptop/hardware-configuration.nix b/hosts/laptop/hardware-configuration.nix index 5702a78..b5be1ea 100755 --- a/hosts/laptop/hardware-configuration.nix +++ b/hosts/laptop/hardware-configuration.nix @@ -4,7 +4,6 @@ { config, lib, - pkgs, modulesPath, ... }: { diff --git a/hosts/laptop/home.nix b/hosts/laptop/home.nix index b903d09..580a71c 100755 --- a/hosts/laptop/home.nix +++ b/hosts/laptop/home.nix @@ -1,9 +1,4 @@ -{ - config, - pkgs, - inputs, - ... -}: { +{inputs, ...}: { # every import imports a specific module for an app. This module contains the enabling of this app and its settings. # So if you want to add an home-manager app create a module which enables it and configures it and import it. imports = [ diff --git a/hostsModules/laptop/home-manager/hyprland.nix b/hostsModules/laptop/home-manager/hyprland.nix index 0b80f2b..bac5d9b 100644 --- a/hostsModules/laptop/home-manager/hyprland.nix +++ b/hostsModules/laptop/home-manager/hyprland.nix @@ -1,11 +1,4 @@ -{ - config, - pkgs, - pkgs-unstable, - ... -}: - -{ +_: { wayland.windowManager.hyprland.settings = { exec-once = [ "qtbatticon" # custom battery tray diff --git a/hostsModules/laptop/home-manager/zsh.nix b/hostsModules/laptop/home-manager/zsh.nix index f7a2362..a21f803 100644 --- a/hostsModules/laptop/home-manager/zsh.nix +++ b/hostsModules/laptop/home-manager/zsh.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: { +_: { 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"; diff --git a/hostsModules/laptop/nixos/autoUpdate.nix b/hostsModules/laptop/nixos/autoUpdate.nix index eb46b5d..4919da4 100644 --- a/hostsModules/laptop/nixos/autoUpdate.nix +++ b/hostsModules/laptop/nixos/autoUpdate.nix @@ -1,12 +1,10 @@ -{ pkgs, ... }: - -{ +{pkgs, ...}: { # Ensure your script is available system-wide environment.systemPackages = [ (pkgs.callPackage ../scripts/autoUpdate.nix {}) ]; users.users.tomasr = { - linger = true; # lingering is required + linger = true; # lingering is required }; systemd.user.services.custom-autoupdate = { @@ -33,7 +31,7 @@ # Systemd USER timer systemd.user.timers.custom-autoupdate = { - wantedBy = [ "timers.target" ]; + wantedBy = ["timers.target"]; timerConfig = { OnCalendar = "Fri *-*-* 20:00:00"; # runs friday night. If for whatever reason something breaks. I have whole week-end to fix it. diff --git a/hostsModules/laptop/nixos/battery.nix b/hostsModules/laptop/nixos/battery.nix index 1cacc63..d334045 100644 --- a/hostsModules/laptop/nixos/battery.nix +++ b/hostsModules/laptop/nixos/battery.nix @@ -2,7 +2,8 @@ { lib, config, - ...}: + ... +}: # we just activate tlp unconditonally #let # cfg = config.custom; diff --git a/hostsModules/laptop/nixos/bootloader.nix b/hostsModules/laptop/nixos/bootloader.nix index f58aaf2..c36b37f 100644 --- a/hostsModules/laptop/nixos/bootloader.nix +++ b/hostsModules/laptop/nixos/bootloader.nix @@ -2,8 +2,7 @@ inputs, pkgs, ... -}: -{ +}: { # grub theme boot.loader.grub = { theme = inputs.nixos-grub-themes.packages.${pkgs.system}.nixos; # if you want to use nixos grub theme diff --git a/hostsModules/laptop/nixos/disk.nix b/hostsModules/laptop/nixos/disk.nix index c794a1f..1781598 100644 --- a/hostsModules/laptop/nixos/disk.nix +++ b/hostsModules/laptop/nixos/disk.nix @@ -1,13 +1,7 @@ -{ - config, - pkgs, - pkgs-unstable, - libs, - inputs, - ... -}: { +_: { # i found swap necessary when running nixpkgs review - swapDevices = [{ + swapDevices = [ + { device = "/swapfile"; size = 16384; # 16 GB } diff --git a/hostsModules/laptop/nixos/hardwareUtils.nix b/hostsModules/laptop/nixos/hardwareUtils.nix index 7b3a1ee..6edd5a9 100644 --- a/hostsModules/laptop/nixos/hardwareUtils.nix +++ b/hostsModules/laptop/nixos/hardwareUtils.nix @@ -1,8 +1,4 @@ -{ - pkgs, - ... -}: -{ +{pkgs, ...}: { environment.systemPackages = with pkgs; [ # used for the framework 16 laptop framework-tool diff --git a/hostsModules/laptop/nixos/networking.nix b/hostsModules/laptop/nixos/networking.nix index 427c276..3fff075 100644 --- a/hostsModules/laptop/nixos/networking.nix +++ b/hostsModules/laptop/nixos/networking.nix @@ -1,14 +1,9 @@ -{ - pkgs, - ... -}: -{ +{pkgs, ...}: { environment.systemPackages = with pkgs; [ - wget - networkmanagerapplet # NetworkManager control applet - inetutils # collections of network programs such as telnet - -]; + wget + networkmanagerapplet # NetworkManager control applet + inetutils # collections of network programs such as telnet + ]; #networking.Name = "nixos"; # Define your hostname. #networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. diff --git a/hostsModules/laptop/nixos/nixUtils.nix b/hostsModules/laptop/nixos/nixUtils.nix index 838e561..df13ddd 100644 --- a/hostsModules/laptop/nixos/nixUtils.nix +++ b/hostsModules/laptop/nixos/nixUtils.nix @@ -1,7 +1,4 @@ -{ - ... -}: -{ +_: { # nixpkgs-review crashed my laptop multiple times. nix.settings.max-jobs = 2; nix.settings.cores = 2; diff --git a/hostsModules/laptop/nixos/ollama.nix b/hostsModules/laptop/nixos/ollama.nix index f9658bf..b879210 100644 --- a/hostsModules/laptop/nixos/ollama.nix +++ b/hostsModules/laptop/nixos/ollama.nix @@ -1,7 +1,4 @@ -{ - pkgs-unstable, - ... -}: { +{pkgs-unstable, ...}: { services.ollama = { enable = true; package = pkgs-unstable.ollama-vulkan; @@ -11,15 +8,18 @@ #loadModels = [ "mistral:7b" ]; # don't forget the :xxxxx for ex: "mixtral" don't work #syncModels = true; }; - systemd.services.ollama.serviceConfig.ExecStartPost = [ # use this to auto download models - "${pkgs-unstable.ollama-vulkan}/bin/ollama pull mistral:7b" + systemd.services.ollama.serviceConfig.ExecStartPost = [ + # use this to auto download models + "${pkgs-unstable.ollama-vulkan}/bin/ollama pull mistral:7b" ]; - /*services.open-webui = { + /* + services.open-webui = { enable = true; port = 8080; environment = { OLLAMA_BASE_URL = "http://127.0.0.1:11434"; WEBUI_AUTH = "True"; }; - };*/ + }; + */ } diff --git a/hostsModules/laptop/nixos/udev.nix b/hostsModules/laptop/nixos/udev.nix index b89c224..e5600b2 100644 --- a/hostsModules/laptop/nixos/udev.nix +++ b/hostsModules/laptop/nixos/udev.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: { +_: { # udev with only the necessary rules. See udev.nix to get all the rules services.udev.extraRules = '' # adapted from here https://wiki.nixos.org/wiki/Keychron_M6 diff --git a/hostsModules/laptop/nixos/user.nix b/hostsModules/laptop/nixos/user.nix index be1f3a4..f28310a 100644 --- a/hostsModules/laptop/nixos/user.nix +++ b/hostsModules/laptop/nixos/user.nix @@ -1,7 +1,4 @@ # configuration is in ../../../modules/nixos/user.nix -{ - ... -}: -{ +_: { home-manager.users.tomasr = ../../../hosts/laptop/home.nix; } diff --git a/hostsModules/laptop/qt/qtbatticon.nix b/hostsModules/laptop/qt/qtbatticon.nix index 9caf25a..a91eb2a 100644 --- a/hostsModules/laptop/qt/qtbatticon.nix +++ b/hostsModules/laptop/qt/qtbatticon.nix @@ -4,7 +4,6 @@ # at your risk and perils # click on the icon to get a notification with state, percentage and wattage { - lib, stdenv, qt6, pkg-config, diff --git a/hostsModules/laptop/scripts/autoUpdate.nix b/hostsModules/laptop/scripts/autoUpdate.nix index bace09e..8479c87 100644 --- a/hostsModules/laptop/scripts/autoUpdate.nix +++ b/hostsModules/laptop/scripts/autoUpdate.nix @@ -1,7 +1,4 @@ -{ - pkgs, - ... -}: +{pkgs, ...}: pkgs.writeShellApplication { name = "custom-autoupdate"; @@ -30,7 +27,7 @@ pkgs.writeShellApplication { nix flake update --flake "$FLAKE_DIR" if sudo /run/current-system/sw/bin/nixos-rebuild switch --flake "$FLAKE" 2> "$ERROR_FILE"; then # use /run/.../bin/ uses the sudoless rule - + if ! git -C "$FLAKE_DIR" diff --quiet -- flake.lock; then git -C "$FLAKE_DIR" add flake.lock git -C "$FLAKE_DIR" commit -m "flake.lock: autoupdate-$TIME" @@ -57,7 +54,7 @@ pkgs.writeShellApplication { git -C "$FLAKE_DIR" reset --hard "pre-autoupdate-$TIME" fi - + rm -f "$ERROR_FILE" ''; } diff --git a/hostsModules/laptop/scripts/checkMatrix.nix b/hostsModules/laptop/scripts/checkMatrix.nix index 177ca7a..46e9a74 100644 --- a/hostsModules/laptop/scripts/checkMatrix.nix +++ b/hostsModules/laptop/scripts/checkMatrix.nix @@ -1,5 +1,4 @@ -{ pkgs }: - +{pkgs}: pkgs.writeShellApplication { name = "custom-checkMatrix"; diff --git a/hostsModules/laptop/scripts/cleanNix.nix b/hostsModules/laptop/scripts/cleanNix.nix index d493c0f..f89278d 100644 --- a/hostsModules/laptop/scripts/cleanNix.nix +++ b/hostsModules/laptop/scripts/cleanNix.nix @@ -1,7 +1,4 @@ -{ - pkgs, - ... -}: +{pkgs, ...}: pkgs.writeShellApplication { name = "custom-cleanNix"; @@ -34,7 +31,7 @@ pkgs.writeShellApplication { alejandra "$FLAKE_DIR" # formats the config if sudo /run/current-system/sw/bin/nixos-rebuild switch --flake "$FLAKE" 2> "$ERROR_FILE"; then # use /run/.../bin/ uses the sudoless rule - + if ! git -C "$FLAKE_DIR" diff --quiet HEAD; then git -C "$FLAKE_DIR" add -A git -C "$FLAKE_DIR" commit -m "Auto: cleanup-$TIME" @@ -62,7 +59,7 @@ pkgs.writeShellApplication { git -C "$FLAKE_DIR" reset --hard "pre-cleanup-$TIME" fi git -C "$FLAKE_DIR" tag -d "pre-cleanup-$TIME" # removes the tag - + rm -f "$ERROR_FILE" ''; } diff --git a/modules/home-manager/.OLDneovim.nix b/modules/home-manager/.OLDneovim.nix index 392060e..ded0ff3 100644 --- a/modules/home-manager/.OLDneovim.nix +++ b/modules/home-manager/.OLDneovim.nix @@ -1,5 +1,4 @@ # OLD Deprecated. - { config, pkgs, diff --git a/modules/home-manager/anki.nix b/modules/home-manager/anki.nix index 21d9dd3..9d91c71 100644 --- a/modules/home-manager/anki.nix +++ b/modules/home-manager/anki.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: { +_: { programs.anki = { # we enable system wide with nixpkgs because it offers some addon configuration. We just use this for some config #enable = true; diff --git a/modules/home-manager/batsignal.nix b/modules/home-manager/batsignal.nix index fa02b0c..ebf8cd8 100644 --- a/modules/home-manager/batsignal.nix +++ b/modules/home-manager/batsignal.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: { +_: { services.batsignal = { enable = true; }; diff --git a/modules/home-manager/caelestia.nix b/modules/home-manager/caelestia.nix index 2f791f8..b3475ee 100644 --- a/modules/home-manager/caelestia.nix +++ b/modules/home-manager/caelestia.nix @@ -1,13 +1,9 @@ -{ -config, -pkgs, -pkgs-unstable, -... -}: let -sisyphe = ../../assets/sisyphe.gif; -pepe-music = ../../assets/pepe-music.gif; +_: let + sisyphe = ../../assets/sisyphe.gif; + pepe-music = ../../assets/pepe-music.gif; in { - home.file.".local/state/caelestia/wallpaper/path.txt" = { # dummy file. Does nothing. Prevent an error + home.file.".local/state/caelestia/wallpaper/path.txt" = { + # dummy file. Does nothing. Prevent an error enable = true; text = "${sisyphe}"; }; diff --git a/modules/home-manager/cbatticon.nix b/modules/home-manager/cbatticon.nix index d00a5ae..b919435 100644 --- a/modules/home-manager/cbatticon.nix +++ b/modules/home-manager/cbatticon.nix @@ -1,11 +1,7 @@ # don't works. some GTK error. I let it here if someday, someone is interest in this shit. # ChatGPT half baked a replacement that works on my system. # see ../qt/qtbatticon -{ - config, - pkgs, - ... -}: { +_: { services.cbatticon = { enable = true; lowLevelPercent = 20; diff --git a/modules/home-manager/cursor.nix b/modules/home-manager/cursor.nix index dbb6bb5..aa91337 100644 --- a/modules/home-manager/cursor.nix +++ b/modules/home-manager/cursor.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: { +{pkgs, ...}: { home.pointerCursor = { hyprcursor.enable = true; enable = true; diff --git a/modules/home-manager/eza.nix b/modules/home-manager/eza.nix index 4899959..a04e29f 100644 --- a/modules/home-manager/eza.nix +++ b/modules/home-manager/eza.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: +_: # ls replacement # see ./zsh.nix for the alias (usefull to se default flags) { diff --git a/modules/home-manager/fastfetch.nix b/modules/home-manager/fastfetch.nix index c892b37..4658bb0 100644 --- a/modules/home-manager/fastfetch.nix +++ b/modules/home-manager/fastfetch.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: { +_: { # Adapted from https://github.com/dacrab/fastfetch-config/blob/main/config.jsonc programs.fastfetch = { enable = true; diff --git a/modules/home-manager/git.nix b/modules/home-manager/git.nix index d1734ab..0136aa5 100644 --- a/modules/home-manager/git.nix +++ b/modules/home-manager/git.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: { +_: { programs.git = { enable = true; settings = { diff --git a/modules/home-manager/gtk.nix b/modules/home-manager/gtk.nix index 078f319..85a0b7c 100644 --- a/modules/home-manager/gtk.nix +++ b/modules/home-manager/gtk.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: { +{pkgs, ...}: { # gtk config gtk.theme = { enable = true; diff --git a/modules/home-manager/hypridle.nix b/modules/home-manager/hypridle.nix index c2ee302..c6e049a 100644 --- a/modules/home-manager/hypridle.nix +++ b/modules/home-manager/hypridle.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: { +_: { services.hypridle = { enable = true; settings = { diff --git a/modules/home-manager/hyprland.nix b/modules/home-manager/hyprland.nix index 94cfaf0..0ec1988 100644 --- a/modules/home-manager/hyprland.nix +++ b/modules/home-manager/hyprland.nix @@ -1,224 +1,219 @@ -{ - config, - pkgs, - pkgs-unstable, - ... -}: let +{pkgs-unstable, ...}: let wallpaper = ../../assets/wallpaper1.jpg; in { - #refer to https://wiki.hypr.land/Nix/Hyprland-on-Home-Manager/ - wayland.windowManager.hyprland.enable = true; - wayland.windowManager.hyprland.package = pkgs-unstable.hyprland; - #hint Electron apps to use on wayland; - home.sessionVariables.NIXOS_OZONE_WL = "1"; - wayland.windowManager.hyprland.plugins = [ - #pkgs-unstable.hyprlandPlugins.hyprspace # currently broken - #pkgs-unstable.hyprlandPlugins.hypr-dynamic-cursors # currently broken + #refer to https://wiki.hypr.land/Nix/Hyprland-on-Home-Manager/ + wayland.windowManager.hyprland.enable = true; + wayland.windowManager.hyprland.package = pkgs-unstable.hyprland; + #hint Electron apps to use on wayland; + home.sessionVariables.NIXOS_OZONE_WL = "1"; + wayland.windowManager.hyprland.plugins = [ + #pkgs-unstable.hyprlandPlugins.hyprspace # currently broken + #pkgs-unstable.hyprlandPlugins.hypr-dynamic-cursors # currently broken + ]; + wayland.windowManager.hyprland.settings = { + "$mod" = "SUPER"; + "$term" = "kitty"; + "$editor" = "nvim"; + "$notes" = "kitty --class \"custom-obsidianvaults\" --name \"Select Obsidian vault\" --hold custom-obsidianvaults"; + "$file" = "dolphin"; + "$browser" = "kitty --class \"custom-librewolfprofiles\" --name \"Select LibreWolf profile\" --hold custom-librewolfprofiles"; + # ▄▀█ █▄░█ █ █▀▄▀█ ▄▀█ ▀█▀ █ █▀█ █▄░█ + # █▀█ █░▀█ █ █░▀░█ █▀█ ░█░ █ █▄█ █░▀█ + animations = { + enabled = true; + bezier = [ + "wind, 0.05, 0.9, 0.1, 1.05" + "winIn, 0.1, 1.1, 0.1, 1.1" + "winOut, 0.3, -0.3, 0, 1" + "liner, 1, 1, 1, 1" + ]; + animation = [ + "windows, 1, 6, wind, slide" + "windowsIn, 1, 6, winIn, slide" + "windowsOut, 1, 5, winOut, slide" + "windowsMove, 1, 5, wind, slide" + "border, 1, 1, liner" + "borderangle, 1, 30, liner, loop" + "fade, 1, 10, default" + "workspaces, 1, 5, wind" + ]; + }; + + # █▀▀ █▄░█ █░█ + # ██▄ █░▀█ ▀▄▀ + + # See https://wiki.hyprland.org/Configuring/Environment-variables/ + env = [ + "PATH, $PATH:$scrPath" + "XDG_CURRENT_DESKTOP,Hyprland" + "XDG_SESSION_TYPE,wayland" + "XDG_SESSION_DESKTOP,Hyprland" + "QT_QPA_PLATFORM,wayland;xcb" + "QT_QPAPLATFORMTHEME,qt6ct" + "QT_WAYLAND_DISABLE_WINDOWDECORATION,1" + "MOZ_ENABLE_WAYLAND,1" + "GDK_SCALE,1" ]; - wayland.windowManager.hyprland.settings = { - "$mod" = "SUPER"; - "$term" = "kitty"; - "$editor" = "nvim"; - "$notes" = "kitty --class \"custom-obsidianvaults\" --name \"Select Obsidian vault\" --hold custom-obsidianvaults"; - "$file" = "dolphin"; - "$browser" = "kitty --class \"custom-librewolfprofiles\" --name \"Select LibreWolf profile\" --hold custom-librewolfprofiles"; - # ▄▀█ █▄░█ █ █▀▄▀█ ▄▀█ ▀█▀ █ █▀█ █▄░█ - # █▀█ █░▀█ █ █░▀░█ █▀█ ░█░ █ █▄█ █░▀█ - animations = { - enabled = true; - bezier = [ - "wind, 0.05, 0.9, 0.1, 1.05" - "winIn, 0.1, 1.1, 0.1, 1.1" - "winOut, 0.3, -0.3, 0, 1" - "liner, 1, 1, 1, 1" - ]; - animation = [ - "windows, 1, 6, wind, slide" - "windowsIn, 1, 6, winIn, slide" - "windowsOut, 1, 5, winOut, slide" - "windowsMove, 1, 5, wind, slide" - "border, 1, 1, liner" - "borderangle, 1, 30, liner, loop" - "fade, 1, 10, default" - "workspaces, 1, 5, wind" - ]; - }; - # █▀▀ █▄░█ █░█ - # ██▄ █░▀█ ▀▄▀ + # █ █▄░█ █▀█ █░█ ▀█▀ + # █ █░▀█ █▀▀ █▄█ ░█░ - # See https://wiki.hyprland.org/Configuring/Environment-variables/ - env = [ - "PATH, $PATH:$scrPath" - "XDG_CURRENT_DESKTOP,Hyprland" - "XDG_SESSION_TYPE,wayland" - "XDG_SESSION_DESKTOP,Hyprland" - "QT_QPA_PLATFORM,wayland;xcb" - "QT_QPAPLATFORMTHEME,qt6ct" - "QT_WAYLAND_DISABLE_WINDOWDECORATION,1" - "MOZ_ENABLE_WAYLAND,1" - "GDK_SCALE,1" - ]; + input = { + kb_layout = ["ch"]; + follow_mouse = 1; + sensitivity = 0; + force_no_accel = 1; + }; - # █ █▄░█ █▀█ █░█ ▀█▀ - # █ █░▀█ █▀▀ █▄█ ░█░ + # █▄▀ █▀▀ █▄█ █▄▄ █ █▄░█ █▀▄ █ █▄░█ █▀▀ █▀ + # █░█ ██▄ ░█░ █▄█ █ █░▀█ █▄▀ █ █░▀█ █▄█ ▄█ + # caelestia shell drawers toggle dashboard + # caelestia shell drawers toggle utilities - input = { - kb_layout = ["ch"]; - follow_mouse = 1; - sensitivity = 0; - force_no_accel = 1; - }; + bind = [ + #hyprland/utility keybindings + "$mod, W, togglefloating" + "$mod, G, togglegroup" + "Alt, Return, fullscreen" + "$mod, Left, movefocus, l" + "$mod, Right, movefocus, r" + "$mod, Up, movefocus, u" + "$mod, Down, movefocus, d" + "Alt, Tab, movefocus, d" + "$mod, 1, workspace, 1" + "$mod, 2, workspace, 2" + "$mod, 3, workspace, 3" + "$mod, 4, workspace, 4" + "$mod, 5, workspace, 5" + "$mod, 6, workspace, 6" + "$mod, 7, workspace, 7" + "$mod, 8, workspace, 8" + "$mod, 9, workspace, 9" + "$mod, 0, workspace, 10" + "$mod+Ctrl, Right, workspace, r+1" + "$mod+Ctrl, Left, workspace, r-1" + "$mod+Ctrl, Doown, workspace, empty" + "$mod+Shift, 1, movetoworkspace, 1" + "$mod+Shift, 2, movetoworkspace, 2" + "$mod+Shift, 3, movetoworkspace, 3" + "$mod+Shift, 4, movetoworkspace, 4" + "$mod+Shift, 5, movetoworkspace, 5" + "$mod+Shift, 6, movetoworkspace, 6" + "$mod+Shift, 7, movetoworkspace, 7" + "$mod+Shift, 8, movetoworkspace, 8" + "$mod+Shift, 9, movetoworkspace, 9" + "$mod+Shift, 0, movetoworkspace, 10" + "$mod+Ctrl+Alt, Right, movetoworkspace, r+1" + "$mod+Ctrl+Alt, Left, movetoworkspace, r-1" + #"$mod, Backspace, exec, wlogout -b 4 -T 600 -B 600" + "$mod, Backspace, exec, caelestia shell drawers toggle session" + "$mod+Shift+Ctrl, Left, movewindow, l" + "$mod+Shift+Ctrl, Right, movewindow, r" + "$mod+Shift+Ctrl, Up, movewindow, u" + "$mod+Shift+Ctrl, Down, movewindow, d" + "$mod, mouse_down, workspace, e+1" + "$mod, mouse_up, workspace, e-1" + "$mod, V, exec, cliphist list | rofi -dmenu| cliphist decode | wl-copy" # copy paste + "$mod, B, exec, hyprkeys -bkr | rofi -dmenu" + #"$mod, A, tagwindow, noborder" # used to not apply image border + "$mod, S, togglespecialworkspace," + "Alt+$mod, S, movetoworkspace, special" + # for the scrolling layout + "$mod, A, layoutmsg, move -col" + "$mod, D, layoutmsg, move +col" + #apps keybindings + "$mod, T, exec, $term" + "$mod, E, exec, $file" + "$mod, F, exec, $browser" + "$mod, N, exec, $notes" + #"$mod+Shift, A, exec, rofi -show drun" + "$mod+Shift, A, exec, caelestia shell drawers toggle launcher" + "$mod, Q, exec, custom-dontkillsteam" + #"Ctrl+Alt, W, exec, pkill waybar || waybar" + "Ctrl+Alt, W, exec, caelestia shell drawers toggle sidebar" + #"$mod, L, exec, swaylock -eFLK -i ${wallpaper}" + "$mod, L, exec, caelestia shell lock lock" + #"$mod, F11, exec, hyprshot -m window" + ", F11, exec, caelestia screenshot" + #"$mod_SHIFT, S, exec, hyprshot -m region --clipboard only" + # "$mod_SHIFT, S, exec, qs ipc call screenshot toggle" + "$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" + # reloads the autostart programs # pos 3 1 + # we passed to caelestia-shell and stoped using that + /* + "Ctrl+$mod, 4, exec, sleep 1 && kitty -o font_size=16 -e sh -c 'custom-weather'" + "Ctrl+$mod, 4, exec, sleep 1 && kitty -o font_size=11 -e sh -c 'custom-cowsay'" + "Ctrl+$mod, 4, exec, kitty -e 'custom-launch'" + "Ctrl+$mod, 4, exec, sleep 1 && kitty -o font_size=5 -e btm --theme gruvbox --disable-click --disable_advanced_kill --enable_cache_memory -g -R -T " + "Ctrl+$mod, 4, exec, sleep 1 && kitty -o font_size=1 -e sh -c 'cmatrix -br'" + #"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" + "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 + "Ctrl+$mod, 5, exec, gnome-characters" # pos 3 2 special chars + "Ctrl+Alt, 8, exec, hyprpicker | tee >(wl-copy) | cliphist store" # pos 4 2 colorpicker + "Ctrl+Alt, 0, exec, custom-tomato" # pos 1 3 pomodoro app + "Ctrl+Alt, 2, exec, custom-bottom" # pos 2 3 btm (like htop but cleaner) + "Ctrl+Alt, 9, exec, anki" + # if hyprexpo plugin enabled bind = $mainMod, Space, hyprexpo:expo, toggle + # maybe exec sudo framework-tools-tui - # █▄▀ █▀▀ █▄█ █▄▄ █ █▄░█ █▀▄ █ █▄░█ █▀▀ █▀ - # █░█ ██▄ ░█░ █▄█ █ █░▀█ █▄▀ █ █░▀█ █▄█ ▄█ - # caelestia shell drawers toggle dashboard - # caelestia shell drawers toggle utilities - - bind = [ - #hyprland/utility keybindings - "$mod, W, togglefloating" - "$mod, G, togglegroup" - "Alt, Return, fullscreen" - "$mod, Left, movefocus, l" - "$mod, Right, movefocus, r" - "$mod, Up, movefocus, u" - "$mod, Down, movefocus, d" - "Alt, Tab, movefocus, d" - "$mod, 1, workspace, 1" - "$mod, 2, workspace, 2" - "$mod, 3, workspace, 3" - "$mod, 4, workspace, 4" - "$mod, 5, workspace, 5" - "$mod, 6, workspace, 6" - "$mod, 7, workspace, 7" - "$mod, 8, workspace, 8" - "$mod, 9, workspace, 9" - "$mod, 0, workspace, 10" - "$mod+Ctrl, Right, workspace, r+1" - "$mod+Ctrl, Left, workspace, r-1" - "$mod+Ctrl, Doown, workspace, empty" - "$mod+Shift, 1, movetoworkspace, 1" - "$mod+Shift, 2, movetoworkspace, 2" - "$mod+Shift, 3, movetoworkspace, 3" - "$mod+Shift, 4, movetoworkspace, 4" - "$mod+Shift, 5, movetoworkspace, 5" - "$mod+Shift, 6, movetoworkspace, 6" - "$mod+Shift, 7, movetoworkspace, 7" - "$mod+Shift, 8, movetoworkspace, 8" - "$mod+Shift, 9, movetoworkspace, 9" - "$mod+Shift, 0, movetoworkspace, 10" - "$mod+Ctrl+Alt, Right, movetoworkspace, r+1" - "$mod+Ctrl+Alt, Left, movetoworkspace, r-1" - #"$mod, Backspace, exec, wlogout -b 4 -T 600 -B 600" - "$mod, Backspace, exec, caelestia shell drawers toggle session" - "$mod+Shift+Ctrl, Left, movewindow, l" - "$mod+Shift+Ctrl, Right, movewindow, r" - "$mod+Shift+Ctrl, Up, movewindow, u" - "$mod+Shift+Ctrl, Down, movewindow, d" - "$mod, mouse_down, workspace, e+1" - "$mod, mouse_up, workspace, e-1" - "$mod, V, exec, cliphist list | rofi -dmenu| cliphist decode | wl-copy" # copy paste - "$mod, B, exec, hyprkeys -bkr | rofi -dmenu" - #"$mod, A, tagwindow, noborder" # used to not apply image border - "$mod, S, togglespecialworkspace," - "Alt+$mod, S, movetoworkspace, special" - # for the scrolling layout - "$mod, A, layoutmsg, move -col" - "$mod, D, layoutmsg, move +col" - #apps keybindings - "$mod, T, exec, $term" - "$mod, E, exec, $file" - "$mod, F, exec, $browser" - "$mod, N, exec, $notes" - #"$mod+Shift, A, exec, rofi -show drun" - "$mod+Shift, A, exec, caelestia shell drawers toggle launcher" - "$mod, Q, exec, custom-dontkillsteam" - #"Ctrl+Alt, W, exec, pkill waybar || waybar" - "Ctrl+Alt, W, exec, caelestia shell drawers toggle sidebar" - #"$mod, L, exec, swaylock -eFLK -i ${wallpaper}" - "$mod, L, exec, caelestia shell lock lock" - #"$mod, F11, exec, hyprshot -m window" - ", F11, exec, caelestia screenshot" - #"$mod_SHIFT, S, exec, hyprshot -m region --clipboard only" - # "$mod_SHIFT, S, exec, qs ipc call screenshot toggle" - "$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" - # reloads the autostart programs # pos 3 1 - # we passed to caelestia-shell and stoped using that - /* - "Ctrl+$mod, 4, exec, sleep 1 && kitty -o font_size=16 -e sh -c 'custom-weather'" - "Ctrl+$mod, 4, exec, sleep 1 && kitty -o font_size=11 -e sh -c 'custom-cowsay'" - "Ctrl+$mod, 4, exec, kitty -e 'custom-launch'" - "Ctrl+$mod, 4, exec, sleep 1 && kitty -o font_size=5 -e btm --theme gruvbox --disable-click --disable_advanced_kill --enable_cache_memory -g -R -T " - "Ctrl+$mod, 4, exec, sleep 1 && kitty -o font_size=1 -e sh -c 'cmatrix -br'" - #"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" - "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 - "Ctrl+$mod, 5, exec, gnome-characters" # pos 3 2 special chars - "Ctrl+Alt, 8, exec, hyprpicker | tee >(wl-copy) | cliphist store" # pos 4 2 colorpicker - "Ctrl+Alt, 0, exec, custom-tomato" # pos 1 3 pomodoro app - "Ctrl+Alt, 2, exec, custom-bottom" # pos 2 3 btm (like htop but cleaner) - "Ctrl+Alt, 9, exec, anki" - # if hyprexpo plugin enabled bind = $mainMod, Space, hyprexpo:expo, toggle - # maybe exec sudo framework-tools-tui - - #plugins keybindings - #"$mod, SPACE, overview:toggle, " - ]; - binde = [ - "$mod+Shift, Right, resizeactive, 30 0" - "$mod+Shift, Left, resizeactive, -30, 0" - "$mod+Shift, Up, resizeactive, 0 -30" - "$mod+Shift, Down, resizeactive,m 0 30" - ]; - bindl = [ - ", F1, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle" #toggle audio mute - ", F5, exec, playerctl play-pause" # media F4-F6 - ", F4, exec, playerctl previous" - ", F6, exec, playerctl next" - ]; - bindel = [ - ", F2, exec, pactl set-sink-volume @DEFAULT_SINK@ -10%" # decrease volume - ", F3, exec, pactl set-sink-volume @DEFAULT_SINK@ +10%" # increase volume - ", F7, exec, brightnessctl s 10%-" # decrease brightness - ", F8, exec, brightnessctl s +10%" # increase brightness - ]; - bindm = [ - "$mod, mouse:272, movewindow" - "$mod, mouse:273, resizewindow" - "$mod, Z, movewindow" - "$mod, X, resizewindow" - ]; - # █░░ ▄▀█ █░█ █▄░█ █▀▀ █░█ - # █▄▄ █▀█ █▄█ █░▀█ █▄▄ █▀█ - exec-once = [ - "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP" # for XDPH - "dbus-update-activation-environment --systemd --all" # for XDPH - "systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP" # for XDPH - "systemctl --user start xdg-desktop-portal-wlr.service" - "blueman-applet" # systray app for Bluetooth - "udiskie --no-automount --smart-tray" # front-end that allows to manage removable media - "nm-applet --indicator" # systray app for Network/wifi - #setups clipboard - "rm -rf ~/.cache/cliphist/ && wl-paste --type text --watch cliphist store & wl-paste --type image --watch cliphist store" - #"wl-paste --type text --watch cliphist store" # clipboard store text data - #"wl-paste --type image --watch cliphist store" # clipboard store image data - "custom-batterynotify" - "custom-batterywarning" - #"birdtray" # thunderbird tray app # curently broken - #wallpapers/b - "swww img ${wallpaper}" - "swww-daemon" - "sleep 1 && custom-wallpaper" - "custom-checkKdrive && custom-mountkdrive" # checks if the remote works and mount it + #plugins keybindings + #"$mod, SPACE, overview:toggle, " + ]; + binde = [ + "$mod+Shift, Right, resizeactive, 30 0" + "$mod+Shift, Left, resizeactive, -30, 0" + "$mod+Shift, Up, resizeactive, 0 -30" + "$mod+Shift, Down, resizeactive,m 0 30" + ]; + bindl = [ + ", F1, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle" #toggle audio mute + ", F5, exec, playerctl play-pause" # media F4-F6 + ", F4, exec, playerctl previous" + ", F6, exec, playerctl next" + ]; + bindel = [ + ", F2, exec, pactl set-sink-volume @DEFAULT_SINK@ -10%" # decrease volume + ", F3, exec, pactl set-sink-volume @DEFAULT_SINK@ +10%" # increase volume + ", F7, exec, brightnessctl s 10%-" # decrease brightness + ", F8, exec, brightnessctl s +10%" # increase brightness + ]; + bindm = [ + "$mod, mouse:272, movewindow" + "$mod, mouse:273, resizewindow" + "$mod, Z, movewindow" + "$mod, X, resizewindow" + ]; + # █░░ ▄▀█ █░█ █▄░█ █▀▀ █░█ + # █▄▄ █▀█ █▄█ █░▀█ █▄▄ █▀█ + exec-once = [ + "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP" # for XDPH + "dbus-update-activation-environment --systemd --all" # for XDPH + "systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP" # for XDPH + "systemctl --user start xdg-desktop-portal-wlr.service" + "blueman-applet" # systray app for Bluetooth + "udiskie --no-automount --smart-tray" # front-end that allows to manage removable media + "nm-applet --indicator" # systray app for Network/wifi + #setups clipboard + "rm -rf ~/.cache/cliphist/ && wl-paste --type text --watch cliphist store & wl-paste --type image --watch cliphist store" + #"wl-paste --type text --watch cliphist store" # clipboard store text data + #"wl-paste --type image --watch cliphist store" # clipboard store image data + "custom-batterynotify" + "custom-batterywarning" + #"birdtray" # thunderbird tray app # curently broken + #wallpapers/b + "swww img ${wallpaper}" + "swww-daemon" + "sleep 1 && custom-wallpaper" + "custom-checkKdrive && custom-mountkdrive" # checks if the remote works and mount it #"waybar" "custom-gitnotify" "custom-checkMatrix" # checks if matrix-commander-rs is connected which is important for other stuff diff --git a/modules/home-manager/kitty.nix b/modules/home-manager/kitty.nix index 8d80550..5255897 100644 --- a/modules/home-manager/kitty.nix +++ b/modules/home-manager/kitty.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: { +_: { programs.kitty = { enable = true; #font.name = nerd-fonts._0xproto; diff --git a/modules/home-manager/librewolf.nix b/modules/home-manager/librewolf.nix index ef04665..edfacff 100644 --- a/modules/home-manager/librewolf.nix +++ b/modules/home-manager/librewolf.nix @@ -1,9 +1,5 @@ # adapted from https://github.com/contre95/dotfiles/blob/main/dotfiles/nixos/programs/librewolf.nix -{ - pkgs, - config, - ... -}: { +_: { home.sessionVariables = { MOZ_ENABLE_WAYLAND = 1; MOZ_USE_XINPUT2 = 1; @@ -310,19 +306,19 @@ } { name = "Signs of AI writing"; - tags = [ "ai" "write"]; + tags = ["ai" "write"]; keyword = "AI writing"; url = "https://en.wikipedia.org/wiki/Wikipedia:Signs_of_AI_writing"; } { name = "nixpkgs-review-gha"; - tags = [ "nixpkgs-review" "gha" ]; + tags = ["nixpkgs-review" "gha"]; keyword = "nixpkgs-review"; url = "https://github.com/tomasriveral/nixpkgs-review-gha/actions/workflows/review.yml"; } { name = "nixpkgs tracker"; - tags = [ "nixpkgs" "tracker" ]; + tags = ["nixpkgs" "tracker"]; keyword = "nixpkgs tracker"; url = "https://nixpk.gs/pr-tracker.html"; } diff --git a/modules/home-manager/micro.nix b/modules/home-manager/micro.nix index 1a4bc63..ffd5cb8 100644 --- a/modules/home-manager/micro.nix +++ b/modules/home-manager/micro.nix @@ -1,6 +1,4 @@ { - config, - pkgs, pkgs-unstable, inputs, ... @@ -21,26 +19,26 @@ enable = true; force = true; text = '' -local buffer = import("micro/buffer") -local shell = import("micro/shell") + local buffer = import("micro/buffer") + local shell = import("micro/shell") -function vivifyOpen(buf) - local cursor = buf:GetActiveCursor() - local line = cursor.Loc.Y + 1 + function vivifyOpen(buf) + local cursor = buf:GetActiveCursor() + local line = cursor.Loc.Y + 1 - shell.ExecCommand("viv", string.format("%s:%d", buf.AbsPath, line)) -end + shell.ExecCommand("viv", string.format("%s:%d", buf.AbsPath, line)) + end -function onBufferOpen(buf) - if os.getenv("MICRO_VIVIFY") ~= "1" then - return - end + function onBufferOpen(buf) + if os.getenv("MICRO_VIVIFY") ~= "1" then + return + end - -- only run for real files (not help/log/etc) - if buf.Type.Kind == buffer.BTDefault then - vivifyOpen(buf) - end -end -''; + -- only run for real files (not help/log/etc) + if buf.Type.Kind == buffer.BTDefault then + vivifyOpen(buf) + end + end + ''; }; } diff --git a/modules/home-manager/mullvad.nix b/modules/home-manager/mullvad.nix index c0b9a5b..d5c01ad 100644 --- a/modules/home-manager/mullvad.nix +++ b/modules/home-manager/mullvad.nix @@ -1,7 +1,5 @@ # see also ../nixos/mullvad.nix -{ - ... -}: { +_: { programs.mullvad-vpn = { enable = true; # see https://github.com/mullvad/mullvadvpn-app/blob/main/desktop/packages/mullvad-vpn/src/main/gui-settings.ts for options diff --git a/modules/home-manager/neovim.nix b/modules/home-manager/neovim.nix index 88bf199..95a6d2f 100644 --- a/modules/home-manager/neovim.nix +++ b/modules/home-manager/neovim.nix @@ -1,9 +1,4 @@ -{ - config, - pkgs, - pkgs-unstable, - ... -}: { +{pkgs-unstable, ...}: { programs.neovim = { enable = true; vimAlias = false; @@ -257,7 +252,7 @@ vim.keymap.set("n", "e", function() local clients = vim.lsp.get_clients({ name = "ltex" }) - + if #clients > 0 then -- Stop LTeX for _, client in ipairs(clients) do @@ -336,26 +331,26 @@ cmd = { "ltex-ls-plus" }, filetypes = { "markdown", "text", "tex", "plaintex" }, on_attach = on_attach, - + settings = { ltex = { language = "fr", - + enabled = { "markdown", "text", "tex", "plaintex", }, - + completionEnabled = true, diagnosticSeverity = "information", - + additionalRules = { enablePickyRules = false, motherTongue = "fr", }, - + dictionary = { ["fr"] = { "icelle", @@ -483,9 +478,9 @@ vim.keymap.set("n", "t", function() local line = vim.api.nvim_get_current_line() - + local result = vim.fn.system({ "custom-syllabes" }, line) - + print(vim.trim(result)) end, { desc = "Count syllables (current line)" }) -- ========================= diff --git a/modules/home-manager/obsidian.nix b/modules/home-manager/obsidian.nix index 685e624..938145d 100644 --- a/modules/home-manager/obsidian.nix +++ b/modules/home-manager/obsidian.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: { +_: { programs.obsidian = { enable = true; diff --git a/modules/home-manager/oh-my-posh.nix b/modules/home-manager/oh-my-posh.nix index 7cc8211..317b214 100644 --- a/modules/home-manager/oh-my-posh.nix +++ b/modules/home-manager/oh-my-posh.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: { +_: { programs.oh-my-posh = { enable = true; enableZshIntegration = true; diff --git a/modules/home-manager/oh-my-zsh.nix b/modules/home-manager/oh-my-zsh.nix index e404420..24095b9 100644 --- a/modules/home-manager/oh-my-zsh.nix +++ b/modules/home-manager/oh-my-zsh.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: { +_: { programs.zsh.oh-my-zsh = { enable = true; theme = "jonathan"; diff --git a/modules/home-manager/other/desktopEntries.nix b/modules/home-manager/other/desktopEntries.nix index 6836d2c..41e8bbb 100644 --- a/modules/home-manager/other/desktopEntries.nix +++ b/modules/home-manager/other/desktopEntries.nix @@ -1,6 +1,4 @@ -{ - ... -}: +_: # see ../../docs/printing.md { home.file.".local/share/applications/org.quickshell.desktop" = { @@ -27,6 +25,6 @@ Icon=printer Categories=Utility; StartupNotify=true - ''; + ''; }; } diff --git a/modules/home-manager/other/user.nix b/modules/home-manager/other/user.nix index 5e66367..d35901b 100644 --- a/modules/home-manager/other/user.nix +++ b/modules/home-manager/other/user.nix @@ -1,7 +1,4 @@ -{ - ... -}: -{ +_: { home.username = "tomasr"; home.homeDirectory = "/home/tomasr"; diff --git a/modules/home-manager/quickshell.nix b/modules/home-manager/quickshell.nix index bee6d55..e2aedb1 100644 --- a/modules/home-manager/quickshell.nix +++ b/modules/home-manager/quickshell.nix @@ -1,9 +1,5 @@ # pulled from https://codeberg.org/zacoons/rivendell-hyprdots -{ - config, - pkgs, - ... -}: { +_: { qt.enable = true; programs.quickshell = { systemd.enable = true; diff --git a/modules/home-manager/rclone.nix b/modules/home-manager/rclone.nix index 18ca66b..43797f5 100644 --- a/modules/home-manager/rclone.nix +++ b/modules/home-manager/rclone.nix @@ -1,7 +1,4 @@ -{ - pkgs-unstable, - ... -}: { +{pkgs-unstable, ...}: { programs.rclone = { enable = true; package = pkgs-unstable.rclone; diff --git a/modules/home-manager/ripgrep.nix b/modules/home-manager/ripgrep.nix index 4e7e52e..03dfed6 100644 --- a/modules/home-manager/ripgrep.nix +++ b/modules/home-manager/ripgrep.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: { +_: { programs.ripgrep = { enable = true; arguments = [ diff --git a/modules/home-manager/rofi.nix b/modules/home-manager/rofi.nix index 9bd6fed..d4bf2be 100644 --- a/modules/home-manager/rofi.nix +++ b/modules/home-manager/rofi.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: { +_: { programs.rofi = { enable = true; theme = "gruvbox-dark-hard"; diff --git a/modules/home-manager/sbb-tui.nix b/modules/home-manager/sbb-tui.nix index 48ea119..6d379e2 100644 --- a/modules/home-manager/sbb-tui.nix +++ b/modules/home-manager/sbb-tui.nix @@ -1,32 +1,29 @@ -{ - pkgs-unstable, - ... -}: { +_: { home.packages = [ #pkgs-unstable.sbb-tui - ]; + ]; home.file.".config/sbb-tui/config.yaml" = { enable = true; -# Gruvbox (from https://github.com/Necrom4/sbb-tui/blob/master/docs/themes.md) + # Gruvbox (from https://github.com/Necrom4/sbb-tui/blob/master/docs/themes.md) text = '' -ui: - nerdfont: true - theme: - text: "#EBDBB2" - textMuted: "#928374" - error: "#FB4934" - warning: "#FB4934" - borderFocused: "#FABD2F" - borderUnfocused: "#504945" - badgeKeyFg: "#282828" - badgeKeyBg: "#FABD2F" - badgeVehicleFg: "#EBDBB2" - badgeVehicleBg: "#458588" - badgeModelFg: "#282828" - badgeModelBg: "#FB4934" - badgeCompanyFg: "#282828" - badgeCompanyBg: "#EBDBB2" - logo: "#EBDBB2" -''; + ui: + nerdfont: true + theme: + text: "#EBDBB2" + textMuted: "#928374" + error: "#FB4934" + warning: "#FB4934" + borderFocused: "#FABD2F" + borderUnfocused: "#504945" + badgeKeyFg: "#282828" + badgeKeyBg: "#FABD2F" + badgeVehicleFg: "#EBDBB2" + badgeVehicleBg: "#458588" + badgeModelFg: "#282828" + badgeModelBg: "#FB4934" + badgeCompanyFg: "#282828" + badgeCompanyBg: "#EBDBB2" + logo: "#EBDBB2" + ''; }; } diff --git a/modules/home-manager/ssh.nix b/modules/home-manager/ssh.nix index 2c48548..8201c23 100644 --- a/modules/home-manager/ssh.nix +++ b/modules/home-manager/ssh.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: { +_: { programs.ssh = { enable = true; enableDefaultConfig = false; # will be removed in the futur. Removes evaluation warning diff --git a/modules/home-manager/swaylock.nix b/modules/home-manager/swaylock.nix index f4c15be..226a296 100644 --- a/modules/home-manager/swaylock.nix +++ b/modules/home-manager/swaylock.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: { +_: { programs.swaylock = { enable = true; settings = { diff --git a/modules/home-manager/swaync.nix b/modules/home-manager/swaync.nix index 21963f0..f89e51e 100644 --- a/modules/home-manager/swaync.nix +++ b/modules/home-manager/swaync.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: { +_: { services.swaync = { enable = true; }; diff --git a/modules/home-manager/thunderbird.nix b/modules/home-manager/thunderbird.nix index c05482b..767b475 100644 --- a/modules/home-manager/thunderbird.nix +++ b/modules/home-manager/thunderbird.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: { +_: { programs.thunderbird = { enable = true; profiles.tomasr = { diff --git a/modules/home-manager/vivify.nix b/modules/home-manager/vivify.nix index 1074d4f..06238ee 100644 --- a/modules/home-manager/vivify.nix +++ b/modules/home-manager/vivify.nix @@ -1,26 +1,23 @@ -{ - pkgs-unstable, - ... -}: { +{pkgs-unstable, ...}: { home.file.".config/vivify/config.json" = { enable = true; text = '' -{ - "browserOptions": { - "name": "qutebrowser", - "arguments": ["-T"] - } - }''; -}; -home.packages = [ - pkgs-unstable.vivify -]; -programs.qutebrowser = { - enable = true; - settings = { - auto_save.session = false; - changelog_after_upgrade = "never"; - content.cookies.accept = "never"; + { + "browserOptions": { + "name": "qutebrowser", + "arguments": ["-T"] + } + }''; + }; + home.packages = [ + pkgs-unstable.vivify + ]; + programs.qutebrowser = { + enable = true; + settings = { + auto_save.session = false; + changelog_after_upgrade = "never"; + content.cookies.accept = "never"; + }; }; -}; } diff --git a/modules/home-manager/waybar.nix b/modules/home-manager/waybar.nix index cdbf56e..8a0c935 100644 --- a/modules/home-manager/waybar.nix +++ b/modules/home-manager/waybar.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: { +_: { programs.waybar = { enable = true; settings = [ diff --git a/modules/home-manager/wlogout.nix b/modules/home-manager/wlogout.nix index 3184d9d..08b6a91 100644 --- a/modules/home-manager/wlogout.nix +++ b/modules/home-manager/wlogout.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: let +_: let wallpaper = ../../assets/wallpaper1.jpg; lock = ../../assets/lock.png; lock-hover = ../../assets/lock-hover.png; diff --git a/modules/home-manager/zoxide.nix b/modules/home-manager/zoxide.nix index ec3fd0d..32ffebc 100644 --- a/modules/home-manager/zoxide.nix +++ b/modules/home-manager/zoxide.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: { +_: { programs.zoxide = { enable = true; enableZshIntegration = true; diff --git a/modules/home-manager/zsh.nix b/modules/home-manager/zsh.nix index 27fbd99..1f5bbc8 100644 --- a/modules/home-manager/zsh.nix +++ b/modules/home-manager/zsh.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: { +_: { programs.zsh = { enable = true; autosuggestion.enable = true; diff --git a/modules/nixos/.lyBROKEN.nix b/modules/nixos/.lyBROKEN.nix index 860bb9c..e36c697 100644 --- a/modules/nixos/.lyBROKEN.nix +++ b/modules/nixos/.lyBROKEN.nix @@ -1,4 +1,4 @@ -{...}: { +_: { services.displayManager.ly = { enable = true; settings = { diff --git a/modules/nixos/IO.nix b/modules/nixos/IO.nix index a820e9e..f9fa255 100644 --- a/modules/nixos/IO.nix +++ b/modules/nixos/IO.nix @@ -1,8 +1,4 @@ -{ - pkgs, - ... -}: -{ +{pkgs, ...}: { # Configure keymap in X11 services.xserver.xkb = { layout = "ch"; diff --git a/modules/nixos/anki.nix b/modules/nixos/anki.nix index 0f4f7bb..e396d06 100644 --- a/modules/nixos/anki.nix +++ b/modules/nixos/anki.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: { +{pkgs, ...}: { environment.systemPackages = with pkgs; [ (pkgs.anki.withAddons [ (pkgs.ankiAddons.recolor.withConfig { diff --git a/modules/nixos/audioAndMedia.nix b/modules/nixos/audioAndMedia.nix index f02b172..d6bef91 100644 --- a/modules/nixos/audioAndMedia.nix +++ b/modules/nixos/audioAndMedia.nix @@ -1,9 +1,4 @@ -{ - pkgs, - pkgs-unstable, - ... -}: -{ +{pkgs, ...}: { # Enable sound with pipewire. services.pulseaudio.enable = false; security.rtkit.enable = true; @@ -20,7 +15,7 @@ #media-session.enable = true; }; environment.systemPackages = with pkgs; [ - (pkgs.callPackage ../../modules/scripts/changeAudioOutput.nix {}) + (pkgs.callPackage ../../modules/scripts/changeAudioOutput.nix {}) kdePackages.okular kdePackages.dolphin pulseaudio # sound server diff --git a/modules/nixos/bluetooth.nix b/modules/nixos/bluetooth.nix index 9892a08..8934420 100644 --- a/modules/nixos/bluetooth.nix +++ b/modules/nixos/bluetooth.nix @@ -1,8 +1,4 @@ -{ - pkgs, - ... -}: -{ +{pkgs, ...}: { hardware.bluetooth.enable = true; environment.systemPackages = with pkgs; [ blueman # GTK-based Bluetooth Manager diff --git a/modules/nixos/browser.nix b/modules/nixos/browser.nix index 63ad142..b06bc32 100644 --- a/modules/nixos/browser.nix +++ b/modules/nixos/browser.nix @@ -4,8 +4,7 @@ pkgs, pkgs-unstable, ... -}: -{ +}: { environment.systemPackages = with pkgs; [ chromium # used only to flash the firmware on my framework laptop 16 (keyboard.frame.work) as only chromium based browser support webHID. pkgs-unstable.tor-browser diff --git a/modules/nixos/development.nix b/modules/nixos/development.nix index 5e1f9d4..8d803d4 100644 --- a/modules/nixos/development.nix +++ b/modules/nixos/development.nix @@ -2,8 +2,7 @@ pkgs, pkgs-unstable, ... -}: -{ +}: { programs.nix-ld.enable = true; #Run unpatched dynamic binaries on NixOS. For example lets run ./a.out from gcc environment.systemPackages = with pkgs; [ gcc @@ -16,7 +15,7 @@ scipy ])) python313Packages.pygments # used for ccat (comment of colorize plugin from oh-my-zsh) - pkg-config + pkg-config gdb raylib glfw # raylib and some dependecies diff --git a/modules/nixos/disk.nix b/modules/nixos/disk.nix index 0b9dbff..97d8c5a 100644 --- a/modules/nixos/disk.nix +++ b/modules/nixos/disk.nix @@ -1,8 +1,4 @@ -{ - pkgs, - ... -}: -{ +{pkgs, ...}: { environment.systemPackages = with pkgs; [ gnome-disk-utility udiskie # removable disk automounter for udisks @@ -10,6 +6,6 @@ ]; # removes rclone error - programs.fuse.userAllowOther = true; + programs.fuse.userAllowOther = true; programs.fuse.enable = true; } diff --git a/modules/nixos/documentation.nix b/modules/nixos/documentation.nix index 756d132..a06b79c 100644 --- a/modules/nixos/documentation.nix +++ b/modules/nixos/documentation.nix @@ -1,11 +1,8 @@ -{ - pkgs, - ... -}: -{ +{pkgs, ...}: { documentation.man.generateCaches = true; # used for the man script - environment.pathsToLink = [ # see https://wiki.nixos.org/wiki/Documentation_Gaps#How_do_manpages_work?_Or:_environment.pathsToLink_and_buildEnv + environment.pathsToLink = [ + # see https://wiki.nixos.org/wiki/Documentation_Gaps#How_do_manpages_work?_Or:_environment.pathsToLink_and_buildEnv "/share/applications" "/share/xdg-desktop-portal" ]; diff --git a/modules/nixos/fonts.nix b/modules/nixos/fonts.nix index 1f7e00c..2d816ff 100644 --- a/modules/nixos/fonts.nix +++ b/modules/nixos/fonts.nix @@ -1,8 +1,4 @@ -{ - pkgs, - ... -}: -{ +{pkgs, ...}: { # fonts fonts.packages = with pkgs; [ nerd-fonts._0xproto diff --git a/modules/nixos/latex.nix b/modules/nixos/latex.nix index f69b66d..e9787bc 100644 --- a/modules/nixos/latex.nix +++ b/modules/nixos/latex.nix @@ -1,8 +1,4 @@ -{ - pkgs, - ... -}: -{ +{pkgs, ...}: { environment.systemPackages = with pkgs; [ texlab ltex-ls-plus diff --git a/modules/nixos/ly.nix b/modules/nixos/ly.nix index a497150..0aff326 100644 --- a/modules/nixos/ly.nix +++ b/modules/nixos/ly.nix @@ -1,4 +1,4 @@ -{...}: { +_: { # a minimal ly config as the big config (ly.nix) didnt worked services.displayManager.ly = { enable = true; diff --git a/modules/nixos/mullvad.nix b/modules/nixos/mullvad.nix index e635f0c..2ca7e01 100644 --- a/modules/nixos/mullvad.nix +++ b/modules/nixos/mullvad.nix @@ -1,8 +1,5 @@ # see also ../home-manager/mullvad.nix -{ - pkgs-unstable, - ... -}: { +{pkgs-unstable, ...}: { services.mullvad-vpn = { enable = true; package = pkgs-unstable.mullvad-vpn; diff --git a/modules/nixos/nixUtils.nix b/modules/nixos/nixUtils.nix index bfb2cfa..3bfd2d1 100644 --- a/modules/nixos/nixUtils.nix +++ b/modules/nixos/nixUtils.nix @@ -22,15 +22,15 @@ nix.settings.experimental-features = ["nix-command" "flakes"]; environment.systemPackages = with pkgs-unstable; [ - nixpkgs-review - nixfmt-tree - treefmt - nixd - deadnix - alejandra - vimPluginsUpdater # used for building plugins - nix-index - statix - (pkgs.callPackage ../../hostsModules/laptop/scripts/cleanNix.nix {}) + nixpkgs-review + nixfmt-tree + treefmt + nixd + deadnix + alejandra + vimPluginsUpdater # used for building plugins + nix-index + statix + (pkgs.callPackage ../../hostsModules/laptop/scripts/cleanNix.nix {}) ]; } diff --git a/modules/nixos/notifications.nix b/modules/nixos/notifications.nix index cdbcf74..2d382fb 100644 --- a/modules/nixos/notifications.nix +++ b/modules/nixos/notifications.nix @@ -1,9 +1,5 @@ # notifications server is set by caelestia-shell. See ../home-manager/caelestia.nix -{ - pkgs, - ... -}: -{ +{pkgs, ...}: { environment.systemPackages = with pkgs; [ libnotify # Library that sends desktop notifications to a notification daemon socat # Utility for bidirectional data transfer between two independent data channels (used to communicate between hyprland and swww to change wallpapers dinamically) @@ -15,6 +11,5 @@ (pkgs.callPackage ../../hostsModules/laptop/scripts/checkMatrix.nix {}) (pkgs.callPackage ../../modules/scripts/gitnotify.nix {}) # check if git is set up (pkgs.callPackage ../../modules/scripts/checkKdrive.nix {}) # check if kdrive is set up with rclone - ]; } diff --git a/modules/nixos/office.nix b/modules/nixos/office.nix index 674f9a2..4159c11 100644 --- a/modules/nixos/office.nix +++ b/modules/nixos/office.nix @@ -1,8 +1,4 @@ -{ - pkgs, - ... -}: -{ +{pkgs, ...}: { environment.systemPackages = with pkgs; [ libreoffice birdtray diff --git a/modules/nixos/otherUtils.nix b/modules/nixos/otherUtils.nix index 48945c4..825d605 100644 --- a/modules/nixos/otherUtils.nix +++ b/modules/nixos/otherUtils.nix @@ -3,8 +3,7 @@ pkgs, pkgs-unstable, ... -}: -{ +}: { environment.systemPackages = with pkgs; [ gnome-calculator snapshot diff --git a/modules/nixos/printer.nix b/modules/nixos/printer.nix index 1a9994f..5a24a15 100644 --- a/modules/nixos/printer.nix +++ b/modules/nixos/printer.nix @@ -1,15 +1,11 @@ -{ - config, - pkgs, - ... -}: { +{pkgs, ...}: { #https://wiki.nixos.org/wiki/Printing - services.avahi = { + services.avahi = { enable = true; nssmdns4 = true; openFirewall = true; }; - + # Enable CUPS to print documents. services.printing = { enable = true; @@ -23,21 +19,21 @@ ]; }; services.ipp-usb.enable = true; - environment.systemPackages = with pkgs; [ + environment.systemPackages = with pkgs; [ kdePackages.print-manager ghostscript hplipWithPlugin ]; -hardware.printers = { - ensurePrinters = [ - { - name = "HP_OfficeJet_Pro_7740"; - location = "Home"; - deviceUri = "hp:/usb/OfficeJet_Pro_7740_series"; - model = "drv:///hp/hpcups.drv/hp-officejet_pro_7740_series.ppd"; - } - ]; + hardware.printers = { + ensurePrinters = [ + { + name = "HP_OfficeJet_Pro_7740"; + location = "Home"; + deviceUri = "hp:/usb/OfficeJet_Pro_7740_series"; + model = "drv:///hp/hpcups.drv/hp-officejet_pro_7740_series.ppd"; + } + ]; - ensureDefaultPrinter = "HP_OfficeJet_Pro_7740"; -}; + ensureDefaultPrinter = "HP_OfficeJet_Pro_7740"; + }; } diff --git a/modules/nixos/theme.nix b/modules/nixos/theme.nix index 25e98f2..de6bada 100644 --- a/modules/nixos/theme.nix +++ b/modules/nixos/theme.nix @@ -1,14 +1,10 @@ # most of the themeing are in the home-manager modules. This just installs some packages needed -{ - pkgs, - ... -}: -{ +{pkgs, ...}: { qt.enable = true; # to resolve this https://wiki.nixos.org/wiki/Home_Manager#I_cannot_set_GNOME_or_Gtk_themes_via_Home_Manager programs.dconf.enable = true; - + environment.systemPackages = with pkgs; [ swww #wallpaper daemon gruvbox-gtk-theme diff --git a/modules/nixos/user.nix b/modules/nixos/user.nix index 2ceebeb..693cf1a 100644 --- a/modules/nixos/user.nix +++ b/modules/nixos/user.nix @@ -3,8 +3,7 @@ pkgs-unstable, inputs, ... -}: -{ +}: { services.dbus.enable = true; security.polkit.enable = true; home-manager = { @@ -42,21 +41,21 @@ services.upower.enable = true; # removes need for password for nixos-rebuild - security.sudo.extraRules = [ + security.sudo.extraRules = [ { - users = [ "tomasr" ]; + users = ["tomasr"]; commands = [ { command = "/run/current-system/sw/bin/nixos-rebuild"; - options = [ "NOPASSWD" ]; + options = ["NOPASSWD"]; } { command = "${pkgs.nixos-rebuild}/bin/nixos-rebuild"; - options = [ "NOPASSWD" ]; + options = ["NOPASSWD"]; } { command = "${pkgs-unstable.nixos-rebuild}/bin/nixos-rebuild"; - options = [ "NOPASSWD" ]; + options = ["NOPASSWD"]; } ]; } diff --git a/modules/nixos/windowManager.nix b/modules/nixos/windowManager.nix index 3dde05a..c608e28 100644 --- a/modules/nixos/windowManager.nix +++ b/modules/nixos/windowManager.nix @@ -3,8 +3,7 @@ pkgs-unstable, pkgs, ... -}: -{ +}: { # Enable the X11 windowing system. services.xserver.enable = true; @@ -27,7 +26,7 @@ xwayland.enable = true; }; - xdg.portal = { + xdg.portal = { enable = true; extraPortals = [ pkgs.xdg-desktop-portal-wlr diff --git a/modules/packages/labplot.nix b/modules/packages/labplot.nix index 5c2331a..465e103 100644 --- a/modules/packages/labplot.nix +++ b/modules/packages/labplot.nix @@ -7,9 +7,7 @@ extra-cmake-modules, shared-mime-info, wrapQtAppsHook, - qtbase, - karchive, kcompletion, kconfig, @@ -24,9 +22,7 @@ ktextwidgets, kxmlgui, syntax-highlighting, - gsl, - poppler, fftw, hdf5, @@ -41,7 +37,6 @@ qtserialport, discount, }: - stdenv.mkDerivation rec { pname = "labplot"; version = "2.10.1"; @@ -121,7 +116,7 @@ stdenv.mkDerivation rec { lgpl3Plus mit ]; - maintainers = [ "tomasriveral" ]; + maintainers = ["tomasriveral"]; mainProgram = "labplot2"; platforms = lib.platforms.unix; }; diff --git a/modules/packages/plint.nix b/modules/packages/plint.nix index 6622506..0ab8397 100644 --- a/modules/packages/plint.nix +++ b/modules/packages/plint.nix @@ -1,10 +1,10 @@ -{ lib -, python3Packages -, fetchFromGitLab -, frhyme -, haspirater +{ + lib, + python3Packages, + fetchFromGitLab, + frhyme, + haspirater, }: - python3Packages.buildPythonApplication rec { pname = "plint"; diff --git a/modules/packages/sbb-tui.nix b/modules/packages/sbb-tui.nix index 5b19420..f5c2c48 100644 --- a/modules/packages/sbb-tui.nix +++ b/modules/packages/sbb-tui.nix @@ -3,9 +3,8 @@ buildGoModule, fetchFromGitHub, nix-update-script, - versionCheckHook + versionCheckHook, }: - buildGoModule (finalAttrs: { pname = "sbb-tui"; version = "1.14.2"; @@ -24,21 +23,21 @@ buildGoModule (finalAttrs: { "-w" "-X main.version=${finalAttrs.version}" ]; - + allowGoReference = true; doCheck = true; - nativeCheckInputs = [ versionCheckHook ]; + nativeCheckInputs = [versionCheckHook]; - passthru.updateScript = nix-update-script { }; + passthru.updateScript = nix-update-script {}; meta = { description = "TUI client for Switzerland's public transport timetables, inspired by SBB/CFF/FFS app"; homepage = "https://github.com/Necrom4/sbb-tui"; license = lib.licenses.mit; platforms = lib.platforms.unix; - maintainers = with lib.maintainers; [ tomasrivera ]; + maintainers = with lib.maintainers; [tomasrivera]; mainProgram = "sbb-tui"; }; }) diff --git a/modules/packages/vivify.nix b/modules/packages/vivify.nix index 36b01b3..2df2a57 100644 --- a/modules/packages/vivify.nix +++ b/modules/packages/vivify.nix @@ -10,7 +10,6 @@ zip, file, }: - stdenv.mkDerivation (finalAttrs: { pname = "vivify"; version = "0.14.0"; @@ -49,11 +48,11 @@ stdenv.mkDerivation (finalAttrs: { wrapProgram $out/bin/viv \ --prefix PATH : ${ - lib.makeBinPath [ - nodejs - file - ] - } + lib.makeBinPath [ + nodejs + file + ] + } ''; nativeBuildInputs = [ @@ -69,7 +68,7 @@ stdenv.mkDerivation (finalAttrs: { # (segmentation fault) dontStrip = true; - passthru.updateScript = nix-update-script { }; + passthru.updateScript = nix-update-script {}; meta = { description = "Live Markdown viewer"; @@ -81,7 +80,7 @@ stdenv.mkDerivation (finalAttrs: { homepage = "https://github.com/jannis-baum/Vivify"; changelog = "https://github.com/jannis-baum/Vivify/releases/tag/v${finalAttrs.src.tag}"; license = lib.licenses.gpl3; - maintainers = with lib.maintainers; [ skohtv ]; + maintainers = with lib.maintainers; [skohtv]; platforms = lib.platforms.linux; mainProgram = "viv"; }; diff --git a/modules/packages/z13ctl.nix b/modules/packages/z13ctl.nix index 212f7cf..f3a835f 100644 --- a/modules/packages/z13ctl.nix +++ b/modules/packages/z13ctl.nix @@ -3,7 +3,6 @@ buildGoModule, fetchFromGitHub, }: - buildGoModule { pname = "z13ctl"; version = "1.1.6"; @@ -17,7 +16,7 @@ buildGoModule { vendorHash = "sha256-ftkcianIR36PNAoMOVuk4lUr7goWUcHhjyNseUraJU0="; - subPackages = [ "." ]; + subPackages = ["."]; __structuredAttrs = true; @@ -27,6 +26,6 @@ buildGoModule { license = licenses.asl20; platforms = platforms.linux; mainProgram = "z13ctl"; - maintainers = with maintainers; [ badheuristic ]; + maintainers = with maintainers; [badheuristic]; }; } diff --git a/modules/scripts/checkKdrive.nix b/modules/scripts/checkKdrive.nix index d2df01b..2a7f515 100644 --- a/modules/scripts/checkKdrive.nix +++ b/modules/scripts/checkKdrive.nix @@ -14,28 +14,28 @@ writeShellApplication { ]; text = '' -# waits for an internet connection. It pings both Google DNS and Cloudfare dns in case one of them is down -until ping -c1 -W1 1.1.1.1 >/dev/null 2>&1 || \ - ping -c1 -W1 8.8.8.8 >/dev/null 2>&1 -do - sleep 1 -done + # waits for an internet connection. It pings both Google DNS and Cloudfare dns in case one of them is down + until ping -c1 -W1 1.1.1.1 >/dev/null 2>&1 || \ + ping -c1 -W1 8.8.8.8 >/dev/null 2>&1 + do + sleep 1 + done -set +e + set +e -output=$(rclone lsd kdrive: 2>&1) -status=$? + output=$(rclone lsd kdrive: 2>&1) + status=$? -set -e + set -e -if [ $status -eq 0 ]; then - echo "kdrive OK" -else - echo "kdrive rclone failed with error: $output" - notify-send "rclone kdrive failed" "$output" - matrix-commander-rs --verbose -m "rclone kdrive failed.
Error:
$output

@notificationbot_0000" \ - --html \ - -r "\!7j-78_02dHROeLj4Ns8F12eo4IiZGv4zNsQ_1-WlyIU" -fi + if [ $status -eq 0 ]; then + echo "kdrive OK" + else + echo "kdrive rclone failed with error: $output" + notify-send "rclone kdrive failed" "$output" + matrix-commander-rs --verbose -m "rclone kdrive failed.
Error:
$output

@notificationbot_0000" \ + --html \ + -r "\!7j-78_02dHROeLj4Ns8F12eo4IiZGv4zNsQ_1-WlyIU" + fi ''; } diff --git a/modules/scripts/librewolfprofiles.nix b/modules/scripts/librewolfprofiles.nix index b12c34b..5715086 100644 --- a/modules/scripts/librewolfprofiles.nix +++ b/modules/scripts/librewolfprofiles.nix @@ -1,7 +1,6 @@ { writeShellApplication, zsh, - kitty, fzf, ... }: diff --git a/modules/scripts/performance-mode.nix b/modules/scripts/performance-mode.nix index 204cf17..c9bd99a 100644 --- a/modules/scripts/performance-mode.nix +++ b/modules/scripts/performance-mode.nix @@ -1,11 +1,5 @@ # used for the terminal autostart. Needs to get cleared and recall fastfetch so that the bar from oh-my-zsh get resized -{ - writeShellApplication, - hyprland, - gawk, - libnotify, - ... -}: +{writeShellApplication, ...}: writeShellApplication { name = "custom-performance"; runtimeInputs = [ diff --git a/modules/scripts/syllabes.nix b/modules/scripts/syllabes.nix index cb7ec98..4655f9a 100644 --- a/modules/scripts/syllabes.nix +++ b/modules/scripts/syllabes.nix @@ -1,29 +1,33 @@ -{ pkgs, python3Packages, ... }: - +{ + pkgs, + python3Packages, + ... +}: pkgs.writers.writePython3Bin "custom-syllabes" { libraries = [ python3Packages.pyphen ]; } '' -import sys -import pyphen + import sys + import pyphen -dic = pyphen.Pyphen(lang="fr") + dic = pyphen.Pyphen(lang="fr") -text = sys.stdin.read().strip() + text = sys.stdin.read().strip() -chunks = [] -total = 0 + chunks = [] + total = 0 -for w in text.split(): - hyphenated = dic.inserted(w) - parts = hyphenated.split("-") - chunks.append("/".join(parts)) - total += len(parts) + for w in text.split(): + hyphenated = dic.inserted(w) + parts = hyphenated.split("-") + chunks.append("/".join(parts)) + total += len(parts) -print(f"{total} ({'/'.join(chunks)})") + print(f"{total} ({'/'.join(chunks)})") '' -/* used IPA but had a deprecated dependency +/* + used IPA but had a deprecated dependency { pkgs, python3Packages, ... }: pkgs.writers.writePython3Bin "custom-syllabes" { @@ -56,8 +60,10 @@ for word in text.split(): chunks.append(f"{word}/{ipa}") print(f"{total} ({' | '.join(chunks)})") -''*/ -/*{ pkgs, ... }: +'' +*/ +/* + { pkgs, ... }: let lexique = pkgs.fetchurl { @@ -170,4 +176,6 @@ def main(): if __name__ == "__main__": main() -''*/ +'' +*/ + From 9425c5f740440b8d743407c163ad1c99d64d0b15 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Mon, 18 May 2026 19:09:03 +0200 Subject: [PATCH 24/34] autoupdate: remove git tag at the end --- hostsModules/laptop/scripts/autoUpdate.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hostsModules/laptop/scripts/autoUpdate.nix b/hostsModules/laptop/scripts/autoUpdate.nix index 8479c87..887f5e1 100644 --- a/hostsModules/laptop/scripts/autoUpdate.nix +++ b/hostsModules/laptop/scripts/autoUpdate.nix @@ -55,6 +55,8 @@ pkgs.writeShellApplication { git -C "$FLAKE_DIR" reset --hard "pre-autoupdate-$TIME" fi + git -C "$FLAKE_DIR" tag -d "pre-autoupdate-$TIME" # removes the tag + rm -f "$ERROR_FILE" ''; } From d71a5e43563db676965be9020e8ecc7ea56bdcf9 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Mon, 18 May 2026 19:16:09 +0200 Subject: [PATCH 25/34] cleanNix: set systemd timer --- hosts/laptop/configuration.nix | 1 + hostsModules/laptop/nixos/autoCleanup.nix | 45 +++++++++++++++++++++++ modules/nixos/nixUtils.nix | 1 - 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 hostsModules/laptop/nixos/autoCleanup.nix diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index f8ae7e2..c71456d 100755 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -23,6 +23,7 @@ ../../hostsModules/laptop/nixos/ollama.nix # llm config ../../modules/nixos/mullvad.nix # vpn config ../../hostsModules/laptop/nixos/autoUpdate.nix # auto update the flakes. Handles notification via libnotify and matrix-commander-rs + ../../hostsModules/laptop/nixos/cleanNix.nix # uses alexandra deadnix and statix to clean the whole config ../../hostsModules/laptop/nixos/bootloader.nix ../../hostsModules/laptop/nixos/networking.nix # firewall, ssh, networkmanager, etc. ../../modules/nixos/bluetooth.nix diff --git a/hostsModules/laptop/nixos/autoCleanup.nix b/hostsModules/laptop/nixos/autoCleanup.nix new file mode 100644 index 0000000..af6545c --- /dev/null +++ b/hostsModules/laptop/nixos/autoCleanup.nix @@ -0,0 +1,45 @@ +{pkgs, ...}: { + # Ensure your script is available system-wide + environment.systemPackages = [ + (pkgs.callPackage ../scripts/cleanNix.nix {}) + ]; + users.users.tomasr = { + linger = true; # lingering is required + }; + + systemd.user.services.custom-autoupdate = { + description = "NixOS configuration auto cleanup"; + + serviceConfig = { + Type = "oneshot"; + + ExecStart = "/run/current-system/sw/bin/custom-cleanNix"; + + # safety for long rebuilds + TimeoutStartSec = "45min"; + TimeoutStopSec = "10min"; + + # avoid overlap + RemainAfterExit = true; + + # tweaks that should make the system run normally during the rebuilds + Nice = 10; + IOSchedulingClass = "best-effort"; + IOSchedulingPriority = 7; + }; + }; + + # Systemd USER timer + systemd.user.timers.custom-autoupdate = { + wantedBy = ["timers.target"]; + + timerConfig = { + OnCalendar = "Sat *-*-* 20:00:00"; # runs saturday night. If for whatever reason something breaks. I have whole sunday to fix it. + + Persistent = true; # if it happens during shutted down + + # avoids thundering herd on boot + RandomizedDelaySec = "2h"; + }; + }; +} diff --git a/modules/nixos/nixUtils.nix b/modules/nixos/nixUtils.nix index 3bfd2d1..696a3c1 100644 --- a/modules/nixos/nixUtils.nix +++ b/modules/nixos/nixUtils.nix @@ -31,6 +31,5 @@ vimPluginsUpdater # used for building plugins nix-index statix - (pkgs.callPackage ../../hostsModules/laptop/scripts/cleanNix.nix {}) ]; } From 77b0a924581fba18a48d10b00e07fc1800fae1f7 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Mon, 18 May 2026 19:25:22 +0200 Subject: [PATCH 26/34] cleanNix: fix bug; wrong systemd name --- hosts/laptop/configuration.nix | 2 +- hostsModules/laptop/nixos/autoCleanup.nix | 4 ++-- hostsModules/laptop/scripts/cleanNix.nix | 17 ++++++++++++----- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index c71456d..e7c72b3 100755 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -23,7 +23,7 @@ ../../hostsModules/laptop/nixos/ollama.nix # llm config ../../modules/nixos/mullvad.nix # vpn config ../../hostsModules/laptop/nixos/autoUpdate.nix # auto update the flakes. Handles notification via libnotify and matrix-commander-rs - ../../hostsModules/laptop/nixos/cleanNix.nix # uses alexandra deadnix and statix to clean the whole config + ../../hostsModules/laptop/nixos/autoCleanup.nix # uses alexandra deadnix and statix to clean the whole config ../../hostsModules/laptop/nixos/bootloader.nix ../../hostsModules/laptop/nixos/networking.nix # firewall, ssh, networkmanager, etc. ../../modules/nixos/bluetooth.nix diff --git a/hostsModules/laptop/nixos/autoCleanup.nix b/hostsModules/laptop/nixos/autoCleanup.nix index af6545c..8d0de9e 100644 --- a/hostsModules/laptop/nixos/autoCleanup.nix +++ b/hostsModules/laptop/nixos/autoCleanup.nix @@ -7,7 +7,7 @@ linger = true; # lingering is required }; - systemd.user.services.custom-autoupdate = { + systemd.user.services.custom-cleanNix = { description = "NixOS configuration auto cleanup"; serviceConfig = { @@ -30,7 +30,7 @@ }; # Systemd USER timer - systemd.user.timers.custom-autoupdate = { + systemd.user.timers.custom-cleanNix = { wantedBy = ["timers.target"]; timerConfig = { diff --git a/hostsModules/laptop/scripts/cleanNix.nix b/hostsModules/laptop/scripts/cleanNix.nix index f89278d..7ee031b 100644 --- a/hostsModules/laptop/scripts/cleanNix.nix +++ b/hostsModules/laptop/scripts/cleanNix.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: +{pkgs, +...}: pkgs.writeShellApplication { name = "custom-cleanNix"; @@ -25,10 +26,16 @@ pkgs.writeShellApplication { git -C "$FLAKE_DIR" commit --allow-empty -m "snapshot pre-cleanup-$TIME" git -C "$FLAKE_DIR" tag "pre-cleanup-$TIME" HEAD - # removes dead code - deadnix --edit "$FLAKE_DIR" # removes unused code - statix fix "$FLAKE_DIR" # check other linting issues - alejandra "$FLAKE_DIR" # formats the config + # the echos are to separate what each one is doing. Just for curiosity + echo "deadnix scans your Nix code and removes or reports unused (dead) variables and bindings" + deadnix -vv --edit "$FLAKE_DIR" # removes unused code + echo "--------------------------------------------------------------" + echo "statix lints your Nix code to find stylistic issues, bad patterns, and potential mistakes." + statix fix "$FLAKE_DIR" --verbose # check other linting issues + echo "--------------------------------------------------------------" + echo "alejandra formats your Nix code consistently according to a strict, opinionated style." + alejandra -v "$FLAKE_DIR" # formats the config + echo "--------------------------------------------------------------" if sudo /run/current-system/sw/bin/nixos-rebuild switch --flake "$FLAKE" 2> "$ERROR_FILE"; then # use /run/.../bin/ uses the sudoless rule From 010556a4285fc4262f0c2cbe9b0ade5cfeabb819 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Mon, 18 May 2026 19:25:29 +0200 Subject: [PATCH 27/34] snapshot pre-cleanup-2026-05-18T17-25-29Z From afac391c9a1f161a3b7273a4208422b0b9018c39 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Mon, 18 May 2026 19:26:45 +0200 Subject: [PATCH 28/34] cleanNix: deadnix: remove false verbose flag --- hostsModules/laptop/scripts/cleanNix.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hostsModules/laptop/scripts/cleanNix.nix b/hostsModules/laptop/scripts/cleanNix.nix index 7ee031b..bd85ee9 100644 --- a/hostsModules/laptop/scripts/cleanNix.nix +++ b/hostsModules/laptop/scripts/cleanNix.nix @@ -28,7 +28,7 @@ pkgs.writeShellApplication { # the echos are to separate what each one is doing. Just for curiosity echo "deadnix scans your Nix code and removes or reports unused (dead) variables and bindings" - deadnix -vv --edit "$FLAKE_DIR" # removes unused code + deadnix --edit "$FLAKE_DIR" # removes unused code echo "--------------------------------------------------------------" echo "statix lints your Nix code to find stylistic issues, bad patterns, and potential mistakes." statix fix "$FLAKE_DIR" --verbose # check other linting issues From 81758277c117c964554c579e5911a8ebc9d4d14c Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Mon, 18 May 2026 19:27:30 +0200 Subject: [PATCH 29/34] snapshot pre-cleanup-2026-05-18T17-27-30Z From 6388edefd64fc32ff162447ff1b363d4afbebaf7 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Mon, 18 May 2026 19:28:30 +0200 Subject: [PATCH 30/34] cleanNix: statix: remove false verbose flag --- hostsModules/laptop/scripts/cleanNix.nix | 2 +- modules/nixos/nixUtils.nix | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/hostsModules/laptop/scripts/cleanNix.nix b/hostsModules/laptop/scripts/cleanNix.nix index bd85ee9..d4af6fd 100644 --- a/hostsModules/laptop/scripts/cleanNix.nix +++ b/hostsModules/laptop/scripts/cleanNix.nix @@ -31,7 +31,7 @@ pkgs.writeShellApplication { deadnix --edit "$FLAKE_DIR" # removes unused code echo "--------------------------------------------------------------" echo "statix lints your Nix code to find stylistic issues, bad patterns, and potential mistakes." - statix fix "$FLAKE_DIR" --verbose # check other linting issues + statix fix "$FLAKE_DIR" # check other linting issues echo "--------------------------------------------------------------" echo "alejandra formats your Nix code consistently according to a strict, opinionated style." alejandra -v "$FLAKE_DIR" # formats the config diff --git a/modules/nixos/nixUtils.nix b/modules/nixos/nixUtils.nix index 696a3c1..41eca06 100644 --- a/modules/nixos/nixUtils.nix +++ b/modules/nixos/nixUtils.nix @@ -1,6 +1,5 @@ # some options are in ../../hostsModules/laptop/nixos/nixUtils.nix { - pkgs, pkgs-unstable, inputs, ... From c84bc422ea78c4a80e84e2282ce9d91881d469c4 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Mon, 18 May 2026 19:29:18 +0200 Subject: [PATCH 31/34] snapshot pre-cleanup-2026-05-18T17-29-18Z From b05dd479200a03800e1425ab958d8eb4065a6c8c Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Mon, 18 May 2026 19:29:58 +0200 Subject: [PATCH 32/34] cleanNix: alejandra: remove false verbose flag --- hostsModules/laptop/scripts/cleanNix.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hostsModules/laptop/scripts/cleanNix.nix b/hostsModules/laptop/scripts/cleanNix.nix index d4af6fd..4124c76 100644 --- a/hostsModules/laptop/scripts/cleanNix.nix +++ b/hostsModules/laptop/scripts/cleanNix.nix @@ -34,7 +34,7 @@ pkgs.writeShellApplication { statix fix "$FLAKE_DIR" # check other linting issues echo "--------------------------------------------------------------" echo "alejandra formats your Nix code consistently according to a strict, opinionated style." - alejandra -v "$FLAKE_DIR" # formats the config + alejandra "$FLAKE_DIR" # formats the config echo "--------------------------------------------------------------" if sudo /run/current-system/sw/bin/nixos-rebuild switch --flake "$FLAKE" 2> "$ERROR_FILE"; then # use /run/.../bin/ uses the sudoless rule From 485446ccaab87e21c47802700e77bdd7e1387f91 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Mon, 18 May 2026 19:30:48 +0200 Subject: [PATCH 33/34] snapshot pre-cleanup-2026-05-18T17-30-48Z From affa5b012ca8ff97fe6c7aabba5d792ac8918f39 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Mon, 18 May 2026 19:31:01 +0200 Subject: [PATCH 34/34] Auto: cleanup-2026-05-18T17-30-48Z --- hostsModules/laptop/scripts/cleanNix.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hostsModules/laptop/scripts/cleanNix.nix b/hostsModules/laptop/scripts/cleanNix.nix index 4124c76..d5515c2 100644 --- a/hostsModules/laptop/scripts/cleanNix.nix +++ b/hostsModules/laptop/scripts/cleanNix.nix @@ -1,5 +1,4 @@ -{pkgs, -...}: +{pkgs, ...}: pkgs.writeShellApplication { name = "custom-cleanNix";