nix-dotfiles/nixosModules/services/displaymanager/service.nix

24 lines
582 B
Nix

{ config, pkgs, lib, ... }:
{
options.tuigreet = {
enable = lib.mkEnableOption "enables tuigreet with greetd";
};
config = lib.mkIf config.tuigreet.enable {
services.greetd = let
wm =
if config.hyprland.enable then "Hyprland"
else (if config.niri.enable then "niri" else null);
in {
enable = true;
package = pkgs.tuigreet;
settings = {
default_session = lib.mkIf (wm != null) {
command = "${pkgs.tuigreet}/bin/tuigreet --time --cmd ${wm}";
user = "greeter";
};
};
};
};
}