From 4873ae096ffa4f0827c9581705da257a8bdc06d4 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 22 Aug 2025 15:03:35 +0100 Subject: [PATCH 01/30] home: terminal: alacritty: add 'enable' --- modules/home/terminal/alacritty/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/home/terminal/alacritty/default.nix b/modules/home/terminal/alacritty/default.nix index 6b090a7..30c51cb 100644 --- a/modules/home/terminal/alacritty/default.nix +++ b/modules/home/terminal/alacritty/default.nix @@ -1,6 +1,6 @@ { config, lib, ... }: let - cfg = config.my.home.terminal; + cfg = config.my.home.terminal.alacritty; inherit (config.my.home.terminal) colors; in { @@ -8,9 +8,15 @@ in default = mkOption { type = with types; nullOr (enum [ "alacritty" ]); }; + + alacritty = { + enable = lib.mkEnableOption "alacritty" // { + default = config.my.home.terminal.default == "alacritty"; + }; + }; }; - config = lib.mkIf (cfg.default == "alacritty") { + config = lib.mkIf cfg.enable { programs.alacritty = { enable = true; From 571f794cedb8b1923c01b6047eec0f6ac30e0d8a Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 22 Aug 2025 15:03:49 +0100 Subject: [PATCH 02/30] home: terminal: termite: add 'enable' --- modules/home/terminal/termite/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/home/terminal/termite/default.nix b/modules/home/terminal/termite/default.nix index da3ee86..8835dc5 100644 --- a/modules/home/terminal/termite/default.nix +++ b/modules/home/terminal/termite/default.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: let - cfg = config.my.home.terminal; + cfg = config.my.home.terminal.termite; inherit (config.my.home.terminal) colors; in { @@ -8,9 +8,15 @@ in default = mkOption { type = with types; nullOr (enum [ "termite" ]); }; + + termite = with lib; { + enable = lib.mkEnableOption "termite" // { + default = config.my.home.terminal.default == "termite"; + }; + }; }; - config = lib.mkIf (cfg.default == "termite") { + config = lib.mkIf cfg.enable { programs.termite = { enable = true; From 8d55daebbcbce9abe3cdf428795df80b8af34753 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 19 Mar 2026 19:59:23 +0000 Subject: [PATCH 03/30] home: firefox: tridactyl: refactor vim command Thus far, I've only encountered `termite` having a broken implementation of `--exec`... --- modules/home/firefox/tridactyl/default.nix | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/modules/home/firefox/tridactyl/default.nix b/modules/home/firefox/tridactyl/default.nix index cd377e5..11e5c80 100644 --- a/modules/home/firefox/tridactyl/default.nix +++ b/modules/home/firefox/tridactyl/default.nix @@ -4,11 +4,19 @@ let term = config.my.home.terminal.default; - vimCommandLine = { - alacritty = ''-e "vim" "%f" "+normal!%lGzv%c|"''; - # Termite wants the whole command in a single argument... - termite = ''-e "vim %f '+normal!%lGzv%c|'"''; - }; + vimCommandLine = + let + # Termite wants the whole command in a single argument... + brokenExecCommand = { + termite = true; + }; + # Assume most other terminals are sane and not broken... + isBroken = brokenExecCommand.${term} or false; + in + if isBroken then + ''-e "vim %f '+normal!%lGzv%c|'"'' + else + ''-e "vim" "%f" "+normal!%lGzv%c|"''; in { config = lib.mkIf cfg.enable { @@ -19,7 +27,7 @@ in # Make it easy to pick out with a window class name "--class tridactyl_editor" # Open vim with the cursor in the correct position - vimCommandLine.${term} + vimCommandLine ]; }; }; From 501645aae158c9d2f2bc04c7cb9c6609f4415d8b Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 19 Mar 2026 20:01:20 +0000 Subject: [PATCH 04/30] home: firefox: tridactyl: refactor editor float Ghostty *needs* a specific format for its `--class`, but not for its `--title`. --- modules/home/firefox/tridactyl/default.nix | 2 +- modules/home/wm/i3/default.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/home/firefox/tridactyl/default.nix b/modules/home/firefox/tridactyl/default.nix index 11e5c80..6fcf8ce 100644 --- a/modules/home/firefox/tridactyl/default.nix +++ b/modules/home/firefox/tridactyl/default.nix @@ -25,7 +25,7 @@ in # Use my configured terminal term # Make it easy to pick out with a window class name - "--class tridactyl_editor" + "--title=tridactyl_editor" # Open vim with the cursor in the correct position vimCommandLine ]; diff --git a/modules/home/wm/i3/default.nix b/modules/home/wm/i3/default.nix index 564aead..f2dd051 100644 --- a/modules/home/wm/i3/default.nix +++ b/modules/home/wm/i3/default.nix @@ -123,7 +123,7 @@ in inherit modifier; criteria = [ - { class = "^tridactyl_editor$"; } + { title = "^tridactyl_editor$"; } { class = "^Blueman-.*$"; } { title = "^htop$"; } { class = "^Thunderbird$"; instance = "Mailnews"; window_role = "filterlist"; } From aa4ef9b0a17201314c805922005dc2d2c7b5257a Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 2 Jan 2026 16:02:19 +0000 Subject: [PATCH 05/30] nixos: profiles: x: remove wallpaper I don't actually care much for the wallpaper, I never look at it. --- modules/nixos/profiles/x/default.nix | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/modules/nixos/profiles/x/default.nix b/modules/nixos/profiles/x/default.nix index 874f36f..2f6b8d5 100644 --- a/modules/nixos/profiles/x/default.nix +++ b/modules/nixos/profiles/x/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ config, lib, ... }: let cfg = config.my.profiles.x; in @@ -10,12 +10,6 @@ in config = lib.mkIf cfg.enable { # Enable the X11 windowing system. services.xserver.enable = true; - # Nice wallpaper - services.xserver.displayManager.lightdm.background = - let - wallpapers = "${pkgs.kdePackages.plasma-workspace-wallpapers}/share/wallpapers"; - in - "${wallpapers}/summer_1am/contents/images/2560x1600.jpg"; # X configuration my.home.x.enable = true; From 153a28158cc3587747f5ef927ef04b1ff4d2a197 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 19 Feb 2026 21:36:34 +0000 Subject: [PATCH 06/30] home: wm: i3: use grey background Because I sometimes do get a glimpse of the background, and would rather not have anything on it. --- modules/home/wm/i3/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/home/wm/i3/default.nix b/modules/home/wm/i3/default.nix index f2dd051..05b202c 100644 --- a/modules/home/wm/i3/default.nix +++ b/modules/home/wm/i3/default.nix @@ -387,5 +387,10 @@ in }; }; }; + + # Use a grey background + xsession.profileExtra = '' + ${lib.getExe pkgs.xsetroot} -solid '#333333' + ''; }; } From f0cc71da5f4652f0e350f9f62a7f7dd6ad3b792d Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sat, 4 Apr 2026 02:50:13 +0100 Subject: [PATCH 07/30] home: wm: fix typo --- modules/home/wm/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/home/wm/default.nix b/modules/home/wm/default.nix index ae1e136..91c032b 100644 --- a/modules/home/wm/default.nix +++ b/modules/home/wm/default.nix @@ -27,7 +27,7 @@ in }; cursor = { - enable = mkRelatedOption "dunst configuration" [ "i3" ]; + enable = mkRelatedOption "cursor configuration" [ "i3" ]; }; dunst = { From 9394de1f31b562fca797639ddb9270509c97458a Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sat, 4 Apr 2026 02:50:56 +0100 Subject: [PATCH 08/30] home: wm: make 'windowManager' extensible --- modules/home/wm/default.nix | 2 +- modules/home/wm/i3/default.nix | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/home/wm/default.nix b/modules/home/wm/default.nix index 91c032b..58855f4 100644 --- a/modules/home/wm/default.nix +++ b/modules/home/wm/default.nix @@ -20,7 +20,7 @@ in options.my.home.wm = with lib; { windowManager = mkOption { - type = with types; nullOr (enum [ "i3" ]); + type = with types; nullOr (enum [ ]); default = null; example = "i3"; description = "Which window manager to use for home session"; diff --git a/modules/home/wm/i3/default.nix b/modules/home/wm/i3/default.nix index 05b202c..1943071 100644 --- a/modules/home/wm/i3/default.nix +++ b/modules/home/wm/i3/default.nix @@ -56,6 +56,12 @@ let ''; in { + options.my.home.wm = with lib; { + windowManager = mkOption { + type = with types; nullOr (enum [ "i3" ]); + }; + }; + config = lib.mkIf isEnabled { home.packages = with pkgs; [ ambroisie.dragger # drag-and-drop from the CLI From ca6d14648e72c73fdb61aea06e06ce02368c7527 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sat, 4 Apr 2026 16:02:10 +0100 Subject: [PATCH 09/30] home: wm: screen-lock: remove 'cornerLock' I never use it... --- modules/home/wm/default.nix | 18 +---------------- modules/home/wm/screen-lock/default.nix | 26 +------------------------ 2 files changed, 2 insertions(+), 42 deletions(-) diff --git a/modules/home/wm/default.nix b/modules/home/wm/default.nix index 58855f4..fa0646d 100644 --- a/modules/home/wm/default.nix +++ b/modules/home/wm/default.nix @@ -77,20 +77,6 @@ in description = "Locker command to run"; }; - cornerLock = { - enable = my.mkDisableOption '' - Move mouse to upper-left corner to lock instantly, lower-right corner to - disable auto-lock. - ''; - - delay = mkOption { - type = types.int; - default = 5; - example = 15; - description = "How many seconds before locking this way"; - }; - }; - notify = { enable = my.mkDisableOption "Notify when about to lock the screen"; @@ -100,14 +86,12 @@ in example = 15; description = '' How many seconds in advance should there be a notification. - This value must be at lesser than or equal to `cornerLock.delay` - when both options are enabled. ''; }; }; timeout = mkOption { - type = types.ints.between 1 60; + type = types.int; default = 15; example = 1; description = "Inactive time interval to lock the screen automatically"; diff --git a/modules/home/wm/screen-lock/default.nix b/modules/home/wm/screen-lock/default.nix index 5e6874e..ac6851c 100644 --- a/modules/home/wm/screen-lock/default.nix +++ b/modules/home/wm/screen-lock/default.nix @@ -12,22 +12,6 @@ let in { config = lib.mkIf cfg.enable { - assertions = [ - { - assertion = - let - inherit (cfg) cornerLock notify; - bothEnabled = cornerLock.enable && notify.enable; - cornerLockHigherThanNotify = cornerLock.delay >= notify.delay; - in - bothEnabled -> cornerLockHigherThanNotify; - message = '' - `config.my.home.wm.notify.delay` cannot have a value higher than - `config.my.home.wm.cornerLock.delay`. - ''; - } - ]; - services.screen-locker = { enable = true; @@ -36,15 +20,7 @@ in lockCmd = cfg.command; xautolock = { - extraOptions = lib.optionals cfg.cornerLock.enable [ - # Mouse corners: instant lock on upper-left, never lock on lower-right - "-cornerdelay" - "${toString cfg.cornerLock.delay}" - "-cornerredelay" - "${toString cfg.cornerLock.delay}" - "-corners" - "+00-" - ] ++ lib.optionals cfg.notify.enable [ + extraOptions = lib.optionals cfg.notify.enable [ "-notify" "${toString cfg.notify.delay}" "-notifier" From 86c3333e0bd30a55657b2f57d6a762f235061caf Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sat, 4 Apr 2026 16:09:33 +0100 Subject: [PATCH 10/30] home: wm: screen-lock: use 'writeShellApplication' More robust implementation of the notifier. --- modules/home/wm/screen-lock/default.nix | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/modules/home/wm/screen-lock/default.nix b/modules/home/wm/screen-lock/default.nix index ac6851c..208e529 100644 --- a/modules/home/wm/screen-lock/default.nix +++ b/modules/home/wm/screen-lock/default.nix @@ -2,13 +2,19 @@ let cfg = config.my.home.wm.screen-lock; - notificationCmd = - let - duration = toString (cfg.notify.delay * 1000); - notifyCmd = "${lib.getExe pkgs.libnotify} -u critical -t ${duration}"; - in - # Needs to be surrounded by quotes for systemd to launch it correctly - ''"${notifyCmd} -- 'Locking in ${toString cfg.notify.delay} seconds'"''; + lockNotifier = pkgs.writeShellApplication { + name = "lock-notifier"; + runtimeInputs = [ + pkgs.libnotify + ]; + text = '' + duration=${toString cfg.notify.delay} + notify-send \ + -u critical \ + -t "$((duration * 1000))" -- \ + "Locking in $duration seconds" + ''; + }; in { config = lib.mkIf cfg.enable { @@ -24,7 +30,7 @@ in "-notify" "${toString cfg.notify.delay}" "-notifier" - notificationCmd + (lib.getExe lockNotifier) ]; }; }; From 0b20f86897199494630daaeedc630736a4a772a0 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sat, 4 Apr 2026 16:18:54 +0100 Subject: [PATCH 11/30] home: wm: fix documentation --- modules/home/wm/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/home/wm/default.nix b/modules/home/wm/default.nix index fa0646d..00ac5f7 100644 --- a/modules/home/wm/default.nix +++ b/modules/home/wm/default.nix @@ -68,7 +68,7 @@ in }; screen-lock = { - enable = mkRelatedOption "automatic X screen locker" [ "i3" ]; + enable = mkRelatedOption "automatic screen locker" [ "i3" ]; command = mkOption { type = types.str; From c38eb022329868ffd398f60c31cb03b0921e0689 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sat, 4 Apr 2026 16:18:54 +0100 Subject: [PATCH 12/30] home: wm: use 'i3lock' with 'i3' Rather than use it as the default, set it in the `i3` module. --- modules/home/wm/default.nix | 3 +-- modules/home/wm/i3/default.nix | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/home/wm/default.nix b/modules/home/wm/default.nix index 00ac5f7..b5a2a80 100644 --- a/modules/home/wm/default.nix +++ b/modules/home/wm/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ config, lib, ... }: let mkRelatedOption = description: relatedWMs: let @@ -72,7 +72,6 @@ in command = mkOption { type = types.str; - default = "${lib.getExe pkgs.i3lock} -n -c 000000"; example = "\${lib.getExe pkgs.i3lock} -n -i lock.png"; description = "Locker command to run"; }; diff --git a/modules/home/wm/i3/default.nix b/modules/home/wm/i3/default.nix index 1943071..4e5b03f 100644 --- a/modules/home/wm/i3/default.nix +++ b/modules/home/wm/i3/default.nix @@ -71,6 +71,9 @@ in xdotool # Used by 'rofi-rbw', in a mapping ]; + # Set `i3lock` as the (default) lock command + my.home.wm.screen-lock.command = lib.mkDefault "${lib.getExe pkgs.i3lock} -n -c 000000"; + xsession.windowManager.i3 = { enable = true; From 3ce9a648a8f60e4548faffad403bafa521beba2b Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sat, 4 Apr 2026 16:25:34 +0100 Subject: [PATCH 13/30] home: wm: clarify documentation --- modules/home/wm/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/home/wm/default.nix b/modules/home/wm/default.nix index b5a2a80..86ae969 100644 --- a/modules/home/wm/default.nix +++ b/modules/home/wm/default.nix @@ -93,7 +93,7 @@ in type = types.int; default = 15; example = 1; - description = "Inactive time interval to lock the screen automatically"; + description = "Inactive time interval (in minutes) to lock the screen automatically"; }; }; }; From 7cd11808c8251b909e541bf61a01a5e3f5ee0f41 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sat, 4 Apr 2026 18:19:46 +0100 Subject: [PATCH 14/30] home: wm: i3: fix 'toggle-xautolock' Because of DPMS, I would still get a screen-lock after a 10-minute timeout. I think the `xset s {on,off}` part is not _strictly_ necessary, but a little bit of cargo-culting never hurt anybody. According to the `xss-lock` man page `xset s on` use hard-coded values, not my preferred timeouts. Given that I rely on `xautolock` anyway, I don't care about the timeouts and set them to `0`. --- modules/home/wm/i3/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/home/wm/i3/default.nix b/modules/home/wm/i3/default.nix index 4e5b03f..9826e68 100644 --- a/modules/home/wm/i3/default.nix +++ b/modules/home/wm/i3/default.nix @@ -47,10 +47,14 @@ let if ${systemctlUser} is-active xautolock-session.service; then ${systemctlUser} stop --user xautolock-session.service xset s off + xset s 0 0 + xset -dpms ${notify} "Disabled Xautolock" else ${systemctlUser} start xautolock-session.service xset s on + xset s 0 0 + xset +dpms ${notify} "Enabled Xautolock" fi ''; From b030f710bde216da1bf3007b4a3b553b337faa66 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sat, 4 Apr 2026 22:00:06 +0100 Subject: [PATCH 15/30] home: vim: tree-sitter: use explicit buffer option --- modules/home/vim/plugin/settings/tree-sitter.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/home/vim/plugin/settings/tree-sitter.lua b/modules/home/vim/plugin/settings/tree-sitter.lua index 2958c2a..0009d48 100644 --- a/modules/home/vim/plugin/settings/tree-sitter.lua +++ b/modules/home/vim/plugin/settings/tree-sitter.lua @@ -76,7 +76,7 @@ local function treesitter_try_attach(buf, language) -- Syntax highlighting vim.treesitter.start(buf, language) -- Indentation - vim.bo.indentexpr = "v:lua.require('nvim-treesitter').indentexpr()" + vim.bo[buf].indentexpr = "v:lua.require('nvim-treesitter').indentexpr()" return true end From 4d9bab8daf0a5fa6d882a65b45c5ff55b00bd216 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 22 Aug 2025 15:03:35 +0100 Subject: [PATCH 16/30] home: terminal: alacritty: add 'enable' --- modules/home/terminal/alacritty/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/home/terminal/alacritty/default.nix b/modules/home/terminal/alacritty/default.nix index 6b090a7..29e00eb 100644 --- a/modules/home/terminal/alacritty/default.nix +++ b/modules/home/terminal/alacritty/default.nix @@ -1,6 +1,6 @@ { config, lib, ... }: let - cfg = config.my.home.terminal; + cfg = config.my.home.terminal.alacritty; inherit (config.my.home.terminal) colors; in { @@ -8,9 +8,15 @@ in default = mkOption { type = with types; nullOr (enum [ "alacritty" ]); }; + + alacritty = { + enable = mkEnableOption "alacritty" // { + default = config.my.home.terminal.default == "alacritty"; + }; + }; }; - config = lib.mkIf (cfg.default == "alacritty") { + config = lib.mkIf cfg.enable { programs.alacritty = { enable = true; From 6a7037f2a68d305801c882803485771ce55cf50a Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 22 Aug 2025 15:03:49 +0100 Subject: [PATCH 17/30] home: terminal: termite: add 'enable' --- modules/home/terminal/termite/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/home/terminal/termite/default.nix b/modules/home/terminal/termite/default.nix index da3ee86..1784ff2 100644 --- a/modules/home/terminal/termite/default.nix +++ b/modules/home/terminal/termite/default.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: let - cfg = config.my.home.terminal; + cfg = config.my.home.terminal.termite; inherit (config.my.home.terminal) colors; in { @@ -8,9 +8,15 @@ in default = mkOption { type = with types; nullOr (enum [ "termite" ]); }; + + termite = { + enable = mkEnableOption "termite" // { + default = config.my.home.terminal.default == "termite"; + }; + }; }; - config = lib.mkIf (cfg.default == "termite") { + config = lib.mkIf cfg.enable { programs.termite = { enable = true; From 70f651c5fabd9cf02320bd01dfc5c04ddd7cd1ac Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 19 Mar 2026 19:59:23 +0000 Subject: [PATCH 18/30] home: firefox: tridactyl: refactor vim command Thus far, I've only encountered `termite` having a broken implementation of `--exec`... --- modules/home/firefox/tridactyl/default.nix | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/modules/home/firefox/tridactyl/default.nix b/modules/home/firefox/tridactyl/default.nix index cd377e5..11e5c80 100644 --- a/modules/home/firefox/tridactyl/default.nix +++ b/modules/home/firefox/tridactyl/default.nix @@ -4,11 +4,19 @@ let term = config.my.home.terminal.default; - vimCommandLine = { - alacritty = ''-e "vim" "%f" "+normal!%lGzv%c|"''; - # Termite wants the whole command in a single argument... - termite = ''-e "vim %f '+normal!%lGzv%c|'"''; - }; + vimCommandLine = + let + # Termite wants the whole command in a single argument... + brokenExecCommand = { + termite = true; + }; + # Assume most other terminals are sane and not broken... + isBroken = brokenExecCommand.${term} or false; + in + if isBroken then + ''-e "vim %f '+normal!%lGzv%c|'"'' + else + ''-e "vim" "%f" "+normal!%lGzv%c|"''; in { config = lib.mkIf cfg.enable { @@ -19,7 +27,7 @@ in # Make it easy to pick out with a window class name "--class tridactyl_editor" # Open vim with the cursor in the correct position - vimCommandLine.${term} + vimCommandLine ]; }; }; From 8e0ea3593c71bcf0c239b4e5742761b7cfa016bc Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 19 Mar 2026 20:01:20 +0000 Subject: [PATCH 19/30] home: firefox: tridactyl: refactor editor float Ghostty *needs* a specific format for its `--class`, but not for its `--title`. --- modules/home/firefox/tridactyl/default.nix | 2 +- modules/home/wm/i3/default.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/home/firefox/tridactyl/default.nix b/modules/home/firefox/tridactyl/default.nix index 11e5c80..6fcf8ce 100644 --- a/modules/home/firefox/tridactyl/default.nix +++ b/modules/home/firefox/tridactyl/default.nix @@ -25,7 +25,7 @@ in # Use my configured terminal term # Make it easy to pick out with a window class name - "--class tridactyl_editor" + "--title=tridactyl_editor" # Open vim with the cursor in the correct position vimCommandLine ]; diff --git a/modules/home/wm/i3/default.nix b/modules/home/wm/i3/default.nix index 564aead..f2dd051 100644 --- a/modules/home/wm/i3/default.nix +++ b/modules/home/wm/i3/default.nix @@ -123,7 +123,7 @@ in inherit modifier; criteria = [ - { class = "^tridactyl_editor$"; } + { title = "^tridactyl_editor$"; } { class = "^Blueman-.*$"; } { title = "^htop$"; } { class = "^Thunderbird$"; instance = "Mailnews"; window_role = "filterlist"; } From c2f07a65292c34ea38ed99d43ce1a3afe5665d20 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 2 Jan 2026 16:02:19 +0000 Subject: [PATCH 20/30] nixos: profiles: x: remove wallpaper I don't actually care much for the wallpaper, I never look at it. --- modules/nixos/profiles/x/default.nix | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/modules/nixos/profiles/x/default.nix b/modules/nixos/profiles/x/default.nix index 874f36f..2f6b8d5 100644 --- a/modules/nixos/profiles/x/default.nix +++ b/modules/nixos/profiles/x/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ config, lib, ... }: let cfg = config.my.profiles.x; in @@ -10,12 +10,6 @@ in config = lib.mkIf cfg.enable { # Enable the X11 windowing system. services.xserver.enable = true; - # Nice wallpaper - services.xserver.displayManager.lightdm.background = - let - wallpapers = "${pkgs.kdePackages.plasma-workspace-wallpapers}/share/wallpapers"; - in - "${wallpapers}/summer_1am/contents/images/2560x1600.jpg"; # X configuration my.home.x.enable = true; From 457d4841ea9c0990ac4bd943c9b3f0b470b3f614 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 19 Feb 2026 21:36:34 +0000 Subject: [PATCH 21/30] home: wm: i3: use grey background Because I sometimes do get a glimpse of the background, and would rather not have anything on it. --- modules/home/wm/i3/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/home/wm/i3/default.nix b/modules/home/wm/i3/default.nix index f2dd051..05b202c 100644 --- a/modules/home/wm/i3/default.nix +++ b/modules/home/wm/i3/default.nix @@ -387,5 +387,10 @@ in }; }; }; + + # Use a grey background + xsession.profileExtra = '' + ${lib.getExe pkgs.xsetroot} -solid '#333333' + ''; }; } From 4086e94d3cd1337f0b1609a0609b74a614fc9743 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sat, 4 Apr 2026 02:50:13 +0100 Subject: [PATCH 22/30] home: wm: fix typo --- modules/home/wm/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/home/wm/default.nix b/modules/home/wm/default.nix index ae1e136..91c032b 100644 --- a/modules/home/wm/default.nix +++ b/modules/home/wm/default.nix @@ -27,7 +27,7 @@ in }; cursor = { - enable = mkRelatedOption "dunst configuration" [ "i3" ]; + enable = mkRelatedOption "cursor configuration" [ "i3" ]; }; dunst = { From 5381aa79deec555ca40728b753ae294e98d44aea Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sat, 4 Apr 2026 02:50:56 +0100 Subject: [PATCH 23/30] home: wm: make 'windowManager' extensible --- modules/home/wm/default.nix | 2 +- modules/home/wm/i3/default.nix | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/home/wm/default.nix b/modules/home/wm/default.nix index 91c032b..58855f4 100644 --- a/modules/home/wm/default.nix +++ b/modules/home/wm/default.nix @@ -20,7 +20,7 @@ in options.my.home.wm = with lib; { windowManager = mkOption { - type = with types; nullOr (enum [ "i3" ]); + type = with types; nullOr (enum [ ]); default = null; example = "i3"; description = "Which window manager to use for home session"; diff --git a/modules/home/wm/i3/default.nix b/modules/home/wm/i3/default.nix index 05b202c..1943071 100644 --- a/modules/home/wm/i3/default.nix +++ b/modules/home/wm/i3/default.nix @@ -56,6 +56,12 @@ let ''; in { + options.my.home.wm = with lib; { + windowManager = mkOption { + type = with types; nullOr (enum [ "i3" ]); + }; + }; + config = lib.mkIf isEnabled { home.packages = with pkgs; [ ambroisie.dragger # drag-and-drop from the CLI From 8233f8e3d95d2f2cd1a138f3338890989dabf65b Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sat, 4 Apr 2026 16:02:10 +0100 Subject: [PATCH 24/30] home: wm: screen-lock: remove 'cornerLock' I never use it... --- modules/home/wm/default.nix | 18 +---------------- modules/home/wm/screen-lock/default.nix | 26 +------------------------ 2 files changed, 2 insertions(+), 42 deletions(-) diff --git a/modules/home/wm/default.nix b/modules/home/wm/default.nix index 58855f4..fa0646d 100644 --- a/modules/home/wm/default.nix +++ b/modules/home/wm/default.nix @@ -77,20 +77,6 @@ in description = "Locker command to run"; }; - cornerLock = { - enable = my.mkDisableOption '' - Move mouse to upper-left corner to lock instantly, lower-right corner to - disable auto-lock. - ''; - - delay = mkOption { - type = types.int; - default = 5; - example = 15; - description = "How many seconds before locking this way"; - }; - }; - notify = { enable = my.mkDisableOption "Notify when about to lock the screen"; @@ -100,14 +86,12 @@ in example = 15; description = '' How many seconds in advance should there be a notification. - This value must be at lesser than or equal to `cornerLock.delay` - when both options are enabled. ''; }; }; timeout = mkOption { - type = types.ints.between 1 60; + type = types.int; default = 15; example = 1; description = "Inactive time interval to lock the screen automatically"; diff --git a/modules/home/wm/screen-lock/default.nix b/modules/home/wm/screen-lock/default.nix index 5e6874e..ac6851c 100644 --- a/modules/home/wm/screen-lock/default.nix +++ b/modules/home/wm/screen-lock/default.nix @@ -12,22 +12,6 @@ let in { config = lib.mkIf cfg.enable { - assertions = [ - { - assertion = - let - inherit (cfg) cornerLock notify; - bothEnabled = cornerLock.enable && notify.enable; - cornerLockHigherThanNotify = cornerLock.delay >= notify.delay; - in - bothEnabled -> cornerLockHigherThanNotify; - message = '' - `config.my.home.wm.notify.delay` cannot have a value higher than - `config.my.home.wm.cornerLock.delay`. - ''; - } - ]; - services.screen-locker = { enable = true; @@ -36,15 +20,7 @@ in lockCmd = cfg.command; xautolock = { - extraOptions = lib.optionals cfg.cornerLock.enable [ - # Mouse corners: instant lock on upper-left, never lock on lower-right - "-cornerdelay" - "${toString cfg.cornerLock.delay}" - "-cornerredelay" - "${toString cfg.cornerLock.delay}" - "-corners" - "+00-" - ] ++ lib.optionals cfg.notify.enable [ + extraOptions = lib.optionals cfg.notify.enable [ "-notify" "${toString cfg.notify.delay}" "-notifier" From ba6d0ee9183469bb0b9c9d90bd46e1c5b7ee8614 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sat, 4 Apr 2026 16:09:33 +0100 Subject: [PATCH 25/30] home: wm: screen-lock: use 'writeShellApplication' More robust implementation of the notifier. --- modules/home/wm/screen-lock/default.nix | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/modules/home/wm/screen-lock/default.nix b/modules/home/wm/screen-lock/default.nix index ac6851c..208e529 100644 --- a/modules/home/wm/screen-lock/default.nix +++ b/modules/home/wm/screen-lock/default.nix @@ -2,13 +2,19 @@ let cfg = config.my.home.wm.screen-lock; - notificationCmd = - let - duration = toString (cfg.notify.delay * 1000); - notifyCmd = "${lib.getExe pkgs.libnotify} -u critical -t ${duration}"; - in - # Needs to be surrounded by quotes for systemd to launch it correctly - ''"${notifyCmd} -- 'Locking in ${toString cfg.notify.delay} seconds'"''; + lockNotifier = pkgs.writeShellApplication { + name = "lock-notifier"; + runtimeInputs = [ + pkgs.libnotify + ]; + text = '' + duration=${toString cfg.notify.delay} + notify-send \ + -u critical \ + -t "$((duration * 1000))" -- \ + "Locking in $duration seconds" + ''; + }; in { config = lib.mkIf cfg.enable { @@ -24,7 +30,7 @@ in "-notify" "${toString cfg.notify.delay}" "-notifier" - notificationCmd + (lib.getExe lockNotifier) ]; }; }; From f02465091c7bafd4341f646516699609f1f6fc63 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sat, 4 Apr 2026 16:18:54 +0100 Subject: [PATCH 26/30] home: wm: fix documentation --- modules/home/wm/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/home/wm/default.nix b/modules/home/wm/default.nix index fa0646d..00ac5f7 100644 --- a/modules/home/wm/default.nix +++ b/modules/home/wm/default.nix @@ -68,7 +68,7 @@ in }; screen-lock = { - enable = mkRelatedOption "automatic X screen locker" [ "i3" ]; + enable = mkRelatedOption "automatic screen locker" [ "i3" ]; command = mkOption { type = types.str; From 537e16501b72507ba61adb1f94c2577f5fea3e34 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sat, 4 Apr 2026 16:18:54 +0100 Subject: [PATCH 27/30] home: wm: use 'i3lock' with 'i3' Rather than use it as the default, set it in the `i3` module. --- modules/home/wm/default.nix | 3 +-- modules/home/wm/i3/default.nix | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/home/wm/default.nix b/modules/home/wm/default.nix index 00ac5f7..b5a2a80 100644 --- a/modules/home/wm/default.nix +++ b/modules/home/wm/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ config, lib, ... }: let mkRelatedOption = description: relatedWMs: let @@ -72,7 +72,6 @@ in command = mkOption { type = types.str; - default = "${lib.getExe pkgs.i3lock} -n -c 000000"; example = "\${lib.getExe pkgs.i3lock} -n -i lock.png"; description = "Locker command to run"; }; diff --git a/modules/home/wm/i3/default.nix b/modules/home/wm/i3/default.nix index 1943071..4e5b03f 100644 --- a/modules/home/wm/i3/default.nix +++ b/modules/home/wm/i3/default.nix @@ -71,6 +71,9 @@ in xdotool # Used by 'rofi-rbw', in a mapping ]; + # Set `i3lock` as the (default) lock command + my.home.wm.screen-lock.command = lib.mkDefault "${lib.getExe pkgs.i3lock} -n -c 000000"; + xsession.windowManager.i3 = { enable = true; From 452a1e96454cb5115fd47d6c61b4eea719c81062 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sat, 4 Apr 2026 16:25:34 +0100 Subject: [PATCH 28/30] home: wm: clarify documentation --- modules/home/wm/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/home/wm/default.nix b/modules/home/wm/default.nix index b5a2a80..86ae969 100644 --- a/modules/home/wm/default.nix +++ b/modules/home/wm/default.nix @@ -93,7 +93,7 @@ in type = types.int; default = 15; example = 1; - description = "Inactive time interval to lock the screen automatically"; + description = "Inactive time interval (in minutes) to lock the screen automatically"; }; }; }; From a371ab94069f827c811eb9e486a5feab923789d7 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sat, 4 Apr 2026 18:19:46 +0100 Subject: [PATCH 29/30] home: wm: i3: fix 'toggle-xautolock' Because of DPMS, I would still get a screen-lock after a 10-minute timeout. I think the `xset s {on,off}` part is not _strictly_ necessary, but a little bit of cargo-culting never hurt anybody. According to the `xss-lock` man page `xset s on` use hard-coded values, not my preferred timeouts. Given that I rely on `xautolock` anyway, I don't care about the timeouts and set them to `0`. --- modules/home/wm/i3/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/home/wm/i3/default.nix b/modules/home/wm/i3/default.nix index 4e5b03f..9826e68 100644 --- a/modules/home/wm/i3/default.nix +++ b/modules/home/wm/i3/default.nix @@ -47,10 +47,14 @@ let if ${systemctlUser} is-active xautolock-session.service; then ${systemctlUser} stop --user xautolock-session.service xset s off + xset s 0 0 + xset -dpms ${notify} "Disabled Xautolock" else ${systemctlUser} start xautolock-session.service xset s on + xset s 0 0 + xset +dpms ${notify} "Enabled Xautolock" fi ''; From 2c88edc5110c57a957f1082cc85d3c924496aab2 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sat, 4 Apr 2026 22:00:06 +0100 Subject: [PATCH 30/30] home: vim: tree-sitter: use explicit buffer option --- modules/home/vim/plugin/settings/tree-sitter.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/home/vim/plugin/settings/tree-sitter.lua b/modules/home/vim/plugin/settings/tree-sitter.lua index 2958c2a..0009d48 100644 --- a/modules/home/vim/plugin/settings/tree-sitter.lua +++ b/modules/home/vim/plugin/settings/tree-sitter.lua @@ -76,7 +76,7 @@ local function treesitter_try_attach(buf, language) -- Syntax highlighting vim.treesitter.start(buf, language) -- Indentation - vim.bo.indentexpr = "v:lua.require('nvim-treesitter').indentexpr()" + vim.bo[buf].indentexpr = "v:lua.require('nvim-treesitter').indentexpr()" return true end