summaryrefslogtreecommitdiffstats
path: root/lass/1systems/aergia
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2023-03-02 09:20:37 +0100
committertv <tv@krebsco.de>2023-03-02 09:20:37 +0100
commit03a9448a0922fcf158c4357922bed689245105e3 (patch)
tree7dbedf90d0443bd1e375aac61f63735f43e64984 /lass/1systems/aergia
parent177fd1eeec05f0821f1ccc63733b3e0fd5aed7b6 (diff)
parent8639d428c2e9f2190ec4e4b5dd931f24a4166f36 (diff)
Merge remote-tracking branch 'prism/master' into head
Diffstat (limited to 'lass/1systems/aergia')
-rw-r--r--lass/1systems/aergia/config.nix6
-rw-r--r--lass/1systems/aergia/physical.nix73
2 files changed, 66 insertions, 13 deletions
diff --git a/lass/1systems/aergia/config.nix b/lass/1systems/aergia/config.nix
index ed5bbcf1..6992db4a 100644
--- a/lass/1systems/aergia/config.nix
+++ b/lass/1systems/aergia/config.nix
@@ -26,6 +26,7 @@
<stockholm/lass/2configs/dunst.nix>
<stockholm/lass/2configs/print.nix>
<stockholm/lass/2configs/br.nix>
+ <stockholm/lass/2configs/c-base.nix>
];
system.stateVersion = "22.11";
@@ -47,11 +48,6 @@
};
hardware.pulseaudio.package = pkgs.pulseaudioFull;
- lass.browser.config = {
- fy = { browser = "chromium"; groups = [ "audio" "video" ]; hidden = true; };
- qt = { browser = "qutebrowser"; groups = [ "audio" "video" ]; hidden = true; };
- };
-
nix.trustedUsers = [ "root" "lass" ];
# nix.extraOptions = ''
diff --git a/lass/1systems/aergia/physical.nix b/lass/1systems/aergia/physical.nix
index de5f7540..02363908 100644
--- a/lass/1systems/aergia/physical.nix
+++ b/lass/1systems/aergia/physical.nix
@@ -3,6 +3,7 @@
imports = [
./config.nix
(modulesPath + "/installer/scan/not-detected.nix")
+ <stockholm/lass/2configs/antimicrox>
];
disko.devices = import ./disk.nix;
@@ -20,15 +21,41 @@
boot.kernelParams = [
# Enable energy savings during sleep
"mem_sleep_default=deep"
- "initcall_blacklist=acpi_cpufreq_init"
+
+ # use less power with pstate
+ "amd_pstate=passive"
# for ryzenadj -i
"iomem=relaxed"
+
+ # suspend
+ "resume_offset=178345675"
];
- # Enables the amd cpu scaling https://www.kernel.org/doc/html/latest/admin-guide/pm/amd-pstate.html
- # On recent AMD CPUs this can be more energy efficient.
- boot.kernelModules = [ "amd-pstate" "kvm-amd" ];
+ boot.kernelModules = [
+ # Enables the amd cpu scaling https://www.kernel.org/doc/html/latest/admin-guide/pm/amd-pstate.html
+ # On recent AMD CPUs this can be more energy efficient.
+ "amd-pstate"
+ "kvm-amd"
+
+ # needed for zenstates
+ "msr"
+
+ # zenpower
+ "zenpower"
+ ];
+
+ boot.extraModulePackages = [
+ (config.boot.kernelPackages.zenpower.overrideAttrs (old: {
+ src = pkgs.fetchFromGitea {
+ domain = "git.exozy.me";
+ owner = "a";
+ repo = "zenpower3";
+ rev = "c176fdb0d5bcba6ba2aba99ea36812e40f47751f";
+ hash = "sha256-d2WH8Zv7F0phZmEKcDiaak9On+Mo9bAFhMulT/N5FWI=";
+ };
+ }))
+ ];
# hardware.cpu.amd.updateMicrocode = true;
@@ -36,7 +63,16 @@
"amdgpu"
];
- boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "usb_storage" "sd_mod" ];
+ boot.initrd.availableKernelModules = [
+ "nvme"
+ "thunderbolt"
+ "xhci_pci"
+ "usbhid"
+ ];
+
+ boot.initrd.kernelModules = [
+ "amdgpu"
+ ];
environment.systemPackages = [
pkgs.vulkan-tools
@@ -54,7 +90,13 @@
hardware.video.hidpi.enable = lib.mkDefault true;
# corectrl
- programs.corectrl.enable = true;
+ programs.corectrl = {
+ enable = true;
+ gpuOverclock = {
+ enable = true;
+ ppfeaturemask = "0xffffffff";
+ };
+ };
users.users.mainUser.extraGroups = [ "corectrl" ];
# use newer ryzenadj
@@ -72,7 +114,7 @@
# keyboard quirks
services.xserver.displayManager.sessionCommands = ''
- xmodmap -e 'keycode 96 = F12 Insert F12 F12' # rebind shift + F12 to shift + insert
+ ${pkgs.xorg.xmodmap}/bin/xmodmap -e 'keycode 96 = F12 Insert F12 F12' # rebind shift + F12 to shift + insert
'';
services.udev.extraHwdb = /* sh */ ''
# disable back buttons
@@ -82,5 +124,20 @@
'';
# ignore power key
- services.logind.extraConfig = "HandlePowerKey=ignore";
+
+ # update cpu microcode
+ hardware.cpu.amd.updateMicrocode = true;
+
+ # suspend to disk
+ swapDevices = [{
+ device = "/swapfile";
+ }];
+ boot.resumeDevice = "/dev/mapper/aergia1";
+ services.logind.lidSwitch = "suspend-then-hibernate";
+ services.logind.extraConfig = ''
+ HandlePowerKey=hibernate
+ '';
+
+ # firefox touchscreen support
+ environment.sessionVariables.MOZ_USE_XINPUT2 = "1";
}