From 2fd84f3705a2f572e730fde48c74f4dae8572878 Mon Sep 17 00:00:00 2001 From: kiskaadee Date: Fri, 21 Aug 2026 07:36:19 -0500 Subject: [PATCH] feat(system): integrate dank-greeter with Niri compositor for login screen - Add `dank-greeter` flake input and import its NixOS module across desktop and laptop hosts. - Configure `programs.dms-greeter` in `modules/system/graphical.nix` using the `niri` compositor and user config path. - Remove legacy `tuigreet` session configuration from `modules/system/base.nix`. - Update desktop server specialisation to disable `dms-greeter` during headless mode. This commit replaces Ly greeter with the Dank Material graphical login screen, leveraging Niri and unified dynamic theming across the entire workstation. --- flake.lock | 40 ++++++++++++++++++++++++++++++++- flake.nix | 10 ++++++++- hosts/desktop/configuration.nix | 1 + hosts/laptop/configuration.nix | 6 ++--- modules/system/base.nix | 6 ++--- modules/system/graphical.nix | 9 ++++++++ 6 files changed, 62 insertions(+), 10 deletions(-) diff --git a/flake.lock b/flake.lock index a0ff255..351b0a0 100644 --- a/flake.lock +++ b/flake.lock @@ -21,7 +21,44 @@ "type": "github" } }, + "dank-greeter": { + "inputs": { + "dank-qml-common": "dank-qml-common", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1787243426, + "narHash": "sha256-VYdCpmyEaHVW3ryqnXbvwiokUL9X+jhzkiqWE2stMS0=", + "owner": "AvengeMedia", + "repo": "dank-greeter", + "rev": "47daf48fcb884e929018e759ce04839c07894c97", + "type": "github" + }, + "original": { + "owner": "AvengeMedia", + "repo": "dank-greeter", + "type": "github" + } + }, "dank-qml-common": { + "flake": false, + "locked": { + "lastModified": 1784433462, + "narHash": "sha256-8MdKtu/tSYrCenhtmgYW+lcv9JhGPTE3BnSE6WuqO1U=", + "owner": "AvengeMedia", + "repo": "dank-qml-common", + "rev": "8d36f668d73e7a4391ea9ead3939c5de137aa1f0", + "type": "github" + }, + "original": { + "owner": "AvengeMedia", + "repo": "dank-qml-common", + "type": "github" + } + }, + "dank-qml-common_2": { "flake": false, "locked": { "lastModified": 1787154726, @@ -59,7 +96,7 @@ }, "dms": { "inputs": { - "dank-qml-common": "dank-qml-common", + "dank-qml-common": "dank-qml-common_2", "flake-compat": "flake-compat", "nixpkgs": [ "nixpkgs" @@ -173,6 +210,7 @@ "root": { "inputs": { "antigravity": "antigravity", + "dank-greeter": "dank-greeter", "dgop": "dgop", "dms": "dms", "home-manager": "home-manager", diff --git a/flake.nix b/flake.nix index 0447f99..53c6a06 100644 --- a/flake.nix +++ b/flake.nix @@ -25,6 +25,12 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + # dank-greeter - greetd login screen with Dank Material aesthetic + dank-greeter = { + url = "github:AvengeMedia/dank-greeter"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + # Zen Browser - modern, lightweight, community-maintained browser zen-browser = { url = "github:0xc000022070/zen-browser-flake"; @@ -46,7 +52,7 @@ # --- System Outputs (Configuration Definitions) --- # Maps host machines to target environments, architecture types, and user settings. - outputs = { self, nixpkgs, home-manager, dms, dgop, zen-browser, antigravity, ...}@inputs: { + outputs = { self, nixpkgs, home-manager, dms, dgop, dank-greeter, zen-browser, antigravity, ...}@inputs: { nixosConfigurations = { # 🖥️ DESKTOP HOST @@ -58,6 +64,7 @@ ./hosts/desktop/hardware-configuration.nix # Autogenerated hardware/disk/CPU module ./hosts/desktop/configuration.nix # Desktop environment / system package settings inputs.sops-nix.nixosModules.sops # Import Sops module + inputs.dank-greeter.nixosModules.default # Import Dank Greeter module home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; @@ -83,6 +90,7 @@ modules = [ ./hosts/laptop/hardware-configuration.nix ./hosts/laptop/configuration.nix + inputs.dank-greeter.nixosModules.default home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; diff --git a/hosts/desktop/configuration.nix b/hosts/desktop/configuration.nix index 5522805..c16fe2e 100644 --- a/hosts/desktop/configuration.nix +++ b/hosts/desktop/configuration.nix @@ -69,6 +69,7 @@ services.greetd.enable = lib.mkForce false; programs.hyprland.enable = lib.mkForce false; programs.dms-shell.enable = lib.mkForce false; + programs.dms-greeter.enable = lib.mkForce false; # 2. Disable peripheral hardware services to reduce power consumption services.pipewire.enable = lib.mkForce false; diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index 4848b3b..71f10b7 100644 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -8,7 +8,8 @@ { imports = [ ./hardware-configuration.nix - ../../modules/system/base.nix # General hardware-agnostic OS settings + ../../modules/system/graphical.nix # System-wide graphical stack settings (DMS daemon + greeter) + ../../modules/system/base.nix # General hardware-agnostic OS settings ]; # Enable experimental Nix features (required for Flakes and newer command line tools) @@ -51,9 +52,6 @@ # Host-specific graphical compositor (Niri window manager for laptop) programs.niri.enable = true; - # Override greetd to launch Niri compositor instead of Hyprland on the laptop - services.greetd.settings.default_session.command = lib.mkForce "${pkgs.tuigreet}/bin/tuigreet --time --remember --remember-session --asterisks --greeting '❄️ Declarative NixOS Workstation' --cmd niri"; - # Rebuild/State version. Do not modify. system.stateVersion = "26.05"; } diff --git a/modules/system/base.nix b/modules/system/base.nix index 6f2b594..b530b22 100644 --- a/modules/system/base.nix +++ b/modules/system/base.nix @@ -45,14 +45,12 @@ }; services.blueman.enable = true; # Enable Blueman DBus/Applet service integrations - # 🚪 Wayland Native TUI Greeter (greetd + tuigreet) + # 🚪 Greetd base configuration services.greetd = { enable = true; settings = { default_session = { - # Command executed when the system displays the login prompt. - # Customized with flags (remember user, asterisks, custom header greeting) for a cleaner login UI. - command = "${pkgs.tuigreet}/bin/tuigreet --time --remember --remember-session --asterisks --greeting '❄️ Declarative NixOS Workstation' --cmd start-hyprland"; + user = "kiskaadee"; }; }; }; diff --git a/modules/system/graphical.nix b/modules/system/graphical.nix index 8e29d83..f41d10c 100644 --- a/modules/system/graphical.nix +++ b/modules/system/graphical.nix @@ -23,4 +23,13 @@ enableDynamicTheming = true; # Automatically applies system-wide material palettes to shells and apps enableClipboardPaste = true; # Bridges terminal and Wayland clipboard buffers seamlessly }; + + # 🚪 Dank Material Shell Greeter (dank-greeter + greetd) + # Uses niri as the compositor for rendering the login screen + programs.dms-greeter = { + enable = true; + compositor.name = "niri"; + configHome = "/home/kiskaadee"; + }; } +