Skip to content

Commit

Permalink
fix: NVIDIA fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lpchaim committed Nov 23, 2024
1 parent 29b604f commit 5ef972d
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 19 deletions.
25 changes: 13 additions & 12 deletions modules/home/de/hyprland/hyprlock/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,23 @@
config,
lib,
...
}:
with lib; let
} @ args: let
inherit (lib) getAttrFromPath mkIf;
namespace = ["my" "modules" "de" "hyprland"];
cfg = getAttrFromPath namespace config;
in
mkIf cfg.enable {
stylix.targets.hyprlock.enable = false;
programs.hyprlock = {
enable = true;
settings = let
colors = config.lib.stylix.colors;
makeRgb = colorIndex: let
r = colors."base${colorIndex}-rgb-r";
g = colors."base${colorIndex}-rgb-g";
b = colors."base${colorIndex}-rgb-b";
in "rgb(${r},${g},${b})";
inherit (config.lib.stylix) colors;
in {
background = {
path = "screenshot";
path =
if (args ? osConfig && (lib.elem "nvidia" args.osConfig.services.xserver.videoDrivers))
then "${config.stylix.image}"
else "screenshot";
blur_size = 3;
blur_passes = 2;
};
Expand All @@ -33,9 +32,11 @@ in
dots_center = true;
fade_on_empty = false;
hide_input = false;
font_color = "rgb(0, 0, 0)";
inner_color = "rgba(200, 200, 200, 0.5)";
outer_color = "rgb(0, 0, 0)";
outer_color = "rgb(${colors.base03})";
inner_color = "rgb(${colors.base00})";
font_color = "rgb(${colors.base05})";
fail_color = "rgb(${colors.base08})";
check_color = "rgb(${colors.base0A})";
placeholder_text = "";
fail_text = "<i>$FAIL <b>($ATTEMPTS)</b></i>";
position = "0, -120";
Expand Down
12 changes: 8 additions & 4 deletions modules/home/gui/chromium.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,19 @@
lib,
pkgs,
...
}: let
} @ args: let
inherit (inputs.home-manager.lib) hm;
in
lib.mkIf (config.my.modules.gui.enable) {
programs.chromium = {
enable = true;
commandLineArgs = [
"--disable-gpu-compositing" # @TODO Remove after NVIDIA figures this out
];
commandLineArgs =
[
"--password-store=gnome"
]
++ (lib.optionals (args ? osConfig && (lib.elem "nvidia" args.osConfig.services.xserver.videoDrivers)) [
"--disable-gpu-compositing" # @TODO Remove after NVIDIA figures this out
]);
package = pkgs.brave;
};

Expand Down
2 changes: 1 addition & 1 deletion modules/nixos/traits/gpu/nvidia.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
modesetting.enable = true;
nvidiaSettings = true;
open = false;
package = config.boot.kernelPackages.nvidiaPackages.stable;
package = config.boot.kernelPackages.nvidiaPackages.latest;
powerManagement.enable = true;
};
};
Expand Down
9 changes: 7 additions & 2 deletions modules/nixos/traits/virtualisation.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
{pkgs, ...}: {
{
config,
lib,
pkgs,
...
}: {
environment.systemPackages = with pkgs; [
distrobox
];
virtualisation = {
docker = {
enable = true;
enableOnBoot = true;
enableNvidia = true;
enableNvidia = lib.elem "nvidia" config.services.xserver.videoDrivers;
};
};
}

0 comments on commit 5ef972d

Please sign in to comment.