From 3cf3c8e81aea261f8071098d9bf7bf9fbaa1dc9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Madeleine=20Sydney=20=C5=9Alaga?= Date: Sun, 14 Sep 2025 01:12:04 -0600 Subject: [PATCH] feat(sddm): init module --- hosts/sydpc/configuration.nix | 22 ++-------------------- modules/nixos/sddm.nix | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 20 deletions(-) create mode 100644 modules/nixos/sddm.nix 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; + }; + }; +}