60 lines
1.2 KiB
Nix
60 lines
1.2 KiB
Nix
# Almost everything in this file is required to get screen sharing on sway
|
|
# to work properly. The rest is required to get sway to work at all.
|
|
|
|
{ pkgs, config, lib, ... }:
|
|
|
|
let cfg = config.custom.gui;
|
|
in {
|
|
|
|
options.custom.gui = {
|
|
enable = lib.mkEnableOption "Nix-managed GUI services";
|
|
};
|
|
|
|
config = lib.mkIf (cfg.enable) {
|
|
hardware.opengl.enable = true;
|
|
|
|
security.rtkit.enable = true;
|
|
|
|
security.pam.services.swaylock = {};
|
|
|
|
services.xserver = {
|
|
enable = true;
|
|
displayManager.gdm.enable = true;
|
|
};
|
|
|
|
services.pipewire = {
|
|
enable = false;
|
|
pulse.enable = true;
|
|
wireplumber.enable = true;
|
|
};
|
|
|
|
hardware.pulseaudio.enable = true;
|
|
|
|
services.dbus.enable = true;
|
|
|
|
programs.sway = {
|
|
enable = true;
|
|
extraPackages = [
|
|
pkgs.vulkan-validation-layers
|
|
pkgs.swaylock-effects
|
|
];
|
|
};
|
|
|
|
xdg.portal = {
|
|
enable = true;
|
|
wlr.enable = true;
|
|
extraPortals = [
|
|
pkgs.xdg-desktop-portal-kde
|
|
];
|
|
};
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
brightnessctl
|
|
mesa
|
|
polkit_gnome
|
|
vulkan-tools
|
|
xdg-desktop-portal-wlr
|
|
];
|
|
};
|
|
|
|
}
|