switch from zen-browser to floorp

this change was made for a multitude of reasons:
1. Zen's constant updates would be completely fine if they didn't almost always result in some part of my workflow being broken. I want my browser to be stable, I don't want updating to break the address bar completely like the latest update as of writing (1.0.2b)
2. Floorp is supported by Home Manager, allowing me to declaratively manage my browser configuration.
This commit is contained in:
Seaswimmer 2024-12-11 15:05:31 -05:00
parent c873a86f32
commit 4b31769241
Signed by: cswimr
GPG key ID: 0EC431A8DA8F8087
5 changed files with 229 additions and 35 deletions

View file

@ -168,6 +168,27 @@
"type": "github" "type": "github"
} }
}, },
"flake-parts_3": {
"inputs": {
"nixpkgs-lib": [
"nur",
"nixpkgs"
]
},
"locked": {
"lastModified": 1733312601,
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": { "flake-utils": {
"locked": { "locked": {
"lastModified": 1652776076, "lastModified": 1652776076,
@ -318,11 +339,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1733484277, "lastModified": 1733873195,
"narHash": "sha256-i5ay20XsvpW91N4URET/nOc0VQWOAd4c4vbqYtcH8Rc=", "narHash": "sha256-dTosiZ3sZ/NKoLKQ++v8nZdEHya0eTNEsaizNp+MUPM=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "d00c6f6d0ad16d598bf7e2956f52c1d9d5de3c3a", "rev": "f26aa4b76fb7606127032d33ac73d7d507d82758",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -431,11 +452,11 @@
}, },
"nix-flatpak": { "nix-flatpak": {
"locked": { "locked": {
"lastModified": 1733345341, "lastModified": 1733863840,
"narHash": "sha256-8S58zrdpzGhax6tmn1i+R3AA0N9DJMu5FQI8JkA0NNU=", "narHash": "sha256-OO/yx700wpyKjFmsNlxep57pUIVCA1OlfEN1qUrxgCY=",
"owner": "gmodena", "owner": "gmodena",
"repo": "nix-flatpak", "repo": "nix-flatpak",
"rev": "ebb0be49fc381112ff37726c6dd6df4df2ef5a1b", "rev": "eb6f90693f91a7ce082c0c2c78627049265bc599",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -494,11 +515,11 @@
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
"lastModified": 1733623412, "lastModified": 1733882180,
"narHash": "sha256-Dc7xuCu6XaSTYbfRxQDHl0nW8mgIXWr8YRBOEmm9GMk=", "narHash": "sha256-KiI6gRWYgV4x5le9ETHWVMH5LBX2vGwamELJG/joiC0=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-vscode-extensions", "repo": "nix-vscode-extensions",
"rev": "094ded90ffc925bca8a44ef47f03f229c9fc68f2", "rev": "b5aa69a2b8c0c31e4e8a23f3dd41b474eeabf4fc",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -557,11 +578,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1733581040, "lastModified": 1733759999,
"narHash": "sha256-Qn3nPMSopRQJgmvHzVqPcE3I03zJyl8cSbgnnltfFDY=", "narHash": "sha256-463SNPWmz46iLzJKRzO3Q2b0Aurff3U1n0nYItxq7jU=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "22c3f2cf41a0e70184334a958e6b124fb0ce3e01", "rev": "a73246e2eef4c6ed172979932bc80e1404ba2d56",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -573,11 +594,11 @@
}, },
"nixpkgs_4": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1732521221, "lastModified": 1733759999,
"narHash": "sha256-2ThgXBUXAE1oFsVATK1ZX9IjPcS4nKFOAjhPNKuiMn0=", "narHash": "sha256-463SNPWmz46iLzJKRzO3Q2b0Aurff3U1n0nYItxq7jU=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "4633a7c72337ea8fd23a4f2ba3972865e3ec685d", "rev": "a73246e2eef4c6ed172979932bc80e1404ba2d56",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -602,11 +623,11 @@
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1733667809, "lastModified": 1733847310,
"narHash": "sha256-RajfsaKZIc3bk75wiaw+ZYVDSMljdLWW69VCT90f05w=", "narHash": "sha256-VHzWuZYK/m5OFXzAczrjnI7vH6knj0sfLnziRVDqgFE=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "e2f81c8e8e8baa28b100e0e43b721f16de6299d8", "rev": "b752606681ded3f69e99ed568c7075b3578dce48",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -615,6 +636,28 @@
"type": "github" "type": "github"
} }
}, },
"nur": {
"inputs": {
"flake-parts": "flake-parts_3",
"nixpkgs": [
"nixpkgs"
],
"treefmt-nix": "treefmt-nix_2"
},
"locked": {
"lastModified": 1733925096,
"narHash": "sha256-RRSyDAuzhL8fTF3pDoiBezQ/7ZQM+c61eYktPksVznE=",
"owner": "nix-community",
"repo": "NUR",
"rev": "cebaa5601eca31b9d7eb4bf65aee90da9696821c",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "NUR",
"type": "github"
}
},
"nuschtosSearch": { "nuschtosSearch": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_4", "flake-utils": "flake-utils_4",
@ -670,11 +713,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1733578387, "lastModified": 1733858086,
"narHash": "sha256-XkMZGeqg0GCRoSXvMcaHP7bdvWPRZxCK1sw1ASsc16E=", "narHash": "sha256-h2BDIDKiqgMpA6E+mu0RgMGy3FeM6k+EuJ9xgOQ1+zw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "plasma-manager", "repo": "plasma-manager",
"rev": "2a64e173f1effdcc86e25cba0601e8feedf89115", "rev": "7e2010249529931a3848054d5ff0dbf24675ab68",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -721,6 +764,7 @@
"nix-vscode-extensions": "nix-vscode-extensions", "nix-vscode-extensions": "nix-vscode-extensions",
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_3",
"nixvim": "nixvim", "nixvim": "nixvim",
"nur": "nur",
"plasma-manager": "plasma-manager", "plasma-manager": "plasma-manager",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
"zen-browser": "zen-browser" "zen-browser": "zen-browser"
@ -758,11 +802,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1733128155, "lastModified": 1733785344,
"narHash": "sha256-m6/qwJAJYcidGMEdLqjKzRIjapK4nUfMq7rDCTmZajc=", "narHash": "sha256-pm4cfEcPXripE36PYCl0A2Tu5ruwHEvTee+HzNk+SQE=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "c6134b6fff6bda95a1ac872a2a9d5f32e3c37856", "rev": "a80af8929781b5fe92ddb8ae52e9027fae780d2a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -837,16 +881,37 @@
"type": "github" "type": "github"
} }
}, },
"treefmt-nix_2": {
"inputs": {
"nixpkgs": [
"nur",
"nixpkgs"
]
},
"locked": {
"lastModified": 1733222881,
"narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "49717b5af6f80172275d47a418c9719a31a78b53",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"zen-browser": { "zen-browser": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_4" "nixpkgs": "nixpkgs_4"
}, },
"locked": { "locked": {
"lastModified": 1732933979, "lastModified": 1733840403,
"narHash": "sha256-Z7X++lKZMNBu67BJl2LP23e7RBadp2C/RuRrygLehaE=", "narHash": "sha256-j5hmZ/Oudzr4/HB383uUvY86PxB4c94+7QRV109kOpE=",
"owner": "0xc000022070", "owner": "0xc000022070",
"repo": "zen-browser-flake", "repo": "zen-browser-flake",
"rev": "5a765451af1db68acceae07b98e5c768f238210c", "rev": "ddbfcd69583724e6d142af98010411ac26c2029d",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -6,6 +6,10 @@
url = "github:nix-community/home-manager/master"; url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nur = {
url = "github:nix-community/NUR";
inputs.nixpkgs.follows = "nixpkgs";
};
plasma-manager = { plasma-manager = {
url = "github:nix-community/plasma-manager"; url = "github:nix-community/plasma-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -32,7 +36,6 @@
url = "github:aksiksi/compose2nix"; url = "github:aksiksi/compose2nix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
zen-browser.url = "github:0xc000022070/zen-browser-flake";
nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions"; nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
catppuccin-vsc.url = "https://flakehub.com/f/catppuccin/vscode/*.tar.gz"; catppuccin-vsc.url = "https://flakehub.com/f/catppuccin/vscode/*.tar.gz";
}; };
@ -48,7 +51,10 @@
system = "x86_64-linux"; system = "x86_64-linux";
pkgs = import nixpkgs { pkgs = import nixpkgs {
inherit system; inherit system;
overlays = [ inputs.catppuccin-vsc.overlays.default ]; overlays = [
inputs.catppuccin-vsc.overlays.default
inputs.nur.overlays.default
];
config.allowUnfree = true; config.allowUnfree = true;
}; };
in in
@ -91,6 +97,7 @@
inputs.sops-nix.nixosModules.sops inputs.sops-nix.nixosModules.sops
inputs.nixvim.nixosModules.nixvim inputs.nixvim.nixosModules.nixvim
inputs.nur.modules.nixos.default
inputs.nix-flatpak.nixosModules.nix-flatpak inputs.nix-flatpak.nixosModules.nix-flatpak
inputs.lanzaboote.nixosModules.lanzaboote inputs.lanzaboote.nixosModules.lanzaboote
@ -114,7 +121,10 @@
home-manager = { home-manager = {
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
sharedModules = [ inputs.plasma-manager.homeManagerModules.plasma-manager ]; sharedModules = [
inputs.nur.modules.homeManager.default
inputs.plasma-manager.homeManagerModules.plasma-manager
];
backupFileExtension = "bak"; backupFileExtension = "bak";
extraSpecialArgs = { extraSpecialArgs = {
inherit inputs; inherit inputs;
@ -125,6 +135,7 @@
}; };
users.${user} = { users.${user} = {
imports = [ imports = [
./home-manager/browser.nix
./home-manager/plasma.nix ./home-manager/plasma.nix
./home-manager/tpm.nix ./home-manager/tpm.nix
./home-manager/user.nix ./home-manager/user.nix

121
home-manager/browser.nix Normal file
View file

@ -0,0 +1,121 @@
{ pkgs, ... }:
let
extensions-repo = pkgs.nur.repos.rycee.firefox-addons;
extensions = with extensions-repo; [
augmented-steam # improve the Steam store experience
bitwarden # password manager
dearrow # crowdsourced YouTube thumbnails and titles with the goal of being less sensationalist
docsafterdark # dark mode for Google Workspace
fastforwardteam # bypass url shorteners
honey # automatically find and try coupon codes on digital stores
indie-wiki-buddy # automatically redirect from Fandom to standalone wikis or Breezewiki
modrinthify # add Modrinth links to Curseforge and Spigot projects that are also on Modrinth
plasma-integration # NOTE - replace with gnome-browser-integration if you use gnome, remove if you don't use either plasma or gnome
privacy-badger # block invisible trackers
prometheus-formatter # format Prometheus endpoints
protondb-for-steam # add ProtonDB information to Steam game store pages
#pwas-for-firefox # a tool to install, manage, and use Progressive Web Apps (PWAs) in Firefox, not necessary with Floorp
return-youtube-dislikes # re-add the dislike counter to YouTube
#sidebery # vertical tabs in Firefox, not necessary with Floorp
sponsorblock # block YouTube video sponsored segments
stylus # user stylesheet editor and manager
tampermonkey # userscript manager
ublock-origin # the best adblocker ❤️
wayback-machine # access the Wayback Machine / Internet Archive from any page, also supports automatically saving a page to the Wayback Machine
web-scrobbler # last.fm scrobbling
youtube-nonstop # removes the "Video paused. Continue watching?" confirmation prompt from YouTube
youtube-shorts-block # remove YouTube shorts from the homepage and video suggestions
];
in
{
programs.floorp = {
enable = true;
policies = {
"DisableAppUpdate" = true; # updates should be handled by NixOS
"DisplayBookmarksToolbar" = "always";
"DisableTelemetry" = true;
# For extensions that aren't in NUR
"ExtensionSettings" = {
# Catppuccin Selector
"catppuccin@federicoscodelaro.com" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/catppuccin-selector/latest.xpi";
installation_mode = "force_installed";
};
};
};
profiles = {
"cswimr (personal)" = {
id = 0;
isDefault = true;
extensions = extensions;
search = {
default = "DuckDuckGo";
force = true;
engines = {
"Nix Packages" = {
urls = [
{
template = "https://search.nixos.org/packages";
params = [
{
"name" = "query";
"value" = "{searchTerms}";
}
{
"name" = "channel";
"value" = "unstable";
}
];
}
];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [
"@np"
"pkgs"
"pkg"
];
};
"Nix Options" = {
urls = [
{
template = "https://search.nixos.org/options";
params = [
{
"name" = "query";
"value" = "{searchTerms}";
}
{
"name" = "channel";
"value" = "unstable";
}
];
}
];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [
"@no"
"opts"
"opt"
];
};
"NixOS Wiki" = {
urls = [ { template = "https://wiki.nixos.org/w/index.php?search={searchTerms}"; } ];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [
"@nw"
"nix"
];
};
};
};
settings = {
"extensions.autoDisableScopes" = 0;
"floorp.browser.sidebar.enable" = false;
"floorp.browser.sidebar.useIconProvider" = "duckduckgo";
"floorp.browser.sidebar2.hide.to.unload.panel.enabled" = true;
"floorp.extensions.allowPrivateBrowsingByDefault.is.enabled" = true;
};
};
};
};
}

View file

@ -48,7 +48,7 @@
{ {
iconTasks = { iconTasks = {
launchers = [ launchers = [
"applications:zen.desktop" "applications:floorp.desktop"
"applications:vesktop.desktop" "applications:vesktop.desktop"
"applications:steam.desktop" "applications:steam.desktop"
"applications:org.prismlauncher.PrismLauncher.desktop" "applications:org.prismlauncher.PrismLauncher.desktop"

View file

@ -1,7 +1,5 @@
{ {
pkgs, pkgs,
inputs,
system,
lib, lib,
... ...
}: }:
@ -22,10 +20,9 @@ let
libnotify libnotify
hoppscotch hoppscotch
]; ];
flakePackages = with inputs; [ zen-browser.packages.${system}.specific ];
in in
{ {
environment.systemPackages = lib.lists.unique (kdePackages ++ packages ++ flakePackages); environment.systemPackages = lib.lists.unique (kdePackages ++ packages);
# Enable the X11 windowing system. # Enable the X11 windowing system.
# You can leave this disabled if you're only using the Wayland session. # You can leave this disabled if you're only using the Wayland session.