ops/nixos: migrate nix.maxJobs/binaryCaches/trustedBinaryCaches to the nix.settings equivalents
This commit is contained in:
parent
14a8bd4945
commit
cbabb6f211
11 changed files with 19 additions and 15 deletions
|
@ -119,8 +119,10 @@ in {
|
|||
];
|
||||
networking.hosts = depot.ops.nixos.tailscaleIPs;
|
||||
nix = {
|
||||
binaryCaches = lib.mkForce [ "https://cache.nixos.org/" "s3://lukegb-nix-cache?endpoint=storage.googleapis.com&trusted=1" ];
|
||||
trustedBinaryCaches = lib.mkForce [ "https://cache.nixos.org/" "s3://lukegb-nix-cache?endpoint=storage.googleapis.com&trusted=1" ];
|
||||
settings = {
|
||||
substituters = lib.mkForce [ "https://cache.nixos.org/" "s3://lukegb-nix-cache?endpoint=storage.googleapis.com&trusted=1" ];
|
||||
trusted-substituters = lib.mkForce [ "https://cache.nixos.org/" "s3://lukegb-nix-cache?endpoint=storage.googleapis.com&trusted=1" ];
|
||||
};
|
||||
envVars = {
|
||||
AWS_ACCESS_KEY_ID = "${depot.ops.secrets.nixCache.AWS_ACCESS_KEY_ID}";
|
||||
AWS_SECRET_ACCESS_KEY = "${depot.ops.secrets.nixCache.AWS_SECRET_ACCESS_KEY}";
|
||||
|
|
|
@ -86,7 +86,7 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
nix.maxJobs = lib.mkDefault 12;
|
||||
nix.settings.max-jobs = lib.mkDefault 12;
|
||||
|
||||
# Use systemd-boot.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
|
|
|
@ -68,7 +68,7 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
nix.maxJobs = lib.mkDefault 8;
|
||||
nix.settings.max-jobs = lib.mkDefault 8;
|
||||
|
||||
# Use GRUB, so we can have mirrored bootloaders.
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
|
|
@ -109,7 +109,7 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
nix.maxJobs = lib.mkDefault 8;
|
||||
nix.settings.max-jobs = lib.mkDefault 8;
|
||||
|
||||
# Networking!
|
||||
networking = {
|
||||
|
|
|
@ -51,7 +51,7 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
nix.maxJobs = lib.mkDefault 12;
|
||||
nix.settings.max-jobs = lib.mkDefault 12;
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
nix.maxJobs = lib.mkDefault 2;
|
||||
nix.settings.max-jobs = lib.mkDefault 2;
|
||||
|
||||
my.rundeck.tags = [ "bvm" ];
|
||||
|
||||
|
|
|
@ -101,11 +101,13 @@ in
|
|||
my.rundeck.tags = [ "nixos" ];
|
||||
|
||||
nix = {
|
||||
nixPath = [ "depot=/home/lukegb/depot/" "nixpkgs=/home/lukegb/depot/third_party/nixpkgs/" ];
|
||||
package = pkgs.nix_2_3; # Use a working nix.
|
||||
trustedUsers = [ "root" "@wheel" "deployer" ];
|
||||
binaryCaches = lib.mkForce [ "https://cache.nixos.org/" "s3://lukegb-nix-cache?endpoint=storage.googleapis.com&trusted=1" ];
|
||||
trustedBinaryCaches = lib.mkForce [ "https://cache.nixos.org/" "s3://lukegb-nix-cache?endpoint=storage.googleapis.com&trusted=1" ];
|
||||
nixPath = [ "depot=/home/lukegb/depot/" "nixpkgs=/home/lukegb/depot/third_party/nixpkgs/" ];
|
||||
settings = {
|
||||
trusted-users = [ "root" "@wheel" "deployer" ];
|
||||
substituters = lib.mkForce [ "https://cache.nixos.org/" "s3://lukegb-nix-cache?endpoint=storage.googleapis.com&trusted=1" ];
|
||||
trusted-substituters = lib.mkForce [ "https://cache.nixos.org/" "s3://lukegb-nix-cache?endpoint=storage.googleapis.com&trusted=1" ];
|
||||
};
|
||||
envVars = {
|
||||
AWS_ACCESS_KEY_ID = "${depot.ops.secrets.nixCache.AWS_ACCESS_KEY_ID}";
|
||||
AWS_SECRET_ACCESS_KEY = "${depot.ops.secrets.nixCache.AWS_SECRET_ACCESS_KEY}";
|
||||
|
|
|
@ -36,7 +36,7 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
nix.maxJobs = lib.mkDefault 1;
|
||||
nix.settings.max-jobs = lib.mkDefault 1;
|
||||
|
||||
# Networking!
|
||||
networking = {
|
||||
|
|
|
@ -73,7 +73,7 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
nix.maxJobs = lib.mkDefault 12;
|
||||
nix.settings.max-jobs = lib.mkDefault 12;
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
nix.maxJobs = lib.mkDefault 4;
|
||||
nix.settings.max-jobs = lib.mkDefault 4;
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
|
|
|
@ -55,7 +55,7 @@ in {
|
|||
services.postgresql.settings.work_mem = "1GB";
|
||||
services.postgresql.settings.maintenance_work_mem = "1GB";
|
||||
|
||||
nix.maxJobs = lib.mkDefault 8;
|
||||
nix.settings.max-jobs = lib.mkDefault 8;
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
|
||||
virtualisation = {
|
||||
podman.enable = true;
|
||||
|
|
Loading…
Reference in a new issue