feat: f*ck you nvidia

This commit is contained in:
Jacob Bachmann 2024-04-29 22:37:44 +02:00
parent bb446c29ee
commit 36ace852a8
Signed by: bchmnn
GPG key ID: 732A612DAD28067D
15 changed files with 95 additions and 46 deletions

60
flake.lock generated
View file

@ -5,11 +5,11 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1711629152, "lastModified": 1713301451,
"narHash": "sha256-GxhduJ3mRzdtdOiJTn2fD6Z5rvM51aT9X7YrZCmoKbs=", "narHash": "sha256-LzYVqEukjOJjm4HGFe6rtHBiuJxAyPqd2MY1k5ci9QU=",
"owner": "Aylur", "owner": "Aylur",
"repo": "ags", "repo": "ags",
"rev": "eedd643db42bb9a5f837904062efb01b6d59fa5b", "rev": "33bcaf34d5277031ecb97047fb8ddd44abd8d80e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -41,11 +41,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1713391096, "lastModified": 1714203603,
"narHash": "sha256-5xkzsy+ILgQlmvDDipL5xqAehnjWBenAQXV4/NLg2dE=", "narHash": "sha256-eT7DENhYy7EPLOqHI9zkIMD9RvMCXcqh6gGqOK5BWYQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "f46814ec7cbef9c2aef18ca1cbe89f2bb1e8c394", "rev": "c1609d584a6b5e9e6a02010f51bd368cb4782f8e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -61,11 +61,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1712655750, "lastModified": 1713850237,
"narHash": "sha256-uTvoGFzbBJfVKZVZ/+nIPP93E8EnGXwmVPIqgRlT14I=", "narHash": "sha256-wa7l1cfG5X4hJzFsFZEVwp6UJ6uaRqUWJA/ETwAn2TU=",
"owner": "outfoxxed", "owner": "outfoxxed",
"repo": "hy3", "repo": "hy3",
"rev": "7d988d310f2b15eea5f2b9998f777a9590c4d1d9", "rev": "e6cabcfa3d303c47406e458f662564d50883b4f2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -90,11 +90,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1713214463, "lastModified": 1712434681,
"narHash": "sha256-zAOOjqHAbccCRgJSuvTCA0FNLqKswN63LgVo43R7pxw=", "narHash": "sha256-qwmR2p1oc48Bj7gUDvb1oGL19Rjs2PmEmk4ChV01A5o=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprcursor", "repo": "hyprcursor",
"rev": "0a53b9957f0b17f1a0036b25198f569969ad43a0", "rev": "818d8c4b69e0997483d60b75f701fe14b561a7a3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -165,11 +165,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1713121246, "lastModified": 1711671891,
"narHash": "sha256-502X0Q0fhN6tJK7iEUA8CghONKSatW/Mqj4Wappd++0=", "narHash": "sha256-C/Wwsy/RLxHP1axFFl+AnwJRWfd8gxDKKoa8nt8Qk3c=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprlang", "repo": "hyprlang",
"rev": "78fcaa27ae9e1d782faa3ff06c8ea55ddce63706", "rev": "c1402612146ba06606ebf64963a02bc1efe11e74",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -180,11 +180,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1713377320, "lastModified": 1714201532,
"narHash": "sha256-OrBm62B+X9jylr6cPgKc+5OSgF2PRW9IY0ARCOtURMY=", "narHash": "sha256-nk0W4rH7xYdDeS7k1SqqNtBaNrcgIBYNmOVc8P2puEY=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "f2d364de6589f7a029624983593eafc3c4dac726", "rev": "53db5e1070d07e750030bf65f1b9963df8f0c678",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -212,11 +212,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1712963716, "lastModified": 1712439257,
"narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", "narHash": "sha256-aSpiNepFOMk9932HOax0XwNxbA38GOUVOiXfUVPOrck=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", "rev": "ff0dbd94265ac470dda06a657d5fe49de93b4599",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -228,11 +228,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1713248628, "lastModified": 1714253743,
"narHash": "sha256-NLznXB5AOnniUtZsyy/aPWOk8ussTuePp2acb9U+ISA=", "narHash": "sha256-mdTQw2XlariysyScCv2tTE45QSU9v/ezLcHJ22f0Nxc=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "5672bc9dbf9d88246ddab5ac454e82318d094bb8", "rev": "58a1abdbae3217ca6b702f03d3b35125d88a2994",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -290,11 +290,11 @@
"nixpkgs": "nixpkgs_4" "nixpkgs": "nixpkgs_4"
}, },
"locked": { "locked": {
"lastModified": 1712127529, "lastModified": 1714034203,
"narHash": "sha256-R3yPS5ktvzhUI+TeHTDkbKgiA8SDvozu33azFUeMVoo=", "narHash": "sha256-saVhZRToJDFaAXHfjAVmJW8HQArldGXRNeqgsPPujUQ=",
"owner": "Alexays", "owner": "Alexays",
"repo": "Waybar", "repo": "Waybar",
"rev": "42dc9cb85f27e3db02da83cd13624cfc5a7191d3", "rev": "2481f7a2924d18ce83bc2bfc2434a06349a7bb32",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -340,11 +340,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1713214484, "lastModified": 1709299639,
"narHash": "sha256-h1bSIsDuPk1FGgvTuSHJyiU2Glu7oAyoPMJutKZmLQ8=", "narHash": "sha256-jYqJM5khksLIbqSxCLUUcqEgI+O2LdlSlcMEBs39CAU=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland", "repo": "xdg-desktop-portal-hyprland",
"rev": "bb44921534a9cee9635304fdb876c1b3ec3a8f61", "rev": "2d2fb547178ec025da643db57d40a971507b82fe",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -15,11 +15,11 @@
gui = { gui = {
enable = true; enable = true;
greeter.enable = false; greeter.enable = false;
flavour = [ "sway" ]; flavour = [ "i3" ];
}; };
nvidia.enable = true; nvidia.enable = true;
audio.enable = true; audio.enable = true;
bluetooth.enable = true; bluetooth.enable = false;
printing.enable = true; printing.enable = true;
vpn.enable = true; vpn.enable = true;

View file

@ -19,6 +19,7 @@
]; ];
# TODO once the 550 drivers are better, switch to them # TODO once the 550 drivers are better, switch to them
/*
hardware.nvidia.package = hardware.nvidia.package =
let let
rcu_patch = pkgs.fetchpatch { rcu_patch = pkgs.fetchpatch {
@ -35,6 +36,7 @@
persistencedSha256 = "sha256-d0Q3Lk80JqkS1B54Mahu2yY/WocOqFFbZVBh+ToGhaE="; persistencedSha256 = "sha256-d0Q3Lk80JqkS1B54Mahu2yY/WocOqFFbZVBh+ToGhaE=";
patches = [ rcu_patch ]; patches = [ rcu_patch ];
}; };
*/
boot.resumeDevice = "/dev/disk/by-label/ROOT"; boot.resumeDevice = "/dev/disk/by-label/ROOT";

