WIP: Switch to ungoogled-chromium #9

Draft
wymiller wants to merge 8 commits from chromium-switch into master
5 changed files with 53 additions and 29 deletions

View File

@ -1,22 +0,0 @@
name: update-flake-lock
on:
workflow_dispatch: # allows manual triggering
schedule:
- cron: "0 0 * * 0" # runs weekly on Sunday at 00:00
jobs:
update_lockfile:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- name: Update flake.lock
uses: DeterminateSystems/update-flake-lock@main
with:
pr-title: "Update flake.lock" # Title of PR to be created
pr-labels: | # Labels to be set on the PR
dependencies
automated
token: ${{ secrets.GH_TOKEN }}

8
flake.lock generated
View File

@ -2,9 +2,7 @@
"nodes": { "nodes": {
"darwin": { "darwin": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": ["nixpkgs"]
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1743127615, "lastModified": 1743127615,
@ -23,9 +21,7 @@
}, },
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": ["nixpkgs"]
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1744743431, "lastModified": 1744743431,

View File

@ -1,5 +1,52 @@
{pkgs, ...}: { {
pkgs,
lib,
...
}: {
programs.firefox = { programs.firefox = {
# please see Mozilla's TOU and privacy policy please i implore you
enable = false;
};
programs.chromium = {
enable = pkgs.stdenv.isLinux; enable = pkgs.stdenv.isLinux;
package = pkgs.ungoogled-chromium.override {
enableWideVine = true;
commandLineArgs = [
"--enable-features=AcceleratedVideoEncoder,Vulkan,VulkanFromANGLE,DefaultANGLEVulkan"
"--ignore-gpu-blocklist"
"--force-dark-mode"
"--enable-zero-copy"
];
};
extensions = let
createChromiumExtensionFor = browserVersion: {
id,
sha256,
version,
}: {
inherit id;
crxPath = builtins.fetchurl {
url = "https://clients2.google.com/service/update2/crx?response=redirect&acceptformat=crx2,crx3&prodversion=${browserVersion}&x=id%3D${id}%26installsource%3Dondemand%26uc";
name = "${id}.crx";
inherit sha256;
};
inherit version;
};
createChromiumExtension = createChromiumExtensionFor (lib.versions.major pkgs.ungoogled-chromium.version);
in [
(createChromiumExtension {
# ublock origin
id = "cjpalhdlnbpafiamejdnhcphjbkeiagm";
sha256 = "sha256:0ycnkna72n969crgxfy2lc1qbndjqrj46b9gr5l9b7pgfxi5q0ll";
version = "1.63.2";
})
(createChromiumExtension {
# bitwarden
id = "nngceckbapebfimnlniiiahkandclblb";
sha256 = "sha256:0jxk3cqmgd5qj8hnw7s0k5s4bfrcmr0w0rckp3x0bmng07azw4gi";
version = "2025.3.1";
})
];
}; };
} }

View File

@ -23,6 +23,7 @@ in {
./direnv.nix ./direnv.nix
./sway.nix ./sway.nix
./terminal.nix ./terminal.nix
./browser.nix
]; ];
# Home Manager needs a bit of information about you and the # Home Manager needs a bit of information about you and the
@ -41,6 +42,7 @@ in {
XDG_CACHE_HOME = "$HOME/.cache"; XDG_CACHE_HOME = "$HOME/.cache";
XDG_DATA_HOME = "$HOME/.local/share"; XDG_DATA_HOME = "$HOME/.local/share";
XDG_STATE_HOME = "$HOME/.local/state"; XDG_STATE_HOME = "$HOME/.local/state";
NIXOS_OZONE_WL = "1";
}; };
pointerCursor = lib.mkIf pkgs.stdenv.isLinux { pointerCursor = lib.mkIf pkgs.stdenv.isLinux {

View File

@ -11,5 +11,6 @@
mcrcon mcrcon
xfce.thunar xfce.thunar
pavucontrol pavucontrol
# ungoogled-chromium
]); ]);
} }