I'm using impermanence with btrfs subvolumes, deleting and recreating / on boot. When I use environment.persistence with directories in /etc/, my system builds fine. But when I try to persist, say, /var/log, it fails with an infinite recursion.
[aly@lavaridge:~/nixcfg] $ sudo nixos-rebuild build --flake .#rustboro
building the system configuration...
warning: Git tree '/home/aly/nixcfg' is dirty
error:
… while calling the 'head' builtin
at /nix/store/cb1gs888vfqxawvc65q1dk6jzbayh3wz-source/lib/attrsets.nix:1541:11:
1540| || pred here (elemAt values 1) (head values) then
1541| head values
| ^
1542| else
… while evaluating the attribute 'value'
at /nix/store/cb1gs888vfqxawvc65q1dk6jzbayh3wz-source/lib/modules.nix:809:9:
808| in warnDeprecation opt //
809| { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
| ^
810| inherit (res.defsFinal') highestPrio;
(stack trace truncated; use '--show-trace' to show the full trace)
error: infinite recursion encountered
at /nix/store/cb1gs888vfqxawvc65q1dk6jzbayh3wz-source/lib/modules.nix:1001:14:
1000| { _type = "if";
1001| inherit condition content;
| ^
1002| };
Hello,
I'm using impermanence with btrfs subvolumes, deleting and recreating / on boot. When I use
environment.persistence
with directories in /etc/, my system builds fine. But when I try to persist, say,/var/log
, it fails with an infinite recursion.In other words, this works:
But this does not:
Here is the output of
nixos-rebuild
:I'm on nixos unstable 24.05.