Add default settings file support for Dank Material Shell (DMS)

- Introduced a new option `defaultSettingsFile` in the DMS configuration to allow host-specific first-run settings.
- Updated the home-manager module to read from the specified settings file if provided, otherwise falling back to the bundled defaults.
- Enhanced the documentation in the default settings file to clarify its purpose and usage.
This commit is contained in:
2026-06-20 21:39:48 -03:00
parent de1f9fc770
commit 02c6b3a45f
5 changed files with 709 additions and 6 deletions
+10
View File
@@ -38,6 +38,15 @@
example = [ "sudo" "nixos-rebuild" "switch" "--flake" ".#14900k" ];
description = "Command used by DMS nix-monitor widget for rebuild actions.";
};
defaultSettingsFile = lib.mkOption {
type = lib.types.nullOr lib.types.path;
default = null;
example = ./dms-default-settings.json;
description = ''
Host-specific first-run `settings.json` seed. When set, replaces the bundled
`default-settings.nix` template on fresh profiles.
'';
};
};
};
@@ -85,6 +94,7 @@
])
++ (cfg.extraRightBarWidgets or [ ]);
programs.nix-monitor.rebuildCommand = rebuildCommand;
dms.defaultSettingsFile = cfg.defaultSettingsFile or null;
};
};
}