feat(nixos): improve nix configuration and tmp handling
- Reformatted function parameters to enhance readability. - Added `build-dir = "/var/tmp"` to nix settings for better build management. - Removed redundant `TMPDIR` environment variable for nix-daemon in systemd services.
This commit is contained in:
parent
3b0809697d
commit
92a9c0756c
2 changed files with 30 additions and 27 deletions
|
@ -59,15 +59,16 @@ 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 =
|
||||
{
|
||||
settings = {
|
||||
experimental-features = "nix-command flakes";
|
||||
build-dir = "/var/tmp";
|
||||
http-connections = 50;
|
||||
warn-dirty = false;
|
||||
log-lines = 50;
|
||||
|
@ -78,10 +79,12 @@ in
|
|||
|
||||
substituters = [
|
||||
cfg.default-substituter.url
|
||||
] ++ (mapAttrsToList (name: value: name) extra-substituters);
|
||||
]
|
||||
++ (mapAttrsToList (name: value: name) extra-substituters);
|
||||
trusted-public-keys = [
|
||||
cfg.default-substituter.key
|
||||
] ++ (mapAttrsToList (name: value: value.key) extra-substituters);
|
||||
]
|
||||
++ (mapAttrsToList (name: value: value.key) extra-substituters);
|
||||
|
||||
}
|
||||
// (lib.optionalAttrs config.metacfg.tools.direnv.enable {
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue