45 lines
1.0 KiB
Nix
45 lines
1.0 KiB
Nix
|
{ lib, config, pkgs, ... }:
|
||
|
|
||
|
let
|
||
|
cfg = config.snowhawk.dwl;
|
||
|
in
|
||
|
{
|
||
|
options.snowhawk.dwl = {
|
||
|
enable = lib.mkEnableOption "dwl";
|
||
|
|
||
|
package = lib.mkPackageOption pkgs "dwl" { };
|
||
|
};
|
||
|
|
||
|
config = lib.mkIf cfg.enable {
|
||
|
services.graphical-desktop.enable = lib.mkDefault true;
|
||
|
|
||
|
services.displayManager.sessionPackages = cfg.package;
|
||
|
|
||
|
security = {
|
||
|
polkit.enable = lib.mkDefault true;
|
||
|
# Uncomment to make swaylock work
|
||
|
# pam.services.swaylock = { };
|
||
|
};
|
||
|
|
||
|
programs = {
|
||
|
dconf.enable = lib.mkDefault true;
|
||
|
xwayland.enable = lib.mkDefault true;
|
||
|
};
|
||
|
|
||
|
xdg.portal.wlr.enable = lib.mkDefault true;
|
||
|
xdg.portal.extraPortals = [
|
||
|
pkgs.xdg-desktop-portal-gtk
|
||
|
];
|
||
|
|
||
|
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1050913
|
||
|
xdg.portal.config.dwl.default = lib.mkDefault [ "wlr" "gtk" ];
|
||
|
|
||
|
services.xserver.desktopManager.runXdgAutostartIfNone = lib.mkDefault true;
|
||
|
|
||
|
environment.systemPackages = with pkgs; [
|
||
|
wl-clipboard
|
||
|
cfg.package
|
||
|
];
|
||
|
};
|
||
|
}
|