summaryrefslogtreecommitdiff
path: root/host/athena.nix
diff options
context:
space:
mode:
authorAdrian Kummerlaender2022-01-26 16:16:42 +0100
committerAdrian Kummerlaender2022-01-26 16:16:42 +0100
commitc7d90c505aefe8719a79baa04a97d2a7937e389c (patch)
tree49cf8078ffb11c467056d9140c21a903dcc9cfb6 /host/athena.nix
parentd29a5d690c03b0e50484b4a4793d1c2da1db617c (diff)
downloadnixos_system-c7d90c505aefe8719a79baa04a97d2a7937e389c.tar
nixos_system-c7d90c505aefe8719a79baa04a97d2a7937e389c.tar.gz
nixos_system-c7d90c505aefe8719a79baa04a97d2a7937e389c.tar.bz2
nixos_system-c7d90c505aefe8719a79baa04a97d2a7937e389c.tar.lz
nixos_system-c7d90c505aefe8719a79baa04a97d2a7937e389c.tar.xz
nixos_system-c7d90c505aefe8719a79baa04a97d2a7937e389c.tar.zst
nixos_system-c7d90c505aefe8719a79baa04a97d2a7937e389c.zip
Adapt athena config from X1 to P14s
Diffstat (limited to 'host/athena.nix')
-rw-r--r--host/athena.nix63
1 files changed, 39 insertions, 24 deletions
diff --git a/host/athena.nix b/host/athena.nix
index 1371bf9..6426bb9 100644
--- a/host/athena.nix
+++ b/host/athena.nix
@@ -29,30 +29,30 @@
users.extraUsers.common.extraGroups = [ "networkmanager" "libvirtd" ];
- networking.wireguard.interfaces = {
- wg0 = {
- ips = [ "10.100.0.4/24" ];
+ #networking.wireguard.interfaces = {
+ # wg0 = {
+ # ips = [ "10.100.0.4/24" ];
- privateKeyFile = "/etc/wireguard/private";
+ # privateKeyFile = "/etc/wireguard/private";
- peers = [
- { # automatix
- publicKey = "B0tkjq+5SfECKx1gWEP5JVWOIaRWL2JNE7iSpMmN4F0=";
- allowedIPs = [ "10.100.0.0/24" ];
- endpoint = "kummerlaender.eu:54321";
+ # peers = [
+ # { # automatix
+ # publicKey = "B0tkjq+5SfECKx1gWEP5JVWOIaRWL2JNE7iSpMmN4F0=";
+ # allowedIPs = [ "10.100.0.0/24" ];
+ # endpoint = "kummerlaender.eu:54321";
- persistentKeepalive = 10;
- }
- ];
- };
- };
+ # persistentKeepalive = 10;
+ # }
+ # ];
+ # };
+ #};
services = {
upower.enable = true;
acpid.enable = true;
xserver = {
- videoDrivers = [ "modesetting" ];
+ videoDrivers = [ "nvidia" ];
synaptics = {
enable = true;
@@ -71,6 +71,25 @@
};
};
+ hardware.nvidia = {
+ package = pkgs.linuxPackages.nvidia_x11;
+ prime = {
+ offload.enable = true;
+
+ intelBusId = "PCI:0:2:0";
+ nvidiaBusId = "PCI:1:0:0";
+ };
+ powerManagement.enable = true;
+ };
+
+ environment.systemPackages = [ (pkgs.writeScriptBin "nvidia-offload" ''
+ export __NV_PRIME_RENDER_OFFLOAD=1
+ export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0
+ export __GLX_VENDOR_LIBRARY_NAME=nvidia
+ export __VK_LAYER_NV_optimus=NVIDIA_only
+ exec -a "$0" "$@"
+ '') ];
+
virtualisation.libvirtd.enable = true;
hardware.trackpoint = {
@@ -81,22 +100,18 @@
hardware.bluetooth.enable = true;
- hardware.opengl.extraPackages = [ pkgs.intel-ocl ];
-
services.tlp = {
enable = true;
settings = {
RESTORE_DEVICE_STATE_ON_STARTUP = 1;
+ START_CHARGE_THRESH_BAT0 = 75;
+ STOP_CHARGE_THRESH_BAT0 = 85;
+ CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
+ ENERGY_PERF_POLICY_ON_BAT = "powersave";
};
};
powerManagement.powertop.enable = true;
- console = {
- earlySetup = true;
- font = "ter-132n";
- packages = [ pkgs.terminus_font ];
- };
-
- system.stateVersion = "20.09";
+ system.stateVersion = "21.11";
}