diff options
Diffstat (limited to 'nixos/features/services/hardware')
| -rw-r--r-- | nixos/features/services/hardware/bluetooth.nix | 23 | ||||
| -rw-r--r-- | nixos/features/services/hardware/iwd.nix | 19 | ||||
| -rw-r--r-- | nixos/features/services/hardware/networkmanager.nix | 11 | ||||
| -rw-r--r-- | nixos/features/services/hardware/pipewire.nix | 15 |
4 files changed, 68 insertions, 0 deletions
diff --git a/nixos/features/services/hardware/bluetooth.nix b/nixos/features/services/hardware/bluetooth.nix new file mode 100644 index 0000000..a9829ac --- /dev/null +++ b/nixos/features/services/hardware/bluetooth.nix @@ -0,0 +1,23 @@ +{ config, pkgs, lib, ... }: let + cfg = config.features.services.hardware.bluetooth; +in { + options.features.services.hardware.bluetooth.enable = lib.mkEnableOption "bluetooth"; + config = lib.mkIf cfg.enable { + environment.systemPackages = [ pkgs.bluetui ]; + services.blueman = { + enable = true; + }; + hardware.bluetooth = { + enable = true; + powerOnBoot = true; + }; + services.pulseaudio = { + package = pkgs.pulseaudioFull; + }; + hardware.bluetooth.settings = { + General = { + Enable = "Source,Sink,Media,Socket"; + }; + }; + }; +} diff --git a/nixos/features/services/hardware/iwd.nix b/nixos/features/services/hardware/iwd.nix new file mode 100644 index 0000000..c2394bc --- /dev/null +++ b/nixos/features/services/hardware/iwd.nix @@ -0,0 +1,19 @@ +{ config, pkgs, lib, ... }: let + cfg = config.features.services.hardware.iwd; +in { + options.features.services.hardware.iwd.enable = lib.mkEnableOption "iwd"; + config = lib.mkIf cfg.enable { + environment.systemPackages = [ pkgs.impala ]; + networking.wireless.iwd = { + enable = true; + settings = { + IPv6 = { + Enabled = true; + }; + Settings = { + AutoConnect = true; + }; + }; + }; + }; +} diff --git a/nixos/features/services/hardware/networkmanager.nix b/nixos/features/services/hardware/networkmanager.nix new file mode 100644 index 0000000..49cc7bc --- /dev/null +++ b/nixos/features/services/hardware/networkmanager.nix @@ -0,0 +1,11 @@ +{ config, lib, ... }: let + cfg = config.features.services.hardware.networkmanager; +in { + options.features.services.hardware.networkmanager.enable = lib.mkEnableOption "networkmanager"; + config = lib.mkIf cfg.enable { + networking.networkmanager = { + enable = true; + }; + systemd.services.NetworkManager-wait-online.enable = false; + }; +} diff --git a/nixos/features/services/hardware/pipewire.nix b/nixos/features/services/hardware/pipewire.nix new file mode 100644 index 0000000..f36a0e9 --- /dev/null +++ b/nixos/features/services/hardware/pipewire.nix @@ -0,0 +1,15 @@ +{ config, pkgs, lib, ... }: let + cfg = config.features.services.hardware.pipewire; +in { + options.features.services.hardware.pipewire.enable = lib.mkEnableOption "pipewire"; + config = lib.mkIf cfg.enable { + security.rtkit.enable = true; + environment.systemPackages = [ pkgs.git ]; # Fixes a weird error + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; + }; +} |
