greenhouse

kore

my public infrastructure monorepo

git clone [email protected]:kore.git

feat(nixos/roles/workstation): wipe trash service

commit9826c952fd6f52d669a97cb4aae06270b65db114
parent9ec2b5d998de2f042e5ef02d1057f4a8ebe1f389
authorlostduk <[email protected]>
date2026-02-23 13:11 +0000
nixos/roles/workstation.nix18+++++++++++++++++-

1 file changed, -1/+17

nixos/roles/workstation.nix

@@ -1,4 +1,4 @@-{ inputs, outputs, config, lib, ... }:+{ inputs, outputs, config, pkgs, lib, ... }:  let   roleName = "workstation";@@ -14,6 +14,22 @@ in {        users.lostduk = outputs.homeConfigurations.${config.networking.hostName};     };++    systemd.services.wipe-trash = {+      restartIfChanged = false;+      wantedBy = [ "multi-user.target" ];+      serviceConfig = {+        Type = "oneshot";+        RemainAfterExit = true;+        ExecStart = pkgs.writeShellScript "" ''+          find '/home/lostduk' -mindepth 1 -maxdepth 1 \+            ! -name 'documents' \+            ! -name '.gnupg' \+            ! -name '.password-store' \+            -exec rm -r {} ++        '';+      };+    };   })]; }