nix/lib/modules/wayland.nix
2023-05-25 08:59:08 +01:00

28 lines
556 B
Nix

{ user }: { lib, pkgs, config, ... }:
with lib;
let
cfg = config.windowManager;
in
{
options.windowManager = {
hyprland = mkEnableOption "hyprland";
sway = mkEnableOption "sway";
};
config = {
services.greetd = {
enable = true;
settings = rec {
hypr_session = {
command = "Hyprland";
user = user;
};
sway_session = {
command = "sway";
user = user;
};
default_session = if cfg.sway then sway_session else hypr_session;
};
};
};
}