{ config, pkgs, ... }: { environment.systemPackages = [ (pkgs.writeShellApplication { name = "nix-cleanup"; runtimeInputs = with pkgs; [ coreutils util-linux findutils btrfs-progs nix ]; runtimeEnv.DEVICE = config.environment.impermanence.device; text = builtins.readFile ./cleanup.sh; }) ]; }