This repository has no description
1.8 kB
84 lines
1{
2 self,
3 modulesPath,
4 config,
5 lib,
6 pkgs,
7 ...
8}:
9{
10
11 imports = [
12 ./config.nix
13 (modulesPath + "/installer/scan/not-detected.nix")
14 self.inputs.disko.nixosModules.disko
15 ./disk.nix
16 ];
17
18 networking.hostId = "9c0a74ac";
19 boot.kernelPackages = pkgs.zfs.latestCompatibleLinuxPackages;
20
21 boot.loader.grub.enable = true;
22 boot.loader.grub.efiSupport = true;
23 boot.initrd.availableKernelModules = [
24 "xhci_pci"
25 "ahci"
26 "nvme"
27 "sd_mod"
28 ];
29 boot.kernelParams = [
30 "boot.shell_on_fail"
31 ];
32 boot.kernelModules = [ "kvm-amd" ];
33 hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
34
35 # networking config
36 networking.useNetworkd = true;
37 systemd.network = {
38 enable = true;
39 config = {
40 networkConfig.SpeedMeter = true;
41 };
42 netdevs.ext-br.netdevConfig = {
43 Kind = "bridge";
44 Name = "ext-br";
45 # keep the host's NIC MAC bound to the host IP on Hetzner's switch
46 MACAddress = "a8:a1:59:0f:2d:69";
47 };
48 networks.ext-br = {
49 matchConfig.Name = "ext-br";
50 address = [
51 "95.217.192.59/26"
52 "2a01:4f9:4a:4f1a::2/64"
53 ];
54 gateway = [
55 "95.217.192.1"
56 "fe80::1"
57 ];
58 };
59 networks."01-enp" = {
60 matchConfig.Name = "enp35s0";
61 # enslave the physical NIC to ext-br; the host IP lives on the bridge now
62 bridge = [ "ext-br" ];
63 };
64 };
65
66 networking.useDHCP = false;
67 # boot.initrd.network = {
68 # enable = true;
69 # ssh = {
70 # enable = true;
71 # authorizedKeys = [ config.krebs.users.lass.pubkey ];
72 # port = 2222;
73 # hostKeys = [
74 # (<secrets/ssh.id_ed25519>)
75 # (<secrets/ssh.id_rsa>)
76 # ];
77 # };
78 # };
79 # boot.kernelParams = [
80 # "net.ifnames=0"
81 # "ip=dhcp"
82 # "boot.trace"
83 # ];
84}