Add cleanup_temporary_files script to base.
This commit is contained in:
parent
381eb1523e
commit
4a0f0bd8c8
@ -5,6 +5,16 @@
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
patchScriptBin =
|
||||
filename: contents:
|
||||
((pkgs.writeScriptBin filename contents).overrideAttrs (old: {
|
||||
buildCommand = "${old.buildCommand}\n patchShebangs $out";
|
||||
}));
|
||||
cleanup_temporary_files = (
|
||||
patchScriptBin "cleanup_temporary_files" (builtins.readFile ./files/cleanup_temporary_files.bash)
|
||||
);
|
||||
in
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
@ -45,6 +55,7 @@
|
||||
gptfdisk # for cgdisk
|
||||
nix-output-monitor # For better view into nixos-rebuild
|
||||
nix-serve-ng # Serve nix store over http
|
||||
cleanup_temporary_files
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Delete temporary files on entire disk
|
||||
find / -type f '(' -name '*.orig' -or -name '*~' -or -name '*.core' ')' -delete -print 2>/dev/null
|
||||
Loading…
x
Reference in New Issue
Block a user