From 068c4469b29e5361121c58d7e8dddd05666571aa Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sat, 9 Sep 2023 15:01:01 +0200 Subject: [PATCH] apply numlock to multiple users without copy paste --- my/gnome.nix | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/my/gnome.nix b/my/gnome.nix index 07c8d1a..2f505c6 100644 --- a/my/gnome.nix +++ b/my/gnome.nix @@ -5,6 +5,19 @@ ... }: let cfg = config.my.gnome; + + applyGnomeUserSettings = { + home.packages = with pkgs; [ + gnome.gpaste + amberol + ]; + + dconf.settings = { + "org/gnome/desktop/peripherals/keyboard" = { + numlock-state = true; + }; + }; + }; in { options.my.gnome = { enable = lib.mkEnableOption "gnome desktop"; @@ -41,18 +54,8 @@ in { ]; home-manager.users = { - vinzenz = lib.mkIf config.my.users.vinzenz.enable { - home.packages = with pkgs; [ - gnome.gpaste - amberol - ]; - - dconf.settings = { - "org/gnome/desktop/peripherals/keyboard" = { - numlock-state = true; - }; - }; - }; + vinzenz = lib.mkIf config.my.users.vinzenz.enable applyGnomeUserSettings; + ronja = lib.mkIf config.my.users.ronja.enable applyGnomeUserSettings; }; }; }