1
0
Fork 0

add(tmp): make /tmp an actual tmpfs

This commit is contained in:
Philipp 2025-05-17 01:17:17 +02:00
parent ddbe5c35c5
commit 5129239a24
Signed by: Philipp
GPG key ID: 9EBD8439AFBAB750
4 changed files with 38 additions and 5 deletions

View file

@ -0,0 +1,25 @@
{
config,
lib,
namespace,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.system.tmpfs;
in
{
options.${namespace}.system.tmpfs = with types; {
enable = mkBoolOpt false "Whether or not to use tmpfs for /tmp.";
};
config = mkIf cfg.enable {
boot.tmp = {
cleanOnBoot = true;
tmpfsSize = "50%";
useTmpfs = true;
};
};
}