This commit is contained in:
PapaTutuWawa 2023-09-17 13:35:43 +02:00
parent d2426b4291
commit 91910ec46e
7 changed files with 49 additions and 28 deletions

View File

@ -36,6 +36,7 @@
thunderbird thunderbird
anki anki
gimp gimp
xwaylandvideobridge
#psst #psst
#lapce #lapce
@ -50,10 +51,10 @@
}; };
sway.enable = false; sway.enable = false;
alacritty.enable = true; alacritty.enable = true;
emacs.enable = true; #emacs.enable = true;
firefox.enable = true; firefox.enable = true;
git.enable = true; git.enable = true;
gnome-terminal.enable = true; #gnome-terminal.enable = true;
tmux.enable = true; tmux.enable = true;
waybar = { waybar = {
enable = true; enable = true;
@ -105,30 +106,34 @@
}; };
virtualisation = { virtualisation = {
podman = { docker = {
enable = true; enable = true;
dockerCompat = true; storageDriver = "btrfs";
}; };
# docker = {
# enable = true;
# storageDriver = "btrfs";
# };
}; };
boot = let boot = let
kernel = pkgs.linuxPackages_zen; kernel = pkgs.linuxPackages_xanmod_latest;
in { in {
extraModprobeConfig = '' extraModprobeConfig = ''
options kvm_amd nested=1 options kvm_amd nested=1
options vfio-pci ids=1002:67df,1002:aaf0
''; '';
initrd = { initrd = {
availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "sd_mod" "amdgpu" "vendor-reset" ]; availableKernelModules = [
"xhci_pci"
"ahci"
"usbhid"
"sd_mod"
"amdgpu"
"vendor-reset"
"winesync"
];
kernelModules = [ kernelModules = [
"amdgpu" # GPU (duh) "amdgpu" # GPU (duh)
"kvm-amd" /*"vfio_virqfd"*/ "vfio_pci" "vfio_iommu_type1" "vfio" # Virt "kvm-amd" /*"vfio_virqfd"*/ "vfio_pci" "vfio_iommu_type1" "vfio" # Virt
"uinput" # key-mapper "uinput" # key-mapper
"vendor-reset" "vendor-reset"
"winesync"
]; ];
}; };
kernelParams = [ kernelParams = [
@ -146,11 +151,13 @@
"mitigations=off" "mitigations=off"
"rhgb" "rhgb"
# Enable ZSwap # Enable ZSwap
"zswap.enabled=1" #"zswap.enabled=1"
# Enable Apparmor # Enable Apparmor
"lsm=landlock,lockdown,yama,integrity,apparmor,bpf" "lsm=landlock,lockdown,yama,integrity,apparmor,bpf"
# Prevent sequential probing # Prevent sequential probing
"libahci.ignore_sss=1" "libahci.ignore_sss=1"
# Make the system less ready to swap
"sysctl.vm.swappiness=0"
]; ];
kernel.sysctl = { kernel.sysctl = {
# League of Legends under Linux # League of Legends under Linux
@ -160,11 +167,12 @@
}; };
extraModulePackages = [ kernel.vendor-reset ]; extraModulePackages = [ kernel.vendor-reset ];
# NOTE: A regression appears to have happend between 5.10 and 5.12
# which leads to the RX590 to have the fence fallback timer on
# sdma0 time out (whatever this means). Maybe bisect?
kernelPackages = kernel; kernelPackages = kernel;
binfmt = {
emulatedSystems = [ "aarch64-linux" ];
registrations.aarch64-linux.fixBinary = true;
};
}; };
services = { services = {
ratbagd.enable = true; ratbagd.enable = true;
@ -190,6 +198,11 @@
motherboard = "amd"; motherboard = "amd";
}; };
}; };
system76-scheduler = {
enable = false;
useStockConfig = true;
};
}; };
programs = { programs = {
cdemu = { cdemu = {

View File

@ -244,7 +244,10 @@ in {
}; };
# Don't wait for a network connection # Don't wait for a network connection
systemd.services.NetworkManager-wait-online.enable = false; systemd = {
services.NetworkManager-wait-online.enable = false;
coredump.enable = false;
};
security.sudo.extraConfig = '' security.sudo.extraConfig = ''
Defaults env_keep += "NIXOS_CONFIG" Defaults env_keep += "NIXOS_CONFIG"

View File

@ -38,6 +38,8 @@ in inputs.nixpkgs.lib.nixosSystem {
# Overlays # Overlays
(util.mkOverlayFromInput "stable" inputs.stable) (util.mkOverlayFromInput "stable" inputs.stable)
(util.mkOverlayFromInput "unstable" inputs.nixpkgs) (util.mkOverlayFromInput "unstable" inputs.nixpkgs)
{ {
nixpkgs.overlays = [ nixpkgs.overlays = [
nur.overlay nur.overlay

View File

@ -30,7 +30,7 @@ in {
dynamic_title = true; dynamic_title = true;
decorations = "full"; decorations = "full";
startup_mode = "Windowed"; startup_mode = "Windowed";
opacity = 0.7; #opacity = 0.7;
}; };
scrolling = { scrolling = {
@ -48,7 +48,6 @@ in {
x = 0; x = 0;
y = 0; y = 0;
}; };
use_thin_strokes = true;
}; };
debug = { debug = {
render_timer = false; render_timer = false;
@ -111,7 +110,6 @@ in {
live_config_reload = true; live_config_reload = true;
enable_experimental_conpty_backend = false; enable_experimental_conpty_backend = false;
alt_send_esc = true;
key_bindings = [ key_bindings = [
{ {

View File

@ -1,10 +1,10 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
let let
mkAnime4kShader = shader: "${pkgs.anime4k}/usr/share/shaders/${shader}"; #mkAnime4kShader = shader: "${pkgs.anime4k}/usr/share/shaders/${shader}";
mkDefaultShader = shader: "${pkgs.mpv-shader-pack}/usr/share/shaders/${shader}"; mkDefaultShader = shader: "${pkgs.mpv-shader-pack}/usr/share/shaders/${shader}";
makeMpvProfile = { shader, gpuContext ? "waylandvk", additional ? {} }: { makeMpvProfile = { shader ? null, gpuContext ? "waylandvk", additional ? {} }: {
glsl-shaders = shader; glsl-shaders = lib.mkIf (shader != null) shader;
scale = "ewa_lanczossharp"; scale = "ewa_lanczossharp";
cscale = "ewa_lanczossharp"; cscale = "ewa_lanczossharp";
gpu-context = gpuContext; gpu-context = gpuContext;
@ -41,13 +41,13 @@ in {
defaultProfiles = [ "anime" ]; defaultProfiles = [ "anime" ];
profiles = { profiles = {
anime = (makeMpvProfile { anime = (makeMpvProfile {
shader = mkAnime4kShader "Anime4K_Upscale_Denoise_CNN_x2_VL.glsl"; #shader = mkAnime4kShader "Anime4K_Upscale_Denoise_CNN_x2_VL.glsl";
additional = { additional = {
fullscreen = ""; fullscreen = "";
}; };
}); });
anime-denoise = (makeMpvProfile { anime-denoise = (makeMpvProfile {
shader = mkAnime4kShader "Anime4K_Upscale_Denoise_CNN_x2_VL.glsl"; #shader = mkAnime4kShader "Anime4K_Upscale_Denoise_CNN_x2_VL.glsl";
}); });
non-anime = (makeMpvProfile { non-anime = (makeMpvProfile {
shader = mkDefaultShader "FSRCNNX_x2_8-0-4-1.glsl"; shader = mkDefaultShader "FSRCNNX_x2_8-0-4-1.glsl";

View File

@ -28,7 +28,12 @@ in {
prismlauncher-wrapped = wrapInSandbox { prismlauncher-wrapped = wrapInSandbox {
name = "prismlauncher"; name = "prismlauncher";
binary = "${prev.prismlauncher}/bin/prismlauncher"; binary = let
script = prev.writeShellScript "prismlauncher-zink.sh" ''
export MESA_LOADER_DRIVER_OVERRIDE=zink
${prev.prismlauncher}/bin/prismlauncher
'';
in "${prev.prismlauncher}/bin/prismlauncher";
launchScriptName = "prismlauncher-wrapped"; launchScriptName = "prismlauncher-wrapped";
mountInHome = [".local/share/PrismLauncher"]; mountInHome = [".local/share/PrismLauncher"];
additionalMounts = [ additionalMounts = [

View File

@ -14,9 +14,9 @@ stdenv.mkDerivation rec {
src = fetchFromGitLab { src = fetchFromGitLab {
owner = "davidedmundson"; owner = "davidedmundson";
repo = "xwaylandvideobridge"; repo = "xwaylandvideobridge";
rev = "b876b5f3ee5cc810c99b08e8f0ebb29553e45e47"; rev = "b9e0c53570f55f4e8289f72ba78f3945e27e1a1a";
domain = "invent.kde.org"; domain = "invent.kde.org";
sha256 = "sha256-gfQkOIZegxdFQ9IV2Qp/lLRtfI5/g6bDD3XRBdLh4q0="; sha256 = "1ypg2c26r5fy9lr8shif5vqcp06yf7mqqj2ps5g00s7s3ykryxdn";
}; };
buildInputs = [ qtbase qtx11extras plasma-framework xorg.xcbproto kpipewire cmake pkg-config ]; buildInputs = [ qtbase qtx11extras plasma-framework xorg.xcbproto kpipewire cmake pkg-config ];