1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-06 05:25:41 -05:00

Add config options to features (#167)

* feat: Add config option to set quickshell package

* refactor: Use configured quickshell package for ipc calls

* feat: Add config for all shell features in flake

Also add missing dependencies

* fix: Fixes niri binds

* fix: Fixes dgop package path

* fix: Fixes pkgs not being set

* fix: Use ${pkgs.system} for dms-cli package

---------

Co-authored-by: Eduardo Barreto Alexandre <git@dummy.com>
This commit is contained in:
Eduardo B. A.
2025-09-05 23:57:58 -03:00
committed by GitHub
parent 9ba3bfb4db
commit 5f97fd4f7c

View File

@@ -3,13 +3,21 @@
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
quickshell.url = "git+https://git.outfoxxed.me/quickshell/quickshell"; quickshell = {
quickshell.inputs.nixpkgs.follows = "nixpkgs"; url = "git+https://git.outfoxxed.me/quickshell/quickshell";
dms-cli.url = "github:AvengeMedia/danklinux"; inputs.nixpkgs.follows = "nixpkgs";
dms-cli.inputs.nixpkgs.follows = "nixpkgs"; };
dgop = {
url = "github:AvengeMedia/dgop";
inputs.nixpkgs.follows = "nixpkgs";
};
dms-cli = {
url = "github:AvengeMedia/danklinux";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = { self, nixpkgs, quickshell, dms-cli, ... }: outputs = { self, nixpkgs, quickshell, dgop, dms-cli, ... }:
let let
forEachSystem = fn: forEachSystem = fn:
nixpkgs.lib.genAttrs nixpkgs.lib.genAttrs
@@ -42,7 +50,46 @@
lib.mkEnableOption "DankMaterialShell systemd startup"; lib.mkEnableOption "DankMaterialShell systemd startup";
enableSpawn = enableSpawn =
lib.mkEnableOption "DankMaterialShell Niri spawn-at-startup"; lib.mkEnableOption "DankMaterialShell Niri spawn-at-startup";
enableSystemMonitoring = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Add needed dependencies to use system monitoring widgets";
};
enableClipboard = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Add needed dependencies to use the clipboard widget";
};
enableVPN = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Add needed dependencies to use the VPN widget";
};
enableBrigthnessControl = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Add needed dependencies to have brightness/backlight support";
};
enableNightMode = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Add needed dependencies to have night mode support";
};
enableDynamicTheming = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Add needed dependencies to have dynamic theming support";
};
enableAudioWavelenght = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Add needed dependencies to have audio wavelenght support";
};
enableCalendarEvents = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Add calendar events support via khal";
};
quickshell = { quickshell = {
package = lib.mkPackageOption pkgs "quickshell" { package = lib.mkPackageOption pkgs "quickshell" {
default = quickshell.packages.${pkgs.system}.quickshell; default = quickshell.packages.${pkgs.system}.quickshell;
@@ -99,19 +146,24 @@
}) })
]; ];
home.packages = with pkgs; [ home.packages = [
material-symbols pkgs.material-symbols
inter pkgs.inter
fira-code pkgs.fira-code
cava
wl-clipboard pkgs.ddcutil
cliphist pkgs.libsForQt5.qt5ct
ddcutil pkgs.kdePackages.qt6ct
libsForQt5.qt5ct dms-cli.packages.${pkgs.system}.default
kdePackages.qt6ct ]
matugen ++ lib.optional cfg.enableSystemMonitoring dgop.packages.${pkgs.system}.dgop
dms-cli.packages.${system}.default ++ lib.optionals cfg.enableClipboard [pkgs.cliphist pkgs.wl-clipboard]
]; ++ lib.optionals cfg.enableVPN [pkgs.glib pkgs.networkmanager]
++ lib.optional cfg.enableBrigthnessControl pkgs.brightnessctl
++ lib.optional cfg.enableNightMode pkgs.gammastep
++ lib.optional cfg.enableDynamicTheming pkgs.matugen
++ lib.optional cfg.enableAudioWavelenght pkgs.cava
++ lib.optional cfg.enableCalendarEvents pkgs.khal;
}; };
}; };
}; };