autologin module, fix awww
This commit is contained in:
parent
5b898f56ae
commit
3f8b6984b7
5 changed files with 51 additions and 4 deletions
25
modules/desktop/autologin.nix
Normal file
25
modules/desktop/autologin.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ lib, config, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.desktop.autologin;
|
||||
in {
|
||||
options.modules.desktop.autologin = {
|
||||
enable = mkEnableOption "Enable auto login, the quickest way to enter your desktop environment";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.displayManager.enable = true;
|
||||
services.displayManager.autoLogin.enable = true;
|
||||
services.displayManager.autoLogin.user = config.user.name;
|
||||
|
||||
# greetd autologin kinda sucks (requires a binary to launch, not the name of a desktop file)
|
||||
# but, ly has it! ly seems pretty cool and lightweight! thank goodness
|
||||
# https://codeberg.org/fairyglade/ly/commit/0cf752f3b850d16283e28853bca63e994d8c5e7b
|
||||
services.displayManager.ly.enable = true;
|
||||
services.displayManager.ly.settings = {
|
||||
auto_login_session = config.services.displayManager.defaultSession;
|
||||
auto_login_user = config.user.name;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue