mirror of
https://github.com/youwen5/nixos.git
synced 2025-01-18 05:02:10 -08:00
refactor: modularize greeter
This commit is contained in:
parent
4c72a5cb8b
commit
d00dcf0355
2 changed files with 47 additions and 19 deletions
|
@ -27,6 +27,7 @@
|
|||
theming = {
|
||||
enable = true;
|
||||
};
|
||||
desktop.greeter.enable = true;
|
||||
};
|
||||
|
||||
boot = {
|
||||
|
|
|
@ -1,5 +1,31 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.liminalOS.desktop.greeter;
|
||||
in
|
||||
{
|
||||
options.liminalOS.desktop.greeter = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = config.liminalOS.desktop.enable;
|
||||
description = ''
|
||||
Whether to enable and set up tui-greet, the default greeter for liminalOS.
|
||||
'';
|
||||
};
|
||||
command = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = if config.liminalOS.desktop.enable then "Hyprland" else "";
|
||||
description = ''
|
||||
Command for the greeter to execute to launch the desktop. If the liminalOS Hyprland Desktop is enabled, defaults to `Hyprland`.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
@ -22,4 +48,5 @@
|
|||
TTYVHangup = true;
|
||||
TTYVTDisallocate = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue