nixos-config/modules/home-manager/_private/state/paths.nix
Gabriel Arazas f6c70a278b
home-manager/state: refactor and add paths and ports sub-option
Similarly structured to the NixOS module to make it consistent, yay.
2024-07-31 21:47:48 +08:00

28 lines
760 B
Nix

{ lib, ... }:
{
options.state =
let
pathsSubmodule = { lib, ... }: {
options = {
paths = lib.mkOption {
type = with lib.types; attrsOf (listOf path);
default = { };
description = ''
Set of paths to hold as a single source of truth for path-related
settings throughout the whole home environment.
'';
example = lib.literalExpression ''
{
ignoreDirectories = [ "''${config.home.homeDirectory}/Nodes" ];
ignorePaths = [ ".gitignore" "node_modules" "result" ];
}
'';
};
};
};
in lib.mkOption {
type = lib.type.submodule pathsSubmodule;
};
}