From 97bc35cb0726ccc5748555a33fa605d0c4d4e252 Mon Sep 17 00:00:00 2001 From: Amneesh Singh Date: Wed, 18 Jan 2023 14:51:32 +0530 Subject: [PATCH] hosts/satori: add tlp and move around misc stuff Signed-off-by: Amneesh Singh --- hosts/satori/boot.nix | 2 +- hosts/satori/hardware.nix | 2 +- hosts/satori/networking.nix | 6 +----- hosts/satori/pkgs.nix | 7 +------ hosts/satori/services.nix | 14 ++++++++++++-- 5 files changed, 16 insertions(+), 15 deletions(-) diff --git a/hosts/satori/boot.nix b/hosts/satori/boot.nix index 3940c4f..ecf95a9 100644 --- a/hosts/satori/boot.nix +++ b/hosts/satori/boot.nix @@ -3,7 +3,7 @@ { boot = { supportedFilesystems = [ "zfs" ]; - kernelPackages = pkgs.linuxPackages_latest; + kernelPackages = pkgs.linuxPackages_5_15; initrd = { availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "vfio-pci" ]; /* preDeviceCommands = '' diff --git a/hosts/satori/hardware.nix b/hosts/satori/hardware.nix index bb28794..f98f04c 100644 --- a/hosts/satori/hardware.nix +++ b/hosts/satori/hardware.nix @@ -42,7 +42,7 @@ powerManagement = { enable = true; - cpuFreqGovernor = "schedutil"; + cpuFreqGovernor = "powersave"; }; hardware = { diff --git a/hosts/satori/networking.nix b/hosts/satori/networking.nix index 4e4f98a..ea26254 100644 --- a/hosts/satori/networking.nix +++ b/hosts/satori/networking.nix @@ -8,17 +8,13 @@ wireless.enable = true; wireless.interfaces = [ "wlp0s20f3" ]; firewall = { - allowedTCPPorts = [ 22 18172 6600 8001 ]; + allowedTCPPorts = [ 22 18172 6600 8001 25565]; allowedUDPPorts = [ 22 17840 18172 ]; trustedInterfaces = [ "docker0" ]; }; interfaces = { enp7s0 = { useDHCP = true; - ipv4.addresses = [{ - prefixLength = 24; - address = "192.168.1.109"; - }]; }; }; diff --git a/hosts/satori/pkgs.nix b/hosts/satori/pkgs.nix index 4ab969b..e90878b 100644 --- a/hosts/satori/pkgs.nix +++ b/hosts/satori/pkgs.nix @@ -72,14 +72,9 @@ host = "127.0.0.1"; port = 2217; }; - remilia4 = { - enable = true; - type = "socks4"; - host = "127.0.0.1"; - port = 2217; - }; }; }; slock.enable = true; + gamemode.enable = true; }; } diff --git a/hosts/satori/services.nix b/hosts/satori/services.nix index c2bbe36..b707605 100644 --- a/hosts/satori/services.nix +++ b/hosts/satori/services.nix @@ -15,10 +15,20 @@ ''; zfs.autoScrub.enable = true; gvfs.enable = true; + tlp = { + enable = true; + settings = { + CPU_SCALING_GOVERNOR_ON_AC = "performance"; + CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; + }; + }; logind.extraConfig = "RuntimeDirectorySize=30%"; }; - systemd.services.tor.wantedBy = lib.mkForce [ ]; - systemd.enableUnifiedCgroupHierarchy = false; + systemd.services = { + tor.wantedBy = lib.mkForce [ ]; + logmein-hamachi.wantedBy = lib.mkForce [ ]; + }; + security.pki.certificateFiles = [ ../../cert.pem ]; virtualisation.libvirtd = { enable = true;