initial commit
This commit is contained in:
commit
2ca4b5440a
13 changed files with 584 additions and 0 deletions
33
shared/modules/state.nix
Normal file
33
shared/modules/state.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{ 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"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue