34 lines
614 B
Nix
Executable File
34 lines
614 B
Nix
Executable File
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
cfg = config.sydnix.impermanence;
|
|
in {
|
|
options = {
|
|
sydnix.impermanence = {
|
|
enable = mkEnableOption "impermanence";
|
|
|
|
directories = mkOption {
|
|
default = [];
|
|
type = types.listOf types.anything;
|
|
};
|
|
|
|
files = mkOption {
|
|
default = [];
|
|
type = types.listOf types.anything;
|
|
};
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
home.persistence = {
|
|
"/persist/home/${config.home.username}" = {
|
|
allowOther = true;
|
|
directories = cfg.directories;
|
|
files = cfg.files;
|
|
};
|
|
};
|
|
};
|
|
}
|