home-manager/state: init module

This commit is contained in:
Gabriel Arazas 2024-05-10 16:02:32 +08:00
parent 9d16099f03
commit 9cd81e5880
No known key found for this signature in database
GPG Key ID: 62104B43D00AA360
2 changed files with 38 additions and 0 deletions

View File

@ -1,6 +1,7 @@
{
imports = [
./extra-arguments.nix
./state.nix
./suites/desktop.nix
./suites/dev.nix
./suites/editors.nix

View File

@ -0,0 +1,37 @@
{ lib, ... }:
{
options.state = lib.mkOption {
type = lib.types.submodule {
freeformType = with lib.types; attrsOf anything;
options = {
ignoreDirectories = lib.mkOption {
type = with lib.types; listOf str;
description = ''
A state variable holding a list of directory names to be excluded
in processes involving walking through directories (e.g., desktop
indexing).
'';
default = [ ];
example = [
"node_modules"
".direnv"
];
};
};
};
description = ''
A set of values to be held in the home-manager configuration. Pretty much
used for anything that requires consistency or deduplicate the source of
truth for module values.
'';
example = {
sampleValue = 10;
dev.ignoreDirectories = [
".git"
"node_modules"
".direnv"
];
};
};
}