2024-12-20 22:37:44 -05:00
{
config ,
lib ,
pkgs ,
. . .
} :
2024-12-20 16:50:27 -05:00
{
2024-12-20 22:37:44 -05:00
imports = [ ] ;
2024-12-20 16:50:27 -05:00
2025-01-23 19:14:25 -05:00
options . me = {
firefox . enable = lib . mkOption {
type = lib . types . bool ;
default = false ;
example = true ;
description = " W h e t h e r w e w a n t t o i n s t a l l f i r e f o x . " ;
} ;
} ;
2024-12-20 16:50:27 -05:00
2025-01-23 19:14:25 -05:00
config = lib . mkIf config . me . firefox . enable (
lib . mkMerge [
( lib . mkIf config . me . graphical {
programs . firefox = {
enable = true ;
package = ( pkgs . wrapFirefox ( pkgs . firefox-unwrapped . override { pipewireSupport = true ; } ) { } ) ;
languagePacks = [ " e n - U S " ] ;
preferences = {
# "identity.sync.tokenserver.uri": "https://ffsync.fizz.buzz/token/1.0/sync/1.5";
" m e d i a . h a r d w a r e - v i d e o - d e c o d i n g . f o r c e - e n a b l e d " = true ;
" m e d i a . f f m p e g . v a a p i . e n a b l e d " = true ;
" d o h - r o l l o u t . d o o r h a n g e r - d e c i s i o n " = " U I D i s a b l e d " ;
" d o m . s e c u r i t y . h t t p s _ o n l y _ m o d e " = true ;
" d o m . s e c u r i t y . h t t p s _ o n l y _ m o d e _ e v e r _ e n a b l e d " = true ;
" e x t e n s i o n s . a c t i v e T h e m e I D " = " f i r e f o x - c o m p a c t - d a r k @ m o z i l l a . o r g " ;
# Disable ads
" e x t e n s i o n s . p o c k e t . e n a b l e d " = false ;
" b r o w s e r . n e w t a b p a g e . a c t i v i t y - s t r e a m . s h o w S p o n s o r e d " = false ;
" b r o w s e r . n e w t a b p a g e . a c t i v i t y - s t r e a m . s h o w S p o n s o r e d T o p S i t e s " = false ;
" b r o w s e r . n e w t a b p a g e . a c t i v i t y - s t r e a m . f e e d s . s e c t i o n . t o p s t o r i e s " = false ;
" b r o w s e r . n e w t a b p a g e . p i n n e d " = " [ ] " ;
" b r o w s e r . n e w t a b p a g e . a c t i v i t y - s t r e a m . s e c t i o n . h i g h l i g h t s . i n c l u d e P o c k e t " = false ;
" b r o w s e r . t o p s i t e s . c o n t i l e . e n a b l e d " = false ;
# Disable cache when devtools are open.
" d e v t o o l s . c a c h e . d i s a b l e d " = true ;
# Do not track header.
" p r i v a c y . d o n o t t r a c k h e a d e r . e n a b l e d " = true ;
# Tell websites not to share or sell my data.
" p r i v a c y . g l o b a l p r i v a c y c o n t r o l . e n a b l e d " = true ;
# Disable "studies" (slice testing)
" a p p . s h i e l d . o p t o u t s t u d i e s . e n a b l e d " = false ;
# Disable attribution which is used by advertisers to track you.
" d o m . p r i v a t e - a t t r i b u t i o n . s u b m i s s i o n . e n a b l e d " = false ;
# Disable battery status, used to track users.
" d o m . b a t t e r y . e n a b l e d " = false ;
2024-12-20 17:06:02 -05:00
2025-01-23 19:14:25 -05:00
# Disable that websites can get notifications if you copy, paste, or cut something from a web page, and it lets them know which part of the page had been selected.
#
# This breaks copying from BigQuery https://github.com/microsoft/monaco-editor/issues/1540
# dom.event.clipboardevents.enabled: false
2024-12-20 17:06:02 -05:00
2025-01-23 19:14:25 -05:00
# Isolates all browser identifier sources (e.g. cookies) to the first party domain, with the goal of preventing tracking across different domains.
" p r i v a c y . f i r s t p a r t y . i s o l a t e " = true ;
# Do not preload URLs that auto-complete in the address bar.
" b r o w s e r . u r l b a r . s p e c u l a t i v e C o n n e c t . e n a b l e d " = false ;
# Do not resist fingerprinting because that tells websites to use light mode.
# https://bugzilla.mozilla.org/show_bug.cgi?id=1732114
" p r i v a c y . r e s i s t F i n g e r p r i n t i n g " = false ; # (default false)
# Instead, enable fingerprinting protection, which allows configuring an override.
" p r i v a c y . f i n g e r p r i n t i n g P r o t e c t i o n " = true ;
# Allow sending dark mode preference to websites.
# Allow sending timezone to websites.
" p r i v a c y . f i n g e r p r i n t i n g P r o t e c t i o n . o v e r r i d e s " =
" + A l l T a r g e t s , - C S S P r e f e r s C o l o r S c h e m e , - J S D a t e T i m e U T C , - C a n v a s E x t r a c t i o n B e f o r e U s e r I n p u t I s B l o c k e d " ;
# Disable weather on new tab page
" b r o w s e r . n e w t a b p a g e . a c t i v i t y - s t r e a m . s h o w W e a t h e r " = false ;
} ;
# Check about:policies#documentation and https://mozilla.github.io/policy-templates/ for options.
policies = {
DisableTelemetry = true ;
DisplayBookmarksToolbar = " n e w t a b " ;
# Check about:support for extension/add-on ID strings.
# Valid strings for installation_mode are "allowed", "blocked",
# "force_installed" and "normal_installed".
ExtensionSettings = {
# "*".installation_mode = "blocked"; # blocks all addons except the ones specified below
" u B l o c k 0 @ r a y m o n d h i l l . n e t " = {
install_url = " h t t p s : / / a d d o n s . m o z i l l a . o r g / f i r e f o x / d o w n l o a d s / l a t e s t / u b l o c k - o r i g i n / l a t e s t . x p i " ;
installation_mode = " f o r c e _ i n s t a l l e d " ;
} ;
" f i r e f o x @ t e l e p a r t y . c o m " = {
install_url = " h t t p s : / / a d d o n s . m o z i l l a . o r g / f i r e f o x / d o w n l o a d s / l a t e s t / n e t f l i x - p a r t y - i s - n o w - t e l e p a r t y / l a t e s t . x p i " ;
installation_mode = " n o r m a l _ i n s t a l l e d " ;
} ;
" @ u b l a c k l i s t " = {
install_url = " h t t p s : / / a d d o n s . m o z i l l a . o r g / f i r e f o x / d o w n l o a d s / l a t e s t / u b l a c k l i s t / l a t e s t . x p i " ;
installation_mode = " n o r m a l _ i n s t a l l e d " ;
} ;
" @ r e a c t - d e v t o o l s " = {
install_url = " h t t p s : / / a d d o n s . m o z i l l a . o r g / f i r e f o x / d o w n l o a d s / l a t e s t / r e a c t - d e v t o o l s / l a t e s t . x p i " ;
installation_mode = " n o r m a l _ i n s t a l l e d " ;
} ;
} ;
} ;
2024-12-20 17:06:02 -05:00
} ;
2025-01-23 19:14:25 -05:00
environment . persistence . " / p e r s i s t " = lib . mkIf ( ! config . me . buildingIso ) {
hideMounts = true ;
users . talexander = {
directories = [
{
directory = " . m o z i l l a " ;
user = " t a l e x a n d e r " ;
group = " t a l e x a n d e r " ;
mode = " 0 7 0 0 " ;
}
] ;
} ;
2025-01-12 22:43:23 -05:00
} ;
2025-01-23 19:14:25 -05:00
environment . persistence . " / s t a t e " = lib . mkIf ( ! config . me . buildingIso ) {
hideMounts = true ;
users . talexander = {
directories = [
{
directory = " . c a c h e / m o z i l l a " ;
user = " t a l e x a n d e r " ;
group = " t a l e x a n d e r " ;
mode = " 0 7 0 0 " ;
}
] ;
} ;
2025-01-12 22:43:23 -05:00
} ;
2025-01-23 19:14:25 -05:00
} )
]
) ;
2024-12-20 16:50:27 -05:00
}