Change default swap amount and update remote builder options
This commit is contained in:
parent
1bbe66d61e
commit
bb76509e9b
14 changed files with 29 additions and 18 deletions
|
@ -19,7 +19,7 @@
|
|||
};
|
||||
};
|
||||
swap = {
|
||||
size = "2G";
|
||||
size = "4G";
|
||||
content = {
|
||||
type = "swap";
|
||||
discardPolicy = "both";
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
};
|
||||
};
|
||||
swap = {
|
||||
size = "2G";
|
||||
size = "4G";
|
||||
content = {
|
||||
type = "swap";
|
||||
discardPolicy = "both";
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
certStoreServer.enable = true;
|
||||
nixCacheClient = {
|
||||
enable = true;
|
||||
disableLocalBuilds = true;
|
||||
remoteBuilds.exclusive = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
forgejo.enable = true;
|
||||
nixCacheClient = {
|
||||
enable = true;
|
||||
disableLocalBuilds = true;
|
||||
remoteBuilds.exclusive = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
gamingServer.enable = true;
|
||||
nixCacheClient = {
|
||||
enable = true;
|
||||
disableLocalBuilds = true;
|
||||
remoteBuilds.exclusive = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -22,7 +22,10 @@
|
|||
platform.hibernate.enable = true;
|
||||
services = {
|
||||
syncthing.enable = true;
|
||||
nixCacheClient.enable = true;
|
||||
nixCacheClient = {
|
||||
enable = true;
|
||||
remoteBuilds.additional = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
system.stateVersion = "23.11";
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
};
|
||||
nixCacheClient = {
|
||||
enable = true;
|
||||
disableLocalBuilds = true;
|
||||
remoteBuilds.exclusive = true;
|
||||
};
|
||||
};
|
||||
networking.idacloudWg.enable = true;
|
||||
|
|
|
@ -22,7 +22,10 @@
|
|||
platform.hibernate.enable = true;
|
||||
services = {
|
||||
syncthing.enable = true;
|
||||
nixCacheClient.enable = true;
|
||||
nixCacheClient = {
|
||||
enable = true;
|
||||
remoteBuilds.additional = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
system.stateVersion = "24.05";
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
};
|
||||
nixCacheClient = {
|
||||
enable = true;
|
||||
disableLocalBuilds = true;
|
||||
remoteBuilds.exclusive = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
siit.enable = true;
|
||||
nixCacheClient = {
|
||||
enable = true;
|
||||
disableLocalBuilds = true;
|
||||
remoteBuilds.exclusive = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
syncthing.enable = true;
|
||||
nixCacheClient = {
|
||||
enable = true;
|
||||
disableLocalBuilds = true;
|
||||
remoteBuilds.exclusive = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
vaultwarden.enable = true;
|
||||
nixCacheClient = {
|
||||
enable = true;
|
||||
disableLocalBuilds = true;
|
||||
remoteBuilds.exclusive = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
zfsBackupServer.enable = true;
|
||||
nixCacheClient = {
|
||||
enable = true;
|
||||
disableLocalBuilds = true;
|
||||
remoteBuilds.exclusive = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -4,13 +4,16 @@ let
|
|||
in
|
||||
{
|
||||
options.custom.services.nixCacheClient = {
|
||||
enable = lib.mkEnableOption "Nix SSH cache client";
|
||||
disableLocalBuilds = lib.mkEnableOption "remote builds only";
|
||||
enable = lib.mkEnableOption "Nix HTTPS cache client";
|
||||
remoteBuilds = {
|
||||
additional = lib.mkEnableOption "remote builds over SSH in addition to local";
|
||||
exclusive = lib.mkEnableOption "remote builds over SSH instead of local";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
nix = {
|
||||
buildMachines = [
|
||||
buildMachines = lib.mkIf (cfg.remoteBuilds.additional || cfg.remoteBuilds.exclusive) [
|
||||
{
|
||||
hostName = "cache.sinerva.eu";
|
||||
maxJobs = 6;
|
||||
|
@ -33,8 +36,10 @@ in
|
|||
settings = {
|
||||
substituters = [ "https://cache.sinerva.eu" ];
|
||||
trusted-public-keys = [ "cache.sinerva.eu:TaIhyAKozO/r88EBWMSdbp+TB0YlcXT/EADunYoYLVc=" ];
|
||||
builders-use-substitutes = true;
|
||||
max-jobs = lib.mkIf cfg.disableLocalBuilds 0;
|
||||
builders-use-substitutes = lib.mkIf (
|
||||
cfg.remoteBuilds.additional || cfg.remoteBuilds.exclusive
|
||||
) true;
|
||||
max-jobs = lib.mkIf cfg.remoteBuilds.exclusive 0;
|
||||
};
|
||||
};
|
||||
services.openssh.knownHosts."cache.sinerva.eu".publicKey =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue