feat: cleanup configs
Sync README to GitHub / sync (push) Successful in 12s

This commit is contained in:
2026-08-03 10:30:48 -04:00
parent 9009f3639f
commit d2789aad7e
40 changed files with 870 additions and 290 deletions
+4 -1
View File
@@ -1,5 +1,8 @@
{ inputs, pkgs, ... }: {
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
nixpkgs.config.allowUnfree = true;
time.timeZone = "America/New_York";
-1
View File
@@ -61,4 +61,3 @@
trackpad.Clicking = false;
};
}
+1 -2
View File
@@ -1,4 +1,4 @@
{ ... }: {
_: {
virtualisation.docker = {
enable = true;
rootless = {
@@ -7,4 +7,3 @@
};
};
}
+30 -21
View File
@@ -17,8 +17,7 @@
package = lib.mkOption {
type = lib.types.package;
default = config.boot.kernelPackages.nvidiaPackages.stable;
defaultText = lib.literalExpression
"config.boot.kernelPackages.nvidiaPackages.stable";
defaultText = lib.literalExpression "config.boot.kernelPackages.nvidiaPackages.stable";
description = "The NVIDIA driver package to use.";
};
@@ -26,7 +25,11 @@
enable = lib.mkEnableOption "NVIDIA Optimus PRIME (hybrid graphics)";
mode = lib.mkOption {
type = lib.types.enum [ "offload" "sync" "reverse-sync" ];
type = lib.types.enum [
"offload"
"sync"
"reverse-sync"
];
default = "offload";
description = ''
Which PRIME mode to use.
@@ -63,13 +66,13 @@
hardware.graphics.enable = true;
services.xserver.videoDrivers =
if config.modules.nvidia.prime.enable
&& config.modules.nvidia.prime.mode == "offload"
then [
(if config.modules.nvidia.prime.amdBusId != "" then "amdgpu" else "modesetting")
"nvidia"
]
else [ "nvidia" ];
if config.modules.nvidia.prime.enable && config.modules.nvidia.prime.mode == "offload" then
[
(if config.modules.nvidia.prime.amdBusId != "" then "amdgpu" else "modesetting")
"nvidia"
]
else
[ "nvidia" ];
hardware.nvidia = {
modesetting.enable = true;
@@ -83,21 +86,27 @@
prime = lib.mkIf config.modules.nvidia.prime.enable (
let
busIds = lib.filterAttrs (_: v: v != "") {
intelBusId = config.modules.nvidia.prime.intelBusId;
intelBusId = config.modules.nvidia.prime.intelBusId;
amdgpuBusId = config.modules.nvidia.prime.amdBusId;
nvidiaBusId = config.modules.nvidia.prime.nvidiaBusId;
};
modeConfig =
if config.modules.nvidia.prime.mode == "offload" then {
offload.enable = true;
offload.enableOffloadCmd = true;
} else if config.modules.nvidia.prime.mode == "sync" then {
sync.enable = true;
} else {
reverseSync.enable = true;
allowExternalGpu = false;
};
in busIds // modeConfig
if config.modules.nvidia.prime.mode == "offload" then
{
offload.enable = true;
offload.enableOffloadCmd = true;
}
else if config.modules.nvidia.prime.mode == "sync" then
{
sync.enable = true;
}
else
{
reverseSync.enable = true;
allowExternalGpu = false;
};
in
busIds // modeConfig
);
};
};
+1 -1
View File
@@ -1,4 +1,4 @@
{ ... }: {
_: {
services.xserver.enable = true;
services.displayManager.sddm = {
enable = true;
+1 -1
View File
@@ -1,4 +1,4 @@
{ ... }: {
_: {
programs._1password.enable = true;
programs._1password-gui = {
enable = true;