consolidate /tmp fs into hosts/modules/roles

This commit is contained in:
2023-07-13 22:04:28 +00:00
parent 4b99331e5a
commit d3d9b30f29
4 changed files with 13 additions and 29 deletions

View File

@@ -2,17 +2,10 @@
{
sane.persist.root-on-tmpfs = true;
# we need a /tmp for building large nix things.
# increase /tmp space (defaults to 50% of RAM) for building large nix things.
# a cross-compiled kernel, particularly, will easily use 30+GB of tmp
fileSystems."/tmp" = {
device = "none";
fsType = "tmpfs";
options = [
"mode=777"
"size=64G"
"defaults"
];
};
fileSystems."/tmp".options = [ "size=64G" ];
fileSystems."/nix" = {
# device = "/dev/disk/by-uuid/985a0a32-da52-4043-9df7-615adec2e4ff";
device = "/dev/disk/by-uuid/0ab0770b-7734-4167-88d9-6e4e20bb2a56";

View File

@@ -2,15 +2,6 @@
{
sane.persist.root-on-tmpfs = true;
# we need a /tmp of default size (half RAM) for building large nix things
fileSystems."/tmp" = {
device = "none";
fsType = "tmpfs";
options = [
"mode=777"
"defaults"
];
};
fileSystems."/nix" = {
device = "/dev/disk/by-uuid/75230e56-2c69-4e41-b03e-68475f119980";

View File

@@ -2,15 +2,6 @@
{
sane.persist.root-on-tmpfs = true;
# we need a /tmp for building large nix things
fileSystems."/tmp" = {
device = "none";
fsType = "tmpfs";
options = [
"mode=777"
"defaults"
];
};
fileSystems."/nix" = {
device = "/dev/disk/by-uuid/cc81cca0-3cc7-4d82-a00c-6243af3e7776";

View File

@@ -1,4 +1,4 @@
{ ... }:
{ config, lib, ... }:
{
imports = [
./ac.nix
@@ -6,4 +6,13 @@
./client
./dev-machine.nix
];
fileSystems."/tmp" = lib.mkIf (config.sane.roles.build-machine.enable || config.sane.roles.dev-machine) {
device = "none";
fsType = "tmpfs";
options = [
"mode=777"
"defaults"
];
};
}