frues-clan/modules/desktop/hyprland.nix
Pedro Rey Anca 7606f9e051
Some checks failed
Update `flake.lock` / update_lockfile (push) Waiting to run
Flake check / check (push) Has been cancelled
Migrate config (frues-pc machine for now) from https://git.peprolinbot.com/peprolinbot/nixos-config, with improvements
2025-09-08 18:59:28 +02:00

44 lines
946 B
Nix

{
pkgs,
lib,
config,
...
}: {
imports = [./regreet.nix];
options = {
programs.hyprland.autoLogin.username = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
example = "john";
description = "User for Hyprland auto login with ReGreet. Disabled by default";
};
};
config = {
programs.hyprland = {
enable = true;
withUWSM = true;
};
xdg.portal = {
enable = true;
wlr.enable = true;
xdgOpenUsePortal = true;
extraPortals = [
pkgs.xdg-desktop-portal-hyprland
pkgs.xdg-desktop-portal-gtk
];
};
services.greetd.settings.initial_session = let
username = config.programs.hyprland.autoLogin.username;
in
lib.mkIf (!isNull username) {
command = "uwsm start hyprland-uwsm.desktop";
user = username;
};
environment.sessionVariables.XKB_DEFAULT_LAYOUT = "es";
};
}