From 97b5944dc1907ffa6e415cfce483ef0a84e98666 Mon Sep 17 00:00:00 2001 From: Bernardo Magri Date: Sat, 20 Jun 2026 18:27:35 +0100 Subject: [PATCH] fix(menu): force-own networkmanager-dmenu config.ini networkmanager_dmenu writes a default config on first run, so an unmanaged file can already sit at ~/.config/networkmanager-dmenu/ config.ini and abort `home-manager switch` with a clobber error. We fully generate this file, so set force = true to overwrite it. Co-Authored-By: Claude Opus 4.8 --- modules/home/rofi.nix | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/modules/home/rofi.nix b/modules/home/rofi.nix index 0aea889..0100ac3 100644 --- a/modules/home/rofi.nix +++ b/modules/home/rofi.nix @@ -421,18 +421,23 @@ in # networkmanager_dmenu drives rofi (not bare dmenu) and uses rofi's # active/urgent row styling for the connected/available networks, so it # inherits the generated theme like every other menu module. Editing a - # connection drops to nmtui in the configured terminal. - xdg.configFile."networkmanager-dmenu/config.ini".text = '' - [dmenu] - dmenu_command = rofi - rofi_highlight = True - compact = False - wifi_chars = ▂▄▆█ + # connection drops to nmtui in the configured terminal. force: the tool + # writes a default config on first run, so an unmanaged file may already + # sit at this path — we fully own it, so overwrite rather than abort. + xdg.configFile."networkmanager-dmenu/config.ini" = { + force = true; + text = '' + [dmenu] + dmenu_command = rofi + rofi_highlight = True + compact = False + wifi_chars = ▂▄▆█ - [editor] - terminal = ${cfg.terminal} - gui_if_available = False - ''; + [editor] + terminal = ${cfg.terminal} + gui_if_available = False + ''; + }; programs.rofi = { enable = true;