moved storage option draft to its own folder
This commit is contained in:
parent
aeb37e658e
commit
573708fd47
7 changed files with 160 additions and 140 deletions
31
modules/nixos-modules/storage/impermanence.nix
Normal file
31
modules/nixos-modules/storage/impermanence.nix
Normal 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);
|
||||
};
|
||||
}));
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue