This commit is contained in:
Leon Vita 2022-11-26 00:33:20 +00:00
commit e6ab80fc5e
7 changed files with 39 additions and 21 deletions

View File

@ -224,7 +224,7 @@
legacyPackages = lib.attrsets.mapAttrs (system: pkgs:
pkgs.appendOverlays [
fenix.overlay
fenix.overlays.default
naersk.overlay
self.overlay
]) nixos.legacyPackages;
@ -548,7 +548,7 @@
self.nixosModules.microvm
./hosts/auth
];
nixpkgs = inputs.nixos-unstable;
# nixpkgs = inputs.nixos-unstable;
};
broker = nixosSystem' {
@ -590,7 +590,7 @@
self.nixosModules.microvm
./hosts/gitea
];
nixpkgs = inputs.nixos-unstable;
# nixpkgs = inputs.nixos-unstable;
};
glotzbert = nixosSystem' {
@ -608,7 +608,7 @@
self.nixosModules.microvm
./hosts/hedgedoc
];
nixpkgs = inputs.nixos-unstable;
# nixpkgs = inputs.nixos-unstable;
};
pulsebert = nixosSystem' {
@ -624,7 +624,7 @@
};
}
];
nixpkgs = inputs.nixos-unstable;
# nixpkgs = inputs.nixos-unstable;
};
radiobert = nixosSystem' {
@ -743,7 +743,7 @@
self.nixosModules.microvm
./hosts/grafana
];
nixpkgs = nixos-unstable;
# nixpkgs = nixos-unstable;
};
hydra = nixosSystem' {
@ -759,7 +759,7 @@
};
}
];
nixpkgs = nixos-unstable;
# nixpkgs = nixos-unstable;
};
mucbot = nixosSystem' {
@ -827,7 +827,7 @@
heliwatch.nixosModules.heliwatch
./hosts/sdrweb
];
nixpkgs = nixos-unstable;
# nixpkgs = nixos-unstable;
};
bind = nixosSystem' {
@ -874,7 +874,6 @@
skyflake.nixosModules.default
{ _module.args = { inherit self; }; }
];
nixpkgs = nixos-unstable;
};
server10 = nixosSystem' {
@ -887,7 +886,6 @@
skyflake.nixosModules.default
{ _module.args = { inherit self; }; }
];
nixpkgs = nixos-unstable;
};
oparl = nixosSystem' {
@ -937,7 +935,7 @@
};
}
];
nixpkgs = nixos-unstable;
# nixpkgs = nixos-unstable;
system = "x86_64-linux";
};
@ -953,7 +951,7 @@
self.nixosModules.microvm
./hosts/mediawiki
];
nixpkgs = nixos-unstable;
# nixpkgs = nixos-unstable;
};
gnunet = nixosSystem' {
@ -961,7 +959,7 @@
self.nixosModules.cluster-options
./hosts/gnunet
];
nixpkgs = nixos-unstable;
# nixpkgs = nixos-unstable;
};
zengel = nixosSystem' {
@ -999,7 +997,7 @@
self.nixosModules.cluster-options
./hosts/owncast
];
nixpkgs = nixos-unstable;
# nixpkgs = nixos-unstable;
};
};
@ -1031,7 +1029,7 @@
nncp = ./modules/nncp.nix;
plume = {
imports = [ ./modules/plume.nix ];
nixpkgs.overlays = [ fenix.overlay naersk.overlay ];
nixpkgs.overlays = [ fenix.overlays.default naersk.overlay ];
};
rpi-netboot = ./modules/rpi-netboot.nix;
};

View File

@ -11,7 +11,7 @@
hq.statistics.enable = true;
};
boot= {
boot = {
loader.grub = {
enable = true;
version = 2;
@ -49,6 +49,7 @@
"data-hoarder"
"staging-data-hoarder"
];
skyflake.nomad.client.meta."c3d2.cpuSpeed" = "4";
system.stateVersion = "21.11"; # Did you read the comment?
}

View File

@ -38,4 +38,5 @@
# deployment.microvmBaseZfsDataset = "tank/storage";
hq.statistics.enable = true;
};
skyflake.nomad.client.meta."c3d2.cpuSpeed" = "3";
}

View File

@ -35,6 +35,7 @@
deployment.microvmBaseZfsDataset = "tank/storage";
hq.statistics.enable = true;
};
skyflake.nomad.client.meta."c3d2.cpuSpeed" = "3";
# XXX: enable for zw-ev and poelzi-ha until we find a better solution
virtualisation.libvirtd = {

View File

@ -36,7 +36,7 @@ in {
nodes = builtins.listToAttrs (
map (name: {
inherit name;
value.address = builtins.trace name hostRegistry.hosts.${name}.ip4;
value.address = hostRegistry.hosts.${name}.ip4;
}) servers
);
nomad = {

View File

@ -21,6 +21,16 @@
storage = mkOption {
type = types.enum [ "fast" "big" ];
default = "fast";
description = ''
Which glusterfs volume to use for persistedShares
'';
};
needForSpeed = mkOption {
type = types.bool;
default = false;
description = ''
Prefer deployment on Nomad clients with a higher c3d2.cpuSpeed
'';
};
};
}

View File

@ -77,10 +77,17 @@ in
};
skyflake = {
nomadJob.constraints = lib.optionals (config.deployment.storage == "big") [ {
attribute = "\${meta.c3d2.storage}";
value = "big";
} ];
nomadJob = {
constraints = lib.optionals (config.deployment.storage == "big") [ {
attribute = "\${meta.c3d2.storage}";
value = "big";
} ];
affinities = lib.optionals config.deployment.needForSpeed (builtins.genList (i: {
attribute = "\${meta.c3d2.cpuSpeed}";
value = toString (i + 1);
weight = 10 + i;
}) 10);
};
};
networking = {