nix-conf/systems/hetzner/default.nix

87 lines
2 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 = {
2024-01-24 20:50:43 +01:00
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot";
};
2024-01-18 20:12:43 +01:00
grub = {
enable = true;
2024-01-24 20:50:43 +01:00
efiSupport = true;
device = "nodev";
2024-01-18 20:12:43 +01:00
};
};
2024-01-24 20:50:43 +01:00
networking = {
useDHCP = false;
interfaces."enp41s0" = {
ipv4.addresses = [{ address = "85.10.200.204 "; prefixLength = 26; }];
ipv6.addresses = [{ address = "2a01:4f8:a0:31e5::"; prefixLength = 64; }];
2024-01-18 22:50:10 +01:00
};
2024-01-24 20:50:43 +01:00
defaultGateway = "85.10.200.193";
defaultGateway6 = { address = "fe80::1"; interface = "enp41s0"; };
2024-01-18 20:12:43 +01:00
};
time.timeZone = "Europe/Berlin";
services.openssh.settings.PermitRootLogin = lib.mkForce "yes";
2024-01-24 20:50:43 +01:00
services.openssh.ports = [ 2222 ];
2024-01-18 20:12:43 +01:00
console = {
enable = true;
};
disko.devices = {
disk = {
2024-01-19 00:22:27 +01:00
vdb = {
2024-01-18 22:25:13 +01:00
device = "/dev/disk/by-id/nvme-SAMSUNG_MZVL2512HCJQ-00B00_S675NX0RA55622";
2024-01-19 00:22:27 +01:00
type = "disk";
2024-01-18 20:12:43 +01:00
content = {
2024-01-19 00:22:27 +01:00
type = "table";
2024-01-24 20:50:43 +01:00
format = "gpt";
2024-01-19 00:22:27 +01:00
partitions = [
{
name = "ESP";
start = "1M";
end = "500M";
bootable = true;
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-19 00:22:27 +01:00
}
{
name = "root";
start = "500M";
end = "100%";
part-type = "primary";
bootable = true;
2024-01-18 20:12:43 +01:00
content = {
2024-01-18 23:15:33 +01:00
type = "filesystem";
format = "ext4";
mountpoint = "/";
2024-01-18 20:12:43 +01:00
};
2024-01-19 00:22:27 +01:00
}
];
2024-01-18 20:12:43 +01:00
};
};
};
};
}