From ccc792f19c203a17781f6cdb88557b937f981130 Mon Sep 17 00:00:00 2001 From: LuckShiba Date: Wed, 3 Dec 2025 03:31:52 -0300 Subject: [PATCH 1/7] maintainers: add luckshiba --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 54c6af756f33..9ba36a048628 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -15339,6 +15339,12 @@ githubId = 1104419; name = "Lucas Hoffmann"; }; + luckshiba = { + email = "luckshiba@protonmail.com"; + github = "luckshiba"; + githubId = 43530291; + name = "LuckShiba"; + }; lucperkins = { email = "lucperkins@gmail.com"; github = "lucperkins"; From 1b2e065a3bc842be723fc9a1f9b414b60b5d4792 Mon Sep 17 00:00:00 2001 From: LuckShiba Date: Wed, 3 Dec 2025 03:37:28 -0300 Subject: [PATCH 2/7] dgop: init at 0.1.11 --- pkgs/by-name/dg/dgop/package.nix | 52 ++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 pkgs/by-name/dg/dgop/package.nix diff --git a/pkgs/by-name/dg/dgop/package.nix b/pkgs/by-name/dg/dgop/package.nix new file mode 100644 index 000000000000..cb04ca653be3 --- /dev/null +++ b/pkgs/by-name/dg/dgop/package.nix @@ -0,0 +1,52 @@ +{ + lib, + buildGoModule, + fetchFromGitHub, + installShellFiles, + nix-update-script, +}: + +buildGoModule rec { + pname = "dgop"; + version = "0.1.11"; + + src = fetchFromGitHub { + owner = "AvengeMedia"; + repo = "dgop"; + tag = "v${version}"; + hash = "sha256-QhzRn7pYN35IFpKjjxJAj3GPJECuC+VLhoGem3ezycc="; + }; + + vendorHash = "sha256-kO8b/eV5Vm/Fwzyzb0p8N9SkNlhkJLmEiPYmR2m5+po="; + + ldflags = [ + "-w" + "-s" + "-X main.Version=${version}" + ]; + + nativeBuildInputs = [ installShellFiles ]; + + postInstall = '' + mv $out/bin/{cli,dgop} + + installShellCompletion --cmd dgop \ + --bash <($out/bin/dgop completion bash) \ + --fish <($out/bin/dgop completion fish) \ + --zsh <($out/bin/dgop completion zsh) + ''; + + passthru = { + updateScript = nix-update-script { }; + }; + + meta = { + description = "API & CLI for System & Process Monitoring"; + homepage = "https://github.com/AvengeMedia/dgop"; + changelog = "https://github.com/AvengeMedia/dgop/releases/tag/v${version}"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ luckshiba ]; + mainProgram = "dgop"; + platforms = lib.platforms.unix; + }; +} From 56ecb95fe67c35594cb41cd4a04bee9a6abc7eff Mon Sep 17 00:00:00 2001 From: LuckShiba Date: Wed, 3 Dec 2025 03:39:47 -0300 Subject: [PATCH 3/7] dsearch: init at 0.0.7 --- pkgs/by-name/ds/dsearch/package.nix | 54 +++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 pkgs/by-name/ds/dsearch/package.nix diff --git a/pkgs/by-name/ds/dsearch/package.nix b/pkgs/by-name/ds/dsearch/package.nix new file mode 100644 index 000000000000..a6d3b8348a0e --- /dev/null +++ b/pkgs/by-name/ds/dsearch/package.nix @@ -0,0 +1,54 @@ +{ + lib, + buildGoModule, + fetchFromGitHub, + installShellFiles, + nix-update-script, +}: + +buildGoModule rec { + pname = "dsearch"; + version = "0.0.7"; + + src = fetchFromGitHub { + owner = "AvengeMedia"; + repo = "danksearch"; + tag = "v${version}"; + hash = "sha256-rtfymtzsxEuto1mOm8A5ubREJzXKCai6dw9Na1Fa21Q="; + }; + + vendorHash = "sha256-65NFlAtix5ehyaRok3/0Z6+j6U7ccc0Kdye0KFepLLM="; + + ldflags = [ + "-w" + "-s" + "-X main.Version=${version}" + ]; + + nativeBuildInputs = [ installShellFiles ]; + + postInstall = '' + install -Dm744 ./assets/dsearch.service $out/lib/systemd/user/dsearch.service + substituteInPlace $out/lib/systemd/user/dsearch.service \ + --replace-fail /usr/local/bin/dsearch $out/bin/dsearch + + installShellCompletion --cmd dsearch \ + --bash <($out/bin/dsearch completion bash) \ + --fish <($out/bin/dsearch completion fish) \ + --zsh <($out/bin/dsearch completion zsh) + ''; + + passthru = { + updateScript = nix-update-script { }; + }; + + meta = { + description = "Fast, configurable filesystem search with fuzzy matching"; + homepage = "https://github.com/AvengeMedia/danksearch"; + changelog = "https://github.com/AvengeMedia/danksearch/releases/tag/v${version}"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ luckshiba ]; + mainProgram = "dsearch"; + platforms = lib.platforms.unix; + }; +} From 45a96143a1a34b85a2285414133bb0b6d2bf1aae Mon Sep 17 00:00:00 2001 From: LuckShiba Date: Wed, 3 Dec 2025 03:40:15 -0300 Subject: [PATCH 4/7] dms-shell: init at 0.6.2 --- pkgs/by-name/dm/dms-shell/package.nix | 74 +++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 pkgs/by-name/dm/dms-shell/package.nix diff --git a/pkgs/by-name/dm/dms-shell/package.nix b/pkgs/by-name/dm/dms-shell/package.nix new file mode 100644 index 000000000000..a9ad173a1c62 --- /dev/null +++ b/pkgs/by-name/dm/dms-shell/package.nix @@ -0,0 +1,74 @@ +{ + lib, + buildGoModule, + fetchFromGitHub, + installShellFiles, + makeWrapper, + procps, + nix-update-script, + bashNonInteractive, +}: + +buildGoModule rec { + pname = "dms-shell"; + version = "0.6.2"; + + src = fetchFromGitHub { + owner = "AvengeMedia"; + repo = "DankMaterialShell"; + tag = "v${version}"; + hash = "sha256-dLbiTWsKoF0if/Wqet/+L90ILdAaBqp+REGOou8uH3k="; + }; + + sourceRoot = "${src.name}/core"; + + vendorHash = "sha256-nc4CvEPfJ6l16/zmhnXr1jqpi6BeSXd3g/51djbEfpQ="; + + ldflags = [ + "-w" + "-s" + "-X main.Version=${version}" + ]; + + subPackages = [ "cmd/dms" ]; + + nativeBuildInputs = [ + installShellFiles + makeWrapper + ]; + + postInstall = '' + mkdir -p $out/share/quickshell + cp -r ${src}/quickshell $out/share/quickshell/dms + + wrapProgram $out/bin/dms --add-flags "-c $out/share/quickshell/dms" + + install -Dm644 ${src}/quickshell/assets/systemd/dms.service \ + $out/lib/systemd/user/dms.service + substituteInPlace $out/lib/systemd/user/dms.service \ + --replace-fail /usr/bin/dms $out/bin/dms \ + --replace-fail /usr/bin/pkill ${procps}/bin/pkill + + substituteInPlace $out/share/quickshell/dms/Modules/Greetd/assets/dms-greeter \ + --replace-fail /bin/bash ${bashNonInteractive}/bin/bash + + installShellCompletion --cmd dms \ + --bash <($out/bin/dms completion bash) \ + --fish <($out/bin/dms completion fish) \ + --zsh <($out/bin/dms completion zsh) + ''; + + passthru = { + updateScript = nix-update-script { }; + }; + + meta = { + description = "Desktop shell for wayland compositors built with Quickshell & GO"; + homepage = "https://danklinux.com"; + changelog = "https://github.com/AvengeMedia/DankMaterialShell/releases/tag/v${version}"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ luckshiba ]; + mainProgram = "dms"; + platforms = lib.platforms.linux; + }; +} From 6e3c1bf5d28084486cc4482a49f26481f52fd3f7 Mon Sep 17 00:00:00 2001 From: LuckShiba Date: Wed, 3 Dec 2025 03:45:09 -0300 Subject: [PATCH 5/7] nixos/dms-shell: add module --- nixos/modules/module-list.nix | 1 + nixos/modules/programs/wayland/dms-shell.nix | 202 +++++++++++++++++++ 2 files changed, 203 insertions(+) create mode 100644 nixos/modules/programs/wayland/dms-shell.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 50323f0dd888..415e09f706f3 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -340,6 +340,7 @@ ./programs/vivid.nix ./programs/vscode.nix ./programs/wavemon.nix + ./programs/wayland/dms-shell.nix ./programs/wayland/dwl.nix ./programs/wayland/gtklock.nix ./programs/wayland/hyprland.nix diff --git a/nixos/modules/programs/wayland/dms-shell.nix b/nixos/modules/programs/wayland/dms-shell.nix new file mode 100644 index 000000000000..a49330fddcf5 --- /dev/null +++ b/nixos/modules/programs/wayland/dms-shell.nix @@ -0,0 +1,202 @@ +{ + config, + lib, + pkgs, + ... +}: + +let + inherit (lib) + mkEnableOption + mkOption + mkIf + mkPackageOption + types + optional + optionals + ; + + cfg = config.programs.dms-shell; + + optionalPackages = + optionals cfg.enableSystemMonitoring [ pkgs.dgop ] + ++ optionals cfg.enableClipboard [ + pkgs.cliphist + pkgs.wl-clipboard + ] + ++ optionals cfg.enableVPN [ + pkgs.glib + pkgs.networkmanager + ] + ++ optional cfg.enableBrightnessControl pkgs.brightnessctl + ++ optional cfg.enableColorPicker pkgs.hyprpicker + ++ optional cfg.enableDynamicTheming pkgs.matugen + ++ optional cfg.enableAudioWavelength pkgs.cava + ++ optional cfg.enableCalendarEvents pkgs.khal + ++ optional cfg.enableSystemSound pkgs.kdePackages.qtmultimedia; +in +{ + options.programs.dms-shell = { + enable = mkEnableOption "DankMaterialShell, a complete desktop shell for Wayland compositors"; + + package = mkPackageOption pkgs "dms-shell" { }; + + systemd = { + target = mkOption { + type = types.str; + default = "graphical-session.target"; + description = '' + The systemd target that will automatically start the DankMaterialShell service. + + Common targets include: + - `graphical-session.target` for most desktop environments + - `wayland-session.target` for Wayland-specific sessions + ''; + }; + + restartIfChanged = mkOption { + type = types.bool; + default = true; + description = '' + Whether to restart the dms.service when the DankMaterialShell package or + configuration changes. This ensures the latest version is always running + after a system rebuild. + ''; + }; + }; + + enableSystemMonitoring = mkOption { + type = types.bool; + default = true; + description = '' + Whether to install dependencies required for system monitoring widgets. + This includes process list viewers and system resource monitors. + + Requires: dgop + ''; + }; + + enableClipboard = mkOption { + type = types.bool; + default = true; + description = '' + Whether to install dependencies required for clipboard management widgets. + This enables clipboard history and clipboard manager functionality. + + Requires: cliphist, wl-clipboard + ''; + }; + + enableVPN = mkOption { + type = types.bool; + default = true; + description = '' + Whether to install dependencies required for VPN widgets. + This enables VPN status monitoring and management through NetworkManager. + + Requires: glib, networkmanager + ''; + }; + + enableBrightnessControl = mkOption { + type = types.bool; + default = true; + description = '' + Whether to install dependencies required for brightness and backlight control. + This enables screen brightness adjustment widgets. + + Requires: brightnessctl + ''; + }; + + enableColorPicker = mkOption { + type = types.bool; + default = true; + description = '' + Whether to install dependencies required for color picking functionality. + This enables on-screen color picker tools. + + Requires: hyprpicker + ''; + }; + + enableDynamicTheming = mkOption { + type = types.bool; + default = true; + description = '' + Whether to install dependencies required for dynamic theming support. + This enables automatic theme generation based on wallpapers and other sources. + + Requires: matugen + ''; + }; + + enableAudioWavelength = mkOption { + type = types.bool; + default = true; + description = '' + Whether to install dependencies required for audio wavelength visualization. + This enables audio spectrum and waveform visualizer widgets. + + Requires: cava + ''; + }; + + enableCalendarEvents = mkOption { + type = types.bool; + default = true; + description = '' + Whether to install dependencies required for calendar events support. + This enables calendar widgets that display events and reminders via khal. + + Requires: khal + ''; + }; + + enableSystemSound = mkOption { + type = types.bool; + default = true; + description = '' + Whether to install dependencies required for system sound support. + This enables audio playback for system notifications and events. + + Requires: qtmultimedia + ''; + }; + + quickshell = { + package = mkPackageOption pkgs "quickshell" { }; + }; + }; + + config = mkIf cfg.enable { + environment.etc."xdg/quickshell/dms".source = "${cfg.package}/share/quickshell/dms"; + + systemd.packages = [ cfg.package ]; + + systemd.user.services.dms = { + wantedBy = [ cfg.systemd.target ]; + restartTriggers = optional cfg.systemd.restartIfChanged "${cfg.package}/share/quickshell/dms"; + path = lib.mkForce [ ]; + }; + + environment.systemPackages = [ + cfg.package + cfg.quickshell.package + pkgs.ddcutil + pkgs.libsForQt5.qt5ct + pkgs.kdePackages.qt6ct + ] + ++ optionalPackages; + + fonts.packages = with pkgs; [ + fira-code + inter + material-symbols + ]; + + hardware.graphics.enable = lib.mkDefault true; + }; + + meta.maintainers = with lib.maintainers; [ luckshiba ]; +} From c3eaa0e1ab1b5094d71d76573ce81cf12c366a0c Mon Sep 17 00:00:00 2001 From: LuckShiba Date: Wed, 3 Dec 2025 03:43:52 -0300 Subject: [PATCH 6/7] nixos/dsearch: add module --- nixos/modules/module-list.nix | 1 + nixos/modules/programs/dsearch.nix | 53 ++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 nixos/modules/programs/dsearch.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 415e09f706f3..f728c028a122 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -201,6 +201,7 @@ ./programs/direnv.nix ./programs/dmrconfig.nix ./programs/droidcam.nix + ./programs/dsearch.nix ./programs/dublin-traceroute.nix ./programs/ecryptfs.nix ./programs/environment.nix diff --git a/nixos/modules/programs/dsearch.nix b/nixos/modules/programs/dsearch.nix new file mode 100644 index 000000000000..c6d7509c91dd --- /dev/null +++ b/nixos/modules/programs/dsearch.nix @@ -0,0 +1,53 @@ +{ + config, + lib, + pkgs, + ... +}: + +let + inherit (lib) + mkEnableOption + mkOption + mkIf + mkPackageOption + types + ; + + cfg = config.programs.dsearch; +in +{ + options.programs.dsearch = { + enable = mkEnableOption "dsearch, a fast filesystem search service with fuzzy matching"; + + package = mkPackageOption pkgs "dsearch" { }; + + systemd = { + enable = mkEnableOption "systemd user service for dsearch" // { + default = true; + }; + + target = mkOption { + type = types.str; + default = "default.target"; + description = '' + The systemd target that will automatically start the dsearch service. + + By default, dsearch starts with the user session (`default.target`). + You can change this to `graphical-session.target` if you only want + it to run in graphical sessions. + ''; + }; + }; + }; + + config = mkIf cfg.enable { + environment.systemPackages = [ cfg.package ]; + + systemd.packages = [ cfg.package ]; + + systemd.user.services.dsearch.wantedBy = mkIf cfg.systemd.enable [ cfg.systemd.target ]; + }; + + meta.maintainers = with lib.maintainers; [ luckshiba ]; +} From b744e5ab0bb291629c75f7aa0d75cf65499137ef Mon Sep 17 00:00:00 2001 From: LuckShiba Date: Wed, 3 Dec 2025 03:46:34 -0300 Subject: [PATCH 7/7] nixos/dms-greeter: add module --- nixos/modules/module-list.nix | 1 + .../services/display-managers/dms-greeter.nix | 261 ++++++++++++++++++ 2 files changed, 262 insertions(+) create mode 100644 nixos/modules/services/display-managers/dms-greeter.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index f728c028a122..c4a9740143d1 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -607,6 +607,7 @@ ./services/development/zammad.nix ./services/display-managers/cosmic-greeter.nix ./services/display-managers/default.nix + ./services/display-managers/dms-greeter.nix ./services/display-managers/gdm.nix ./services/display-managers/greetd.nix ./services/display-managers/lemurs.nix diff --git a/nixos/modules/services/display-managers/dms-greeter.nix b/nixos/modules/services/display-managers/dms-greeter.nix new file mode 100644 index 000000000000..1355291516fa --- /dev/null +++ b/nixos/modules/services/display-managers/dms-greeter.nix @@ -0,0 +1,261 @@ +{ + config, + lib, + pkgs, + ... +}: + +let + inherit (lib) + types + mkEnableOption + mkOption + mkIf + mkDefault + mkPackageOption + literalExpression + getExe + makeBinPath + optionalString + concatMapStringsSep + ; + + cfg = config.services.displayManager.dms-greeter; + cfgAutoLogin = config.services.displayManager.autoLogin; + + greeterScript = pkgs.writeShellScriptBin "dms-greeter-start" '' + export PATH=$PATH:${ + makeBinPath [ + cfg.quickshell.package + config.programs.${cfg.compositor.name}.package + ] + } + exec ${cfg.package}/share/quickshell/dms/Modules/Greetd/assets/dms-greeter \ + --command ${cfg.compositor.name} \ + -p ${cfg.package}/share/quickshell/dms \ + --cache-dir /var/lib/dms-greeter \ + ${ + optionalString ( + cfg.compositor.customConfig != "" + ) "-C ${pkgs.writeText "dms-greeter-compositor-config" cfg.compositor.customConfig}" + } \ + ${optionalString cfg.logs.save ">> ${cfg.logs.path} 2>&1"} + ''; + + configFilesFromHome = + if cfg.configHome != null then + [ + "${cfg.configHome}/.config/DankMaterialShell/settings.json" + "${cfg.configHome}/.local/state/DankMaterialShell/session.json" + "${cfg.configHome}/.cache/DankMaterialShell/dms-colors.json" + ] + else + [ ]; +in +{ + options.services.displayManager.dms-greeter = { + enable = mkEnableOption "DankMaterialShell greeter"; + + package = mkPackageOption pkgs "dms-shell" { }; + + compositor = { + name = mkOption { + type = types.enum [ + "niri" + "hyprland" + "sway" + ]; + example = "niri"; + description = '' + The Wayland compositor to run the greeter in. + + The specified compositor must be enabled via its corresponding + `programs..enable` option. + + Supported compositors: + - niri: A scrollable-tiling Wayland compositor + - hyprland: A dynamic tiling Wayland compositor + - sway: An i3-compatible Wayland compositor + ''; + }; + + customConfig = mkOption { + type = types.lines; + default = ""; + example = '' + # Niri example + input { + keyboard { + xkb { + layout "us" + } + } + } + ''; + description = '' + Custom compositor configuration to use for the greeter session. + + This configuration is written to a file and passed to the compositor + when launching the greeter. The format and available options depend + on the selected compositor. + + Leave empty to use the system's default compositor configuration. + ''; + }; + }; + + configFiles = mkOption { + type = types.listOf types.path; + default = [ ]; + example = literalExpression '' + [ + "/home/user/.config/DankMaterialShell/settings.json" + "/home/user/.local/state/DankMaterialShell/session.json" + ] + ''; + description = '' + List of DankMaterialShell configuration files to copy into the greeter + data directory at `/var/lib/dms-greeter`. + + This is useful for preserving user preferences like wallpapers, themes, + and other settings in the greeter screen. + + ::: {.tip} + Use {option}`configHome` instead if your configuration files are in + standard XDG locations. + ::: + ''; + }; + + configHome = mkOption { + type = types.nullOr types.str; + default = null; + example = "/home/alice"; + description = '' + Path to a user's home directory from which to copy DankMaterialShell + configuration files. + + When set, the following files will be automatically copied to the greeter: + - `~/.config/DankMaterialShell/settings.json` + - `~/.local/state/DankMaterialShell/session.json` + - `~/.cache/DankMaterialShell/dms-colors.json` + + If your configuration files are in non-standard locations, use the + {option}`configFiles` option instead. + ''; + }; + + quickshell = { + package = mkPackageOption pkgs "quickshell" { }; + }; + + logs = { + save = mkEnableOption "saving logs from the DMS greeter to a file"; + + path = mkOption { + type = types.path; + default = "/tmp/dms-greeter.log"; + example = "/var/log/dms-greeter.log"; + description = '' + File path where DMS greeter logs will be saved. + + This is useful for debugging greeter issues. Logs will include + output from both the greeter and the compositor. + ''; + }; + }; + }; + + config = mkIf cfg.enable { + assertions = [ + { + assertion = config.programs.${cfg.compositor.name}.enable or false; + message = '' + DankMaterialShell greeter: The compositor "${cfg.compositor.name}" is not enabled. + + Please enable the compositor via: + programs.${cfg.compositor.name}.enable = true; + ''; + } + ]; + + services.greetd = { + enable = true; + settings = { + default_session = { + user = "dms-greeter"; + command = getExe greeterScript; + }; + initial_session = mkIf (cfgAutoLogin.enable && (cfgAutoLogin.user != null)) { + inherit (cfgAutoLogin) user command; + }; + }; + }; + + environment.systemPackages = [ cfg.package ]; + + fonts.packages = with pkgs; [ + fira-code + inter + material-symbols + ]; + + systemd.tmpfiles.settings."10-dms-greeter"."/var/lib/dms-greeter".d = { + user = "dms-greeter"; + group = "dms-greeter"; + mode = "0750"; + }; + + systemd.services.greetd.preStart = + let + allConfigFiles = cfg.configFiles ++ configFilesFromHome; + in + '' + set -euo pipefail + + cd /var/lib/dms-greeter || exit 1 + + ${concatMapStringsSep "\n" (f: '' + if [[ -f "${f}" ]]; then + cp "${f}" . || true + fi + '') allConfigFiles} + + # Handle session.json wallpaper path + if [[ -f session.json ]]; then + if wallpaper=$(${getExe pkgs.jq} -r '.wallpaperPath' session.json 2>/dev/null); then + if [[ -f "$wallpaper" ]]; then + cp "$wallpaper" wallpaper.jpg || true + mv session.json session.orig.json + ${getExe pkgs.jq} '.wallpaperPath = "/var/lib/dms-greeter/wallpaper.jpg"' \ + session.orig.json > session.json || true + fi + fi + fi + + # Rename colors file if it exists + [[ -f dms-colors.json ]] && mv dms-colors.json colors.json || true + + # Fix ownership of all files + chown -R "dms-greeter:dms-greeter" . || true + ''; + + users.groups.dms-greeter = { }; + users.users.dms-greeter = { + description = "DankMaterialShell greeter user"; + isSystemUser = true; + home = "/var/lib/dms-greeter"; + homeMode = "0750"; + createHome = true; + group = "dms-greeter"; + extraGroups = [ "video" ]; + }; + + security.pam.services.dms-greeter = { }; + + hardware.graphics.enable = mkDefault true; + services.libinput.enable = mkDefault true; + }; + + meta.maintainers = with lib.maintainers; [ luckshiba ]; +}