refactor modules/desktop

Signed-off-by: unexplrd <unexplrd@linerds.us>
This commit is contained in:
2025-05-23 14:34:42 +03:00
parent 56bad06595
commit 52dcc3279e
11 changed files with 137 additions and 143 deletions

View File

@ -4,8 +4,9 @@
pkgs,
lib,
...
}:
with lib; let
}: let
inherit (lib) mkEnableOption mkIf;
inherit (perSystem) hyprland;
cfg = config.desktop.hyprland;
in {
options = {
@ -13,65 +14,23 @@ in {
mkEnableOption "enable hyprland desktop";
};
config = mkIf cfg.enable {
module.desktop.displayManager = "greetd";
module.desktop.gnome-keyring.enable = true;
sound.pipewire.enable = true;
programs.hyprland = {
enable = true;
package = perSystem.hyprland.hyprland;
portalPackage = perSystem.hyprland.xdg-desktop-portal-hyprland;
};
environment.systemPackages = with pkgs; [
brightnessctl
gcr_4
];
fonts.fontDir.enable = true;
security.pam = {
services.hyprlock = {};
loginLimits = [
{
domain = "@users";
item = "rtprio";
type = "-";
value = 1;
}
];
};
services = {
gnome.gnome-keyring.enable = true;
udisks2.enable = true;
dbus = {
apparmor = "enabled";
implementation = "broker";
};
};
programs = {
dconf.enable = true;
seahorse.enable = true;
package = hyprland.hyprland;
portalPackage = hyprland.xdg-desktop-portal-hyprland;
};
security.pam.services.hyprlock = {};
xdg.portal = {
enable = true;
extraPortals = [
perSystem.hyprland.xdg-desktop-portal-hyprland
hyprland.xdg-desktop-portal-hyprland
pkgs.xdg-desktop-portal-gtk
];
config.common.default = [
"hyprland"
"gtk"
];
};
programs.regreet.enable = true;
services.greetd = {
enable = true;
vt = 6;
settings = {
default_session = {
command = "${pkgs.cage}/bin/cage -s -m last -- ${pkgs.greetd.regreet}/bin/regreet";
};
initial_session = {
user = "user";
command = "Hyprland";
};
};
config.hyprland.default = ["hyprland" "gtk"];
};
};
}