-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaendernix.nix
63 lines (57 loc) · 1.44 KB
/
aendernix.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
{ pkgs, lib, config, ... }:
{
options = {
boot.hideR7240 = lib.mkOption {
type = lib.types.bool;
default = true;
example = false;
description = "Whether to bind that AMD GPU to vfio at boot";
};
};
config = {
networking.hostName = "aendernix"; # Define your hostname.
networking.hostId = "faae4fe4"; # for zfs
networking.retiolum = {
ipv4 = "10.243.29.172";
ipv6 = "42:0:3c46:f14:26a0:7b5e:349f:7f0b";
};
specialisation = {
bootR7240 = {
inheritParentConfig = true;
configuration = {
boot.hideR7240 = false;
};
};
};
# passthrough setup
virtualisation.libvirtd = {
enable = true;
};
boot.kernelParams = (if config.boot.hideR7240 then [
# 07:00.0: R7240
"vfio-pci.ids=1002:699f" # TODO nixify this parameter so that it gets properly merged with other definitions
] else [
# 08:00.0: RX 590
"vfio-pci.ids=1002:67df,1002:aaf0"
# spdk/dpdk/qemu hugepages
"default_hugepagesz=1G"
"hugepagesz=1G"
"hugepages=16"
]);
users.groups.libvirtd.members = [ "peter" ];
#users.groups.input.members = [ "peter" ];
environment.systemPackages = with pkgs; [
virt-manager
pciutils
heroic # epic and gog launcher
telegram-desktop
# do i really need these?
wine
winetricks
dxvk
lutris
# libvirt
swtpm
];
};
}