fix displayManager warnings and clean up displayManager configs

This commit is contained in:
Schrottkatze 2024-08-01 08:07:17 +02:00
parent d8e2f19ced
commit 2b13d1c0bb
No known key found for this signature in database
4 changed files with 41 additions and 15 deletions

View file

@ -20,6 +20,10 @@
]; ];
jade = { jade = {
desktop = { desktop = {
dm.autoLogin = {
enable = true;
delay = 5;
};
syncthing.enable = true; syncthing.enable = true;
kdeconnect.enable = true; kdeconnect.enable = true;
cloud.enable = true; cloud.enable = true;
@ -81,10 +85,6 @@
}; };
boot.kernelPackages = pkgs.linuxPackages_zen; boot.kernelPackages = pkgs.linuxPackages_zen;
services.displayManager.autoLogin = {
enable = true;
user = "jade";
};
# networking # networking
networking.networkmanager.enable = true; networking.networkmanager.enable = true;

View file

@ -3,6 +3,7 @@
./audio.nix ./audio.nix
./flatpak.nix ./flatpak.nix
./home ./home
./dm.nix
]; ];
services.upower = { services.upower = {
enable = true; enable = true;

View file

@ -0,0 +1,36 @@
{
pkgs,
config,
lib,
...
}: let
cfg = config.jade.desktop.dm;
in
with lib; {
options.jade.desktop.dm.autoLogin = {
enable = mkEnableOption "Enable Autologin";
delay = mkOption {
type = types.int;
default = 0;
};
};
config.services = {
displayManager = {
autoLogin = {
enable = cfg.autoLogin.enable;
user = "jade";
};
defaultSession = "sway";
sessionPackages = [
pkgs.sway
];
};
xserver.displayManager.gdm = {
enable = true;
banner = "Meow :3";
autoLogin = {
delay = cfg.autoLogin.delay;
};
};
};
}

View file

@ -6,14 +6,6 @@
xterm.enable = false; xterm.enable = false;
}; };
displayManager = {
gdm.enable = true;
sessionPackages = [
pkgs.sway
];
gdm.autoLogin.delay = 5;
};
windowManager.xmonad = { windowManager.xmonad = {
enable = true; enable = true;
}; };
@ -21,7 +13,4 @@
security.polkit.enable = true; security.polkit.enable = true;
programs.sway.enable = true; programs.sway.enable = true;
# services.displayManager.defaultSession = "none+xmonad";
services.displayManager.defaultSession = "sway";
} }