Put impermanence behind an option to make kopia work.
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
{ lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
./impermanence.nix # TODO: find a way to avoid needing this here
|
||||
];
|
||||
|
||||
boot.isContainer = true;
|
||||
custom.impermanence.enable = false;
|
||||
custom.tailscale.enable = false;
|
||||
networking.useDHCP = lib.mkForce false;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
{ pkgs, inputs, ... }:
|
||||
{ pkgs, inputs, lib, config, ... }:
|
||||
let
|
||||
cfg = config.custom.impermanence;
|
||||
in
|
||||
{
|
||||
options.custom.impermanence = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "Enable impermanent root fs";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.persistence = {
|
||||
"/persist" = {
|
||||
directories = [ "/var/lib/nixos" ];
|
||||
@@ -68,4 +80,5 @@
|
||||
btrfs subvolume create /mnt/root
|
||||
umount /mnt
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user