dotfiles/nixos/physical/hetznercloud.nix

36 lines
916 B
Nix
Raw Normal View History

2021-01-03 17:12:16 +01:00
{ config, lib, pkgs, modulesPath, ... }:
2021-05-29 18:05:31 +02:00
let ipconf = (import ../secrets.nix).ipconf.${config.networking.hostName};
in {
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
2020-05-21 17:39:38 +02:00
boot.kernelPackages = pkgs.linuxPackages_latest;
2021-05-29 18:05:31 +02:00
boot.initrd.availableKernelModules =
[ "ata_piix" "uhci_hcd" "virtio_pci" "sd_mod" "sr_mod" ];
2020-05-21 17:39:38 +02:00
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
boot.loader.grub = {
enable = true;
version = 2;
device = "/dev/sda";
};
2021-05-29 18:05:31 +02:00
fileSystems."/" = {
device = "/dev/sda1";
fsType = "ext4";
};
2020-05-21 17:39:38 +02:00
swapDevices = [ ];
nix.maxJobs = lib.mkDefault 1;
#services.nscd.enable = false;
networking.dhcpcd.enable = false;
systemd.network.enable = true;
systemd.network.networks."40-hetzner" = {
DHCP = "ipv4";
address = [ ipconf.mainIPv6 ];
gateway = [ "fe80::1" ];
matchConfig.Name = "ens3";
};
services.fstrim.enable = true;
}