-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathnuc.nix
More file actions
94 lines (78 loc) · 1.64 KB
/
nuc.nix
File metadata and controls
94 lines (78 loc) · 1.64 KB
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
{ config, lib, pkgs, ... }:
let
name = "nuc";
in
{
nix.settings.max-jobs = lib.mkDefault 4;
boot = {
initrd = {
availableKernelModules = [
"ahci"
"rtsx_pci_sdmmc"
"sd_mod"
"usb_storage"
"xhci_pci"
];
kernelModules = [ ];
};
kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ];
# Use the systemd-boot EFI boot loader.
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
binfmt.emulatedSystems = [ "aarch64-linux" ];
};
fileSystems = {
"/boot" =
{
device = "/dev/disk/by-label/boot";
fsType = "vfat";
};
"/" =
{
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
};
swapDevices = [{ device = "/dev/disk/by-label/swap"; }];
networking = {
hostName = name;
useDHCP = false;
};
systemd.network = {
enable = true;
netdevs."25-mv-0" = {
netdevConfig = {
Name = "mv-0";
Kind = "macvlan";
};
macvlanConfig.Mode = "bridge";
};
networks."30-wired" = {
matchConfig = {
Name = "eno1";
};
linkConfig.RequiredForOnline = "carrier";
networkConfig = {
MACVLAN = "mv-0";
DHCP = "no";
IPv6AcceptRA = false;
LinkLocalAddressing = false;
MulticastDNS = false;
LLMNR = false;
};
};
networks."35-mv-0" = {
matchConfig = {
Name = "mv-0";
};
linkConfig.RequiredForOnline = "routable";
networkConfig = {
BindCarrier = "eno1";
DHCP = "yes";
};
};
};
}