From 576a8a378084b4dbad068278d9e8d5c9e2e4761f Mon Sep 17 00:00:00 2001 From: Ahwx Date: Mon, 26 Jan 2026 21:00:04 +0100 Subject: [PATCH 01/17] feat: set new power profiles; move displaylink to laptop role as it is wasted cpu usage on desktops --- roles/laptop.nix | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/roles/laptop.nix b/roles/laptop.nix index 6f1fa7a..f256e9a 100644 --- a/roles/laptop.nix +++ b/roles/laptop.nix @@ -30,11 +30,7 @@ in }; # DisplayLink - services.xserver.videoDrivers = [ - "displaylink" - "modesetting" - ]; - systemd.services.dlm.wantedBy = [ "multi-user.target" ]; + import = [ (../modules/core/displaylink.nix) ]; networking.networkmanager.enable = true; @@ -48,6 +44,13 @@ in thermald.enable = true; power-profiles-daemon.enable = true; + udev.extraRules = '' + # Switch to power-save profile when on battery + SUBSYSTEM=="power_supply", ATTR{online}=="0", RUN+="${pkgs.power-profiles-daemon}/bin/powerprofilesctl set power-saver", RUN+="/bin/sh -c 'echo 30 | tee /sys/class/backlight/amdgpu_bl1/brightness'" + # Switch to balanced profile when plugged in + SUBSYSTEM=="power_supply", ATTR{online}=="1", RUN+="${pkgs.power-profiles-daemon}/bin/powerprofilesctl set balanced", RUN+="/bin/sh -c 'cat /sys/class/backlight/amdgpu_bl1/max_brightness > /sys/class/backlight/amdgpu_bl1/brightness'" + ''; + upower = { enable = true; percentageLow = 20; @@ -55,6 +58,21 @@ in percentageAction = 5; criticalPowerAction = "Hibernate"; }; + #auto-cpufreq = { + # enable = true; + # settings = { + # battery = { + # governor = "powersave"; + # turbo = "never"; + # energy_performance_preference = "balance_power"; + # }; + # charger = { + # governor = "performance"; + # turbo = "auto"; + # energy_performance_preference = "performance"; + # }; + # }; + #}; }; # powerManagement.powertop.enable = false; # somehow figure out how to let this not apply to specific USB devices, as they will auto suspend and that is annoying. }; From f2abfb68e418df5219823ae7dbee56e961d224d1 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Mon, 26 Jan 2026 21:00:11 +0100 Subject: [PATCH 02/17] feat: enable envfs --- modules/core/system.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/core/system.nix b/modules/core/system.nix index 3d2e0a1..0301029 100644 --- a/modules/core/system.nix +++ b/modules/core/system.nix @@ -30,6 +30,8 @@ libraries = with pkgs; [ ]; }; + services.envfs.enable = true; + nixpkgs = { overlays = [ self.overlays.default From 30e5f08e767098eb0fcfef2d7c8e819bedfbeefb Mon Sep 17 00:00:00 2001 From: Ahwx Date: Mon, 26 Jan 2026 21:00:22 +0100 Subject: [PATCH 03/17] chore: cleanup --- modules/core/program.nix | 7 ------- 1 file changed, 7 deletions(-) diff --git a/modules/core/program.nix b/modules/core/program.nix index 3acaa58..f82b534 100644 --- a/modules/core/program.nix +++ b/modules/core/program.nix @@ -8,11 +8,4 @@ # pinentryFlavor = ""; }; }; - - environment.systemPackages = with pkgs; [ - wget - git - dig - traceroute - ]; } From 378ca5fa00c48c39134de8e10e7ff2c3734402a9 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Mon, 26 Jan 2026 21:00:51 +0100 Subject: [PATCH 04/17] feat: adds various networking programs/packages, move tailscale to `core` instead of `services` --- modules/core/network.nix | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/modules/core/network.nix b/modules/core/network.nix index 9cb9355..c6031a3 100644 --- a/modules/core/network.nix +++ b/modules/core/network.nix @@ -12,5 +12,29 @@ }; services = { avahi.enable = lib.mkDefault false; + tailscale = { + enable = true; + useRoutingFeatures = "client"; + extraUpFlags = [ + # "--accept-dns=false" + "--accept-routes" + ]; + }; }; + + programs = { + wireshark.enable = true; + }; + + environment.systemPackages = with pkgs; [ + dig + iftop + inetutils + ipcalc + iperf + nmap + tcpdump + traceroute + tshark + ]; } From 81516955ec9ec13be969d1cdbb59269068e30947 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Mon, 26 Jan 2026 21:01:03 +0100 Subject: [PATCH 05/17] feat: enable logitech wireless hardware support for trackball --- modules/core/hardware.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/core/hardware.nix b/modules/core/hardware.nix index ca598dc..20dd4c1 100644 --- a/modules/core/hardware.nix +++ b/modules/core/hardware.nix @@ -1,7 +1,11 @@ { pkgs, ... }: -{ +{ services.smartd = { enable = true; autodetect = true; }; + hardware.logitech.wireless = { + enable = true; + enableGraphical = true; + }; } From 00eab67bfb64f1e70f2701666233c715c423e806 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Mon, 26 Jan 2026 21:01:13 +0100 Subject: [PATCH 06/17] chore: move displaylink over to laptop role --- modules/core/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/core/default.nix b/modules/core/default.nix index 31e123e..c896eec 100644 --- a/modules/core/default.nix +++ b/modules/core/default.nix @@ -4,7 +4,6 @@ [ (import ./docker.nix) ] ++ [ (import ../security/default.nix) ] ++ [ (import ./hardware.nix) ] - ++ [ (import ./displaylink.nix) ] # ++ [(import ./printing.nix)] ++ [ (import ./xserver.nix) ] ++ [ (import ./network.nix) ] From a2ae9bfa4b72c1cff9a4d495ac5247fc802777b6 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Mon, 26 Jan 2026 21:01:35 +0100 Subject: [PATCH 07/17] feat: write first little bit of `xdg.mimeApps` options --- modules/home/xdg.nix | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 modules/home/xdg.nix diff --git a/modules/home/xdg.nix b/modules/home/xdg.nix new file mode 100644 index 0000000..794dc7f --- /dev/null +++ b/modules/home/xdg.nix @@ -0,0 +1,9 @@ +{ + xdg.mimeApps = { + enable = true; + defaultApplications = { + "x-scheme-handler/sgnl" = "signal-desktop.desktop"; + "x-scheme-handler/signalcaptcha" = "signal-desktop.desktop"; + }; + }; +} From ad76b07bbca5931a5e2c2938a7988c78930609a7 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Mon, 26 Jan 2026 21:01:57 +0100 Subject: [PATCH 08/17] feat: import `ssh` and `xdg` --- modules/home/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/home/default.nix b/modules/home/default.nix index aaec9da..c6bb4d7 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -16,8 +16,10 @@ ++ [ (import ./packages.nix) ] ++ [ (import ./scripts/scripts.nix) ] ++ [ (import ./spotify.nix) ] + ++ [ (import ./ssh.nix) ] ++ [ (import ./waybar) ] ++ [ (import ./zsh.nix) ] ++ [ (import ./qutebrowser.nix) ] + ++ [ (import ./xdg.nix) ] ++ [ (import ./tmux.nix) ]; } From d3dac79665678b1c85482c65ef01154d5b6ab613 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Mon, 26 Jan 2026 21:02:13 +0100 Subject: [PATCH 09/17] feat: adds `matchBlocks` for git hosts --- modules/home/ssh.nix | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 modules/home/ssh.nix diff --git a/modules/home/ssh.nix b/modules/home/ssh.nix new file mode 100644 index 0000000..f9b3df5 --- /dev/null +++ b/modules/home/ssh.nix @@ -0,0 +1,9 @@ +{ + programs.ssh = { + matchBlocks = { + "github.com gitlab.com" = { + user = "git"; + }; + }; + }; +} From 4846b393d0da0db8906d24d4bce46742a6bb977b Mon Sep 17 00:00:00 2001 From: Ahwx Date: Mon, 26 Jan 2026 21:02:35 +0100 Subject: [PATCH 10/17] feat: adds spellcheck dictionaries --- modules/home/packages.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/modules/home/packages.nix b/modules/home/packages.nix index 9069d0b..17f39e3 100644 --- a/modules/home/packages.nix +++ b/modules/home/packages.nix @@ -66,6 +66,19 @@ nmap aerc + aspell + aspellDicts.de + aspellDicts.nl + aspellDicts.uk + + # Hunspell dictionaries for spell checking + hunspell + hunspellDicts.de_DE # German + hunspellDicts.en_GB-ise # UK English with -ise spellings + hunspellDicts.en_US + hunspellDicts.nl_NL # Dutch + hunspellDicts.nl_nl # Dutch (alternative) + # Install pip packages # python3 # python3Packages.pip From 7a844ee3cbabebe39d9439cfa12a4458440e6276 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Mon, 26 Jan 2026 21:03:02 +0100 Subject: [PATCH 11/17] chore: disable `eDP-1` on `sakura` when connected to monitor at main desk --- modules/home/kanshi.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/home/kanshi.nix b/modules/home/kanshi.nix index 015b7b7..f7c1f6c 100644 --- a/modules/home/kanshi.nix +++ b/modules/home/kanshi.nix @@ -86,7 +86,7 @@ } { criteria = "eDP-1"; - status = if (host == "sakura") then "enable" else "disable"; + status = if (host == "sakura") then "disable" else "disable"; position = if (host == "sakura") then "152,1440" else "300,1440"; } ]; From 299b2f1a5618fe01917e10af55e2b71b0a1fb5ca Mon Sep 17 00:00:00 2001 From: Ahwx Date: Mon, 26 Jan 2026 21:05:18 +0100 Subject: [PATCH 12/17] feat: adds `power-profiles-daemon` to `waybar`; remove tooltip for `powerdraw` module --- modules/home/waybar/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/modules/home/waybar/default.nix b/modules/home/waybar/default.nix index 193dd32..8dfb270 100644 --- a/modules/home/waybar/default.nix +++ b/modules/home/waybar/default.nix @@ -288,7 +288,8 @@ "orientation": "horizontal", "modules": [ "battery", - "custom/powerdraw" + "custom/powerdraw", + "power-profiles-daemon" ], "drawer": { "transition-left-to-right": false, @@ -318,6 +319,14 @@ "custom/powerdraw": { "interval": 60, "exec": "~/.local/bin/waybar-powerdraw", + "tooltip": false, + }, + + "power-profiles-daemon": { + "interval": 60, + "format": "{profile}", + "tooltip-format": "Power profile: {profile}\nDriver: {driver}", + "tooltip": true, }, "group/clock": { From a5223cd0c073090ab9552f138606c80ffd8526e3 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Mon, 26 Jan 2026 22:39:00 +0100 Subject: [PATCH 13/17] fix: do not import `displaylink` for now --- roles/laptop.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/laptop.nix b/roles/laptop.nix index f256e9a..f747485 100644 --- a/roles/laptop.nix +++ b/roles/laptop.nix @@ -30,7 +30,7 @@ in }; # DisplayLink - import = [ (../modules/core/displaylink.nix) ]; + # imports = [ ../modules/core/displaylink.nix ]; networking.networkmanager.enable = true; From 17f3a7f07f97a6c2782a08d6519d2dac12c42170 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Mon, 26 Jan 2026 22:39:30 +0100 Subject: [PATCH 14/17] feat: adds move `xdg` defaults --- modules/home/xdg.nix | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/modules/home/xdg.nix b/modules/home/xdg.nix index 794dc7f..3bfd17c 100644 --- a/modules/home/xdg.nix +++ b/modules/home/xdg.nix @@ -2,8 +2,40 @@ xdg.mimeApps = { enable = true; defaultApplications = { + "image/tiff" = "nsxiv.desktop"; + "image/jp2" = "nsxiv.desktop"; + "image/jxl" = "nsxiv.desktop"; + "image/jpeg" = "nsxiv.desktop"; + "image/x-canon-cr2" = "nsxiv.desktop"; + "image/x-jp2-codestream" = "nsxiv.desktop"; + "image/webp" = "nsxiv.desktop"; + "image/x-nikon-nef" = "nsxiv.desktop"; + "image/x-sony-arw" = "nsxiv.desktop"; + "image/gif" = "nsxiv.desktop"; + "image/x-fuji-raf" = "nsxiv.desktop"; + "image/heif" = "nsxiv.desktop"; + "audio/mpeg" = "mpv.desktop"; + "audio/mp3" = "mpv.desktop"; + "audio/vnd.wave" = "mpv.desktop"; + "video/mp4" = "mpv.desktop"; + "video/mkv" = "mpv.desktop"; "x-scheme-handler/sgnl" = "signal-desktop.desktop"; "x-scheme-handler/signalcaptcha" = "signal-desktop.desktop"; + "x-scheme-handler/http" = "chromium-browser.desktop"; + "x-scheme-handler/https" = "chromium-browser.desktop"; + "x-scheme-handler/about" = "chromium-browser.desktop"; + "x-scheme-handler/unknown" = "chromium-browser.desktop"; + "x-scheme-handler/mailto" = "thunderbird.desktop"; + "x-scheme-handler/chrome" = "thunderbird.desktop"; + "text/calendar" = "thunderbird.desktop"; + "application/pdf" = "org.pwmt.zathura-pdf-mupdf.desktop"; + "application/x-extension-htm" = "chromium-browser.desktop"; + "application/x-extension-html" = "chromium-browser.desktop"; + "application/x-extension-shtml" = "chromium-browser.desktop"; + "application/x-extension-xht" = "chromium-browser.desktop"; + "application/x-extension-xhtml" = "chromium-browser.desktop"; + "application/x-zerosize" = "nsxiv.desktop"; + "application/xhtml+xml" = "chromium-browser.desktop"; }; }; } From 36aa522f607e1e4f0e654855e20deb1176d79639 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Mon, 26 Jan 2026 22:40:10 +0100 Subject: [PATCH 15/17] feat: adds `htop` configuration (and thus move htop to own file) --- modules/home/htop.nix | 59 +++++++++++++++++++++++++++++++++++++++ modules/home/packages.nix | 1 - 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 modules/home/htop.nix diff --git a/modules/home/htop.nix b/modules/home/htop.nix new file mode 100644 index 0000000..f9555fd --- /dev/null +++ b/modules/home/htop.nix @@ -0,0 +1,59 @@ +{ pkgs, ... }: +{ + + programs.htop = { + enable = true; + package = pkgs.htop; + }; + + home.file.".config/htop/htoprc" = { + text = '' + fields=0 48 38 39 40 2 46 109 110 47 49 1 + hide_kernel_threads=1 + hide_userland_threads=0 + hide_running_in_container=0 + shadow_other_users=0 + show_thread_names=0 + show_program_path=1 + highlight_base_name=1 + highlight_deleted_exe=1 + shadow_distribution_path_prefix=0 + highlight_megabytes=1 + highlight_threads=1 + highlight_changes=0 + highlight_changes_delay_secs=5 + find_comm_in_cmdline=1 + strip_exe_from_cmdline=1 + show_merged_command=0 + header_margin=1 + screen_tabs=1 + detailed_cpu_time=1 + cpu_count_from_one=0 + show_cpu_usage=1 + show_cpu_frequency=1 + show_cpu_temperature=1 + degree_fahrenheit=0 + show_cached_memory=1 + update_process_names=0 + account_guest_in_cpu_meter=0 + color_scheme=6 + enable_mouse=1 + delay=15 + hide_function_bar=0 + header_layout=two_50_50 + column_meters_0=LeftCPUs2 MemorySwap PressureStallMemoryFull PressureStallIOFull DiskIO NetworkIO Uptime + column_meter_modes_0=1 1 2 2 2 2 2 + column_meters_1=RightCPUs2 CPU PressureStallCPUSome LoadAverage Tasks System Systemd Battery + column_meter_modes_1=1 1 2 2 2 2 2 2 + tree_view=0 + sort_key=46 + tree_sort_key=0 + sort_direction=-1 + tree_sort_direction=1 + tree_view_always_by_pid=0 + all_branches_collapsed=0 + screen:Main=PID USER M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU IO_READ_RATE IO_WRITE_RATE PERCENT_MEM TIME Command + ''; + }; + +} diff --git a/modules/home/packages.nix b/modules/home/packages.nix index 17f39e3..c039254 100644 --- a/modules/home/packages.nix +++ b/modules/home/packages.nix @@ -43,7 +43,6 @@ pwgen jq tmux - htop eza file fzf From 71a935e805013d812d81c6eef3420f8a52b6905a Mon Sep 17 00:00:00 2001 From: Ahwx Date: Mon, 26 Jan 2026 22:40:26 +0100 Subject: [PATCH 16/17] feat: import `htop` --- modules/home/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/home/default.nix b/modules/home/default.nix index c6bb4d7..dac5f89 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -5,6 +5,7 @@ ++ [ (import ./swaync/default.nix) ] ++ [ (import ./sway/default.nix) ] ++ [ (import ./fonts.nix) ] + ++ [ (import ./htop.nix) ] ++ [ (import ./hyprland) ] ++ [ (import ./hyprlock) ] ++ [ (import ./kitty.nix) ] From 887dc41b02c644b5bd3e4d2794308177678a7bed Mon Sep 17 00:00:00 2001 From: Ahwx Date: Mon, 26 Jan 2026 22:40:53 +0100 Subject: [PATCH 17/17] feat: switch to `vicinae`; adds various window rules --- modules/home/hyprland/config.nix | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/modules/home/hyprland/config.nix b/modules/home/hyprland/config.nix index d37d4cb..94ce71a 100644 --- a/modules/home/hyprland/config.nix +++ b/modules/home/hyprland/config.nix @@ -124,6 +124,7 @@ "nwg-dock-hyprland -l top &" "nextcloud &" "hyprland-monitor-attached dock-on-all-monitors dock-on-all-monitors &" + "vicinae server &" ]; input = { @@ -279,7 +280,8 @@ "$mainMod SHIFT, X, exec, footclient --title 'float_foot' zsh -c 'bash ~/.local/src/bw-fzf/bw-fzf.sh" # clipboard manager - "$mainMod SHIFT, V, exec, cliphist list | bemenu -l 5 --ignorecase | cliphist decode | wl-copy" + # "$mainMod SHIFT, V, exec, cliphist list | bemenu -l 5 --ignorecase | cliphist decode | wl-copy" + "$mainMod SHIFT, V, exec, vicinae vicinae://extensions/vicinae/clipboard/history" "$mainMod SHIFT, F, exec, librewolf" "$mainMod SHIFT, C, exec, chromium" @@ -398,6 +400,14 @@ # "opacity 0.5 0.5, match:class nwg-dock-hyprland" "no_blur on, match:class ungoogled-chromium" "no_blur on, match:class librewolf" + "no_screen_share on, match:class element-desktop" + "match:title ^(.*Bitwarden Password Manager.*)$, float on" + "match:title ^(Picture-in-Picture)$, float on" + "match:title ^(Picture-in-Picture)$, pin on" + # stop idle when watching videos + "match:class ^(mpv|.+exe|celluloid)$, idle_inhibit focus" + "match:class ^(chromium)$, match:title ^(.*YouTube.*)$, idle_inhibit focus" + "match:class ^(chromium)$, idle_inhibit fullscreen" # "noanim, class:^(bemenu)$" # "float, title:^(Picture-in-Picture)$" # "opacity 1.0 override 1.0 override, title:^(Picture-in-Picture)$" @@ -430,7 +440,10 @@ # "float,title:^(float_foot)$" # "nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0" ]; - + layerrule = [ + "match:class vicinae, blur on" + "match:class vicinae, ignore_alpha 0" + ]; }; extraConfig = "