add(tmp): make /tmp an actual tmpfs
This commit is contained in:
parent
ddbe5c35c5
commit
5129239a24
4 changed files with 38 additions and 5 deletions
25
modules/nixos/system/tmp/default.nix
Normal file
25
modules/nixos/system/tmp/default.nix
Normal 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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
|
@ -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;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -71,6 +71,7 @@ with lib.${namespace};
|
||||||
};
|
};
|
||||||
|
|
||||||
system = {
|
system = {
|
||||||
|
tmpfs = enabled;
|
||||||
fonts = {
|
fonts = {
|
||||||
enable = true;
|
enable = true;
|
||||||
emoji = true;
|
emoji = true;
|
||||||
|
|
|
@ -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";
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue