server9, server10: refactor into modules/microvm-host
This commit is contained in:
parent
56e961221d
commit
ac2a9e2246
|
@ -694,6 +694,7 @@
|
|||
modules = [
|
||||
./hosts/server9
|
||||
microvm.nixosModules.host
|
||||
self.nixosModules.microvm-host
|
||||
self.nixosModules.cluster-network
|
||||
self.nixosModules.cluster
|
||||
{ _module.args = { inherit self; }; }
|
||||
|
@ -704,6 +705,7 @@
|
|||
modules = [
|
||||
./hosts/server10
|
||||
microvm.nixosModules.host
|
||||
self.nixosModules.microvm-host
|
||||
self.nixosModules.cluster-network
|
||||
self.nixosModules.cluster
|
||||
{ _module.args = { inherit self; }; }
|
||||
|
@ -789,6 +791,7 @@
|
|||
microvm.nixosModules.microvm
|
||||
./modules/microvm.nix
|
||||
];
|
||||
microvm-host = ./modules/microvm-host.nix;
|
||||
nncp = ./modules/nncp.nix;
|
||||
plume = {
|
||||
imports = [ ./modules/plume.nix ];
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./microvm-staging.nix
|
||||
./microvms.nix
|
||||
];
|
||||
|
||||
c3d2 = {
|
||||
|
@ -45,5 +44,11 @@
|
|||
zfs.autoScrub.enable = true;
|
||||
};
|
||||
|
||||
# static list of microvms from other sources
|
||||
microvm.autostart = [
|
||||
"data-hoarder"
|
||||
"staging-data-hoarder"
|
||||
];
|
||||
|
||||
system.stateVersion = "21.11"; # Did you read the comment?
|
||||
}
|
||||
|
|
|
@ -31,7 +31,10 @@
|
|||
services.zfs.autoScrub.enable = true;
|
||||
services.smartd.enable = true;
|
||||
|
||||
c3d2.hq.statistics.enable = true;
|
||||
c3d2 = {
|
||||
deployment.microvmBaseZfsDataset = "tank/storage";
|
||||
hq.statistics.enable = true;
|
||||
};
|
||||
|
||||
# XXX: enable for zw-ev and poelzi-ha until we find a better solution
|
||||
virtualisation.libvirtd = {
|
||||
|
|
|
@ -8,21 +8,14 @@
|
|||
};
|
||||
|
||||
config = {
|
||||
microvm.autostart =
|
||||
# static list of microvms from other sources
|
||||
[
|
||||
"data-hoarder"
|
||||
"staging-data-hoarder"
|
||||
]
|
||||
++
|
||||
# just all the microvms from this flake
|
||||
# that are supposed to run on the server
|
||||
microvm.autostart =
|
||||
builtins.filter (name:
|
||||
self.nixosConfigurations.${name}
|
||||
.config ? c3d2.deployment.server
|
||||
&& self.nixosConfigurations.${name}
|
||||
.config.c3d2.deployment.server
|
||||
== config.networking.hostName
|
||||
let
|
||||
inherit (self.nixosConfigurations.${name}) config;
|
||||
in
|
||||
(config.c3d2.deployment.server or null) == config.networking.hostName
|
||||
) (builtins.attrNames self.nixosConfigurations);
|
||||
|
||||
systemd.services."microvm-virtiofsd@" = {
|
Loading…
Reference in New Issue
Block a user