67 lines
1.7 KiB
Nix
67 lines
1.7 KiB
Nix
{ pkgs, config, lib, ... }:
|
|
|
|
{
|
|
options.modules.hyprland = {
|
|
enable = lib.mkEnableOption "Enable Hyprland";
|
|
additionalPackages = lib.mkOption {
|
|
type = lib.types.listOf lib.types.package;
|
|
description = "Additional Hyprland-related packages to install";
|
|
default = [];
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf config.modules.hyprland.enable {
|
|
environment.systemPackages = with pkgs; [
|
|
hyprlock hypridle wl-clipboard cliphist swww
|
|
] ++ config.modules.hyprland.additionalPackages;
|
|
|
|
programs.hyprland.withUWSM = true;
|
|
programs.hyprland.enable = true;
|
|
programs.hyprland.xwayland.enable = true;
|
|
|
|
services.logind.extraConfig = ''
|
|
HandleLidSwitch=suspend
|
|
HandleLidSwitchExternalPower=ignore
|
|
HandlePowerKey=ignore
|
|
'';
|
|
|
|
xdg.portal = {
|
|
enable = true;
|
|
extraPortals = with pkgs; [
|
|
xdg-desktop-portal-gtk
|
|
];
|
|
};
|
|
|
|
security.polkit.enable = true;
|
|
systemd.user.services.authentication-agent = {
|
|
description = "GNOME Authentication Agent";
|
|
wantedBy = ["graphical-session.target"];
|
|
wants = ["graphical-session.target"];
|
|
after = ["graphical-session.target"];
|
|
serviceConfig = {
|
|
Type = "simple";
|
|
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
|
|
Restart = "on-failure";
|
|
RestartSec = 1;
|
|
TimeoutStopSec = 10;
|
|
};
|
|
};
|
|
|
|
services = {
|
|
dbus.enable = true;
|
|
gvfs.enable = true;
|
|
upower.enable = true;
|
|
power-profiles-daemon.enable = true;
|
|
};
|
|
|
|
services.xserver.displayManager = {
|
|
gdm.enable = true;
|
|
startx.enable = true;
|
|
};
|
|
|
|
systemd.tmpfiles.rules = [
|
|
"d '/var/cache/greeter' - greeter greeter - -"
|
|
];
|
|
};
|
|
}
|