]> Git — Sourcephile - julm/julm-nix.git/blob - nixos/profiles/builder.nix
nix: format with nixfmt-rfc-style
[julm/julm-nix.git] / nixos / profiles / builder.nix
1 { lib, inputs, ... }:
2 {
3 nix.settings.experimental-features = [
4 "nix-command"
5 "flakes"
6 ];
7 #nix.registry.self.flake = inputs.self;
8 nix.nixPath = [
9 "nixpkgs=${inputs.nixpkgs}"
10 ];
11
12 systemd.services.nix-daemon.serviceConfig = {
13 CPUSchedulingPolicy = lib.mkForce "batch";
14 IOSchedulingClass = lib.mkForce "best-effort";
15 # 0: high priority, 7: low priority
16 IOSchedulingPriority = lib.mkForce 4;
17 Nice = 0;
18 };
19
20 systemd.services.nix-gc.serviceConfig = {
21 CPUSchedulingPolicy = "batch";
22 IOSchedulingClass = "best-effort";
23 IOSchedulingPriority = 7;
24 Nice = 5;
25 };
26
27 systemd.sleep.extraConfig = ''
28 AllowSuspend=no
29 AllowHibernation=no
30 '';
31 }