From b82eeb859593ecc9df1484af1639db0a85b0f0ff Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Wed, 3 Sep 2025 18:49:55 +0200 Subject: [PATCH] modules: Move `bluetooth`, `sound` and `wlan` modules into the `services` namespace --- hosts/desktop/default.nix | 3 +-- hosts/laptop/default.nix | 7 +++---- modules/system/{ => services}/bluetooth.nix | 4 ++-- modules/system/{ => services}/sound.nix | 4 ++-- modules/system/{wifi.nix => services/wlan.nix} | 4 ++-- 5 files changed, 10 insertions(+), 12 deletions(-) rename modules/system/{ => services}/bluetooth.nix (61%) rename modules/system/{ => services}/sound.nix (64%) rename modules/system/{wifi.nix => services/wlan.nix} (91%) diff --git a/hosts/desktop/default.nix b/hosts/desktop/default.nix index 5d97523..4c6e51f 100644 --- a/hosts/desktop/default.nix +++ b/hosts/desktop/default.nix @@ -20,11 +20,10 @@ }; de.hyprland.enable = true; - sound.enable = true; - services = { resolved.enable = true; gc.enable = true; + sound.enable = true; geoclue.enable = true; tailscale = { enable = true; diff --git a/hosts/laptop/default.nix b/hosts/laptop/default.nix index a9f271a..e01ca58 100644 --- a/hosts/laptop/default.nix +++ b/hosts/laptop/default.nix @@ -20,13 +20,12 @@ }; de.hyprland.enable = true; - wifi.enable = true; - bluetooth.enable = true; - sound.enable = true; - services = { resolved.enable = true; gc.enable = true; + wlan.enable = true; + bluetooth.enable = true; + sound.enable = true; geoclue.enable = true; tailscale = { enable = true; diff --git a/modules/system/bluetooth.nix b/modules/system/services/bluetooth.nix similarity index 61% rename from modules/system/bluetooth.nix rename to modules/system/services/bluetooth.nix index bb6ffa4..31d4f36 100644 --- a/modules/system/bluetooth.nix +++ b/modules/system/services/bluetooth.nix @@ -1,8 +1,8 @@ { config, lib, ... }: { - options.custom.bluetooth.enable = lib.mkEnableOption ""; + options.custom.services.bluetooth.enable = lib.mkEnableOption ""; - config = lib.mkIf config.custom.bluetooth.enable { + config = lib.mkIf config.custom.services.bluetooth.enable { hardware = { bluetooth = { enable = true; diff --git a/modules/system/sound.nix b/modules/system/services/sound.nix similarity index 64% rename from modules/system/sound.nix rename to modules/system/services/sound.nix index a355ecc..6763039 100644 --- a/modules/system/sound.nix +++ b/modules/system/services/sound.nix @@ -1,8 +1,8 @@ { config, lib, ... }: { - options.custom.sound.enable = lib.mkEnableOption ""; + options.custom.services.sound.enable = lib.mkEnableOption ""; - config = lib.mkIf config.custom.sound.enable { + config = lib.mkIf config.custom.services.sound.enable { security.rtkit.enable = true; services.pipewire = { enable = true; diff --git a/modules/system/wifi.nix b/modules/system/services/wlan.nix similarity index 91% rename from modules/system/wifi.nix rename to modules/system/services/wlan.nix index 6d57810..e8eb4f1 100644 --- a/modules/system/wifi.nix +++ b/modules/system/services/wlan.nix @@ -5,10 +5,10 @@ ... }: let - cfg = config.custom.wifi; + cfg = config.custom.services.wlan; in { - options.custom.wifi = { + options.custom.services.wlan = { enable = lib.mkEnableOption ""; networks = lib.mkOption { type = lib.types.listOf lib.types.nonEmptyStr;