From 43b0973d19b27ea34a9455f423036f7d1ee64f82 Mon Sep 17 00:00:00 2001 From: fleaz Date: Tue, 19 Nov 2024 21:36:50 +0100 Subject: [PATCH] configure nm-applet and blueman via home-manager --- home-manager/default.nix | 4 ---- home-manager/modules/blueman-applet.nix | 5 +++++ home-manager/modules/nm-applet.nix | 5 +++++ modules/bluetooth.nix | 1 + modules/networkmanager.nix | 1 - 5 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 home-manager/modules/blueman-applet.nix create mode 100644 home-manager/modules/nm-applet.nix diff --git a/home-manager/default.nix b/home-manager/default.nix index bb118f9..7e398eb 100644 --- a/home-manager/default.nix +++ b/home-manager/default.nix @@ -164,9 +164,5 @@ in }; }; - - # Enable blueman-applet when the machine has bluetooth enabled - services.blueman-applet.enable = config.hardware.bluetooth.enable == true; - }; } diff --git a/home-manager/modules/blueman-applet.nix b/home-manager/modules/blueman-applet.nix new file mode 100644 index 0000000..7db1853 --- /dev/null +++ b/home-manager/modules/blueman-applet.nix @@ -0,0 +1,5 @@ +{ nixosConfig, ... }: +{ + # Enable blueman-applet when the machine has bluetooth enabled + services.blueman-applet.enable = nixosConfig.services.blueman.enable == true; +} diff --git a/home-manager/modules/nm-applet.nix b/home-manager/modules/nm-applet.nix new file mode 100644 index 0000000..03c3758 --- /dev/null +++ b/home-manager/modules/nm-applet.nix @@ -0,0 +1,5 @@ +{ nixosConfig, ... }: +{ + # Enable nm-applet when the machine has networkmanager enabled + services.network-manager-applet.enable = nixosConfig.networking.networkmanager.enable == true; +} diff --git a/modules/bluetooth.nix b/modules/bluetooth.nix index 3dac4a1..1db6b76 100644 --- a/modules/bluetooth.nix +++ b/modules/bluetooth.nix @@ -1,3 +1,4 @@ { hardware.bluetooth.enable = true; + services.blueman.enable = true; } diff --git a/modules/networkmanager.nix b/modules/networkmanager.nix index 71e0133..2ab71e2 100644 --- a/modules/networkmanager.nix +++ b/modules/networkmanager.nix @@ -1,5 +1,4 @@ { # Laptops need NetworkManger networking.networkmanager.enable = true; - programs.nm-applet.enable = true; }