Codified firefox config as a GPO with userChrome while nixos firefox 23.11 gets patched.

This commit is contained in:
2024-01-10 17:42:06 -04:00
parent fe2d5ef08b
commit 5c31be499a
3 changed files with 91 additions and 0 deletions

16
flake.lock generated
View File

@@ -448,6 +448,21 @@
"type": "github"
}
},
"nur": {
"locked": {
"lastModified": 1704913619,
"narHash": "sha256-RpdG4vYs+WLCYzDZXDC4sYp5eD/De3CBeO5/CheyZxM=",
"owner": "nix-community",
"repo": "NUR",
"rev": "7446d0fcbcadfcfcbc9197c5b836cf442896590c",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "NUR",
"type": "github"
}
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat",
@@ -484,6 +499,7 @@
"nix-vscode-extensions": "nix-vscode-extensions",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_3",
"nur": "nur",
"stylix": "stylix"
}
},

View File

@@ -5,6 +5,9 @@
# Nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
# NUR
nur.url = "github:nix-community/NUR";
# NixOS-Hardware
nixos-hardware.url = "github:NixOS/nixos-hardware";
@@ -31,6 +34,7 @@
};
outputs = inputs @ {
nixpkgs,
nur,
stylix,
home-manager,
...
@@ -52,6 +56,9 @@
#kde2nix Module
inputs.kde2nix.nixosModules.default
# NUR Modules
nur.nixosModules.nur
# Theme Modules
stylix.nixosModules.stylix
./themes/targets/all-desktop.nix
@@ -71,6 +78,7 @@
};
home-manager.users.panotaka = {
imports = [
nur.hmModules.nur
./home
./home/shell
./home/desktop
@@ -90,6 +98,9 @@
# Modules
modules = [
# NUR Modules
nur.nixosModules.nur
# Theme Modules
stylix.nixosModules.stylix
./themes/targets/all.nix
@@ -110,6 +121,7 @@
home-manager.users.panotaka = {
imports = [
nur.hmModules.nur
./home
./home/shell
./home/desktop

View File

@@ -7,12 +7,75 @@
};
firefox = {
policies = {
ExtensionSettings = {
# Allow extensions to be installed from anywhere
"*" = {
"installation_mode" = "allowed";
};
# uBlock Origin
"uBlock0@raymondhill.net" = {
"installation_mode" = "force_installed";
"install_url" = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
};
# LocalCDN
"{b86e4813-687a-43e6-ab65-0bde4ab75758}" = {
"installation_mode" = "force_installed";
"install_url" = "https://addons.mozilla.org/firefox/downloads/latest/localcdn-fork-of-decentraleyes/latest.xpi";
};
# Sidebery
"{3c078156-979c-498b-8990-85f7987dd929}" = {
"installation_mode" = "force_installed";
"install_url" = "https://addons.mozilla.org/firefox/downloads/latest/sidebery/latest.xpi";
};
# User-Agent Switcher and Manager
"{a6c4a591-f1b2-4f03-b3ff-767e5bedf4e7}" = {
"installation_mode" = "force_installed";
"install_url" = "https://addons.mozilla.org/firefox/downloads/latest/user-agent-switcher-and-manager/latest.xpi";
};
};
};
enable = true;
profiles.panotaka = {
settings = {
"widget.use-xdg-desktop-portal.file-picker" = 1;
};
userChrome = ''
#TabsToolbar
{
visibility: collapse;
}
'';
};
/*
# Wait for https://github.com/NixOS/nixpkgs/pull/269817 to be merged
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
nixExtensions = with config.nur.repos.rycee.firefox-addons; [
ublock-origin
localcdn
];
extraPolicies = {
CaptivePortal = false;
DisableFirefoxStudies = true;
DisablePocket = true;
DisableTelemetry = true;
DisableFirefoxAccounts = true;
FirefoxHome = {
Pocket = false;
Snippets = false;
};
UserMessaging = {
ExtensionRecommendations = false;
SkipOnboarding = true;
};
};
};
*/
};
};
}