From 4c50091a7c639fabf696d7c5aa727e72ad677233 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 8 Jul 2023 14:24:31 +0200 Subject: l aergia.r: import jovian nixos --- lass/1systems/aergia/config.nix | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lass/1systems/aergia') diff --git a/lass/1systems/aergia/config.nix b/lass/1systems/aergia/config.nix index d49040a7a..08bf2b2b5 100644 --- a/lass/1systems/aergia/config.nix +++ b/lass/1systems/aergia/config.nix @@ -27,6 +27,13 @@ + # steam-deck like experience https://github.com/Jovian-Experiments/Jovian-NixOS + { + imports = [ + "${builtins.fetchTarball "https://github.com/Jovian-Experiments/Jovian-NixOS/archive/master.tar.gz"}/modules" + ]; + jovian.steam.enable = true; + } ]; system.stateVersion = "22.11"; -- cgit v1.2.3 From b74b986a5e34dbdcf8e4c6d092435e662e31e32a Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 8 Jul 2023 14:25:12 +0200 Subject: l aergia.r: configure autorandr for docking --- lass/1systems/aergia/config.nix | 70 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) (limited to 'lass/1systems/aergia') diff --git a/lass/1systems/aergia/config.nix b/lass/1systems/aergia/config.nix index 08bf2b2b5..c3ef6d732 100644 --- a/lass/1systems/aergia/config.nix +++ b/lass/1systems/aergia/config.nix @@ -34,6 +34,76 @@ ]; jovian.steam.enable = true; } + { # autorandrs + services.autorandr = { + enable = true; + hooks.postswitch.reset_usb = '' + echo 0 > /sys/bus/usb/devices/usb9/authorized; echo 1 > /sys/bus/usb/devices/usb9/authorized + ${pkgs.xorg.xmodmap}/bin/xmodmap -e 'keycode 96 = F12 Insert F12 F12' # rebind shift + F12 to shift + insert + ''; + profiles = { + default = { + fingerprint = { + eDP = "00ffffffffffff00288931000100000016200104805932780a0dc9a05747982712484c0000000101010101010101010101010101010108700088a1401360c820a300d9870000001ead4a0088a1401360c820a30020c23100001e000000fd0016480f5a1e000a202020202020000000fc0047504431303031480a2020202000cf"; + }; + config = { + eDP = { + enable = true; + primary = true; + position = "0x0"; + mode = "2560x1600"; + rate = "60.01"; + transform = [ + [ 0.750000 0.000000 0.000000 ] + [ 0.000000 0.750000 0.000000 ] + [ 0.000000 0.000000 1.000000 ] + ]; + # scale = { + # x = 0.599991; + # y = 0.599991; + # }; + }; + }; + }; + docked2 = { + fingerprint = { + eDP = config.services.autorandr.profiles.default.fingerprint.eDP; + DisplayPort-8 = "00ffffffffffff0010ac39d14c3346300f200104b5462878fb26f5af4f46a5240f5054a54b00714f8140818081c081009500b300d1c0565e00a0a0a0295030203500b9882100001a000000ff00444342375847330a2020202020000000fc0044454c4c204733323233440a20000000fd0030a5fafa41010a2020202020200181020332f149030212110490131f3f2309070783010000e200eae305c000e606050162622c6d1a0000020b30a50007622c622c5a8780a070384d4030203500b9882100001af4fb0050a0a0285008206800b9882100001a40e7006aa0a0675008209804b9882100001a6fc200a0a0a0555030203500b9882100001a000000000009"; + DisplayPort-7 = "00ffffffffffff0020a32f00010000000c190103807341780acf74a3574cb02309484c21080081c0814081800101010101010101010104740030f2705a80b0588a00501d7400001e023a801871382d40582c4500501d7400001e000000fc00484953454e53450a2020202020000000fd00324b0f451e000a2020202020200172020333714f5f5e5d01020400101113001f2021222909070715075057070083010000e200f96d030c002000183c200060010203662150b051001b304070360056005300001e011d8018711c1620582c2500c48e2100009e011d007251d01e206e285500c48e2100001800000000000000000000000000000000000000000000ea"; + }; + config = { + DisplayPort-7 = { + enable = true; + position = "2560x0"; + mode = "1920x1080"; + rate = "60.00"; + }; + DisplayPort-8 = config.services.autorandr.profiles.docked1.config.DisplayPort-1; + eDP = config.services.autorandr.profiles.docked1.config.eDP; + }; + }; + docked1 = { + fingerprint = { + eDP = config.services.autorandr.profiles.default.fingerprint.eDP; + DisplayPort-1 = "00ffffffffffff0010ac39d14c3346300f200104b5462878fb26f5af4f46a5240f5054a54b00714f8140818081c081009500b300d1c0565e00a0a0a0295030203500b9882100001a000000ff00444342375847330a2020202020000000fc0044454c4c204733323233440a20000000fd0030a5fafa41010a2020202020200181020332f149030212110490131f3f2309070783010000e200eae305c000e606050162622c6d1a0000020b30a50007622c622c000000000000000000000000000000000000f4fb0050a0a0285008206800b9882100001a40e7006aa0a0675008209804b9882100001a6fc200a0a0a0555030203500b9882100001a000000000040"; + }; + config = { + DisplayPort-1 = { + enable = true; + primary = true; + position = "0x0"; + mode = "2560x1440"; + rate = "165.08"; + }; + eDP = config.services.autorandr.profiles.default.config.eDP // { + primary = false; + position = "640x1440"; + }; + }; + }; + }; + }; + } ]; system.stateVersion = "22.11"; -- cgit v1.2.3 From c614ec65355b821eb563e79930eee40e181088f6 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 8 Jul 2023 14:25:28 +0200 Subject: l aergia.r: add more tools --- lass/1systems/aergia/config.nix | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lass/1systems/aergia') diff --git a/lass/1systems/aergia/config.nix b/lass/1systems/aergia/config.nix index c3ef6d732..618938ce8 100644 --- a/lass/1systems/aergia/config.nix +++ b/lass/1systems/aergia/config.nix @@ -115,6 +115,8 @@ bank l-gen-secrets generate-secrets + nixpkgs-review + pipenv ]; programs.adb.enable = true; @@ -142,4 +144,5 @@ ]; boot.cleanTmpDir = true; + programs.noisetorch.enable = true; } -- cgit v1.2.3 From 4874f72c5b3500a895def67994113f02f3b622e8 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 8 Jul 2023 14:55:56 +0200 Subject: l aergia.r: update disko config --- lass/1systems/aergia/disk.nix | 3 --- 1 file changed, 3 deletions(-) (limited to 'lass/1systems/aergia') diff --git a/lass/1systems/aergia/disk.nix b/lass/1systems/aergia/disk.nix index 0ae0892ee..848157729 100644 --- a/lass/1systems/aergia/disk.nix +++ b/lass/1systems/aergia/disk.nix @@ -10,14 +10,12 @@ partitions = [ { name = "boot"; - type = "partition"; start = "0"; end = "1M"; part-type = "primary"; flags = ["bios_grub"]; } { - type = "partition"; name = "ESP"; start = "1MiB"; end = "1GiB"; @@ -31,7 +29,6 @@ } { name = "root"; - type = "partition"; start = "1GiB"; end = "100%"; content = { -- cgit v1.2.3 From 9b9e64fb6b2a1ef0f844a459186b0befa6b3f114 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 8 Jul 2023 14:57:40 +0200 Subject: l aergia.r: remove cruft from physical.nix --- lass/1systems/aergia/physical.nix | 54 +++++---------------------------------- 1 file changed, 7 insertions(+), 47 deletions(-) (limited to 'lass/1systems/aergia') diff --git a/lass/1systems/aergia/physical.nix b/lass/1systems/aergia/physical.nix index 692f68dcc..f24c6aa11 100644 --- a/lass/1systems/aergia/physical.nix +++ b/lass/1systems/aergia/physical.nix @@ -19,14 +19,10 @@ boot.kernelPackages = pkgs.linuxPackages_latest; boot.kernelParams = [ - # Enable energy savings during sleep - "mem_sleep_default=deep" # use less power with pstate "amd_pstate=passive" - # for ryzenadj -i - "iomem=relaxed" # suspend "resume_offset=178345675" @@ -37,24 +33,6 @@ # 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; @@ -76,7 +54,6 @@ environment.systemPackages = [ pkgs.vulkan-tools - pkgs.ryzenadj (pkgs.writers.writeDashBin "set_tdp" '' set -efux watt=$1 @@ -85,31 +62,9 @@ '') ]; - # textsize - services.xserver.dpi = 200; - # corectrl - programs.corectrl = { - enable = true; - gpuOverclock = { - enable = true; - ppfeaturemask = "0xffffffff"; - }; - }; - users.users.mainUser.extraGroups = [ "corectrl" ]; # use newer ryzenadj - nixpkgs.config.packageOverrides = super: { - ryzenadj = super.ryzenadj.overrideAttrs (old: { - version = "unstable-2023-01-15"; - src = pkgs.fetchFromGitHub { - owner = "FlyGoat"; - repo = "RyzenAdj"; - rev = "1052fb52b2c0e23ac4cd868c4e74d4a9510be57c"; # unstable on 2023-01-15 - sha256 = "sha256-/IxkbQ1XrBrBVrsR4EdV6cbrFr1m+lGwz+rYBqxYG1k="; - }; - }); - }; # keyboard quirks services.xserver.displayManager.sessionCommands = '' @@ -122,11 +77,16 @@ KEYBOARD_KEY_70027=reserved ''; - # ignore power key - # update cpu microcode hardware.cpu.amd.updateMicrocode = true; + hardware.opengl.enable = true; + hardware.opengl.extraPackages = [ + pkgs.amdvlk + pkgs.rocm-opencl-icd + pkgs.rocm-opencl-runtime + ]; + # suspend to disk swapDevices = [{ device = "/swapfile"; -- cgit v1.2.3 From 4aff1a4985faac187e0691a86dfc00f654006499 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 8 Jul 2023 14:59:15 +0200 Subject: l aergia.r: reinit usb after docking --- lass/1systems/aergia/physical.nix | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lass/1systems/aergia') diff --git a/lass/1systems/aergia/physical.nix b/lass/1systems/aergia/physical.nix index f24c6aa11..ef62478b4 100644 --- a/lass/1systems/aergia/physical.nix +++ b/lass/1systems/aergia/physical.nix @@ -99,4 +99,8 @@ # firefox touchscreen support environment.sessionVariables.MOZ_USE_XINPUT2 = "1"; + # reinit usb after docking station connect + services.udev.extraRules = '' + SUBSYSTEM=="drm", ACTION=="change", RUN+="${pkgs.dash}/bin/dash -c 'echo 0 > /sys/bus/usb/devices/usb9/authorized; echo 1 > /sys/bus/usb/devices/usb9/authorized'" + ''; } -- cgit v1.2.3 From caa22d7d6457b0a69fb0c60acaa396c4b2aee7f3 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 23 Jul 2023 23:01:09 +0200 Subject: l aergia.r: enable corectrl --- lass/1systems/aergia/physical.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'lass/1systems/aergia') diff --git a/lass/1systems/aergia/physical.nix b/lass/1systems/aergia/physical.nix index ef62478b4..9f06dccdc 100644 --- a/lass/1systems/aergia/physical.nix +++ b/lass/1systems/aergia/physical.nix @@ -19,11 +19,9 @@ boot.kernelPackages = pkgs.linuxPackages_latest; boot.kernelParams = [ - # use less power with pstate "amd_pstate=passive" - # suspend "resume_offset=178345675" ]; @@ -63,6 +61,14 @@ ]; # corectrl + programs.corectrl = { + enable = true; + gpuOverclock = { + enable = true; + ppfeaturemask = "0xffffffff"; + }; + }; + users.users.mainUser.extraGroups = [ "corectrl" ]; # use newer ryzenadj -- cgit v1.2.3