dotfiles/machines/common/linux/greeter.nix

74 lines
1.7 KiB
Nix
Raw Normal View History

{
config,
lib,
pkgs,
...
2024-05-07 18:20:52 +02:00
}:
2024-08-13 01:13:08 +02:00
let
condition = (
builtins.elem config.dotfiles.desktop [
"hyprland"
"sway"
]
);
in
2024-05-07 18:20:52 +02:00
{
2024-08-13 01:13:08 +02:00
config = lib.mkIf condition {
programs.regreet = {
2023-05-19 04:07:58 +02:00
enable = true;
2024-08-13 01:13:08 +02:00
settings = {
background = {
path = ../../../home/wallpapers/dhm_1610.png;
fit = "Cover";
};
GTK = {
cursor_theme_name = "macOS-Monterey";
font_name = "IBM Plex Sans 16";
icon_theme_name = "WhiteSur";
theme_name = "WhiteSur-Dark";
};
};
font.name = "IBM Plex Sans";
cursorTheme = {
name = "macOS-Monterey";
package = pkgs.apple-cursor;
};
iconTheme = {
name = "WhiteSur-Dark";
package = pkgs.whitesur-icon-theme;
};
theme = {
name = "WhiteSur-Dark";
package = pkgs.whitesur-gtk-theme;
2023-12-07 15:40:49 +01:00
};
2023-05-19 04:07:58 +02:00
};
2023-12-07 15:40:49 +01:00
services.gnome.gnome-keyring.enable = true;
security.pam.services.greetd = {
2023-05-19 04:07:58 +02:00
enableGnomeKeyring = true;
u2fAuth = true;
};
2023-12-07 15:40:49 +01:00
security.polkit.enable = true;
2023-05-19 04:07:58 +02:00
2023-12-07 15:40:49 +01:00
# start a keyring daemon for sway
systemd = {
2024-05-07 18:20:52 +02:00
packages = [ pkgs.polkit_gnome ];
2023-12-07 15:40:49 +01:00
user.services.polkit-gnome-authentication-agent-1 = {
unitConfig = {
Description = "polkit-gnome-authentication-agent-1";
2024-05-07 18:20:52 +02:00
Wants = [ "graphical-session.target" ];
WantedBy = [ "graphical-session.target" ];
After = [ "graphical-session.target" ];
2023-12-07 15:40:49 +01:00
};
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
Restart = "on-failure";
RestartSec = 1;
TimeoutStopSec = 10;
};
};
};
};
}