Compare commits
6 Commits
7d07de663d
...
b1e3fa601d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b1e3fa601d | ||
|
|
2f07912f1b | ||
|
|
8701b72258 | ||
|
|
8c305e3703 | ||
|
|
86f61e9547 | ||
|
|
ce387ab5db |
205
flake.lock
generated
205
flake.lock
generated
@ -34,11 +34,11 @@
|
||||
"flake-compat_2": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1717312683,
|
||||
"narHash": "sha256-FrlieJH50AuvagamEvWMIE6D2OAnERuDboFDYAED/dE=",
|
||||
"lastModified": 1746162366,
|
||||
"narHash": "sha256-5SSSZ/oQkwfcAz/o/6TlejlVGqeK08wyREBQ5qFFPhM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "flake-compat",
|
||||
"rev": "38fd3954cf65ce6faf3d0d45cd26059e059f07ea",
|
||||
"rev": "0f158086a2ecdbb138cd0429410e44994f1b7e4b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -101,43 +101,6 @@
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils-plus": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1715533576,
|
||||
"narHash": "sha256-fT4ppWeCJ0uR300EH3i7kmgRZnAVxrH+XtK09jQWihk=",
|
||||
"owner": "gytis-ivaskevicius",
|
||||
"repo": "flake-utils-plus",
|
||||
"rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "gytis-ivaskevicius",
|
||||
"repo": "flake-utils-plus",
|
||||
"rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"inputs": {
|
||||
"systems": "systems_2"
|
||||
},
|
||||
@ -155,6 +118,25 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils-plus": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1715533576,
|
||||
"narHash": "sha256-fT4ppWeCJ0uR300EH3i7kmgRZnAVxrH+XtK09jQWihk=",
|
||||
"owner": "gytis-ivaskevicius",
|
||||
"repo": "flake-utils-plus",
|
||||
"rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "gytis-ivaskevicius",
|
||||
"repo": "flake-utils-plus",
|
||||
"rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"game-of-life": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
@ -202,11 +184,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1735381016,
|
||||
"narHash": "sha256-CyCZFhMUkuYbSD6bxB/r43EdmDE7hYeZZPTCv0GudO4=",
|
||||
"lastModified": 1749160002,
|
||||
"narHash": "sha256-IM3xKjsKxhu7Y1WdgTltrLKiOJS8nW7D4SUDEMNr7CI=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "10e99c43cdf4a0713b4e81d90691d22c6a58bdf2",
|
||||
"rev": "68cc9eeb3875ae9682c04629f20738e1e79d72aa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -215,6 +197,48 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"zen-browser",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1743604125,
|
||||
"narHash": "sha256-ZD61DNbsBt1mQbinAaaEqKaJk2RFo9R/j+eYWeGMx7A=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "180fd43eea296e62ae68e079fcf56aba268b9a1a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"kwin-effects-forceblur": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"utils": "utils"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1745057346,
|
||||
"narHash": "sha256-71cyYKUul9owRzbcObXkzhTBcmnXJsvmk1gq0RbP5PQ=",
|
||||
"owner": "taj-ny",
|
||||
"repo": "kwin-effects-forceblur",
|
||||
"rev": "fea9f80f27389aa8a62befb5babf40b28fed328d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "taj-ny",
|
||||
"repo": "kwin-effects-forceblur",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"lanzaboote": {
|
||||
"inputs": {
|
||||
"crane": "crane",
|
||||
@ -249,11 +273,11 @@
|
||||
"rust-overlay": "rust-overlay_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1735608992,
|
||||
"narHash": "sha256-NkzMjar9Sz0pLJxVfp9Hchf48YCuQQ1AnGVYGNfzwVA=",
|
||||
"lastModified": 1749121763,
|
||||
"narHash": "sha256-TVFiyMBs+3KEzZVwf/n1zedUWzPrMPzud/2Jiho8dcE=",
|
||||
"owner": "lilyinstarlight",
|
||||
"repo": "nixos-cosmic",
|
||||
"rev": "af6900c2f6e68439c5f4aaaa8bb1a6d54bf04025",
|
||||
"rev": "c89df80b72b4e1802fd91a35f4857868c953c1c0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -265,15 +289,14 @@
|
||||
"nixos-wsl": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_3",
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733854371,
|
||||
"narHash": "sha256-K9qGHniYBbjqVcEiwXyiofj/IFf78L5F0/FCf+CKyr0=",
|
||||
"lastModified": 1746453552,
|
||||
"narHash": "sha256-r66UGha+7KVHkI7ksrcMjnw/mm9Sg4l5bQlylxHwdGU=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NixOS-WSL",
|
||||
"rev": "dee4425dcee3149475ead0cb6a616b8a028c5888",
|
||||
"rev": "be618645aa0adf461f778500172b6896d5ab2d01",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -317,11 +340,11 @@
|
||||
},
|
||||
"nixpkgs-stable_2": {
|
||||
"locked": {
|
||||
"lastModified": 1735531152,
|
||||
"narHash": "sha256-As8I+ebItDKtboWgDXYZSIjGlKeqiLBvjxsQHUmAf1Q=",
|
||||
"lastModified": 1748995628,
|
||||
"narHash": "sha256-bFufQGSAEYQgjtc4wMrobS5HWN0hDP+ZX+zthYcml9U=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "3ffbbdbac0566a0977da3d2657b89cbcfe9a173b",
|
||||
"rev": "8eb3b6a2366a7095939cd22f0dc0e9991313294b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -333,11 +356,11 @@
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1735471104,
|
||||
"narHash": "sha256-0q9NGQySwDQc7RhAV2ukfnu7Gxa5/ybJ2ANT8DQrQrs=",
|
||||
"lastModified": 1748929857,
|
||||
"narHash": "sha256-lcZQ8RhsmhsK8u7LIFsJhsLh/pzR9yZ8yqpTzyGdj+Q=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "88195a94f390381c6afcdaa933c2f6ff93959cb4",
|
||||
"rev": "c2a03962b8e24e669fb37b7df10e7c79531ff1a4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -349,27 +372,27 @@
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1733384649,
|
||||
"narHash": "sha256-K5DJ2LpPqht7K76bsxetI+YHhGGRyVteTPRQaIIKJpw=",
|
||||
"lastModified": 1742937945,
|
||||
"narHash": "sha256-lWc+79eZRyvHp/SqMhHTMzZVhpxkRvthsP1Qx6UCq0E=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "190c31a89e5eec80dd6604d7f9e5af3802a58a13",
|
||||
"rev": "d02d88f8de5b882ccdde0465d8fa2db3aa1169f7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-24.05",
|
||||
"ref": "nixos-24.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1735471104,
|
||||
"narHash": "sha256-0q9NGQySwDQc7RhAV2ukfnu7Gxa5/ybJ2ANT8DQrQrs=",
|
||||
"lastModified": 1748929857,
|
||||
"narHash": "sha256-lcZQ8RhsmhsK8u7LIFsJhsLh/pzR9yZ8yqpTzyGdj+Q=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "88195a94f390381c6afcdaa933c2f6ff93959cb4",
|
||||
"rev": "c2a03962b8e24e669fb37b7df10e7c79531ff1a4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -381,11 +404,11 @@
|
||||
},
|
||||
"nixpkgs_5": {
|
||||
"locked": {
|
||||
"lastModified": 1727348695,
|
||||
"narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=",
|
||||
"lastModified": 1743448293,
|
||||
"narHash": "sha256-bmEPmSjJakAp/JojZRrUvNcDX2R5/nuX6bm+seVaGhs=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "1925c603f17fc89f4c8f6bf6f631a802ad85d784",
|
||||
"rev": "77b584d61ff80b4cef9245829a6f1dfad5afdfa3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -426,6 +449,7 @@
|
||||
"inputs": {
|
||||
"game-of-life": "game-of-life",
|
||||
"home-manager": "home-manager",
|
||||
"kwin-effects-forceblur": "kwin-effects-forceblur",
|
||||
"lanzaboote": "lanzaboote",
|
||||
"nixos-cosmic": "nixos-cosmic",
|
||||
"nixos-wsl": "nixos-wsl",
|
||||
@ -465,11 +489,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1735525800,
|
||||
"narHash": "sha256-pcN8LAL021zdC99a9F7iEiFCI1wmrE4DpIYUgKpB/jY=",
|
||||
"lastModified": 1749091064,
|
||||
"narHash": "sha256-TGtYjzRX0sueFhwYsnNNFF5TTKnpnloznpIghLzxeXo=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "10faa81b4c0135a04716cbd1649260d82b2890cd",
|
||||
"rev": "12419593ce78f2e8e1e89a373c6515885e218acb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -487,11 +511,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1732544274,
|
||||
"narHash": "sha256-qvzLIxuqukl0nxpXHEh5+iw1BLeLxYOwRC0+7cFUbPo=",
|
||||
"lastModified": 1736130495,
|
||||
"narHash": "sha256-4i9nAJEZFv7vZMmrE0YG55I3Ggrtfo5/T07JEpEZ/RM=",
|
||||
"owner": "snowfallorg",
|
||||
"repo": "lib",
|
||||
"rev": "cfeacd055545ab5de0ecfd41e09324dcd8fb2bbb",
|
||||
"rev": "02d941739f98a09e81f3d2d9b3ab08918958beac",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -507,11 +531,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1735468296,
|
||||
"narHash": "sha256-ZjUjbvS06jf4fElOF4ve8EHjbpbRVHHypStoY8HGzk8=",
|
||||
"lastModified": 1747603214,
|
||||
"narHash": "sha256-lAblXm0VwifYCJ/ILPXJwlz0qNY07DDYdLD+9H+Wc8o=",
|
||||
"owner": "mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "bcb8b65aa596866eb7e5c3e1a6cccbf5d1560b27",
|
||||
"rev": "8d215e1c981be3aa37e47aeabd4e61bb069548fd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -552,11 +576,11 @@
|
||||
},
|
||||
"trilium-next-pr": {
|
||||
"locked": {
|
||||
"lastModified": 1733744893,
|
||||
"narHash": "sha256-CufsQ+I/s7TsPd6Rq62WAQZQDtoeC8nw+ExuXeWnDRk=",
|
||||
"lastModified": 1736678965,
|
||||
"narHash": "sha256-2A687i3Rq0/wqJVvpgaiRPWcfnBBuBhPjKaT8cnd7o0=",
|
||||
"owner": "FliegendeWurst",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "6000de6a3f96f729ef031cbd4ecb04898cb38780",
|
||||
"rev": "4fcdf706929246476e52e960760b6643cb8395c4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -566,16 +590,35 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726560853,
|
||||
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"zen-browser": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager_2",
|
||||
"nixpkgs": "nixpkgs_5"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1736824652,
|
||||
"narHash": "sha256-8J56ngRvKVvCxdY3iDtol/9UAJfwCh0k96DnyNchUCA=",
|
||||
"lastModified": 1749093358,
|
||||
"narHash": "sha256-Clx1BzHsSSzIXbnCW9KM3m5gW3SFgemcW9/4XH4epeM=",
|
||||
"owner": "0xc000022070",
|
||||
"repo": "zen-browser-flake",
|
||||
"rev": "a17923b5fd758700c67afdaae2a1d3123381f96b",
|
||||
"rev": "d4cf0ac2e860be17036a376ae99b233a115826bc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@ -29,6 +29,10 @@
|
||||
# Optional but recommended to limit the size of your system closure.
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
kwin-effects-forceblur = {
|
||||
url = "github:taj-ny/kwin-effects-forceblur";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = inputs:
|
||||
@ -91,6 +95,8 @@
|
||||
pkgs.sbctl
|
||||
];
|
||||
|
||||
|
||||
boot.loader.systemd-boot.configurationLimit = 4;
|
||||
# Lanzaboote currently replaces the systemd-boot module.
|
||||
# This setting is usually set to true in configuration.nix
|
||||
# generated at installation time. So we force it to false
|
||||
|
||||
@ -27,6 +27,8 @@ in
|
||||
pkgs.qbittorrent
|
||||
pkgs.vesktop
|
||||
pkgs.obsidian
|
||||
inputs.zen-browser.packages.x86_64-linux.default ];
|
||||
inputs.zen-browser.packages.x86_64-linux.default
|
||||
inputs.kwin-effects-forceblur.packages.${pkgs.system}.default
|
||||
];
|
||||
};
|
||||
}
|
||||
@ -18,6 +18,41 @@ in
|
||||
# Enable NVIDIA driver for X11 and Wayland
|
||||
services.xserver.videoDrivers = [ "amdgpu" "nvidia" ];
|
||||
|
||||
services.xserver.displayManager.xserverArgs = [ "-config" "/opt/x11/xserver.conf" ];
|
||||
|
||||
|
||||
services.xserver.config = lib.mkAfter ''
|
||||
Section "ServerLayout"
|
||||
Identifier "layout"
|
||||
Screen 0 "amdgpu"
|
||||
Inactive "nvidia"
|
||||
Option "AllowNVIDIAGPUScreens"
|
||||
EndSection
|
||||
|
||||
Section "Device"
|
||||
Identifier "nvidia"
|
||||
Driver "nvidia"
|
||||
BusID "PCI:01:0:0"
|
||||
EndSection
|
||||
|
||||
Section "Screen"
|
||||
Identifier "nvidia"
|
||||
Device "nvidia"
|
||||
EndSection
|
||||
|
||||
Section "Device"
|
||||
Identifier "amdgpu"
|
||||
Driver "amdgpu"
|
||||
BusID "PCI:50:0:0"
|
||||
EndSection
|
||||
|
||||
Section "Screen"
|
||||
Identifier "amdgpu"
|
||||
Device "amdgpu"
|
||||
EndSection
|
||||
'';
|
||||
services.switcherooControl.enable = true;
|
||||
|
||||
# Enable OpenGL
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
@ -25,7 +60,7 @@ in
|
||||
};
|
||||
|
||||
# Use Beta Driver Package
|
||||
boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11_beta ];
|
||||
boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11 ];
|
||||
|
||||
|
||||
|
||||
@ -33,22 +68,22 @@ in
|
||||
|
||||
# Enable required Kernel Modules
|
||||
boot.initrd.kernelModules = [
|
||||
"amdgpu"
|
||||
"nvidia-modeset"
|
||||
"nvidia"
|
||||
# "nvidia-drm"
|
||||
"nvidiafb"
|
||||
# "amdgpu"
|
||||
"nvidia-drm"
|
||||
# "nvidiafb"
|
||||
# "nvidia-uvm"
|
||||
# "nvidia-modeset"
|
||||
# "i2c-nvidia_gpu"
|
||||
];
|
||||
|
||||
|
||||
boot.kernelParams = [
|
||||
"amdgpu.modeset=1"
|
||||
# "amdgpu.modeset=1"
|
||||
"nvidia-drm.fbdev=1"
|
||||
"nvidia-drm.modeset=0"
|
||||
"nvidia-drm.modeset=1"
|
||||
# "nvidia.NVreg_PreserveVideoMemoryAllocations=0"
|
||||
"amd_iommu=on"
|
||||
# "amd_iommu=on"
|
||||
# "vfio-pci.ids=\"10de:2489,10de:228b\""
|
||||
# "nomodeset"
|
||||
# "nvidia_drm.modeset=1"
|
||||
@ -102,7 +137,8 @@ in
|
||||
nvidiaSettings = true;
|
||||
|
||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
# package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
# package = config.boot.kernelPackages.nvidiaPackages.none;
|
||||
# package = config.boot.kernelPackages.nvidiaPackages.production;
|
||||
|
||||
@ -110,10 +146,12 @@ in
|
||||
|
||||
prime = {
|
||||
offload = {
|
||||
enable = true;
|
||||
enableOffloadCmd = true;
|
||||
enable = lib.mkForce true;
|
||||
enableOffloadCmd = lib.mkForce true;
|
||||
};
|
||||
reverseSync.enable = false;
|
||||
|
||||
reverseSync.enable = lib.mkForce false;
|
||||
sync.enable = lib.mkForce false;
|
||||
# Make sure to use the correct Bus ID values for your system!
|
||||
# intelBusId = "PCI:0:2:0";
|
||||
nvidiaBusId = "PCI:01:0:0";
|
||||
@ -128,4 +166,5 @@ in
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,149 @@
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
inherit (lib.my-namespace) disabled enabled;
|
||||
cfg = config.my-namespace.hardware.graphics-nvidia-specializations;
|
||||
in
|
||||
{
|
||||
options.my-namespace.hardware.graphics-nvidia-specializations = {
|
||||
enable = mkEnableOption "Enable nvidia";
|
||||
};
|
||||
options.nvidia-sync.enable = lib.mkEnableOption "Enable NVIDIA prime sync mode";
|
||||
options.nvidia-offload.enable = lib.mkEnableOption "Enable NVIDIA prime sync mode";
|
||||
|
||||
config = {
|
||||
specialisation."NVIDIA-SYNC".configuration = {
|
||||
system.nixos.tags = [ "with-nvidia-sync" ];
|
||||
nvidia-sync.enable = true;
|
||||
};
|
||||
|
||||
specialisation."NVIDIA-OFFLOAD".configuration = {
|
||||
system.nixos.tags = [ "with-nvidia-offload" ];
|
||||
nvidia-offload.enable = true;
|
||||
};
|
||||
|
||||
services.xserver.videoDrivers = [ "nvidia" "amdgpu" ];
|
||||
hardware.graphics = {
|
||||
extraPackages = with pkgs; [ nvidia-vaapi-driver ];
|
||||
};
|
||||
boot.kernelParams = [
|
||||
"nvidia.NVreg_PreserveVideoMemoryAllocations=1"
|
||||
"nvidia-drm.fbdev=1"
|
||||
"nvidia-drm.modeset=1"
|
||||
"amdgpu.modeset=0"
|
||||
];
|
||||
boot.initrd.kernelModules = [
|
||||
# "amdgpu"
|
||||
"nvidia"
|
||||
"nvidia-drm"
|
||||
"nvidiafb"
|
||||
# "nvidia-uvm"
|
||||
# "nvidia-modeset"
|
||||
# "i2c-nvidia_gpu"
|
||||
];
|
||||
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
|
||||
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
||||
powerManagement.enable = config.nvidia-offload.enable;
|
||||
# Fine-grained power management. Turns off GPU when not in use.
|
||||
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
||||
powerManagement.finegrained = false;
|
||||
|
||||
# Use the NVidia open source kernel module (not to be confused with the
|
||||
# independent third-party "nouveau" open source driver).
|
||||
# Support is limited to the Turing and later architectures. Full list of
|
||||
# supported GPUs is at:
|
||||
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
|
||||
# Only available from driver 515.43.04+
|
||||
# Currently alpha-quality/buggy, so false is currently the recommended setting.
|
||||
open = false;
|
||||
|
||||
# Enable the Nvidia settings menu,
|
||||
# accessible via `nvidia-settings`.
|
||||
nvidiaSettings = true;
|
||||
|
||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||
# package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.production;
|
||||
|
||||
prime = {
|
||||
amdgpuBusId = "PCI:50:0:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
} // lib.optionalAttrs config.nvidia-sync.enable {
|
||||
sync.enable = true;
|
||||
} // lib.optionalAttrs (config.nvidia-offload.enable) {
|
||||
offload = {
|
||||
enable = true;
|
||||
enableOffloadCmd = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
services.xserver.config = lib.mkAfter ''
|
||||
Section "ServerLayout"
|
||||
Identifier "layout"
|
||||
Screen 0 "amdgpu"
|
||||
Inactive "nvidia"
|
||||
Option "AllowNVIDIAGPUScreens"
|
||||
Option "AllowEmptyInitialConfiguration" "True"
|
||||
EndSection
|
||||
|
||||
Section "Device"
|
||||
Identifier "nvidia"
|
||||
Driver "nvidia"
|
||||
BusID "PCI:01:0:0"
|
||||
Option "AllowEmptyInitialConfiguration" "True"
|
||||
EndSection
|
||||
|
||||
Section "Screen"
|
||||
Identifier "nvidia"
|
||||
Device "nvidia"
|
||||
Option "AllowEmptyInitialConfiguration" "True"
|
||||
EndSection
|
||||
|
||||
Section "Device"
|
||||
Identifier "amdgpu"
|
||||
Driver "amdgpu"
|
||||
BusID "PCI:50:0:0"
|
||||
Option "AllowEmptyInitialConfiguration" "True"
|
||||
EndSection
|
||||
|
||||
Section "Screen"
|
||||
Identifier "amdgpu"
|
||||
Device "amdgpu"
|
||||
Option "AllowEmptyInitialConfiguration" "True"
|
||||
EndSection
|
||||
'';
|
||||
# services.xserver.config = lib.mkForce ''
|
||||
# Section "ServerLayout"
|
||||
# Identifier "layout"
|
||||
# Screen 0 "amdgpu"
|
||||
# Inactive "nvidia"
|
||||
# Option "AllowNVIDIAGPUScreens"
|
||||
# EndSection
|
||||
|
||||
# Section "Device"
|
||||
# Identifier "nvidia"
|
||||
# Driver "nvidia"
|
||||
# BusID "PCI:01:0:0"
|
||||
# EndSection
|
||||
|
||||
# Section "Screen"
|
||||
# Identifier "nvidia"
|
||||
# Device "nvidia"
|
||||
# EndSection
|
||||
|
||||
# Section "Device"
|
||||
# Identifier "amdgpu"
|
||||
# Driver "amdgpu"
|
||||
# BusID "PCI:50:0:0"
|
||||
# EndSection
|
||||
|
||||
# Section "Screen"
|
||||
# Identifier "amdgpu"
|
||||
# Device "amdgpu"
|
||||
# EndSection
|
||||
# '';
|
||||
};
|
||||
}
|
||||
@ -43,11 +43,35 @@
|
||||
};
|
||||
|
||||
services = {
|
||||
displayManager.sddm.enable = false;
|
||||
# Enable Gnome Session
|
||||
desktopManager.gnome.enable = true;
|
||||
displayManager.gdm.enable = false;
|
||||
displayManager.sddm.enable = true;
|
||||
displayManager.defaultSession = "gnome";
|
||||
desktopManager.plasma6.enable = true;
|
||||
xserver = {
|
||||
enable = true; # Enable the deprecated X11 teletype terminal connection system.
|
||||
|
||||
desktopManager = {
|
||||
# Disable xterm
|
||||
xterm.enable = false;
|
||||
# Enable xfce session
|
||||
xfce = {
|
||||
enable = true;
|
||||
};
|
||||
# Disable fuckshit plasma
|
||||
};
|
||||
# Configure Display Manager
|
||||
displayManager = {
|
||||
# Enable lightdm
|
||||
lightdm.enable = false;
|
||||
};
|
||||
# Configure keymap in X11
|
||||
xkb = {
|
||||
layout = "us";
|
||||
variant = "intl";
|
||||
};
|
||||
|
||||
# Specify first device section to use nvidia GPU
|
||||
|
||||
|
||||
@ -84,29 +108,6 @@
|
||||
# Device "amdgpu"
|
||||
# EndSection
|
||||
# '';
|
||||
|
||||
desktopManager = {
|
||||
# Disable xterm
|
||||
xterm.enable = false;
|
||||
# Enable xfce session
|
||||
xfce = {
|
||||
enable = true;
|
||||
};
|
||||
# Enable Gnome Session
|
||||
gnome.enable = true;
|
||||
# Disable fuckshit plasma
|
||||
};
|
||||
# Configure Display Manager
|
||||
displayManager = {
|
||||
gdm.enable = true;
|
||||
# Enable lightdm
|
||||
lightdm.enable = false;
|
||||
};
|
||||
# Configure keymap in X11
|
||||
xkb = {
|
||||
layout = "us";
|
||||
variant = "intl";
|
||||
};
|
||||
};
|
||||
};
|
||||
# services.xserver.displayManager.defaultSession = "gnome-x11"; # services.xserver.displayManager.autoLogin.enable = true;
|
||||
@ -123,7 +124,7 @@
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable sound with pipewire.
|
||||
hardware.pulseaudio.enable = false;
|
||||
services.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
@ -168,7 +169,7 @@
|
||||
# List services that you want to enable:
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
# services.openssh.enable = true;
|
||||
services.openssh.enable = true;
|
||||
|
||||
# Open ports in the firewall.
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
boot.kernelParams = [ "drm.edid_firmware=DP-6:edid/edid.bin" ];
|
||||
boot.kernelParams = [ "drm.edid_firmware=DP-1:edid/edid.bin,DP-2:edid/edid.bin,DP-3:edid/edid.bin,DP-4:edid/edid.bin" ];
|
||||
|
||||
hardware.firmware = [
|
||||
(
|
||||
|
||||
@ -4,7 +4,8 @@ let
|
||||
in
|
||||
{
|
||||
my-namespace.hardware = {
|
||||
graphics-nvidia-prime-amd = enabled;
|
||||
graphics-nvidia-specializations = enabled;
|
||||
# graphics-nvidia-prime-amd = enabled;
|
||||
# graphics-nvidia-prime-amd-testing = enabled;
|
||||
# graphics-amd-igpu-only = enabled;
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user