-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Manage firefox and improve firewall rules
- Loading branch information
Showing
6 changed files
with
88 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
{ pkgs, lib, ... }: | ||
let | ||
managed-firefox = (pkgs.firefox.override { | ||
extraPolicies = { | ||
AutofillCreditCardEnabled = false; | ||
DisableFirefoxAccounts = true; | ||
DisableFirefoxScreenshots = true; | ||
DisableFirefoxStudies = true; | ||
DisablePocket = true; | ||
DisableTelemetry = true; | ||
DontCheckDefaultBrowser = true; | ||
EnableTrackingProtection = { | ||
Value = true; | ||
Locked = true; | ||
Cryptomining = true; | ||
Fingerprinting = true; | ||
EmailTracking = true; | ||
}; | ||
ExtensionSettings = { | ||
"*".installation_mode = "blocked"; # blocks all addons except the ones specified below | ||
# 1Password: | ||
"{d634138d-c276-4fc8-924b-40a0ea21d284}" = { | ||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/1password-x-password-manager/latest.xpi"; | ||
installation_mode = "force_installed"; | ||
}; | ||
# Facebook container | ||
"@contain-facebook" = { | ||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/facebook-container/latest.xpi"; | ||
installation_mode = "force_installed"; | ||
}; | ||
# Impluse Blocker | ||
"{3a7ab27c-6a20-4d24-9fda-5e38f8992556}" = { | ||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/impulse-blocker/latest.xpi"; | ||
installation_mode = "force_installed"; | ||
}; | ||
# ublock origin | ||
"[email protected]" = { | ||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; | ||
installation_mode = "force_installed"; | ||
}; | ||
}; | ||
|
||
FirefoxSuggest = { | ||
WebSuggestions = false; | ||
SponsoredSuggestions = false; | ||
ImproveSuggest = false; | ||
Locked = true; | ||
}; | ||
PasswordManagerEnabled = false; | ||
PictureInPicture = { | ||
Enabled = true; | ||
Locked = true; | ||
}; | ||
}; | ||
}); | ||
in | ||
{ | ||
environment.systemPackages = [ | ||
managed-firefox | ||
]; | ||
|
||
|
||
services.opensnitch.rules = { | ||
rule-000-firefox = { | ||
name = "Allow Firefox"; | ||
enabled = true; | ||
action = "allow"; | ||
duration = "always"; | ||
operator = { | ||
type = "simple"; | ||
sensitive = false; | ||
operand = "process.path"; | ||
data = "${lib.getBin managed-firefox}/lib/firefox/firefox"; | ||
}; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters