From 122fb9a33ec133070a4d0c9da34607b480e2a29e Mon Sep 17 00:00:00 2001 From: Julian T Date: Sun, 13 Mar 2022 23:15:41 +0100 Subject: Add x230 config --- pc_x230.nix | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 pc_x230.nix (limited to 'pc_x230.nix') diff --git a/pc_x230.nix b/pc_x230.nix new file mode 100644 index 0000000..247f2b1 --- /dev/null +++ b/pc_x230.nix @@ -0,0 +1,54 @@ +{ config, lib, pkgs, ... }: + +{ + networking = { + hostName = "nixX230"; + + interfaces.enp2s25.useDHCP = true; + interfaces.wlp3s0.useDHCP = true; + }; + + networking = { + # We want to NAT container traffic + nat = { + enable = true; + internalInterfaces = [ "ve-test" ]; + externalInterface = "wlp3s0"; + }; + }; + + boot = { + loader.grub = { + device = "/dev/disk/by-id/wwn-0x50026b7682847b8f"; + enable = true; + }; + + initrd.luks.devices = { + lvmroot = { + device = "/dev/disk/by-uuid/676e4bca-b29f-4ec8-a701-59303489c402"; + preLVM = true; + }; + }; + }; + + hardware = { + acpilight.enable = true; + }; + + services = { + tlp = { + enable = true; + settings = { + START_CHARGE_THRESH_BAT0 = 90; + STOP_CHARGE_THRESH_BAT0 = 95; + }; + }; + fwupd.enable = true; + }; + + environment.systemPackages = with pkgs; [ + linuxPackages.acpi_call + + acpilight + ]; +} -- cgit v1.2.3