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

36 lines
914 B
Nix
Raw Normal View History

2024-05-10 08:29:54 +00:00
{ lib, ... }:
{
2024-07-30 10:29:59 +00:00
imports = [
2024-07-31 05:12:17 +00:00
./paths.nix
2024-07-30 10:29:59 +00:00
./ports.nix
];
# We can basically dump everything that is supposed to hold values for the
# entire system. This entry module should contain NOTHING ELSE!
2024-05-10 08:29:54 +00:00
options.state = lib.mkOption {
type = lib.types.submodule {
2024-07-30 10:29:59 +00:00
freeformType = with lib.types; attrsOf anything;
2024-05-10 08:29:54 +00:00
default = { };
};
2024-11-19 12:37:26 +00:00
default = { };
2024-05-10 08:29:54 +00:00
description = ''
A set of values referring to the system state for use in other parts of
the NixOS system. Useful for consistent values and referring to a single
source of truth for different parts (e.g., services, program) of the
system.
'';
example = lib.literalExpression ''
{
services = {
postgresql.directory = "/var/lib/postgresql";
backup.ignoreDirectories = [
"node_modules"
".direnv"
];
};
}
'';
2024-05-10 08:29:54 +00:00
};
}