From c23e6d9621fe177880e255bb34e72862347b8cb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20R=C3=B6ger?= Date: Sun, 29 Mar 2026 17:27:45 +0200 Subject: [PATCH] System Gen228 @ 2026-03-29-17:27:44 by jonas@comfy-station --- hosts/comfy-station/configuration.nix | 2 ++ modules/desktop/hyprland.nix | 34 ++++++++---------------- modules/desktop/sddm.nix | 37 +++++++++++++++++++++++++++ modules/programs/creative.nix | 1 + 4 files changed, 50 insertions(+), 24 deletions(-) create mode 100644 modules/desktop/sddm.nix diff --git a/hosts/comfy-station/configuration.nix b/hosts/comfy-station/configuration.nix index dae4879..d77752d 100644 --- a/hosts/comfy-station/configuration.nix +++ b/hosts/comfy-station/configuration.nix @@ -28,6 +28,8 @@ programs.zsh.enable = true; # hive modules + hive.hyprland.enable = true; + hive.sddm.autologin = "jonas"; hive.kwallet.forUsers = ["jonas"]; hive.virt-manager.enable = true; hive.virt-manager.forUsers = ["jonas"]; diff --git a/modules/desktop/hyprland.nix b/modules/desktop/hyprland.nix index 8665a0a..9e1da02 100644 --- a/modules/desktop/hyprland.nix +++ b/modules/desktop/hyprland.nix @@ -1,35 +1,21 @@ -{ +{self, ...}: { flake.nixosModules.hyprland = { config, lib, pkgs, ... }: let - cfg = config.hive.displayManager; + cfg = config.hive.hyprland; in { - options.hive.displayManager = with lib; { - autologin = mkOption { - type = types.nullOr types.str; - default = null; - description = "The autologin username or null for no autologin."; - }; + options.hive.hyprland = with lib; { + enable = mkEnableOption "Enable Hyprland Wayland compositor"; }; - config = { - services.xserver.enable = true; - services.xserver = { - xkb.layout = "de"; - xkb.variant = ""; - xkb.options = "caps:ctrl_modifier"; - }; - services.displayManager.autoLogin.enable = cfg.autologin != null; - services.displayManager.autoLogin.user = cfg.autologin; - - services.libinput.enable = true; - services.dbus.enable = true; - services.displayManager.sddm = { - enable = true; - wayland.enable = true; - }; + imports = [ + self.nixosModules.sddm + ]; + config = lib.mkIf cfg.enable { + hive.sddm.enable = true; + hive.sddm.wayland = true; xdg.portal = { enable = true; diff --git a/modules/desktop/sddm.nix b/modules/desktop/sddm.nix new file mode 100644 index 0000000..130e25c --- /dev/null +++ b/modules/desktop/sddm.nix @@ -0,0 +1,37 @@ +{ + flake.nixosModules.sddm = { + config, + lib, + ... + }: let + cfg = config.hive.sddm; + in { + options.hive.sddm = with lib; { + enable = mkEnableOption "Enable SDDM display manager"; + autologin = mkOption { + type = types.nullOr types.str; + default = null; + description = "The autologin username or null for no autologin."; + }; + wayland = mkEnableOption "Enable Wayland session in SDDM"; + }; + + config = lib.mkIf cfg.enable { + services.xserver.enable = true; + services.xserver = { + xkb.layout = "de"; + xkb.variant = ""; + xkb.options = "caps:ctrl_modifier"; + }; + services.displayManager.autoLogin.enable = cfg.autologin != null; + services.displayManager.autoLogin.user = cfg.autologin; + + services.libinput.enable = true; + services.dbus.enable = true; + services.displayManager.sddm = { + enable = true; + wayland.enable = cfg.wayland; + }; + }; + }; +} diff --git a/modules/programs/creative.nix b/modules/programs/creative.nix index 0387d80..ceeaa7b 100644 --- a/modules/programs/creative.nix +++ b/modules/programs/creative.nix @@ -56,6 +56,7 @@ imports = [ self.nixosModules.bulk-transcode-overlay + self.nixosModules.unstable-overlay ]; config = {