about summary refs log tree commit diff stats
path: root/modules/by-name/te/tempfiles/module.nix
blob: f8bfd4dc123edea5ff742159cb0c00a0ac76742c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{
  config,
  lib,
  ...
}: let
  cfg = config.soispha.tempfiles;
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"
    ];
  };
}