From b23b138ccc399ddb17bc8c51ca237a05ee726efd Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Tue, 18 Apr 2023 05:17:33 +0000 Subject: [PATCH] Add linodeeu configuration and tailscale update --- flake.nix | 1 + hosts/linodeeu/default.nix | 12 +++++++++++ hosts/linodeeu/hardware-configuration.nix | 26 +++++++++++++++++++++++ modules-linux/tailscale.nix | 4 ++++ 4 files changed, 43 insertions(+) create mode 100644 hosts/linodeeu/default.nix create mode 100644 hosts/linodeeu/hardware-configuration.nix diff --git a/flake.nix b/flake.nix index f14421d..5c385ed 100644 --- a/flake.nix +++ b/flake.nix @@ -72,6 +72,7 @@ jude = unstable { name = "jude"; }; "icdm-root" = unstable { name = "icdm-root"; }; "linode" = machine { name = "linode"; }; + "linodeeu" = machine { name = "linodeeu"; }; "lappy" = machine { name = "lappy"; }; "iso" = machine { name = "iso"; }; # nix build '.#nixosConfigurations.wsl.config.system.build.installer' diff --git a/hosts/linodeeu/default.nix b/hosts/linodeeu/default.nix new file mode 100644 index 0000000..b9d0692 --- /dev/null +++ b/hosts/linodeeu/default.nix @@ -0,0 +1,12 @@ +{ ... }: + +{ + imports = [ + ./hardware-configuration.nix + ]; + greg.home = false; + greg.linode.enable = true; + greg.tailscale.enable = true; + networking.hostName = "linodeeu"; + networking.domain = "thehellings.com"; +} diff --git a/hosts/linodeeu/hardware-configuration.nix b/hosts/linodeeu/hardware-configuration.nix new file mode 100644 index 0000000..844ba26 --- /dev/null +++ b/hosts/linodeeu/hardware-configuration.nix @@ -0,0 +1,26 @@ +# Do not modify this file! It was generated by "nixos-generate-config" +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = [ + (modulesPath + "/profiles/qemu-guest.nix") + ]; + + boot.initrd.availableKernelModules = [ "virtio_pci" "virtio_scsi" "ahci" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = { + device = "/dev/sda"; + fsType = "ext4"; + }; + + swapDevices = [ + { device = "/dev/sdb"; } + ]; + + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/modules-linux/tailscale.nix b/modules-linux/tailscale.nix index 54e34b1..b446c9f 100644 --- a/modules-linux/tailscale.nix +++ b/modules-linux/tailscale.nix @@ -10,5 +10,9 @@ in { config = lib.mkIf cfg.enable { services.tailscale.enable = true; networking.firewall.checkReversePath = "loose"; + boot.kernel.sysctl = { + "net.ipv4.ip_forward" = "1"; + "net.ipv6.conf.all.forwarding" = "1"; + }; }; }