34 lines
543 B
Nix
34 lines
543 B
Nix
|
{ config, lib, ... }:
|
||
|
|
||
|
with lib;
|
||
|
|
||
|
let
|
||
|
sources = import ./../sources/sources.nix;
|
||
|
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"
|
||
|
];
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
}
|