Using immutable users with impermanence on LUKS?

i use impermanence on LUKS, and recently came across the users.mutableUsers option.
making this immutable makes sense to me, but i’ve yet to really make this work.

specifically, in this setup i couldn’t get the ephemeral rollback script to work by either:

has anyone figured out how to get this combination to work? am i looking in the wrong direction?

You have to order your systemd service after the device you want to wipe. e.g.

boot.initrd.systemd.services.wipe-my-fs = {
  requires = ["dev-mapper-foo.device"];
  after = ["dev-mapper-foo.device"];
  wantedBy = ["initrd.target"];
  script = ''
    ...
  '';
};
1 Like