forked from DGNum/infrastructure
feat(krz01): add basic microvm exprs
For a router01. Signed-off-by: Ryan Lahfa <ryan@dgnum.eu>
This commit is contained in:
parent
4d689fee33
commit
3aeae4e33f
5 changed files with 32 additions and 0 deletions
|
@ -9,9 +9,11 @@ lib.extra.mkConfig {
|
|||
# INFO: This list needs to stay sorted alphabetically
|
||||
# TODO: re-enable me when #139 is merged. "proxmox"
|
||||
"nvidia-tesla-k80"
|
||||
"microvm-router01"
|
||||
];
|
||||
|
||||
extraConfig = {
|
||||
microvm.host.enable = true;
|
||||
dgn-hardware = {
|
||||
useZfs = true;
|
||||
zfsPools = [
|
||||
|
|
16
machines/krz01/microvm-router01.nix
Normal file
16
machines/krz01/microvm-router01.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
_: {
|
||||
microvm.autostart = [ "router01" ];
|
||||
microvm.vms.router01 = {
|
||||
config = {
|
||||
networking.hostName = "router01";
|
||||
microvm.shares = [
|
||||
{
|
||||
source = "/nix/store";
|
||||
mountPoint = "/nix/.ro-store";
|
||||
tag = "ro-store";
|
||||
proto = "virtiofs";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -62,6 +62,7 @@
|
|||
++ [
|
||||
"${sources.agenix}/modules/age.nix"
|
||||
"${sources.arkheon}/module.nix"
|
||||
"${sources."microvm.nix"}/nixos-modules/host"
|
||||
]
|
||||
++ ((import sources.nix-modules { inherit lib; }).importModules (
|
||||
[
|
||||
|
|
|
@ -43,6 +43,7 @@ in
|
|||
|
||||
config = mkIf cfg.enable (mkMerge [
|
||||
{
|
||||
microvm.host.enable = lib.mkDefault false;
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
hardware.cpu.intel.updateMicrocode = true;
|
||||
|
||||
|
|
|
@ -182,6 +182,18 @@
|
|||
"url": null,
|
||||
"hash": "0m9il1lllw59a6l9vwfi1bika7g4pxs20clc48kklpflnk0scb1f"
|
||||
},
|
||||
"microvm.nix": {
|
||||
"type": "Git",
|
||||
"repository": {
|
||||
"type": "GitHub",
|
||||
"owner": "RaitoBezarius",
|
||||
"repo": "microvm.nix"
|
||||
},
|
||||
"branch": "main",
|
||||
"revision": "49899c9a4fdf75320785e79709bf1608c34caeb8",
|
||||
"url": "https://github.com/RaitoBezarius/microvm.nix/archive/49899c9a4fdf75320785e79709bf1608c34caeb8.tar.gz",
|
||||
"hash": "0sz6azdpiz4bd36x23bcdhx6mwyqj8zl5cczjgv48xqfmysy8zwy"
|
||||
},
|
||||
"nix-lib": {
|
||||
"type": "GitRelease",
|
||||
"repository": {
|
||||
|
|
Loading…
Reference in a new issue