From 3d721a297feacbb503ae1cdbb2a2bae5bc1d783d Mon Sep 17 00:00:00 2001 From: Craige McWhirter Date: Tue, 2 Jul 2019 11:52:10 +1000 Subject: [PATCH] Inital commit linode_vm.nix --- Hardware/linode_vm.nix | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 Hardware/linode_vm.nix diff --git a/Hardware/linode_vm.nix b/Hardware/linode_vm.nix new file mode 100644 index 0000000..1d74f24 --- /dev/null +++ b/Hardware/linode_vm.nix @@ -0,0 +1,41 @@ +# Configuration common to all my Linode VMs + +{ config, pkgs, lib, ... }: + +{ + imports = [ + # Import the NixOS Qemu guest settings + + ]; + + boot.initrd.availableKernelModules = [ "virtio_pci" "ahci" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + boot.kernelParams = [ "console-ttyS0,19200n8" ]; + boot.loader = { + grub = { + extraConfig = '' + serial --speed=19200 --unit=0 --word=8 --parity=no --stop=1; + terminal_input serial; + terminal_output serial + ''; + device = "nodev"; + }; + timeout = 10; + }; + + # File systems configuration for the Linode VMs + fileSystems."/" = + { device = "/dev/sda"; + fsType = "ext4"; + }; + + swapDevices = [ + { + device = "/dev/sdb"; + } + ]; + + nix.maxJobs = lib.mkDefault 4; +}