nixosmodules/greetd: simplify autologin options

This commit is contained in:
Aly Raffauf 2024-07-10 20:30:11 -04:00
parent b0f814a6bd
commit 17f721d33b
6 changed files with 10 additions and 30 deletions

View file

@ -38,11 +38,7 @@
desktop = {
greetd = {
enable = true;
autologin = {
enable = true;
user = "aly";
};
autologin = "aly";
};
hyprland.enable = true;

View file

@ -111,11 +111,7 @@ in {
desktop = {
greetd = {
enable = true;
autologin = {
enable = true;
user = "aly";
};
autologin = "aly";
};
hyprland.enable = true;

View file

@ -60,11 +60,7 @@
desktop = {
greetd = {
enable = true;
autologin = {
enable = true;
user = "aly";
};
autologin = "aly";
};
hyprland.enable = true;

View file

@ -34,11 +34,7 @@
desktop = {
greetd = {
enable = true;
autologin = {
enable = true;
user = "aly";
};
autologin = "aly";
};
hyprland.enable = true;

View file

@ -15,14 +15,14 @@
greetd = {
enable = true;
settings =
if config.ar.desktop.greetd.autologin.enable
if config.ar.desktop.greetd.autologin != null
then {
default_session = {
command = lib.mkDefault "${lib.getExe pkgs.greetd.tuigreet} --asterisks --user-menu -g 'Welcome to NixOS ${config.system.nixos.release}' --time --remember --cmd ${config.ar.desktop.greetd.session}";
};
initial_session = {
command = config.ar.desktop.greetd.session;
user = config.ar.desktop.greetd.autologin.user;
user = config.ar.desktop.greetd.autologin;
};
}
else {

View file

@ -20,14 +20,10 @@
greetd = {
enable = lib.mkEnableOption "Greetd display manager.";
autologin = {
enable = lib.mkEnableOption "Whether to enable autologin.";
user = lib.mkOption {
description = "User to autologin.";
default = "aly";
type = lib.types.str;
};
autologin = lib.mkOption {
description = "User to autologin.";
default = null;
type = lib.types.nullOr lib.types.str;
};
session = lib.mkOption {