nix-dotfiles/nixosModules/services/displaymanager/service.nix
Julia Lange f5962d1d27
Niri, Hypr, Flake Bump, tuigreet, init niri
Sets up a config for Niri which involved both the host and user config
settings. It's a semi basic set up to be improved on further later.

This also needs to bump flake so that niri can be added to the flake
update. I don't know what the flake bump date was at this point, so I'll
have to bump it again soon.

This needs to break apart the "waylandcompositors" service to allow niri
and hypr to better fit the directory structure. Otherwise Hypr is
unchanged.

need to update the tuigreet default WM based on the currently selected
one. Currently prioritizes Hyprland > Niri because I didn't want to
write assert code...
2025-05-22 09:27:37 -07:00

27 lines
646 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.greetd.tuigreet;
settings = {
terminal = {
vt = 2;
};
default_session = lib.mkIf (wm != null) {
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd ${wm}";
user = "greeter";
};
};
};
};
}