From 1a64deeb894dc95e2645a75771732c6cc53a79ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Wed, 4 Oct 2023 01:35:06 +0200 Subject: Squash changes containing private information There were a lot of changes since the previous commit, but a lot of them contained personnal information about users. All thos changes got stashed into a single commit (history is kept in a different place) and private information was moved in a separate private repository --- modules/private/databases/utils.nix | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 modules/private/databases/utils.nix (limited to 'modules/private/databases/utils.nix') diff --git a/modules/private/databases/utils.nix b/modules/private/databases/utils.nix deleted file mode 100644 index 47988fc..0000000 --- a/modules/private/databases/utils.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ pkgs }: -{ - keepLastNDumps = ext: backupDir: n: '' - #!${pkgs.stdenv.shell} - - cd ${backupDir} - ${pkgs.coreutils}/bin/rm -f \ - $(${pkgs.coreutils}/bin/ls -1 *.${ext} \ - | ${pkgs.coreutils}/bin/sort -r \ - | ${pkgs.gnused}/bin/sed -e '1,${builtins.toString n}d') - ''; - exponentialDumps = ext: backupDir: let - log2rotateSrc = builtins.fetchGit { - url = "https://github.com/avian2/pylog2rotate"; - ref = "master"; - rev = "061f0564757289d3bea553b16f8fd5c4a0319c5e"; - }; - log2rotate = pkgs.writeScript "log2rotate" '' - #!${pkgs.python3}/bin/python - - ${builtins.readFile "${log2rotateSrc}/log2rotate.py"} - ''; - in '' - #!${pkgs.stdenv.shell} - - cd ${backupDir} - ${pkgs.coreutils}/bin/rm -f $(ls -1 *.${ext} | grep -v 'T22:' | sort -r | sed -e '1,12d') - ${pkgs.coreutils}/bin/rm -f $(ls -1 *T22*.${ext} | ${log2rotate} --skip 7 --fuzz 7 --delete --format='%Y-%m-%dT%H:%M+00:00.${ext}') - ''; -} -- cgit v1.2.3