diff --git a/hosts/sydpc/configuration.nix b/hosts/sydpc/configuration.nix index b60c236..c43a11d 100644 --- a/hosts/sydpc/configuration.nix +++ b/hosts/sydpc/configuration.nix @@ -21,6 +21,7 @@ stylix.enable = true; qemu.enable = true; flatpak.enable = true; + sddm.enable = true; steam = { enable = true; @@ -52,20 +53,9 @@ }; }; - # services.xserver.desktopManager.plasma5.enable = true; - - # Disable systemd-sleep. Let KDE or whatever dim the screen without - # suspending the computer. - # systemd.sleep.extraConfig = '' - # AllowSuspend=no - # AllowHibernation=no - # AllowHybridSleep=no - # AllowSuspendThenHibernate=no - # ''; - # Make pressing the power button suspend the system. services.logind.settings.Login = { - HandlePowerKey = "suspend"; + HandlePowerKey = "suspend"; }; boot.loader = { @@ -94,12 +84,6 @@ }; }; - services.displayManager.sddm = { - enable = true; - wayland.enable = true; - autoNumlock = true; - }; - services.libinput = { enable = true; # Disable mouse acceleration. @@ -122,8 +106,6 @@ # services.pulseaudio.package = pkgs.pulseaudioFull; - services.flatpak.enable = true; - # Usually we try to delegate declarations of globally-available packages to # separate modules. These are some exceptional essentials. environment.systemPackages = [ diff --git a/modules/nixos/sddm.nix b/modules/nixos/sddm.nix new file mode 100644 index 0000000..7ade28c --- /dev/null +++ b/modules/nixos/sddm.nix @@ -0,0 +1,16 @@ +{ config, lib, pkgs, ... }: + +let cfg = config.sydnix.sddm; +in { + options.sydnix.sddm = { + enable = lib.mkEnableOption "SDDM"; + }; + + config = lib.mkIf cfg.enable { + services.displayManager.sddm = { + enable = true; + wayland.enable = true; + autoNumlock = true; + }; + }; +}