From 9f6e0487cde95d8080543596a1a8e0d10566e960 Mon Sep 17 00:00:00 2001 From: Joe Mou Date: Mon, 23 Dec 2024 13:34:33 -0800 Subject: Manual duperemove systemd service Deduplicate btrfs files. --- hostnix/elmo/configuration.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/hostnix/elmo/configuration.nix b/hostnix/elmo/configuration.nix index 7f5b197..b70cfe3 100644 --- a/hostnix/elmo/configuration.nix +++ b/hostnix/elmo/configuration.nix @@ -90,6 +90,16 @@ }; }; + systemd.services.duperemove = { + serviceConfig = { + Type = "simple"; + CacheDirectory = "duperemove"; + }; + script = '' + exec ${pkgs.duperemove}/bin/duperemove -dhrq --hashfile $CACHE_DIRECTORY/hashfile /srv /var + ''; + }; + networking.firewall.allowedTCPPorts = [ 80 443 ]; # This value determines the NixOS release from which the default -- cgit v1.3.1