adding uwsm, ty fufexan. and quite a bit more

This commit is contained in:
cnst
2024-11-18 06:14:56 +01:00
parent 8d121fda97
commit edfc9767c7
17 changed files with 120 additions and 119 deletions

View File

@@ -18,9 +18,8 @@ in {
security.pam.services.hyprlock.text = "auth include login";
programs.hyprland = {
enable = true;
xwayland.enable = true;
package = pkgs.hyprland;
portalPackage = pkgs.xdg-desktop-portal-hyprland;
package = inputs.hyprland.packages.${pkgs.system}.default;
portalPackage = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland;
};
environment = {
variables.NIXOS_OZONE_WL = "1";

View File

@@ -14,16 +14,6 @@ in {
default = false;
description = "Enables the greetd service.";
};
gnomeKeyring.enable = mkEnableOption {
type = types.bool;
default = false;
description = "Enables GnomeKeyring PAM service for greetd.";
};
autologin.enable = mkEnableOption {
type = types.bool;
default = false;
description = "Enables autologin for a specified user.";
};
user = mkOption {
type = types.str;
default = "cnst";
@@ -33,26 +23,30 @@ in {
};
config = mkIf cfg.enable {
services.greetd = {
services.greetd = let
session = {
command = "${lib.getExe config.programs.uwsm.package} start hyprland-uwsm.desktop";
user = cfg.user;
};
in {
enable = true;
settings = mkMerge [
# Conditionally include initial_session if autologin is enabled
(mkIf cfg.autologin.enable {
initial_session = {
command = "${lib.getExe config.programs.hyprland.package}";
user = cfg.user;
};
})
{
default_session = {
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --window-padding 1 --time --time-format '%R - %F' -r --remember-session --asterisks";
user = cfg.user;
};
}
];
settings = {
terminal.vt = 1;
default_session = session;
initial_session = session;
};
};
programs.uwsm = {
enable = true;
waylandCompositors.hyprland = {
binPath = "/run/current-system/sw/bin/Hyprland";
prettyName = "Hyprland";
comment = "Hyprland managed by UWSM";
};
};
# Apply GnomeKeyring PAM Service based on user configuration
security.pam.services.greetd.enableGnomeKeyring = cfg.gnomeKeyring.enable;
# security.pam.services.greetd.enableGnomeKeyring = cfg.gnomeKeyring.enable;
};
}

View File

@@ -24,7 +24,7 @@ in {
xdgOpenUsePortal = cfg.xdgOpenUsePortal;
config = {
common.default = ["gtk"];
hyprland.default = ["hyprland" "gtk"];
hyprland.default = ["gtk" "hyprland"];
};
extraPortals = [pkgs.xdg-desktop-portal-gtk];
};