dwl: module init

sh-initrd-on-root
Zynh Ludwig 2024-10-06 09:59:19 -07:00
parent e4d090e0dc
commit 976e95c1ff
2 changed files with 50 additions and 0 deletions

View File

@ -16,6 +16,12 @@
home-manager.sharedModules = [{ snowhawk.dunst.enable = lib.mkDefault true; }];
};
dwl.configuration = {
snowhawk.dwl.enable = true;
home-manager.sharedModules = [{ snowhawk.dunst.enable = lib.mkDefault true; }];
};
};
snowhawk = {

44
modules/dwl.nix Normal file
View File

@ -0,0 +1,44 @@
{ 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
];
};
}