2024-07-19 12:00:55 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
2024-07-18 04:08:27 +00:00
|
|
|
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.modules.tuigreet;
|
2024-07-19 12:00:55 +00:00
|
|
|
in
|
|
|
|
{
|
|
|
|
options.modules.tuigreet = {
|
|
|
|
enable = mkEnableOption "tuigreet";
|
2024-07-18 04:08:27 +00:00
|
|
|
greeting = mkOption {
|
|
|
|
type = types.str;
|
|
|
|
default = "Hewwo! >_< :3";
|
|
|
|
description = "Greeting message to show.";
|
2024-07-19 12:00:55 +00:00
|
|
|
};
|
2024-07-18 04:08:27 +00:00
|
|
|
command = mkOption {
|
|
|
|
type = types.str;
|
|
|
|
default = "~/.initrc";
|
|
|
|
description = "Command to run after logging in.";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
# Enable greetd
|
|
|
|
modules.greetd = {
|
|
|
|
enable = true;
|
|
|
|
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --remember --greeting \"${cfg.greeting}\" --time --cmd \"${cfg.command}\" --asterisks";
|
|
|
|
};
|
2024-07-18 22:27:18 +00:00
|
|
|
|
|
|
|
# Enable silent boot to prevent late log messages from messing up tuigreet
|
|
|
|
modules.silent-boot.enable = true;
|
2024-07-18 04:08:27 +00:00
|
|
|
};
|
2024-07-19 12:00:55 +00:00
|
|
|
}
|