-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathrose.nix
73 lines (63 loc) · 2.04 KB
/
rose.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
{
imports = [
../modules/ipmi-supermicro.nix
../modules/hardware/supermicro-AS-4124GS.nix
../modules/nfs/client.nix
../modules/disko-zfs.nix
../modules/intel-fpgas.nix
../modules/xilinx.nix
../modules/xrdp.nix
../modules/amd_sev_snp.nix
#../modules/amd_sev_svsm.nix
../modules/vfio/iommu-amd.nix
../modules/dpdk.nix
];
disko.rootDisk = "/dev/disk/by-id/nvme-SAMSUNG_MZQL21T9HCJR-00A07_S64GNA0T724988";
boot.hugepages1GB.number = 0;
# boot.hugepages2MB.number = 0;
boot.hugepages2MB.number =
let
gb = 1500;
in
gb * 1024 / 2;
# blacklist kernel module that conflicts with the Intel FPGA OpenCL driver
boot.blacklistedKernelModules = [ "altera_cvp" ];
networking.hostName = "rose";
simd.arch = "znver3";
system.stateVersion = "22.11";
# peters benchmarks seem to trigger envfs to hang up, rendering the enire system unusable
services.envfs.enable = false;
# external deduplicating zfs for large numbers of VMs
# formating:
# create linux partition with fdisk
# sudo zpool create zokelmannvms -O acltype=posixacl -O xattr=sa -O compression=lz4 -O atime=off /dev/disk/by-partuuid/ced04b7c-f718-4997-8306-c33fb44a04e2
# sudo zfs create -o mountpoint=legacy zokelmannvms/vms
fileSystems."/scratch/okelmann/vmuxIO/VMs" = {
device = "zokelmannvms/vms";
fsType = "zfs";
# options = [ "uid=${builtins.toString config.users.users.okelmann.uid}" ];
};
systemd.services.set-vmount-owner = {
description = "Set ownership of /scratch/okelmann/vmuxIO/VMs";
after = [ "local-fs.target" ];
wantedBy = [ "multi-user.target" ];
script = "chown -R okelmann:users /scratch/okelmann/vmuxIO/VMs";
};
# manually added to load xilinx from
fileSystems."/share" = {
device = "nfs:/export/share";
fsType = "nfs4";
options = [
"nofail"
"ro"
"timeo=14"
];
};
# Don't manage vnet interface with systemd-networkd
systemd.network.networks."05-rose_vnet".extraConfig = ''
[Match]
Name = vnet*
[Link]
Unmanaged = yes
'';
}