infra/flake/den/templates/default/modules/aspects/eg/autologin.nix
2025-12-01 13:23:24 +07:00

15 lines
439 B
Nix

{
# autologin is context-aware, parametric aspect.
# it applies only if the context has at least { user }
# meaning that has access to user data
eg.autologin =
{ user, ... }:
{
nixos =
{ config, lib, ... }:
lib.mkIf config.services.displayManager.enable {
services.displayManager.autoLogin.enable = true;
services.displayManager.autoLogin.user = user.userName;
};
};
}