From 5d45bfd4b05de437dbdc83ef037555a4c4fcbe42 Mon Sep 17 00:00:00 2001 From: punkfairie Date: Mon, 17 Feb 2025 20:23:57 -0800 Subject: [PATCH] fix(nixos): Don't install audio/printing drivers on servers --- modules/nixos/base/drivers/default.nix | 29 ++++++++++++++++---------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/modules/nixos/base/drivers/default.nix b/modules/nixos/base/drivers/default.nix index 15056ae..e8a6cf4 100644 --- a/modules/nixos/base/drivers/default.nix +++ b/modules/nixos/base/drivers/default.nix @@ -1,17 +1,24 @@ -{pkgs, ...}: { - security.rtkit.enable = true; # Used for pulseaudio. +{ + pkgs, + config, + lib, + ... +}: { + config = lib.mkIf (!config.marleyos.isServer) { + security.rtkit.enable = true; # Used for pulseaudio. - services = { - pulseaudio.enable = false; + services = { + pulseaudio.enable = false; - pipewire = { - enable = true; - alsa.enable = true; - pulse.enable = true; + pipewire = { + enable = true; + alsa.enable = true; + pulse.enable = true; + }; + + printing.enable = true; }; - printing.enable = true; + environment.systemPackages = [pkgs.pwvucontrol]; }; - - environment.systemPackages = [pkgs.pwvucontrol]; }