summaryrefslogtreecommitdiffstats
path: root/makefu/1systems/gum/hetznercloud/default.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2022-03-18 16:52:49 +0100
committertv <tv@krebsco.de>2022-03-18 16:52:49 +0100
commit60bdd171f50cd9350f69d7df46049c48070e638d (patch)
treebbedbf1c59f61c0de71cea14bb9c6c76ab73b653 /makefu/1systems/gum/hetznercloud/default.nix
parent519648574e85fe02550092eaa76298e62568b655 (diff)
parentb1068cadc4458d91889b7ede847829af33d2b145 (diff)
Merge remote-tracking branch 'prism/master'
Diffstat (limited to 'makefu/1systems/gum/hetznercloud/default.nix')
-rw-r--r--makefu/1systems/gum/hetznercloud/default.nix50
1 files changed, 50 insertions, 0 deletions
diff --git a/makefu/1systems/gum/hetznercloud/default.nix b/makefu/1systems/gum/hetznercloud/default.nix
new file mode 100644
index 000000000..cfcd894af
--- /dev/null
+++ b/makefu/1systems/gum/hetznercloud/default.nix
@@ -0,0 +1,50 @@
+{ config, lib, pkgs, modulesPath, ... }:
+{
+
+ imports =
+ [ ./network.nix
+ (modulesPath + "/profiles/qemu-guest.nix")
+ ];
+
+ # Disk
+ boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sd_mod" "sr_mod" ];
+ boot.initrd.kernelModules = [ ];
+ boot.kernelModules = [ ];
+ boot.extraModulePackages = [ ];
+
+ fileSystems."/" =
+ { device = "rpool/root";
+ fsType = "zfs";
+ };
+
+ fileSystems."/home" =
+ { device = "rpool/home";
+ fsType = "zfs";
+ };
+
+ fileSystems."/nix" =
+ { device = "rpool/nix";
+ fsType = "zfs";
+ };
+
+ fileSystems."/boot" =
+ { device = "/dev/sda1";
+ fsType = "vfat";
+ };
+
+ swapDevices = [ ];
+ boot.loader.grub.device = "/dev/sda";
+
+ networking.hostId = "3150697b"; # required for zfs use
+ boot.tmpOnTmpfs = true;
+ boot.supportedFilesystems = [ "zfs" ];
+
+ boot.loader.grub.enable = true;
+ boot.loader.grub.version = 2;
+ boot.loader.grub.copyKernels = true;
+ boot.zfs.devNodes = "/dev"; # fixes some virtualmachine issues
+ boot.kernelParams = [
+ "boot.shell_on_fail"
+ "panic=30" "boot.panic_on_fail" # reboot the machine upon fatal boot issues
+ ];
+}