diff --git a/home/ironbar.nix b/home/ironbar.nix index 132f8703..190ca2b7 100644 --- a/home/ironbar.nix +++ b/home/ironbar.nix @@ -1,5 +1,8 @@ -{ config, ... }: +{ config, lib, ... }: +let + inherit (lib) singleton; +in { xdg.configFile."ironbar/config.json".text = builtins.toJSON { name = "main"; @@ -23,20 +26,18 @@ } ]; - center = [ - { - type = "launcher"; - icon_size = 39; - favorites = [ - "librewolf" - "kitty" - "thunar" - "org.qutebrowser.qutebrowser" - "anki" - "Element" - ]; - } - ]; + center = singleton { + type = "launcher"; + icon_size = 39; + favorites = [ + "librewolf" + "kitty" + "thunar" + "org.qutebrowser.qutebrowser" + "anki" + "Element" + ]; + }; end = [ { diff --git a/modules/dual-function-keys.nix b/modules/dual-function-keys.nix index 51396bab..ae24df52 100644 --- a/modules/dual-function-keys.nix +++ b/modules/dual-function-keys.nix @@ -1,7 +1,7 @@ { pkgs, lib, ... }: let - inherit (lib) getExe; + inherit (lib) getExe singleton; inherit (builtins) toJSON; inherit (pkgs) interception-tools; inherit (pkgs.interception-tools-plugins) dual-function-keys; @@ -13,21 +13,19 @@ in enable = true; plugins = [ dual-function-keys ]; - udevmonConfig = toJSON [ - { - JOB = /* bash */ '' - ${interception-tools}/bin/intercept -g $DEVNODE | - ${getExe dual-function-keys} -c /etc/${configFile} | - ${interception-tools}/bin/uinput -d $DEVNODE - ''; + udevmonConfig = toJSON (singleton { + JOB = /* bash */ '' + ${interception-tools}/bin/intercept -g $DEVNODE | + ${getExe dual-function-keys} -c /etc/${configFile} | + ${interception-tools}/bin/uinput -d $DEVNODE + ''; - DEVICE = { - EVENTS = { - EV_KEY = [ "KEY_CAPSLOCK" "KEY_ESC" ]; - }; + DEVICE = { + EVENTS = { + EV_KEY = [ "KEY_CAPSLOCK" "KEY_ESC" ]; }; - } - ]; + }; + }); }; environment.etc.${configFile}.text = toJSON {