cleanup
This commit is contained in:
parent
51a984f518
commit
9849e6d22b
@ -9,7 +9,12 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
imports = [ ./declarative-nm.nix ];
|
imports = [
|
||||||
|
./declarative-nm.nix
|
||||||
|
|
||||||
|
inputs.nixos-hardware.nixosModules.common-pc-ssd
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
#garbage collection and cleanup stuff
|
#garbage collection and cleanup stuff
|
||||||
|
|||||||
33
etcnixos/no-rgb.nix
Normal file
33
etcnixos/no-rgb.nix
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
systemd.services.no-rgb =
|
||||||
|
let
|
||||||
|
no-rgb = pkgs.writeScriptBin "no-rgb" ''
|
||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
NUM_DEVICES=$(${pkgs.openrgb}/bin/openrgb --noautoconnect --list-devices | ${pkgs.gnugrep}/bin/grep -E '^[0-9]+: ' | ${pkgs.coreutils}/bin/wc -l)
|
||||||
|
|
||||||
|
for i in $(${pkgs.coreutils}/bin/seq 0 $(($NUM_DEVICES - 1))); do
|
||||||
|
${pkgs.openrgb}/bin/openrgb --noautoconnect --device $i --mode direct --color 000000
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
{
|
||||||
|
description = "disable rgb";
|
||||||
|
serviceConfig = {
|
||||||
|
ExecStart = "${no-rgb}/bin/no-rgb";
|
||||||
|
Type = "oneshot";
|
||||||
|
};
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
services.hardware.openrgb.enable = true;
|
||||||
|
services.udev.packages = [ pkgs.openrgb ];
|
||||||
|
hardware.i2c.enable = true;
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
openrgb-with-all-plugins
|
||||||
|
];
|
||||||
|
|
||||||
|
}
|
||||||
@ -3,7 +3,6 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
username,
|
username,
|
||||||
system,
|
|
||||||
inputs,
|
inputs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|||||||
@ -3,8 +3,6 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
username,
|
username,
|
||||||
system,
|
|
||||||
cpu_arch,
|
|
||||||
inputs,
|
inputs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
@ -12,27 +10,17 @@
|
|||||||
imports = [
|
imports = [
|
||||||
./common.nix
|
./common.nix
|
||||||
./hardware_desktop.nix
|
./hardware_desktop.nix
|
||||||
|
./no-rgb.nix
|
||||||
|
./vr.nix
|
||||||
|
|
||||||
inputs.nixos-hardware.nixosModules.common-cpu-amd-pstate
|
inputs.nixos-hardware.nixosModules.common-cpu-amd-pstate
|
||||||
inputs.nixos-hardware.nixosModules.common-cpu-amd-zenpower
|
inputs.nixos-hardware.nixosModules.common-cpu-amd-zenpower
|
||||||
inputs.nixos-hardware.nixosModules.common-pc-ssd
|
|
||||||
];
|
];
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
# kernelPackages = lib.mkForce pkgs.linuxPackages_6_10;
|
# kernelPackages = lib.mkForce pkgs.linuxPackages_6_10;
|
||||||
# supportedFilesystems = [ "zfs" ];
|
# supportedFilesystems = [ "zfs" ];
|
||||||
|
|
||||||
kernelPatches = [
|
|
||||||
# for making ALVR support better :)
|
|
||||||
{
|
|
||||||
name = "amdgpu-ignore-ctx-privileges";
|
|
||||||
patch = pkgs.fetchpatch {
|
|
||||||
name = "cap_sys_nice_begone.patch";
|
|
||||||
url = "https://github.com/Frogging-Family/community-patches/raw/master/linux61-tkg/cap_sys_nice_begone.mypatch";
|
|
||||||
sha256 = "Y3a0+x2xvHsfLax/uwycdJf3xLxvVfkfDVqjkxNaYEo=";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
kernelParams = [
|
kernelParams = [
|
||||||
# allow overclocking (I actually underclock but lol)
|
# allow overclocking (I actually underclock but lol)
|
||||||
"amdgpu.ppfeaturemask=0xFFF7FFFF"
|
"amdgpu.ppfeaturemask=0xFFF7FFFF"
|
||||||
@ -68,87 +56,13 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.no-rgb =
|
|
||||||
let
|
|
||||||
no-rgb = pkgs.writeScriptBin "no-rgb" ''
|
|
||||||
#!/bin/sh
|
|
||||||
set -e
|
|
||||||
|
|
||||||
NUM_DEVICES=$(${pkgs.openrgb}/bin/openrgb --noautoconnect --list-devices | ${pkgs.gnugrep}/bin/grep -E '^[0-9]+: ' | ${pkgs.coreutils}/bin/wc -l)
|
|
||||||
|
|
||||||
for i in $(${pkgs.coreutils}/bin/seq 0 $(($NUM_DEVICES - 1))); do
|
|
||||||
${pkgs.openrgb}/bin/openrgb --noautoconnect --device $i --mode direct --color 000000
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
{
|
|
||||||
description = "disable rgb";
|
|
||||||
serviceConfig = {
|
|
||||||
ExecStart = "${no-rgb}/bin/no-rgb";
|
|
||||||
Type = "oneshot";
|
|
||||||
};
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
services.hardware.openrgb.enable = true;
|
|
||||||
services.udev.packages = [ pkgs.openrgb ];
|
|
||||||
hardware.i2c.enable = true;
|
|
||||||
|
|
||||||
# System packages
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
openrgb-with-all-plugins
|
|
||||||
lact
|
|
||||||
];
|
|
||||||
|
|
||||||
services.wivrn = {
|
|
||||||
enable = true;
|
|
||||||
openFirewall = true;
|
|
||||||
package = inputs.wivrn.legacyPackages.${pkgs.system}.wivrn;
|
|
||||||
defaultRuntime = true;
|
|
||||||
autoStart = true;
|
|
||||||
config = {
|
|
||||||
enable = true;
|
|
||||||
json = {
|
|
||||||
scale = 1.0;
|
|
||||||
bitrate = 100000000;
|
|
||||||
encoders = [
|
|
||||||
{
|
|
||||||
encoder = "vaapi";
|
|
||||||
codec = "h265";
|
|
||||||
width = 1.0;
|
|
||||||
height = 1.0;
|
|
||||||
offset_x = 0.0;
|
|
||||||
offset_y = 0.0;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.steam = {
|
programs.steam = {
|
||||||
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
|
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
|
||||||
};
|
};
|
||||||
|
|
||||||
# services.ollama = {
|
environment.systemPackages = with pkgs; [
|
||||||
# enable = true;
|
lact
|
||||||
# acceleration = "rocm";
|
];
|
||||||
# environmentVariables = {
|
|
||||||
# HCC_AMDGPU_TARGET = "gfx1031"; # used to be necessary, but doesn't seem to anymore
|
|
||||||
# };
|
|
||||||
# rocmOverrideGfx = "10.3.1";
|
|
||||||
# };
|
|
||||||
|
|
||||||
# services.open-webui = {
|
|
||||||
# enable = true;
|
|
||||||
# openFirewall = true;
|
|
||||||
# port = 8082;
|
|
||||||
# environment = {
|
|
||||||
# # Disable authentication
|
|
||||||
# WEBUI_AUTH = "False";
|
|
||||||
# PYDANTIC_SKIP_VALIDATING_CORE_SCHEMAS = "True";
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
|
|
||||||
systemd.packages = with pkgs; [ lact ];
|
systemd.packages = with pkgs; [ lact ];
|
||||||
systemd.services.lactd.wantedBy = [ "multi-user.target" ];
|
systemd.services.lactd.wantedBy = [ "multi-user.target" ];
|
||||||
|
|
||||||
|
|||||||
35
etcnixos/vr.nix
Normal file
35
etcnixos/vr.nix
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
{ pkgs, inputs, ... }:
|
||||||
|
{
|
||||||
|
services.wivrn = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
|
||||||
|
# Use my fork for WiVRn 0.20
|
||||||
|
package = inputs.wivrn.legacyPackages.${pkgs.system}.wivrn;
|
||||||
|
|
||||||
|
# Executing it through the systemd service executes WiVRn w/ CAP_SYS_NICE
|
||||||
|
# Resulting in no stutters!
|
||||||
|
defaultRuntime = true;
|
||||||
|
autoStart = true;
|
||||||
|
|
||||||
|
# Config for WiVRn
|
||||||
|
config = {
|
||||||
|
enable = true;
|
||||||
|
json = {
|
||||||
|
scale = 1.0;
|
||||||
|
# 100 Mb/s
|
||||||
|
bitrate = 100000000;
|
||||||
|
encoders = [
|
||||||
|
{
|
||||||
|
encoder = "vaapi";
|
||||||
|
codec = "h265";
|
||||||
|
width = 1.0;
|
||||||
|
height = 1.0;
|
||||||
|
offset_x = 0.0;
|
||||||
|
offset_y = 0.0;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user