nix-config/hosts/nfsroot/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

45 lines
873 B
Nix
Raw Normal View History

2022-12-04 08:53:28 +01:00
{ lib, ... }:
2022-06-07 20:22:25 +02:00
let
nfsExports = [
"var/lib/nfsroot/dacbert"
"var/lib/nfsroot/riscbert"
"var/lib/dump-dvb/whoopsie"
];
2022-06-07 20:22:25 +02:00
in {
imports = [
./tftp.nix
./nfs.nix
];
2022-06-07 20:15:09 +02:00
microvm = {
hypervisor = "cloud-hypervisor";
mem = 2048;
2022-06-17 00:05:32 +02:00
2022-09-14 21:34:44 +02:00
# shares break nfs
shares = lib.mkForce [];
bootDiskType = "erofs";
2022-06-17 00:05:32 +02:00
volumes = map (export: {
mountPoint = "/${export}";
image = "/dev/zvol/server10/vm/nfsroot/${builtins.baseNameOf export}";
autoCreate = false;
}) nfsExports;
2022-06-16 22:41:04 +02:00
};
c3d2.deployment = {
server = "server10";
mounts = [ "etc" "home" "var"];
2022-06-07 20:15:09 +02:00
};
fileSystems = builtins.foldl' (fileSystems: export: fileSystems // {
"/${export}".options = [ "relatime" "discard" ];
}) {} nfsExports;
2022-06-07 20:15:09 +02:00
networking = {
hostName = "nfsroot";
firewall.enable = false;
};
system.stateVersion = "22.05";
}