mirror of
https://github.com/ItsDrike/nixdots
synced 2024-12-25 06:04:33 +00:00
Add chromium
This commit is contained in:
parent
b97be8e632
commit
fe885f3d4b
72
home/programs/graphical/browsers/chromium/default.nix
Normal file
72
home/programs/graphical/browsers/chromium/default.nix
Normal file
|
@ -0,0 +1,72 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf optionals concatStringsSep;
|
||||
|
||||
cfg = osConfig.myOptions.home-manager.programs.browsers.chromium;
|
||||
isWayland = osConfig.myOptions.home-manager.wms.isWayland;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
programs.chromium = {
|
||||
enable = true;
|
||||
|
||||
package = pkgs.ungoogled-chromium.override {
|
||||
nss = pkgs.nss_latest;
|
||||
commandLineArgs = [
|
||||
# Ungoogled features
|
||||
"--disable-search-engine-collection"
|
||||
"--extension-mime-request-handling=always-prompt-for-install"
|
||||
"--fingerprinting-canvas-image-data-noise"
|
||||
"--fingerprinting-canvas-measuretext-noise"
|
||||
"--fingerprinting-client-rects-noise"
|
||||
"--popups-to-tabs"
|
||||
"--show-avatar-button=incognito-and-guest"
|
||||
|
||||
# Experimental features
|
||||
"--enable-features=${
|
||||
concatStringsSep "," [
|
||||
"BackForwardCache:enable_same_site/true"
|
||||
"CopyLinkToText"
|
||||
"OverlayScrollbar"
|
||||
"TabHoverCardImages"
|
||||
"VaapiVideoDecoder"
|
||||
]
|
||||
}"
|
||||
|
||||
# Aesthetics
|
||||
"--force-dark-mode"
|
||||
|
||||
# Performance
|
||||
"--enable-gpu-rasterization"
|
||||
"--enable-oop-rasterization"
|
||||
"--enable-zero-copy"
|
||||
"--ignore-gpu-blocklist"
|
||||
|
||||
# Etc
|
||||
# "--gtk-version=4"
|
||||
"--disk-cache=$XDG_RUNTIME_DIR/chromium-cache"
|
||||
"--no-default-browser-check"
|
||||
"--no-service-autorun"
|
||||
"--disable-features=PreloadMediaEngagementData,MediaEngagementBypassAutoplayPolicies"
|
||||
"--disable-reading-from-canvas"
|
||||
"--no-pings"
|
||||
"--no-first-run"
|
||||
"--no-experiments"
|
||||
"--no-crash-upload"
|
||||
"--disable-wake-on-wifi"
|
||||
"--disable-breakpad"
|
||||
"--disable-sync"
|
||||
"--disable-speech-api"
|
||||
"--disable-speech-synthesis-api"
|
||||
] ++ optionals isWayland [
|
||||
"--ozone-platform=wayland"
|
||||
"--enable-features=UseOzonePlatform"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
6
home/programs/graphical/browsers/default.nix
Normal file
6
home/programs/graphical/browsers/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./chromium
|
||||
];
|
||||
}
|
||||
|
|
@ -4,5 +4,6 @@ _: {
|
|||
./launchers
|
||||
./apps
|
||||
./bars
|
||||
./browsers
|
||||
];
|
||||
}
|
||||
|
|
|
@ -95,6 +95,10 @@
|
|||
};
|
||||
|
||||
programs = {
|
||||
browsers = {
|
||||
chromium.enable = true;
|
||||
};
|
||||
|
||||
spotify.enable = true;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -19,6 +19,10 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
browsers = {
|
||||
chromium.enable = mkEnableOption "Chromium browser";
|
||||
};
|
||||
|
||||
spotify.enable = mkEnableOption "Spotify";
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue