flocon/modules/greetd.nix

28 lines
627 B
Nix
Raw Normal View History

2024-09-12 00:31:34 +00:00
{ config, lib, pkgs, username, ... }:
2024-09-06 01:43:59 +00:00
let
cfg = config.modules.greetd;
2024-09-12 00:31:34 +00:00
tuigreet = "${pkgs.greetd.tuigreet}/bin/tuigreet";
2024-09-06 01:43:59 +00:00
in
{
options = {
modules.greetd = {
enable = lib.mkEnableOption "Enable the greetd module";
};
};
config = lib.mkIf cfg.enable {
programs.regreet.enable = true;
services.greetd = {
enable = true;
2024-09-12 00:31:34 +00:00
settings = {
default_session = {
command = "${tuigreet} --time --time-format '%a, %d %b %Y %T' --asterisks --remember --cmd Hyprland";
user = username;
2024-09-06 01:43:59 +00:00
};
};
};
2024-09-06 02:32:07 +00:00
security.pam.services.hyprlock = {};
2024-09-06 01:43:59 +00:00
};
}