moved storage option draft to its own folder

This commit is contained in:
Leyla Becker 2025-11-04 15:02:49 -06:00
parent aeb37e658e
commit 573708fd47
7 changed files with 160 additions and 140 deletions

View file

@ -0,0 +1,31 @@
args @ {lib, ...}: let
impermanenceDatasetSubmodules = (import ./submodules/impermanenceDataset.nix) args;
in {
options.storage = {
impermanence = {
enable = lib.mkEnableOption "should impermanence be enabled for this system";
# TODO: enable option implementation
# TODO: assertion that zfs needs to be enabled when impermanence is enabled
# TODO: datasets option that is a submodule that will be used to define what datasets to add to the storage system
# We should by default create the `local`, `local/system/nix`, `local/system/root`, `persist` `persist/system/root`, and `persist/system/var/log` datasets
# We should also create datasets for systemd modules that have have impermanence enabled for them
datasets = lib.mkOption {
type = lib.types.attrsOf (lib.types.submodule impermanenceDatasetSubmodules);
};
# TODO: this should just live under home-manager.users.<user>.storage.impermanence
home-manager = lib.mkOption {
type = lib.types.attrsOf (lib.types.submodule ({name, ...}: {
enable = lib.mkEnableOption "should impermanence be enabled for this user";
# We should by default create the `local/home/${name}`, and `persist/home/${name}` datasets
datasets = lib.mkOption {
type = lib.types.attrsOf (lib.types.submodule impermanenceDatasetSubmodules);
};
}));
};
};
};
}