diff --git a/modules/nixos/nix/default.nix b/modules/nixos/nix/default.nix index f5b0c60..61232ea 100644 --- a/modules/nixos/nix/default.nix +++ b/modules/nixos/nix/default.nix @@ -59,35 +59,38 @@ in users = [ "root" config.metacfg.user.name - ] ++ optional config.services.hydra.enable "hydra"; + ] + ++ optional config.services.hydra.enable "hydra"; extra-substituters = cfg.extra-substituters; in { package = cfg.package; - settings = - { - experimental-features = "nix-command flakes"; - http-connections = 50; - warn-dirty = false; - log-lines = 50; - sandbox = true; - auto-optimise-store = true; - trusted-users = users; - allowed-users = users; + settings = { + experimental-features = "nix-command flakes"; + build-dir = "/var/tmp"; + http-connections = 50; + warn-dirty = false; + log-lines = 50; + sandbox = true; + auto-optimise-store = true; + trusted-users = users; + allowed-users = users; - substituters = [ - cfg.default-substituter.url - ] ++ (mapAttrsToList (name: value: name) extra-substituters); - trusted-public-keys = [ - cfg.default-substituter.key - ] ++ (mapAttrsToList (name: value: value.key) extra-substituters); + substituters = [ + cfg.default-substituter.url + ] + ++ (mapAttrsToList (name: value: name) extra-substituters); + trusted-public-keys = [ + cfg.default-substituter.key + ] + ++ (mapAttrsToList (name: value: value.key) extra-substituters); - } - // (lib.optionalAttrs config.metacfg.tools.direnv.enable { - keep-outputs = true; - keep-derivations = true; - }); + } + // (lib.optionalAttrs config.metacfg.tools.direnv.enable { + keep-outputs = true; + keep-derivations = true; + }); gc = { automatic = true; diff --git a/modules/nixos/services/base/default.nix b/modules/nixos/services/base/default.nix index 259f2c6..ab277df 100644 --- a/modules/nixos/services/base/default.nix +++ b/modules/nixos/services/base/default.nix @@ -1,7 +1,8 @@ -{ config -, lib -, pkgs -, ... +{ + config, + lib, + pkgs, + ... }: with lib; with lib.metacfg; @@ -188,7 +189,6 @@ in virtualisation.libvirtd.enable = lib.mkDefault true; boot.tmp.useTmpfs = true; - systemd.services.nix-daemon.environment.TMPDIR = "/var/tmp"; services.fstrim.enable = true; };