diff options
author | Franck Cuny <franck@fcuny.net> | 2022-02-09 08:13:15 -0800 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2022-02-09 08:13:15 -0800 |
commit | 3a914ba5a22d288db2b094b2de8c6982ae19c329 (patch) | |
tree | c0a466ec7b5e12120435bafced4c73df386c1ea5 /modules/desktop | |
parent | desktop: install sound and xserver only when asked (diff) | |
download | world-3a914ba5a22d288db2b094b2de8c6982ae19c329.tar.gz |
Revert "desktop: install sound and xserver only when asked"
This reverts commit 3b1ac4f78d21802073c82df39ca7080ae70a67a9.
Diffstat (limited to '')
-rw-r--r-- | modules/desktop/sound.nix | 35 | ||||
-rw-r--r-- | modules/desktop/xserver.nix | 41 |
2 files changed, 32 insertions, 44 deletions
diff --git a/modules/desktop/sound.nix b/modules/desktop/sound.nix index 11c3fc2..95c7c75 100644 --- a/modules/desktop/sound.nix +++ b/modules/desktop/sound.nix @@ -1,27 +1,20 @@ {pkgs, config, lib, ...}: -with lib; -let - xorg = (elem "xorg" config.sys.graphics.desktopProtocols); - wayland = (elem "wayland" config.sys.graphics.desktopProtocols); - desktopMode = xorg || wayland; -in { - config= mkIf desktopMode { - sound.enable = true; +{ + sound.enable = true; - environment.systemPackages = with pkgs; [ - # We install it to get access to pactl. It isn't enabled or run as a service. - pulseaudio - ]; + environment.systemPackages = with pkgs; [ + # We install it to get access to pactl. It isn't enabled or run as a service. + pulseaudio + ]; - services.pipewire = { - enable = true; - # Compatibility shims, adjust according to your needs - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - jack.enable = true; - }; - hardware.pulseaudio.enable = false; + services.pipewire = { + enable = true; + # Compatibility shims, adjust according to your needs + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + jack.enable = true; }; + hardware.pulseaudio.enable = false; } diff --git a/modules/desktop/xserver.nix b/modules/desktop/xserver.nix index d007bd8..894b39b 100644 --- a/modules/desktop/xserver.nix +++ b/modules/desktop/xserver.nix @@ -1,31 +1,26 @@ { config, pkgs, lib, ... }: -with lib; -let - xorg = (elem "xorg" config.sys.graphics.desktopProtocols); -in { - config= mkIf xorg { - services.xserver = { - enable = true; - layout = "us"; - xkbOptions = "eurosign:e"; - libinput.enable = true; +{ + services.xserver = { + enable = true; + layout = "us"; + xkbOptions = "eurosign:e"; + libinput.enable = true; - desktopManager = { - xterm.enable = false; - }; - - displayManager = { - lightdm.enable = true; - defaultSession = "none+i3"; - }; + desktopManager = { + xterm.enable = false; + }; - windowManager = { - i3.enable = true; - }; + displayManager = { + lightdm.enable = true; + defaultSession = "none+i3"; }; - services.gnome.gnome-keyring.enable = true; - services.gvfs.enable = true; + windowManager = { + i3.enable = true; + }; }; + + services.gnome.gnome-keyring.enable = true; + services.gvfs.enable = true; } |