server-configs/shared/modules/state.nix

34 lines
531 B
Nix
Raw Permalink Normal View History

2024-08-08 12:16:04 +00:00
{ config, lib, ... }:
with lib;
let
2024-08-14 10:22:33 +00:00
sources = import ./../sources;
2024-08-08 12:16:04 +00:00
in {
options.mine.state.enable = mkOption {
type = types.bool;
default = false;
};
imports = [
(sources.impermanence + "/nixos.nix")
];
config = mkIf config.mine.state.enable {
environment.persistence = {
root = {
persistentStoragePath = "/state/root";
files = [
"/etc/machine-id"
];
directories = [
"/var/lib/nixos"
"/var/log"
];
};
};
};
}