nixos-config/modules/nixos/_private/state/paths.nix

24 lines
649 B
Nix
Raw Normal View History

2024-07-31 05:12:17 +00:00
{ lib, ... }:
{
2025-01-29 04:48:19 +00:00
options.state = let
directoriesSubmodule = { lib, ... }: {
options = {
paths = lib.mkOption {
type = with lib.types; attrsOf (either path (listOf str));
description = ''
A set of directories to share its value to various parts of the
system.
'';
default = { };
example = {
cacheDir = "/var/cache";
ignoreDirectories = [ "/var/log" ];
ignoreFiles = [ "node_modules" ".gitignore" ".bak" ];
2024-07-31 05:12:17 +00:00
};
};
};
};
2025-01-29 04:48:19 +00:00
in lib.mkOption { type = lib.types.submodule directoriesSubmodule; };
2024-07-31 05:12:17 +00:00
}