nixos/state: init module

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

View File

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

View File

@ -0,0 +1,25 @@
{ lib, ... }:
{
options.state = lib.mkOption {
type = lib.types.submodule {
freeFormType = with lib.types; attrsOf anything;
default = { };
};
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 = {
services = {
postgresql.directory = "/var/lib/postgresql";
backup.ignoreDirectories = [
"node_modules"
".direnv"
];
};
};
};
}