2024-09-09 00:22:14 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
2024-09-13 01:50:53 +00:00
|
|
|
with lib; let
|
2024-09-09 00:22:14 +00:00
|
|
|
Hyprland = "${config.programs.hyprland.package}/bin/Hyprland";
|
|
|
|
systemd-cat = "${pkgs.systemd}/bin/systemd-cat";
|
|
|
|
tuigreet = "${pkgs.greetd.tuigreet}/bin/tuigreet";
|
|
|
|
|
|
|
|
cfg = config.custom.services.greetd;
|
2024-09-13 01:50:53 +00:00
|
|
|
in {
|
|
|
|
options.custom.services.greetd.enable = mkOption {default = false;};
|
2024-09-09 00:22:14 +00:00
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
# https://sr.ht/~kennylevinsen/greetd
|
|
|
|
# https://github.com/apognu/tuigreet
|
|
|
|
services.greetd = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
settings.default_session = {
|
|
|
|
command = lib.concatStringsSep " " [
|
|
|
|
"${tuigreet}"
|
|
|
|
"--session-wrapper '${systemd-cat} --identifier hyprland'" # ?? journalctl --identifier hyprland
|
|
|
|
"--cmd ${Hyprland}"
|
|
|
|
"--remember"
|
|
|
|
"--time"
|
|
|
|
"--asterisks"
|
|
|
|
"--window-padding 1"
|
|
|
|
"--greeting owo"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-09-28 17:44:57 +00:00
|
|
|
# Use password at login to unlock keyring
|
|
|
|
security.pam.services.greetd.fprintAuth = false;
|
|
|
|
|
2024-09-09 00:22:14 +00:00
|
|
|
# Attempt to prevent bootlogs from polluting the tty
|
|
|
|
# https://github.com/apognu/tuigreet/issues/68
|
|
|
|
systemd.services.greetd.serviceConfig = {
|
|
|
|
Type = "idle";
|
|
|
|
StandardInput = "tty";
|
|
|
|
StandardOutput = "tty";
|
|
|
|
StandardError = "journal";
|
|
|
|
TTYReset = true;
|
|
|
|
TTYVHangup = true;
|
|
|
|
TTYVTDisallocate = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|