[run-vm] handle edgecase for prometheus mmaped file on 9p share
All checks were successful
Check flake syntax / flake-check (push) Successful in 4m15s
All checks were successful
Check flake syntax / flake-check (push) Successful in 4m15s
This commit is contained in:
11
outputs.nix
11
outputs.nix
@@ -15,7 +15,7 @@ in (utils.lib.eachSystem (builtins.filter filter_system utils.lib.defaultSystems
|
||||
pkgs-unstable = nixpkgs-unstable.legacyPackages."${system}";
|
||||
pkgs = nixpkgs.legacyPackages."${system}";
|
||||
|
||||
vmMicroVMOverwrites = options: {
|
||||
vmMicroVMOverwrites = hostname: options: {
|
||||
microvm = {
|
||||
mem = pkgs.lib.mkForce 4096;
|
||||
hypervisor = pkgs.lib.mkForce "qemu";
|
||||
@@ -43,9 +43,12 @@ in (utils.lib.eachSystem (builtins.filter filter_system utils.lib.defaultSystems
|
||||
|
||||
fileSystems = {
|
||||
"/".fsType = pkgs.lib.mkForce "tmpfs";
|
||||
"/var/lib" = pkgs.lib.mkIf (options.varPath != "") {
|
||||
depends = [ "/var" ];
|
||||
};
|
||||
|
||||
# prometheus uses a memory mapped file which doesnt seem supported by 9p shares
|
||||
# therefore we mount a tmpfs inside the datadir
|
||||
"/var/lib/prometheus2/data" = pkgs.lib.mkIf (hostname == "overwatch" && options.varPath != "") (pkgs.lib.mkForce {
|
||||
fsType = pkgs.lib.mkForce "tmpfs";
|
||||
});
|
||||
};
|
||||
|
||||
boot.isContainer = pkgs.lib.mkForce false;
|
||||
|
||||
Reference in New Issue
Block a user