1524100ff5
- Introduced new DMS plugins: `rbw-lock-toggle` for managing Bitwarden vault state and `wvkbd-toggle` for showing/hiding the on-screen keyboard. - Updated `flake.lock` and `flake.nix` to include the new plugins and their configurations. - Removed legacy options and files related to the rbw lock toggle, streamlining the DMS configuration. - Enhanced the home-manager module to support the new plugins and their integration into the DMS environment.
74 lines
2.6 KiB
Nix
74 lines
2.6 KiB
Nix
{ inputs, ... }: {
|
|
flake.nixosModules.desktopShellDmsOptions = { lib, ... }: {
|
|
options.chiasson.desktop.shells.dms = {
|
|
enableGpuTemp = lib.mkOption {
|
|
type = lib.types.bool;
|
|
default = true;
|
|
description = "GPU temp in DMS bar.";
|
|
};
|
|
obsidianVaults = lib.mkOption {
|
|
type = lib.types.listOf lib.types.str;
|
|
default = [ ];
|
|
example = [ "/mnt/zimaos/Obsidian/Home/.obsidian" ];
|
|
description = "Vault `.obsidian/` dirs; matugen writes `<vault>/snippets/matugen.css`.";
|
|
};
|
|
extraRightBarWidgets = lib.mkOption {
|
|
type = lib.types.listOf lib.types.attrs;
|
|
default = [ ];
|
|
description = "Extra right-bar widgets merged into the first-run DMS settings seed.";
|
|
};
|
|
rebuildCommand = lib.mkOption {
|
|
type = lib.types.nullOr (lib.types.listOf lib.types.str);
|
|
default = null;
|
|
example = [ "sudo" "nixos-rebuild" "switch" "--flake" ".#14900k" ];
|
|
description = "Command used by DMS nix-monitor widget for rebuild actions.";
|
|
};
|
|
defaultSeedDir = lib.mkOption {
|
|
type = lib.types.nullOr lib.types.path;
|
|
default = null;
|
|
example = ./dms-defaults;
|
|
description = ''
|
|
Host-specific first-run DMS config seed directory. When set, copies
|
|
`settings.json` (required) and `plugin_settings.json` (optional) from this
|
|
directory into `~/.config/DankMaterialShell/` on fresh profiles.
|
|
Replaces the bundled `default-settings.nix` template for `settings.json`.
|
|
'';
|
|
};
|
|
bundleThirdPartyPlugins = lib.mkOption {
|
|
type = lib.types.bool;
|
|
default = true;
|
|
description = ''
|
|
Install bundled DMS plugins from flake inputs (third-party + chiasson).
|
|
Disable individual plugins in DMS settings; set this to false to skip all bundled plugins.
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
|
|
flake.homeManagerModules.desktopShellDms = {
|
|
lib,
|
|
osConfig ? { },
|
|
...
|
|
}:
|
|
let
|
|
cfg = lib.attrByPath [ "chiasson" "desktop" "shells" "dms" ] { } osConfig;
|
|
selectedShell = lib.attrByPath [ "chiasson" "desktop" "shell" ] null osConfig;
|
|
dmsEnabled = selectedShell == "dms";
|
|
hostName = lib.attrByPath [ "networking" "hostName" ] "nixos" osConfig;
|
|
rebuildCommand =
|
|
if (cfg.rebuildCommand or null) != null then
|
|
cfg.rebuildCommand
|
|
else
|
|
[ "sudo" "nixos-rebuild" "switch" "--flake" ".#${hostName}" ];
|
|
in
|
|
{
|
|
imports = [
|
|
./home-manager/default.nix
|
|
];
|
|
|
|
config = lib.mkIf dmsEnabled {
|
|
programs.nix-monitor.rebuildCommand = rebuildCommand;
|
|
};
|
|
};
|
|
}
|