View file

@ -1,6 +1,6 @@
{ pkgs, config, lib, ... }: lib.mkIf config.bchmnn.audio.enable { { pkgs, config, lib, ... }: lib.mkIf config.bchmnn.audio.enable {
# Enable pipewire - audio # Enable pipewire - audio
services.pipewire = { services.pipewire = lib.mkIf (!builtins.elem "gnome" config.bchmnn.gui.flavour) {
enable = true; enable = true;
audio.enable = true; audio.enable = true;
alsa.enable = true; alsa.enable = true;

View file

@ -65,9 +65,9 @@
./ausweisapp.nix ./ausweisapp.nix
./bluetooth.nix ./bluetooth.nix
./ccache.nix ./ccache.nix
./desktop.nix
./dbus.nix ./dbus.nix
./fonts.nix ./fonts.nix
./greetd.nix
./gstreamer.nix ./gstreamer.nix
./i18n.nix ./i18n.nix
./kdeconnect.nix ./kdeconnect.nix

View file

@ -7,8 +7,11 @@
services.xserver.windowManager.i3.enable = builtins.elem "i3" gui.flavour; services.xserver.windowManager.i3.enable = builtins.elem "i3" gui.flavour;
services.xserver = { services.xserver = {
enable = (builtins.elem "i3" gui.flavour || builtins.elem "gnome" gui.flavour);
libinput.enable = true; libinput.enable = true;
desktopManager.gnome.enable = builtins.elem "gnome" gui.flavour;
displayManager = { displayManager = {
gdm.enable = builtins.elem "gnome" gui.flavour;
startx.enable = builtins.elem "i3" gui.flavour; startx.enable = builtins.elem "i3" gui.flavour;
}; };
}; };

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { { pkgs, ... }@inputs: {
nix = { nix = {
# TODO remove once 24.05 is released # TODO remove once 24.05 is released
package = pkgs.nixVersions.unstable; package = pkgs.nixVersions.unstable;

View file

@ -37,7 +37,7 @@
javaPackages.openjfx17 javaPackages.openjfx17
gradle_7 gradle_7
bun-baseline bun-baseline
nodejs_21 nodejs_20
nodenv nodenv
nodePackages.yarn nodePackages.yarn
nodePackages.pnpm nodePackages.pnpm

View file

@ -1,11 +1,10 @@
{ pkgs, ... }: { { pkgs, config, ... }: with config.bchmnn; {
powerManagement = { powerManagement = {
enable = true; enable = true;
# powertop.enable = true;
}; };
services.tlp = { services.tlp = {
enable = true; enable = !builtins.elem "gnome" gui.flavour;
settings = { settings = {
CPU_ENERGY_PERF_POLICY_ON_AC = "performance"; CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
CPU_ENERGY_PERF_POLICY_ON_BAT = "balance_power"; CPU_ENERGY_PERF_POLICY_ON_BAT = "balance_power";

View file

@ -8,29 +8,43 @@
nomad = { nomad = {
config = { config = {
"LVDS-1" = { "LVDS-1" = {
enable = false;
};
};
};
samsung = {
fingerprint = {
"DP-1" = "00ffffffffffff004c2d830e000e0001011c0103806b3c780a23ada4544d99260f474abdef80714f81c0810081809500a9c0b300010104740030f2705a80b0588a00501d7400001e023a801871382d40582c4500501d7400001e000000fd00184b0f511e000a202020202020000000fc0053414d53554e470a202020202001b902034cf0535f101f041305142021225d5e626364071603122909070715075057070183010000e2004fe30503016e030c001000b83c20008001020304e3060d01e50e60616566e5018b849001011d80d0721c1620102c2580501d7400009e662156aa51001e30468f3300501d7400001e000000000000000000000000000000a3";
};
config = {
"DP-1" = {
enable = true; enable = true;
primary = true;
mode = "3840x2160";
rate = "59.94";
position = "0x0";
}; };
}; };
}; };
station = { station = {
config = { config = {
"LVDS-1" = { "LVDS-1" = {
enable = false; enable = false;
}; };
"DP-1-3" = { "DP-1-3" = {
enable = true; enable = false;
mode = "1920x1080"; mode = "1920x1080";
position = "0x0"; position = "0x0";
}; };
"DP-1-2" = { "DP-1-2" = {
enable = true; enable = false;
mode = "1920x1080"; mode = "1920x1080";
position = "1920x0"; position = "1920x0";
}; };
"VGA-1-2" = { "VGA-1-2" = {
enable = true; enable = false;
mode = "1920x1080"; mode = "1920x1080";
position = "3840x0"; position = "3840x0";
}; };

View file

@ -10,6 +10,7 @@ in
imports = [ imports = [
./autorandr.nix ./autorandr.nix
./rofi.nix
]; ];
home.packages = with pkgs; [ home.packages = with pkgs; [
@ -26,6 +27,7 @@ in
nextcloud-client # nextcloud client to connect to any instance nextcloud-client # nextcloud client to connect to any instance
libsForQt5.kdeconnect-kde # sync phone and pc libsForQt5.kdeconnect-kde # sync phone and pc
system-config-printer # printer manager system-config-printer # printer manager
gnome3.adwaita-icon-theme
]; ];
xsession.windowManager.i3 = { xsession.windowManager.i3 = {
@ -33,8 +35,10 @@ in
config = { config = {
modifier = "Mod4"; modifier = "Mod4";
terminal = "${pkgs.alacritty}/bin/alacritty"; terminal = "${pkgs.alacritty}/bin/alacritty";
menu = "${pkgs.dmenu}/bin/dmenu_run"; menu = "${config.programs.rofi.package}/bin/rofi -show drun";
startup = with pkgs; [ startup = with pkgs; [
{ command = "${gnome.gnome-keyring}/bin/gnome-keyring-daemon --start --components=ssh,secrets,pkcs11"; }
{ command = "${autorandr}/bin/autorandr -c"; }
{ command = "${feh}/bin/feh --bg-fill ${common.wallpaper.default}"; } { command = "${feh}/bin/feh --bg-fill ${common.wallpaper.default}"; }
{ command = "${networkmanagerapplet}/bin/nm-applet"; } { command = "${networkmanagerapplet}/bin/nm-applet"; }
{ command = "${blueman}/bin/blueman-applet"; } { command = "${blueman}/bin/blueman-applet"; }

View file

@ -0,0 +1,13 @@
{ pkgs, lib, ... }:
let
common = (import ../common.nix) { pkgs = pkgs; lib = lib; };
in
{
programs.rofi = {
enable = true;
font = common.font;
location = "center";
};
}

View file

@ -69,7 +69,7 @@ in
'' + optionalString nvidia.enable '' '' + optionalString nvidia.enable ''
# nvidia # nvidia
export WLR_RENDERER=vulkan; export WLR_RENDERER=vulkan;
export LIBVA_DRIVER_NAME,nvidia; # export LIBVA_DRIVER_NAME,nvidia;
# export GBM_BACKEND=nvidia-drm; # export GBM_BACKEND=nvidia-drm;
export __GL_GSYNC_ALLOWED=0; export __GL_GSYNC_ALLOWED=0;
export __GL_VRR_ALLOWED=0; export __GL_VRR_ALLOWED=0;

View file

@ -1,4 +1,4 @@
{ ... }: { { pkgs, ... }: {
/* /*
xdg.configFile."nvim" = { xdg.configFile."nvim" = {
@ -7,6 +7,15 @@
}; };
*/ */
home.packages = with pkgs; [
lua-language-server
clang-tools
rust-analyzer
gopls
nixd
typescript
];
programs.neovim = { programs.neovim = {
enable = true; enable = true;
defaultEditor = true; defaultEditor = true;

View file

@ -2,8 +2,13 @@
programs.ssh = { programs.ssh = {
enable = true; enable = true;
addKeysToAgent = "yes"; addKeysToAgent = "yes";
includes = [
"config.d/*"
];
}; };
home.file.".ssh/config.d/.keep".source = builtins.toFile "keep" "";
services.ssh-agent = { services.ssh-agent = {
enable = true; enable = true;
}; };