diff --git a/modules/system/default.nix b/modules/system/default.nix index 7e6a526..fb97bd2 100644 --- a/modules/system/default.nix +++ b/modules/system/default.nix @@ -2,6 +2,7 @@ imports = [ ./boot.nix ./cli.nix + ./displaymanager.nix ./flatpak.nix ./fonts.nix ./gtk.nix diff --git a/modules/system/displaymanager.nix b/modules/system/displaymanager.nix new file mode 100644 index 0000000..95b79d5 --- /dev/null +++ b/modules/system/displaymanager.nix @@ -0,0 +1,27 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.systems.displaymanager; + graphical = config.this.graphical; +in with lib; { + options = { + systems.displaymanager = { + enable = mkOption { + default = graphical.enable; + type = with types; bool; + }; + }; + }; + + config = mkIf cfg.enable { + services.xserver = { + enable = true; + displayManager = { + autoLogin = { + enable = true; + user = "james"; + }; + gdm.enable = true; + }; + }; + }; +}