Skip to content

Commit

Permalink
Move browser in a separate folder
Browse files Browse the repository at this point in the history
  • Loading branch information
arunoruto committed Oct 17, 2024
1 parent 3675213 commit 3019271
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 27 deletions.
File renamed without changes.
19 changes: 19 additions & 0 deletions modules/nixos/environment/gui/browsers/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
lib,
config,
...
}: {
imports = [
./chrome.nix
./firefox.nix
./vivaldi.nix
];

options.browsers.enable = lib.mkEnableOption "Enable browsers system-wide";

config = lib.mkIf config.browsers.enable {
chrome.enable = lib.mkDefault true;
firefox.enable = lib.mkDefault true;
vivaldi.enable = lib.mkDefault true;
};
}
31 changes: 31 additions & 0 deletions modules/nixos/environment/gui/browsers/firefox.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
config,
lib,
pkgs,
...
}: let
# version = "firefox-unwrapped";
version = "floorp";
in {
options.firefox.enable = lib.mkEnableOption "Configure firefox systemwide";

config = lib.mkIf config.firefox.enable {
# environment.systemPackages = with pkgs; [
# (wrapFirefox (firefox-unwrapped.override {
# pipewireSupport = true;
# }) {})
# ];

programs.firefox = {
enable = true;
package =
if (version == "firefox-unwrapped")
then
pkgs.wrapFirefox (pkgs.${version}.override {
pipewireSupport = true;
}) {}
else pkgs.${version};
languagePacks = ["de" "en-US"];
};
};
}
30 changes: 30 additions & 0 deletions modules/nixos/environment/gui/browsers/vivaldi.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
pkgs,
config,
lib,
...
}: {
options.vivaldi.enable = lib.mkEnableOption "Vivaldi Browser";

config = lib.mkIf config.vivaldi.enable {
environment.systemPackages = with pkgs; [
(vivaldi.override {
# https://github.com/NixOS/nixpkgs/issues/343806#issuecomment-2368835641
# mesa = pkgs.mesa;
commandLineArgs = [
"--enable-features=TouchpadOverscrollHistoryNavigation,UseOzonePlatform"
"--ozone-platform=wayland"
# "--disable-features=WaylandFractionalScaleV1"
# "--use-gl=egl" # Disable GPU/HW acceleration
#"--enable-gpu-rasterization"
#"--ignore-gpu-blacklist"
#"--disable-gpu-driver-workarounds"
];
})
vivaldi-ffmpeg-codecs
];

# Enable native Wayland support for chrome/electron
#environment.sessionVariables.NIXOS_OZONE_WL = "1";
};
}
6 changes: 2 additions & 4 deletions modules/nixos/environment/gui/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
...
}: {
imports = [
./chrome.nix
./firefox.nix
./browsers
./steam.nix
./packages.nix

Expand All @@ -18,8 +17,7 @@
gui.packages.enable = lib.mkDefault true;
wayland.enable = lib.mkDefault true;

chrome.enable = lib.mkDefault true;
firefox.enable = lib.mkDefault true;
browsers.enable = lib.mkDefault true;
steam.enable = lib.mkDefault true;
};
}
23 changes: 0 additions & 23 deletions modules/nixos/environment/gui/firefox.nix

This file was deleted.

0 comments on commit 3019271

Please sign in to comment.