dotfiles/modules/nixos/desktop/wayland/greetd/default.nix

43 lines
901 B
Nix
Raw Normal View History

2025-03-29 23:08:26 -05:00
{
config,
flake,
lib,
2025-04-16 12:35:38 -05:00
pkgs,
2025-03-29 23:08:26 -05:00
...
}:
let
inherit (flake.config.people)
user0
user1
user2
;
inherit (flake.config.machines) devices;
venus = devices.venus.name;
charon = devices.charon.name;
2025-04-16 12:35:38 -05:00
mars = devices.mars.name;
2025-03-29 23:08:26 -05:00
host = config.networking.hostName;
in
{
services = {
greetd = {
enable = true;
vt = 7;
2025-04-16 12:35:38 -05:00
settings = {
default_session = {
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --time-format '%I:%M %p | %a %h | %F' --theme border=magenta;text=cyan;prompt=green;time=red;action=blue;button=yellow;container=black;input=red --cmd Hyprland";
user =
if host == mars then
"greeter"
else if host == charon then
user1
else if host == venus then
user2
else
user0;
2025-03-29 23:08:26 -05:00
};
2025-04-16 12:35:38 -05:00
};
2025-03-29 23:08:26 -05:00
};
};
}