Skip to content

Commit

Permalink
refactor: Move chromium logic to its own module
Browse files Browse the repository at this point in the history
  • Loading branch information
lpchaim committed Sep 29, 2024
1 parent bb7c89b commit 79a41f0
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.
16 changes: 16 additions & 0 deletions modules/home/gui/chromium.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
config,
inputs,
pkgs,
...
}: let
inherit (inputs.home-manager.lib) hm;
in {
programs.chromium = {
enable = true;
commandLineArgs = [
"--disable-gpu-compositing" # @TODO Remove after NVIDIA figures this out
];
package = pkgs.brave;
};
}
18 changes: 6 additions & 12 deletions modules/home/gui/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ with lib; let
namespace = ["my" "modules" "gui"];
cfg = getAttrFromPath namespace config;
in {
imports = [
./chromium.nix
./firefox.nix
./mangohud.nix
];

options = setAttrByPath namespace {
enable = mkEnableOption "gui apps";
};
Expand All @@ -25,13 +31,6 @@ in {
];

programs = {
chromium = {
enable = true;
commandLineArgs = [
"--disable-gpu-compositing" # @TODO Remove after NVIDIA figures this out
];
package = pkgs.brave;
};
vscode = {
enable = true;
package = pkgs.vscode.fhs;
Expand All @@ -51,9 +50,4 @@ in {
];
}
]);

imports = [
./firefox.nix
./mangohud.nix
];
}

0 comments on commit 79a41f0

Please sign in to comment.