tuigreet
This commit is contained in:
parent
dd0bc50a55
commit
59f582f8fd
3 changed files with 47 additions and 1 deletions
44
modules/boot/greeter/greetd.nix
Normal file
44
modules/boot/greeter/greetd.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkIf mkOption types;
|
||||
cfg = config.horseman.boot.greeter.greetd;
|
||||
homeCfg = config.horseman;
|
||||
in {
|
||||
options = {
|
||||
horseman.boot.greeter.greetd = {
|
||||
enable = mkEnableOption "Greetd Greeter";
|
||||
session = mkOption {type = types.str;};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
greetd.tuigreet
|
||||
];
|
||||
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default_session = {
|
||||
user = homeCfg.username;
|
||||
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --remember --remember-session --greeting 'Please authenticate to continue' --asterisks --asterisks-char '*' --theme 'border=74;text=cyan;prompt=green;time=cyan;action=cyan;button=cyan;container=black;input=238' --cmd ${cfg.session}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.greetd.serviceConfig = {
|
||||
Type = "idle";
|
||||
StandardInput = "tty";
|
||||
StandardOutput = "tty";
|
||||
StandardError = "journal"; # Without this errors will spam on screen
|
||||
# Without these bootlogs will spam on screen
|
||||
TTYReset = true;
|
||||
TTYVHangup = true;
|
||||
TTYVTDisallocate = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue