Initial commit

This commit is contained in:
2026-02-01 00:42:40 +08:00
commit 17c5379a9a
11 changed files with 514 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
{ config, lib, pkgs, ... }:
let
cfg = config.my.desktop.greetd;
in
{
options.my.desktop.greetd = {
user = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
description = "User account that runs the default session.";
};
command = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
description = "Command to run for the default session (use an absolute path).";
};
};
config = {
assertions = [
{
assertion = cfg.user != null;
message = "my.desktop.greetd.user must be set.";
}
{
assertion = cfg.command != null;
message = "my.desktop.greetd.command must be set (use an absolute path like \"${pkgs.sway}/bin/sway\").";
}
];
services.greetd = {
enable = true;
settings.default_session = {
user = cfg.user;
command = cfg.command;
};
};
};
}