Merge branch 'main' into Mic92-wayland-update
This commit is contained in:
commit
b9613c4801
@ -1,33 +1,8 @@
|
||||
{ lib, ... }:
|
||||
{
|
||||
options.clanCore.state = lib.mkOption {
|
||||
default = { };
|
||||
type = lib.types.attrsOf
|
||||
(lib.types.submodule ({ ... }: {
|
||||
options = {
|
||||
folders = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
description = ''
|
||||
Folder where state resides in
|
||||
'';
|
||||
};
|
||||
preRestoreScript = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = ":";
|
||||
description = ''
|
||||
script to run before restoring the state dir from a backup
|
||||
'';
|
||||
};
|
||||
postRestoreScript = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = ":";
|
||||
description = ''
|
||||
script to restore the service after the state dir was restored from a backup
|
||||
'';
|
||||
};
|
||||
};
|
||||
}));
|
||||
};
|
||||
imports = [
|
||||
./state.nix
|
||||
];
|
||||
options.clanCore.backups = {
|
||||
providers = lib.mkOption {
|
||||
type = lib.types.attrsOf (lib.types.submodule ({ name, ... }: {
|
||||
|
35
nixosModules/clanCore/state.nix
Normal file
35
nixosModules/clanCore/state.nix
Normal file
@ -0,0 +1,35 @@
|
||||
{ lib, ... }:
|
||||
{
|
||||
# defaults
|
||||
config.clanCore.state.HOME.folders = [ "/home" ];
|
||||
|
||||
# interface
|
||||
options.clanCore.state = lib.mkOption {
|
||||
default = { };
|
||||
type = lib.types.attrsOf
|
||||
(lib.types.submodule ({ ... }: {
|
||||
options = {
|
||||
folders = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
description = ''
|
||||
Folder where state resides in
|
||||
'';
|
||||
};
|
||||
preRestoreScript = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = ":";
|
||||
description = ''
|
||||
script to run before restoring the state dir from a backup
|
||||
'';
|
||||
};
|
||||
postRestoreScript = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = ":";
|
||||
description = ''
|
||||
script to restore the service after the state dir was restored from a backup
|
||||
'';
|
||||
};
|
||||
};
|
||||
}));
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user