2023-06-06 16:05:51 +02:00
|
|
|
# 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;
|
|
|
|
|
2023-06-14 10:42:52 +02:00
|
|
|
security.pam.services.swaylock = {};
|
2023-06-06 20:55:21 +02:00
|
|
|
|
2023-06-06 16:05:51 +02:00
|
|
|
services.xserver = {
|
|
|
|
enable = true;
|
|
|
|
displayManager.gdm.enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
services.pipewire = {
|
|
|
|
enable = true;
|
|
|
|
pulse.enable = true;
|
|
|
|
wireplumber.enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
services.dbus.enable = true;
|
|
|
|
|
|
|
|
programs.sway = {
|
|
|
|
enable = true;
|
|
|
|
extraPackages = [
|
|
|
|
pkgs.vulkan-validation-layers
|
2023-06-14 10:42:52 +02:00
|
|
|
pkgs.swaylock-effects
|
2023-06-06 16:05:51 +02:00
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
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
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|