From 49fb61ed9400966a0358abc589f26cfcc93947a8 Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Tue, 12 Apr 2022 02:33:46 +0000 Subject: [PATCH] Base linode installation --- hosts/linode/default.nix | 8 ++++++++ profiles/linode.nix | 28 ++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 hosts/linode/default.nix create mode 100644 profiles/linode.nix diff --git a/hosts/linode/default.nix b/hosts/linode/default.nix new file mode 100644 index 0000000..38ab82e --- /dev/null +++ b/hosts/linode/default.nix @@ -0,0 +1,8 @@ +{ ... }: + +{ + imports = [ + ../../profiles/linode.nix + ]; + networking.hostName = "linode"; +} diff --git a/profiles/linode.nix b/profiles/linode.nix new file mode 100644 index 0000000..4681d96 --- /dev/null +++ b/profiles/linode.nix @@ -0,0 +1,28 @@ +{ pkgs, ... }: + +{ + # Enables connection over Linode consoles + boot.kernelParams = [ "console=ttyS0,19200n8" ]; + boot.loader.grub = { + device = "nodev"; + extraConfig = '' +serial --speed=19200 --unit=0 --word=8 --parity=no --stop=1; +terminal_input serial; +terminal_output serial; +''; + }; + + # Tells grub to ignore partion-free device warnings, since we are on Linode + boot.loader.timeout = 15; + + networking.usePredictableInterfaceNames = false; # Use old style eth0 names + networking.useDHCP = false; + networking.interfaces.eth0.useDHCP = true; + + # Suggested diagnostic tools + environment.systemPackages = with pkgs; [ + inetutils + mtr + sysstat + ]; +}