diff --git a/hosts/lavaridge/default.nix b/hosts/lavaridge/default.nix index 13e28ed5..ebb3ff13 100644 --- a/hosts/lavaridge/default.nix +++ b/hosts/lavaridge/default.nix @@ -38,11 +38,7 @@ desktop = { greetd = { enable = true; - - autologin = { - enable = true; - user = "aly"; - }; + autologin = "aly"; }; hyprland.enable = true; diff --git a/hosts/mauville/default.nix b/hosts/mauville/default.nix index d0e1bb42..40dc29d6 100644 --- a/hosts/mauville/default.nix +++ b/hosts/mauville/default.nix @@ -111,11 +111,7 @@ in { desktop = { greetd = { enable = true; - - autologin = { - enable = true; - user = "aly"; - }; + autologin = "aly"; }; hyprland.enable = true; diff --git a/hosts/petalburg/default.nix b/hosts/petalburg/default.nix index b7f20e17..3f636b39 100644 --- a/hosts/petalburg/default.nix +++ b/hosts/petalburg/default.nix @@ -60,11 +60,7 @@ desktop = { greetd = { enable = true; - - autologin = { - enable = true; - user = "aly"; - }; + autologin = "aly"; }; hyprland.enable = true; diff --git a/hosts/rustboro/default.nix b/hosts/rustboro/default.nix index 72ea0111..aadde056 100644 --- a/hosts/rustboro/default.nix +++ b/hosts/rustboro/default.nix @@ -34,11 +34,7 @@ desktop = { greetd = { enable = true; - - autologin = { - enable = true; - user = "aly"; - }; + autologin = "aly"; }; hyprland.enable = true; diff --git a/nixosModules/desktop/greetd/default.nix b/nixosModules/desktop/greetd/default.nix index f6ca52fb..8f220ce1 100644 --- a/nixosModules/desktop/greetd/default.nix +++ b/nixosModules/desktop/greetd/default.nix @@ -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 { diff --git a/nixosModules/options.nix b/nixosModules/options.nix index d7da7011..18b72551 100644 --- a/nixosModules/options.nix +++ b/nixosModules/options.nix @@ -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 {