From 171ee59ab4e3be4d100147a14200454b0b27c7f6 Mon Sep 17 00:00:00 2001 From: Julien Malka Date: Sun, 2 Jan 2022 15:15:03 +0100 Subject: [PATCH] Updated config for rpi --- rpi.nix | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/rpi.nix b/rpi.nix index c4922cb..8b44cf0 100644 --- a/rpi.nix +++ b/rpi.nix @@ -8,9 +8,9 @@ # if you have a Raspberry Pi 2 or 3, pick this: boot.kernelPackages = pkgs.linuxPackages_latest; - + networking.hostName = "lambda"; # A bunch of boot parameters needed for optimal runtime on RPi 3b+ - boot.kernelParams = ["cma=256M"]; + boot.kernelParams = [ "cma=256M" ]; boot.loader.raspberryPi.enable = true; boot.loader.raspberryPi.version = 3; boot.loader.raspberryPi.uboot.enable = true; @@ -31,25 +31,35 @@ }; }; - # Preserve space by sacrificing documentation and history + + networking.interfaces.eth0.useDHCP = false; + networking.interfaces.eth0.ipv4.addresses = [ + { + address = "129.199.134.202"; + prefixLength = 24; + } + ]; + networking.defaultGateway = "129.199.134.254"; + networking.nameservers = [ "8.8.8.8" ]; + documentation.nixos.enable = false; nix.gc.automatic = true; nix.gc.options = "--delete-older-than 30d"; boot.cleanTmpDir = true; -luj.status = { + luj.status = { + enable = true; + nginx = { enable = true; - nginx = { - enable = true; - subdomain = "status"; - }; + subdomain = "status"; }; + }; # Configure basic SSH access services.openssh.enable = true; -# services.openssh.permitRootLogin = "yes"; + # services.openssh.permitRootLogin = "yes"; # Use 1GB of additional swap memory in order to not run out of memory # when installing lots of things while running other things at the same time. - swapDevices = [ { device = "/swapfile"; size = 1024; } ]; + swapDevices = [{ device = "/swapfile"; size = 1024; }]; - luj.hmgr.status = {}; + luj.hmgr.status = { }; }