mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-06 01:38:06 +00:00
[NonPersistence] Add non-persistence configuration
This commit is contained in:
parent
0f12a98583
commit
80c28de044
1 changed files with 17 additions and 0 deletions
17
non-persistence.nix
Normal file
17
non-persistence.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
{config, pkgs, lib, ...}:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.aviallon.non-persistence;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.aviallon.non-persistence = {
|
||||||
|
enable = mkEnableOption "non-persitent root";
|
||||||
|
};
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
environment.etc = {
|
||||||
|
nixos.source = "/persist/etc/nixos";
|
||||||
|
NIXOS.source = "/persist/etc/NIXOS";
|
||||||
|
machine-id.source = "/persist/etc/machine-id";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue