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;
};
};
}

View file

@ -56,16 +56,17 @@ with lib.${namespace};
cinny = enabled; cinny = enabled;
ente-auth = enabled; ente-auth = enabled;
restic = enabled; restic = enabled;
linkwarden = { linkwarden = enabled;
enable = true;
secretsFile = "/run/secrets/linkwarden";
};
forgejo = enabled; forgejo = enabled;
}; };
#container.invidious = enabled; #container.invidious = enabled;
system.sops = enabled; system = {
sops = enabled;
tmpfs = enabled;
};
cli.neovim = enabled; cli.neovim = enabled;
}; };

View file

@ -71,6 +71,7 @@ with lib.${namespace};
}; };
system = { system = {
tmpfs = enabled;
fonts = { fonts = {
enable = true; enable = true;
emoji = true; emoji = true;

View file

@ -39,8 +39,14 @@ with lib.${namespace};
eza = enabled; eza = enabled;
nh = enabled; nh = enabled;
}; };
system.tmpfs = true;
}; };
environment.systemPackages = with pkgs; [
git
];
# Set your time zone # Set your time zone
time.timeZone = "Europe/Berlin"; time.timeZone = "Europe/Berlin";