nix-conf/systems/hetzner/default.nix

100 lines
2.3 KiB
Nix
Raw Normal View History

2024-01-18 20:12:43 +01:00
{ config, pkgs, lib, ... }:
{
jopejoe1 = {
local.enable = true;
nix.enable = true;
user = {
jopejoe1.enable = true;
root.enable = true;
};
ssh.enable = true;
};
boot.initrd.availableKernelModules = [ "ahci" "nvme" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
boot.loader = {
grub = {
enable = true;
2024-01-18 23:22:00 +01:00
device = "/dev/disk/by-id/nvme-SAMSUNG_MZVL2512HCJQ-00B00_S675NX0RA55622";
2024-01-18 20:12:43 +01:00
};
};
2024-01-18 22:50:10 +01:00
networking.usePredictableInterfaceNames = false;
networking.dhcpcd.enable = false;
systemd.network = {
enable = true;
networks."eth0" = {
extraConfig = ''
2024-01-18 23:15:33 +01:00
[Match]
Name = eth0
[Network]
# Add your own assigned ipv6 subnet here here!
Address = 2a01:4f8:a0:31e5::/64
Gateway = fe80::1
# optionally you can do the same for ipv4 and disable DHCP (networking.dhcpcd.enable = false;)
Address = 85.10.200.204
Gateway = 85.10.200.193
'';
2024-01-18 22:50:10 +01:00
};
2024-01-18 20:12:43 +01:00
};
time.timeZone = "Europe/Berlin";
services.openssh.settings.PermitRootLogin = lib.mkForce "yes";
console = {
enable = true;
};
disko.devices = {
disk = {
one = {
type = "disk";
2024-01-18 22:25:13 +01:00
device = "/dev/disk/by-id/nvme-SAMSUNG_MZVL2512HCJQ-00B00_S675NX0RA55622";
2024-01-18 20:12:43 +01:00
content = {
type = "gpt";
partitions = {
ESP = {
type = "EF00";
2024-01-18 23:15:33 +01:00
size = "500M";
2024-01-18 20:12:43 +01:00
content = {
2024-01-18 23:15:33 +01:00
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
2024-01-18 20:12:43 +01:00
};
};
2024-01-18 23:15:33 +01:00
root = {
2024-01-18 20:12:43 +01:00
size = "100%";
content = {
2024-01-18 23:15:33 +01:00
type = "filesystem";
format = "ext4";
mountpoint = "/";
2024-01-18 20:12:43 +01:00
};
};
};
};
};
two = {
type = "disk";
2024-01-18 22:25:13 +01:00
device = "/dev/disk/by-id/nvme-SAMSUNG_MZVL2512HCJQ-00B00_S675NX0RA55649";
2024-01-18 20:12:43 +01:00
content = {
type = "gpt";
partitions = {
2024-01-18 23:15:33 +01:00
extra = {
2024-01-18 20:12:43 +01:00
size = "100%";
content = {
2024-01-18 23:15:33 +01:00
type = "filesystem";
format = "ext4";
mountpoint = "/media/extra";
2024-01-18 20:12:43 +01:00
};
};
};
};
};
};
};
}