about summary refs log tree commit diff stats
path: root/modules/system/tempfiles/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/system/tempfiles/default.nix')
-rw-r--r--modules/system/tempfiles/default.nix20
1 files changed, 20 insertions, 0 deletions
diff --git a/modules/system/tempfiles/default.nix b/modules/system/tempfiles/default.nix
new file mode 100644
index 00000000..fa17f112
--- /dev/null
+++ b/modules/system/tempfiles/default.nix
@@ -0,0 +1,20 @@
+{
+  config,
+  lib,
+  ...
+}: let
+  cfg = config.soispha.temfiles;
+in {
+  options.soispha.tempfiles = {
+    enable = lib.mkEnableOption "systemd tempfiles generation";
+  };
+
+  config = lib.mkIf cfg.enable {
+    systemd.tmpfiles.rules = [
+      # TODO: Find a way to move this file to the lf home manager config.
+      #
+      # This file is needed to trash stuff on the root ('/') temp file system.
+      "d /.Trash 1777 root root"
+    ];
+  };
+}