add missing sane-nix-files
hmm. not great that i could deploy even without this being checked into git....
This commit is contained in:
parent
1515f01384
commit
ebff35a378
34
pkgs/additional/sane-nix-files/default.nix
Normal file
34
pkgs/additional/sane-nix-files/default.nix
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
{
|
||||||
|
findutils,
|
||||||
|
runCommandLocal,
|
||||||
|
rsync,
|
||||||
|
}:
|
||||||
|
runCommandLocal "sane-nix-files" {
|
||||||
|
nativeBuildInputs = [
|
||||||
|
findutils
|
||||||
|
rsync
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "top-level host configs for Colin's machines";
|
||||||
|
longDescription = ''
|
||||||
|
i like to ensure a copy of my config is present on all my machines,
|
||||||
|
and this does that in a hermetic way.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
} ''
|
||||||
|
mkdir src
|
||||||
|
pushd src
|
||||||
|
|
||||||
|
rsync -lptr ${../../../.}/ ./
|
||||||
|
chmod u+w .
|
||||||
|
for pat in $(cat .gitignore); do
|
||||||
|
set +e
|
||||||
|
chmod u+w -R "$pat" ; rm -rf "$pat"
|
||||||
|
find $PWD -name "$pat" -exec 'chmod u+w -R {}; rm -rf {}' \;
|
||||||
|
set -e
|
||||||
|
done
|
||||||
|
rsync -lptr ./ $out/
|
||||||
|
|
||||||
|
popd
|
||||||
|
''
|
Loading…
Reference in New Issue
Block a user