Compare commits

..

3 commits

Author SHA1 Message Date
Raito Bezarius
0e8785863e epyc: nerf it 2023-08-13 01:21:41 +02:00
Raito Bezarius
ada25e575f flake: bump 2023-08-13 01:21:41 +02:00
Raito Bezarius
14ec5cc6fe epyc: add nix-top 2023-08-13 01:21:41 +02:00
3 changed files with 62 additions and 43 deletions

65
flake.lock generated
View file

@ -9,11 +9,11 @@
]
},
"locked": {
"lastModified": 1684153753,
"narHash": "sha256-PVbWt3qrjYAK+T5KplFcO+h7aZWfEj1UtyoKlvcDxh0=",
"lastModified": 1690228878,
"narHash": "sha256-9Xe7JV0krp4RJC9W9W9WutZVlw6BlHTFMiUP/k48LQY=",
"owner": "ryantm",
"repo": "agenix",
"rev": "db5637d10f797bb251b94ef9040b237f4702cde3",
"rev": "d8c973fd228949736dedf61b7f8cc1ece3236792",
"type": "github"
},
"original": {
@ -32,11 +32,11 @@
"stable": "stable"
},
"locked": {
"lastModified": 1685163780,
"narHash": "sha256-tMwseHtEFDpO3WKeZKWqrKRAZI6TiEULidxEbzicuFg=",
"lastModified": 1688224393,
"narHash": "sha256-rsAvFNhRFzTF7qyb6WprLFghJnRxMFjvD2e5/dqMp4I=",
"owner": "zhaofengli",
"repo": "colmena",
"rev": "c61bebae1dc1d57237577080b1ca1e37a3fbcebf",
"rev": "19384f3ee2058c56021e4465a3ec57e84a47d8dd",
"type": "github"
},
"original": {
@ -74,11 +74,11 @@
]
},
"locked": {
"lastModified": 1685970051,
"narHash": "sha256-F5ZxBD2DeNd+Q0dDKYBhv76kfjVG/X0ccXjSKpa8KdI=",
"lastModified": 1690739034,
"narHash": "sha256-roW02IaiQ3gnEEDMCDWL5YyN+C4nBf/te6vfL7rG0jk=",
"owner": "nix-community",
"repo": "disko",
"rev": "29d632d7e8fa86f937153ecdfd7d768411001d2d",
"rev": "4015740375676402a2ee6adebc3c30ea625b9a94",
"type": "github"
},
"original": {
@ -110,11 +110,11 @@
]
},
"locked": {
"lastModified": 1685662779,
"narHash": "sha256-cKDDciXGpMEjP1n6HlzKinN0H+oLmNpgeCTzYnsA2po=",
"lastModified": 1690933134,
"narHash": "sha256-ab989mN63fQZBFrkk4Q8bYxQCktuHmBIBqUG1jl6/FQ=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "71fb97f0d875fd4de4994dfb849f2c75e17eb6c3",
"rev": "59cf3f1447cfc75087e7273b04b31e689a8599fb",
"type": "github"
},
"original": {
@ -147,11 +147,11 @@
"flake-registry": {
"flake": false,
"locked": {
"lastModified": 1682423975,
"narHash": "sha256-zvOBrH3hwCedgpaWiOSHYSt+fgF/RhaJs8R5qOX6AYc=",
"lastModified": 1689333397,
"narHash": "sha256-g1Nn0sgH/hR/gEAQ1q6bloU+Q+V+Y4HlBBH6CBxC0HM=",
"owner": "NixOS",
"repo": "flake-registry",
"rev": "8054bfa00d60437297d670ab3296a117e7059a10",
"rev": "5d8dc3eb692809ffd9a2f22cdb8015aa11972905",
"type": "github"
},
"original": {
@ -219,11 +219,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1684899633,
"narHash": "sha256-NtwerXX8UFsoNy6k+DukJMriWtEjQtMU/Urbff2O2Dg=",
"lastModified": 1690957133,
"narHash": "sha256-0Y4CiOIszhHDDXHFmvHUpmhUotKOIn0m3jpMlm6zUTE=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "4cc688ee711159b9bcb5a367be44007934e1a49d",
"rev": "24f9162b26f0debd163f6d94752aa2acb9db395a",
"type": "github"
},
"original": {
@ -241,11 +241,11 @@
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1688319245,
"lastModified": 1688428885,
"narHash": "sha256-fVIbXKvHmxSUAKTMiXx799UasQwU2XT+op7bzvtfl8c=",
"ref": "main",
"rev": "9f32a304708fd9c91c081db05eee1b4f2e0226cc",
"revCount": 5,
"revCount": 2,
"type": "git",
"url": "ssh://gitea@git.newtype.fr/newtype/nixos-hypervisor"
},
@ -257,11 +257,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1685952468,
"narHash": "sha256-YCOr9kttCqoa9IZMjHxX6SlwenTg7FsSmG9TaT76mSE=",
"lastModified": 1691083802,
"narHash": "sha256-bjWTVGskCWR2BdB0Glnj2FyHooNiFThkFBF4oaAMe2s=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "70f7275b32f49bc67ae3532b758b80cb6c27f98a",
"rev": "096c262bbb73d84b8298d81c7daa9890c6ccd6da",
"type": "github"
},
"original": {
@ -273,11 +273,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1685938391,
"narHash": "sha256-96Jw6TbWDLSopt5jqCW8w1Fc1cjQyZlhfBnJ3OZGpME=",
"lastModified": 1691003216,
"narHash": "sha256-Qq/MPkhS12Bl0X060pPvX3v9ac3f2rRQfHjjozPh/Qs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "31cd1b4afbaf0b1e81272ee9c31d1ab606503aed",
"rev": "4a56ce9727a0c5478a836a0d8a8f641c5b9a3d5f",
"type": "github"
},
"original": {
@ -289,11 +289,11 @@
},
"nur": {
"locked": {
"lastModified": 1685980073,
"narHash": "sha256-7BkreZ2cH488dR1XPcdlALj+2g+NvrZdG9ZhwRt0YFI=",
"lastModified": 1691109630,
"narHash": "sha256-NkltnE+ZMABNP7pJVj7ftu/58aTGa5PXxICLr8fjkI4=",
"owner": "nix-community",
"repo": "NUR",
"rev": "de817406e39c1f9be28fde1d62c1f1f0c91acb09",
"rev": "dcd922e7738fc027c73cd2cc110015d38fba9651",
"type": "github"
},
"original": {
@ -325,11 +325,11 @@
]
},
"locked": {
"lastModified": 1685966850,
"narHash": "sha256-HaWNbihBIBATmSbuXLzA92C4858tNdS9Q5kRHJNagVo=",
"lastModified": 1690557184,
"narHash": "sha256-KMGPz3pP7OoUZaUhgcuYG84CtVaJOQw6RK8J0fAtKt0=",
"owner": "numtide",
"repo": "srvos",
"rev": "4f22e6fcaf17c6313c2ecdc996760c3e4b14a623",
"rev": "ceed433086a85e5540bd73cff46497af5a09e36f",
"type": "github"
},
"original": {
@ -379,4 +379,3 @@
"root": "root",
"version": 7
}

View file

@ -1,6 +1,7 @@
{ lib
, config
, pkgs
, inputs
, ...
}:
@ -29,6 +30,17 @@ in
{ domain = "*"; item = "nofile"; type = "-"; value = "20480"; }
];
# Memory accounting techniques
systemd.services.nix-daemon.serviceConfig = {
MemoryAccounting = true;
MemoryMax = "225G";
MemoryHigh = "220G";
MemorySwapMax = "2G";
ManagedOOMSwap = "kill";
ManagedOOMMemoryPressure = "kill";
MemoryPressureWatch = "on";
};
nix = {
# Garbage-collect often
gc.automatic = true;
@ -38,23 +50,21 @@ in
# Randomize GC to avoid thundering herd effects.
gc.randomizedDelaySec = "1800";
# 2.11, 2.12 suffers from a bug with remote builders…
package = pkgs.nixVersions.nix_2_13;
# Inchallah, it works.
# package = lib.mkForce inputs.nixpkgs-unstable.legacyPackages.x86_64-linux.nixVersions.nix_2_17;
# should be enough?
nrBuildUsers = 128;
# https://github.com/NixOS/nix/issues/719
daemonCPUSchedPolicy = "batch";
daemonIOSchedClass = "best-effort";
daemonIOSchedPriority = 5;
settings = {
keep-outputs = true;
keep-derivations = true;
max-jobs = 42; # 64 is too much, it will explode the RAM for now. Let's keep it serious.
# in zfs we trust
fsync-metadata = lib.boolToString (!config.boot.isContainer or config.fileSystems."/".fsType != "zfs");
use-cgroups = true;
http-connections = 0;
auto-allocate-uids = true;
cores = 64; # 128 is too much, it will explode the RAM for now. Let's keep it serious.
max-jobs = 2; # Do not build more than 2 derivations at once in the event, both of them are too big, yes this is stupid, fix it in Nix.
fsync-metadata = true;
substituters = [
"https://nix-community.cachix.org"
"https://tum-dse.cachix.org"
@ -64,6 +74,14 @@ in
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"tum-dse.cachix.org-1:v67rK18oLwgO0Z4b69l30SrV1yRtqxKpiHodG4YxhNM="
];
experimental-features = [
"auto-allocate-uids"
"ca-derivations"
"cgroups"
"discard-references"
"fetch-closure"
"impure-derivations"
];
};
};

View file

@ -35,6 +35,8 @@
usbutils
ipmitool
nix-top
# tries to default to soft-float due to out-dated cc-rs
] ++ lib.optional (!stdenv.hostPlatform.isRiscV) bandwhich;
}