Home
Random
Log in
Settings
About the NixOS Wiki
Official NixOS Wiki
Search
Export translations
Translate
Settings
Group
Accelerated Video Playback
Appimage
Applications
Creating a NixOS live CD
Disko
Doas
Docker
FAQ
Firefox
Flakes
Hardware/System76/galp5
Honk
Hugo
Hydra
Install NixOS on Amazon EC2
Kitty
Konqueror
MediaWiki:Sidebar
Mihomo
Neovim
Nitrokey
Nix (language)
Nix (package manager)
Nix ecosystem
NixOS
NixOS as a desktop
NixOS Installation Guide
NixOS on ARM
NixOS on ARM/UEFI
NixOS Wiki
NixOS Wiki/documentation topics
NixOS Wiki/get in touch
NixOS Wiki/getting started
NixOS Wiki/news
NixOS Wiki/setting up
NixOS Wiki/special pages
NixOS Wiki/welcome
Nixpkgs
Official NixOS Wiki:News
Packaging/Icons
Plymouth
Secure Boot
Smartmontools
Starship
Steam
Sudo
Systemd/Hardening
Systemd/logind
Systemd/timers
Systemd/User Services
Terms and Definitions in Nix Project
Vim
VR
Zed
Language
aa - Qafár af
aae - Arbërisht
ab - аԥсшәа
abr - Abron
abs - bahasa ambon
ace - Acèh
acf - Kwéyòl Sent Lisi
acm - عراقي
ady - адыгабзэ
ady-cyrl - адыгабзэ
aeb - تونسي / Tûnsî
aeb-arab - تونسي
aeb-latn - Tûnsî
af - Afrikaans
aig - Aanteegan an' Baabyuudan
aln - Gegë
alt - алтай тил
am - አማርኛ
ami - Pangcah
an - aragonés
ang - Ænglisc
ann - Obolo
anp - अंगिका
apc - شامي
ar - العربية
arc - ܐܪܡܝܐ
arn - mapudungun
arq - جازايرية
ary - الدارجة
arz - مصرى
as - অসমীয়া
ase - American sign language
ast - asturianu
atj - Atikamekw
av - авар
avk - Kotava
awa - अवधी
ay - Aymar aru
az - azərbaycanca
azb - تۆرکجه
ba - башҡортса
ban - Basa Bali
ban-bali - ᬩᬲᬩᬮᬶ
bar - Boarisch
bbc - Batak Toba
bbc-latn - Batak Toba
bcc - جهلسری بلوچی
bci - wawle
bcl - Bikol Central
bdr - Bajau Sama
be - беларуская
be-tarask - беларуская (тарашкевіца)
bew - Betawi
bg - български
bgc - हरियाणवी
bgn - روچ کپتین بلوچی
bh - भोजपुरी
bho - भोजपुरी
bi - Bislama
bjn - Banjar
blk - ပအိုဝ်ႏဘာႏသာႏ
bm - bamanankan
bn - বাংলা
bo - བོད་ཡིག
bpy - বিষ্ণুপ্রিয়া মণিপুরী
bqi - بختیاری
br - brezhoneg
brh - Bráhuí
bs - bosanski
btm - Batak Mandailing
bto - Iriga Bicolano
bug - Basa Ugi
bug-bugi - ᨅᨔ ᨕᨘᨁᨗ
bxr - буряад
ca - català
cbk-zam - Chavacano de Zamboanga
ccp - 𑄌𑄋𑄴𑄟𑄳𑄦
cdo - 閩東語 / Mìng-dĕ̤ng-ngṳ̄
cdo-hant - 閩東語(傳統漢字)
cdo-latn - Mìng-dĕ̤ng-ngṳ̄ (Bàng-uâ-cê)
ce - нохчийн
ceb - Cebuano
ch - Chamoru
chn - chinuk wawa
cho - Chahta anumpa
chr - ᏣᎳᎩ
chy - Tsetsêhestâhese
ckb - کوردی
co - corsu
cop - ϯⲙⲉⲧⲣⲉⲙⲛ̀ⲭⲏⲙⲓ
cps - Capiceño
cpx - 莆仙語 / Pó-sing-gṳ̂
cpx-hans - 莆仙语(简体)
cpx-hant - 莆仙語(繁體)
cpx-latn - Pó-sing-gṳ̂ (Báⁿ-uā-ci̍)
cr - Nēhiyawēwin / ᓀᐦᐃᔭᐍᐏᐣ
crh - qırımtatarca
crh-cyrl - къырымтатарджа (Кирилл)
crh-latn - qırımtatarca (Latin)
crh-ro - tatarşa
cs - čeština
csb - kaszëbsczi
cu - словѣньскъ / ⰔⰎⰑⰂⰡⰐⰠⰔⰍⰟ
cv - чӑвашла
cy - Cymraeg
da - dansk
dag - dagbanli
de - Deutsch
de-at - Österreichisches Deutsch
de-ch - Schweizer Hochdeutsch
de-formal - Deutsch (Sie-Form)
dga - Dagaare
din - Thuɔŋjäŋ
diq - Zazaki
dlg - долган тыла
dsb - dolnoserbski
dtp - Kadazandusun
dty - डोटेली
dua - Duálá
dv - ދިވެހިބަސް
dz - ཇོང་ཁ
ee - eʋegbe
efi - Efịk
egl - Emiliàn
el - Ελληνικά
eml - emiliàn e rumagnòl
en - English
en-ca - Canadian English
en-gb - British English
eo - Esperanto
es - español
es-419 - español de América Latina
es-formal - español (formal)
et - eesti
eu - euskara
ext - estremeñu
fa - فارسی
fat - mfantse
ff - Fulfulde
fi - suomi
fit - meänkieli
fj - Na Vosa Vakaviti
fo - føroyskt
fon - fɔ̀ngbè
fr - français
frc - français cadien
frp - arpetan
frr - Nordfriisk
fur - furlan
fvr - poor’íŋ belé’ŋ
fy - Frysk
ga - Gaeilge
gaa - Ga
gag - Gagauz
gan - 贛語
gan-hans - 赣语(简体)
gan-hant - 贛語(繁體)
gcf - kréyòl Gwadloup
gcr - kriyòl gwiyannen
gd - Gàidhlig
gl - galego
gld - на̄ни
glk - گیلکی
gn - Avañe'ẽ
gom - गोंयची कोंकणी / Gõychi Konknni
gom-deva - गोंयची कोंकणी
gom-latn - Gõychi Konknni
gor - Bahasa Hulontalo
got - 𐌲𐌿𐍄𐌹𐍃𐌺
gpe - Ghanaian Pidgin
grc - Ἀρχαία ἑλληνικὴ
gsw - Alemannisch
gu - ગુજરાતી
guc - wayuunaiki
gur - farefare
guw - gungbe
gv - Gaelg
ha - Hausa
hak - 客家語 / Hak-kâ-ngî
hak-hans - 客家语(简体)
hak-hant - 客家語(繁體)
hak-latn - Hak-kâ-ngî (Pha̍k-fa-sṳ)
haw - Hawaiʻi
he - עברית
hi - हिन्दी
hif - Fiji Hindi
hif-latn - Fiji Hindi
hil - Ilonggo
hke - kihunde
hno - ہندکو
ho - Hiri Motu
hoc-latn - Ho
hr - hrvatski
hrx - Hunsrik
hsb - hornjoserbsce
hsn - 湘語
ht - Kreyòl ayisyen
hu - magyar
hu-formal - magyar (formal)
hy - հայերեն
hyw - Արեւմտահայերէն
hz - Otsiherero
ia - interlingua
iba - Jaku Iban
ibb - ibibio
id - Bahasa Indonesia
ie - Interlingue
ig - Igbo
igl - Igala
ii - ꆇꉙ
ik - Iñupiatun
ike-cans - ᐃᓄᒃᑎᑐᑦ
ike-latn - inuktitut
ilo - Ilokano
inh - гӀалгӀай
io - Ido
is - íslenska
isv-cyrl - меджусловјанскы
isv-latn - medžuslovjansky
it - italiano
iu - ᐃᓄᒃᑎᑐᑦ / inuktitut
ja - 日本語
jam - Patois
jbo - la .lojban.
jut - jysk
jv - Jawa
ka - ქართული
kaa - Qaraqalpaqsha
kab - Taqbaylit
kai - Karai-karai
kaj - Jju
kbd - адыгэбзэ
kbd-cyrl - адыгэбзэ
kbp - Kabɩyɛ
kcg - Tyap
kea - kabuverdianu
kg - Kongo
kge - Kumoring
khw - کھوار
ki - Gĩkũyũ
kiu - Kırmancki
kj - Kwanyama
kjh - хакас
kjp - ဖၠုံလိက်
kk - қазақша
kk-arab - قازاقشا (تٴوتە)
kk-cn - قازاقشا (جۇنگو)
kk-cyrl - қазақша (кирил)
kk-kz - қазақша (Қазақстан)
kk-latn - qazaqşa (latın)
kk-tr - qazaqşa (Türkïya)
kl - kalaallisut
km - ភាសាខ្មែរ
kn - ಕನ್ನಡ
knc - Yerwa Kanuri
ko - 한국어
ko-kp - 조선말
koi - перем коми
kr - kanuri
krc - къарачай-малкъар
kri - Krio
krj - Kinaray-a
krl - karjal
ks - کٲشُر
ks-arab - کٲشُر
ks-deva - कॉशुर
ksh - Ripoarisch
ksw - စှီၤ
ku - kurdî
ku-arab - کوردی (عەرەبی)
ku-latn - kurdî (latînî)
kum - къумукъ
kus - Kʋsaal
kv - коми
kw - kernowek
ky - кыргызча
la - Latina
lad - Ladino
lb - Lëtzebuergesch
lbe - лакку
lez - лезги
lfn - Lingua Franca Nova
lg - Luganda
li - Limburgs
lij - Ligure
liv - Līvõ kēļ
ljp - Lampung Api
lki - لەکی
lld - Ladin
lmo - lombard
ln - lingála
lo - ລາວ
loz - Silozi
lrc - لۊری شومالی
lt - lietuvių
ltg - latgaļu
lua - ciluba
lus - Mizo ţawng
luz - لئری دوٙمینی
lv - latviešu
lzh - 文言
lzz - Lazuri
mad - Madhurâ
mag - मगही
mai - मैथिली
map-bms - Basa Banyumasan
mdf - мокшень
mg - Malagasy
mh - Ebon
mhr - олык марий
mi - Māori
min - Minangkabau
mk - македонски
ml - മലയാളം
mn - монгол
mnc - manju gisun
mnc-latn - manju gisun
mnc-mong - ᠮᠠᠨᠵᡠ ᡤᡳᠰᡠᠨ
mni - ꯃꯤꯇꯩ ꯂꯣꯟ
mnw - ဘာသာမန်
mo - молдовеняскэ
mos - moore
mr - मराठी
mrh - Mara
mrj - кырык мары
ms - Bahasa Melayu
ms-arab - بهاس ملايو
mt - Malti
mui - Baso Palembang
mus - Mvskoke
mwl - Mirandés
my - မြန်မာဘာသာ
myv - эрзянь
mzn - مازِرونی
na - Dorerin Naoero
nah - Nāhuatl
nan - 閩南語 / Bân-lâm-gí
nan-hant - 閩南語(傳統漢字)
nan-latn-pehoeji - Bân-lâm-gí (Pe̍h-ōe-jī)
nan-latn-tailo - Bân-lâm-gí (Tâi-lô)
nap - Napulitano
nb - norsk bokmål
nds - Plattdüütsch
nds-nl - Nedersaksies
ne - नेपाली
new - नेपाल भाषा
ng - Oshiwambo
nia - Li Niha
nit - కొలామి
niu - Niuē
nl - Nederlands
nl-informal - Nederlands (informeel)
nmz - nawdm
nn - norsk nynorsk
no - norsk
nod - ᨣᩤᩴᨾᩮᩬᩥᨦ
nog - ногайша
nov - Novial
nqo - ߒߞߏ
nr - isiNdebele seSewula
nrm - Nouormand
nso - Sesotho sa Leboa
nup - Nupe
nv - Diné bizaad
ny - Chi-Chewa
nyn - runyankore
nyo - Orunyoro
nys - Nyunga
oc - occitan
ojb - Ojibwemowin
olo - livvinkarjala
om - Oromoo
or - ଓଡ଼ିଆ
os - ирон
pa - ਪੰਜਾਬੀ
pag - Pangasinan
pam - Kapampangan
pap - Papiamentu
pap-aw - Papiamento (Aruba)
pcd - Picard
pcm - Naijá
pdc - Deitsch
pdt - Plautdietsch
pfl - Pälzisch
pi - पालि
pih - Norfuk / Pitkern
pl - polski
pms - Piemontèis
pnb - پنجابی
pnt - Ποντιακά
prg - prūsiskan
ps - پښتو
pt - português
pt-br - português do Brasil
pwn - pinayuanan
qu - Runa Simi
qug - Runa shimi
rgn - Rumagnôl
rif - Tarifit
rki - ရခိုင်
rm - rumantsch
rmc - romaňi čhib
rmy - romani čhib
rn - ikirundi
ro - română
roa-tara - tarandíne
rsk - руски
ru - русский
rue - русиньскый
rup - armãneashti
ruq - Vlăheşte
ruq-cyrl - Влахесте
ruq-latn - Vlăheşte
rut - мыхаӀбишды
rw - Ikinyarwanda
ryu - うちなーぐち
sa - संस्कृतम्
sah - саха тыла
sas - Sasak
sat - ᱥᱟᱱᱛᱟᱲᱤ
sc - sardu
scn - sicilianu
sco - Scots
sd - سنڌي
sdc - Sassaresu
sdh - کوردی خوارگ
se - davvisámegiella
se-fi - davvisámegiella (Suoma bealde)
se-no - davvisámegiella (Norgga bealde)
se-se - davvisámegiella (Ruoŧa bealde)
sei - Cmique Itom
ses - Koyraboro Senni
sg - Sängö
sgs - žemaitėška
sh - srpskohrvatski / српскохрватски
sh-cyrl - српскохрватски (ћирилица)
sh-latn - srpskohrvatski (latinica)
shi - Taclḥit
shi-latn - Taclḥit
shi-tfng - ⵜⴰⵛⵍⵃⵉⵜ
shn - တႆး
shy - tacawit
shy-latn - tacawit
si - සිංහල
simple - Simple English
sjd - кӣллт са̄мь кӣлл
sje - bidumsámegiella
sk - slovenčina
skr - سرائیکی
skr-arab - سرائیکی
sl - slovenščina
sli - Schläsch
sm - Gagana Samoa
sma - åarjelsaemien
smn - anarâškielâ
sms - nuõrttsääʹmǩiõll
sn - chiShona
so - Soomaaliga
sq - shqip
sr - српски / srpski
sr-ec - српски (ћирилица)
sr-el - srpski (latinica)
srn - Sranantongo
sro - sardu campidanesu
ss - SiSwati
st - Sesotho
stq - Seeltersk
sty - себертатар
su - Sunda
sv - svenska
sw - Kiswahili
syl - ꠍꠤꠟꠐꠤ
szl - ślůnski
szy - Sakizaya
ta - தமிழ்
tay - Tayal
tcy - ತುಳು
tdd - ᥖᥭᥰ ᥖᥬᥲ ᥑᥨᥒᥰ
te - తెలుగు
tet - tetun
tg - тоҷикӣ
tg-cyrl - тоҷикӣ
tg-latn - tojikī
th - ไทย
ti - ትግርኛ
tig - ትግሬ
tk - Türkmençe
tl - Tagalog
tly - tolışi
tly-cyrl - толыши
tn - Setswana
to - lea faka-Tonga
tok - toki pona
tpi - Tok Pisin
tr - Türkçe
tru - Ṫuroyo
trv - Seediq
ts - Xitsonga
tt - татарча / tatarça
tt-cyrl - татарча
tt-latn - tatarça
ttj - Orutooro
tum - chiTumbuka
tw - Twi
ty - reo tahiti
tyv - тыва дыл
tzm - ⵜⴰⵎⴰⵣⵉⵖⵜ
udm - удмурт
ug - ئۇيغۇرچە / Uyghurche
ug-arab - ئۇيغۇرچە
ug-latn - Uyghurche
uk - українська
ur - اردو
uz - oʻzbekcha / ўзбекча
uz-cyrl - ўзбекча
uz-latn - oʻzbekcha
ve - Tshivenda
vec - vèneto
vep - vepsän kel’
vi - Tiếng Việt
vls - West-Vlams
vmf - Mainfränkisch
vmw - emakhuwa
vo - Volapük
vot - Vaďďa
vro - võro
wa - walon
wal - wolaytta
war - Winaray
wls - Fakaʻuvea
wlx - waale
wo - Wolof
wuu - 吴语
wuu-hans - 吴语(简体)
wuu-hant - 吳語(正體)
xal - хальмг
xh - isiXhosa
xmf - მარგალური
xsy - saisiyat
yi - ייִדיש
yo - Yorùbá
yrl - Nhẽẽgatú
yua - maaya t’aan
yue - 粵語
yue-hans - 粵语(简体)
yue-hant - 粵語(繁體)
za - Vahcuengh
zea - Zeêuws
zgh - ⵜⴰⵎⴰⵣⵉⵖⵜ ⵜⴰⵏⴰⵡⴰⵢⵜ
zgh-latn - tamaziɣt tanawayt
zh - 中文
zh-cn - 中文(中国大陆)
zh-hans - 中文(简体)
zh-hant - 中文(繁體)
zh-hk - 中文(香港)
zh-mo - 中文(澳門)
zh-my - 中文(马来西亚)
zh-sg - 中文(新加坡)
zh-tw - 中文(臺灣)
zu - isiZulu
Format
Export for off-line translation
Export in native format
Export in CSV format
Fetch
<languages/> {{infobox application |name=Mozilla Firefox |image=Firefox logo, 2019.svg |type=Web Browser |developer=Mozilla Foundation & Community |firstRelease=November 9, 2004 |latestRelease=Firefox 140.0 (June 24, 2025) |status=Active |license=[https://www.mozilla.org/MPL/2.0/ Mozilla Public License 2.0] |os=Cross-platform (Linux, macOS, Windows, *BSD) |website=[https://www.mozilla.org/firefox mozilla.org/firefox] |github=mozilla/firefox |bugTracker=[https://bugzilla.mozilla.org/ Bugzilla] |documentation=[https://support.mozilla.org/ Official Support] }} <div lang="en" dir="ltr" class="mw-content-ltr"> <strong>Firefox</strong><ref>Mozilla Foundation, "Firefox", Official Website, Accessed June 2025. https://www.mozilla.org/firefox</ref> is a free and open-source web browser developed by the Mozilla Foundation. It is known for its focus on privacy, security, and user freedom, offering a customizable experience through a rich ecosystem of add-ons and themes. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> == Installation == </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ==== Shell ==== </div> {{code|lang=bash|line=no|1=$ nix-shell -p firefox}} <div lang="en" dir="ltr" class="mw-content-ltr"> The command above makes <code>firefox</code> available in your current shell without modifying any configuration files. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ==== System setup ==== </div> {{code|lang=nix|line=no|1=# Example for /etc/nixos/configuration.nix environment.systemPackages = [ pkgs.firefox ]; # User-specific installation (in ~/.config/nixpkgs/home.nix) home.packages = [ pkgs.firefox ];}} <div lang="en" dir="ltr" class="mw-content-ltr"> After rebuilding with <code>nixos-rebuild switch</code>, Firefox will be installed system-wide. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> == Configuration == </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ==== Basic ==== </div> {{code|lang=nix|line=no|1= programs.firefox = { enable = true; languagePacks = [ "en-US" "de" "fr" ]; preferences = { "browser.startup.homepage" = "https://example.com"; "privacy.resistFingerprinting" = true; }; policies = { DisableTelemetry = true; }; }; }} <div lang="en" dir="ltr" class="mw-content-ltr"> The snippet above enables Firefox for all users (or the current Home Manager profile, if placed in <code>home.nix</code>). </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ==== Advanced ==== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Home Manager allows for deep customization of Firefox, including extensions, search engines, bookmarks, and themes. The example below shows a configuration for adding custom search engines with aliases. </div> {{code|lang=nix|line=no|1= programs.firefox = { enable = true; languagePacks = [ "en-US" ]; policies = { # Updates & Background Services AppAutoUpdate = false; BackgroundAppUpdate = false; # Feature Disabling DisableBuiltinPDFViewer = true; DisableFirefoxStudies = true; DisableFirefoxAccounts = true; DisableFirefoxScreenshots = true; DisableForgetButton = true; DisableMasterPasswordCreation = true; DisableProfileImport = true; DisableProfileRefresh = true; DisableSetDesktopBackground = true; DisablePocket = true; DisableTelemetry = true; DisableFormHistory = true; DisablePasswordReveal = true; # Access Restrictions BlockAboutConfig = false; BlockAboutProfiles = true; BlockAboutSupport = true; # UI and Behavior DisplayMenuBar = "never"; DontCheckDefaultBrowser = true; HardwareAcceleration = false; OfferToSaveLogins = false; DefaultDownloadDirectory = "${home}/Downloads"; # Extensions ExtensionSettings = let moz = short: "https://addons.mozilla.org/firefox/downloads/latest/${short}/latest.xpi"; in { "*".installation_mode = "blocked"; "uBlock0@raymondhill.net" = { install_url = moz "ublock-origin"; installation_mode = "force_installed"; updates_disabled = true; }; "{f3b4b962-34b4-4935-9eee-45b0bce58279}" = { install_url = moz "animated-purple-moon-lake"; installation_mode = "force_installed"; updates_disabled = true; }; "{73a6fe31-595d-460b-a920-fcc0f8843232}" = { install_url = moz "noscript"; installation_mode = "force_installed"; updates_disabled = true; }; }; # Extension configuration "3rdparty".Extensions = { "uBlock0@raymondhill.net".adminSettings = { userSettings = rec { uiTheme = "dark"; uiAccentCustom = true; uiAccentCustom0 = "#8300ff"; cloudStorageEnabled = mkForce false; importedLists = [ "https:#filters.adtidy.org/extension/ublock/filters/3.txt" "https:#github.com/DandelionSprout/adfilt/raw/master/LegitimateURLShortener.txt" ]; externalLists = lib.concatStringsSep "\n" importedLists; }; selectedFilterLists = [ "CZE-0" "adguard-generic" "adguard-annoyance" "adguard-social" "adguard-spyware-url" "easylist" "easyprivacy" "https:#github.com/DandelionSprout/adfilt/raw/master/LegitimateURLShortener.txt" "plowe-0" "ublock-abuse" "ublock-badware" "ublock-filters" "ublock-privacy" "ublock-quick-fixes" "ublock-unbreak" "urlhaus-1" ]; }; }; }; profiles.default.search = { force = true; default = "DuckDuckGo"; privateDefault = "DuckDuckGo"; engines = { "Nix Packages" = { urls = [ { template = "https://search.nixos.org/packages"; params = [ { name = "channel"; value = "unstable"; } { name = "query"; value = "{searchTerms}"; } ]; } ]; icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; definedAliases = [ "@np" ]; }; "Nix Options" = { urls = [ { template = "https://search.nixos.org/options"; params = [ { name = "channel"; value = "unstable"; } { name = "query"; value = "{searchTerms}"; } ]; } ]; icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; definedAliases = [ "@no" ]; }; "NixOS Wiki" = { urls = [ { template = "https://wiki.nixos.org/w/index.php"; params = [ { name = "search"; value = "{searchTerms}"; } ]; } ]; icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; definedAliases = [ "@nw" ]; }; }; }; }; }} <div lang="en" dir="ltr" class="mw-content-ltr"> [https://nix-community.github.io/home-manager/options.xhtml#opt-programs.firefox.enable More options are available on Home Manager's site.] </div> <div lang="en" dir="ltr" class="mw-content-ltr"> == Firefox Variants == </div> <div lang="en" dir="ltr" class="mw-content-ltr"> There are several Firefox variants available. To choose one, set the <code>programs.firefox.package</code> option accordingly. </div> {{Note|<span lang="en" dir="ltr" class="mw-content-ltr">The packages for the variants listed below are installed ''instead'' of the normal <code>firefox</code> package.</span>}} <div lang="en" dir="ltr" class="mw-content-ltr"> === Variant: Official Binaries === </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Mozilla provides official pre-built Firefox binaries via the <code>firefox-bin</code> package, which are downloaded directly from Mozilla's servers. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> === Variant: Extended Support Release (ESR) === </div> <div lang="en" dir="ltr" class="mw-content-ltr"> <code>firefox-esr</code> is a variant that receives security updates for a longer period with a slower feature implementation cadence. It also allows for more extensive policy-based configuration. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> === Variant: Nightly === </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Nightly builds are daily builds from the central Mozilla repository. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ==== Method 1: Using nix-community/flake-firefox-nightly ==== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> This method is reproducible but may lag behind the upstream version. First, add the input to your flake: </div> {{code|lang=nix|line=no|1= inputs = { firefox.url = "github:nix-community/flake-firefox-nightly"; firefox.inputs.nixpkgs.follows = "nixpkgs"; }; }} <div lang="en" dir="ltr" class="mw-content-ltr"> Then, add the package to your system: </div> {{code|lang=nix|line=no|1= # In configuration.nix, assuming use of specialArgs environment.systemPackages = [ inputs.firefox.packages.${pkgs.stdenv.hostPlatform.system}.firefox-nightly-bin ]; }} <div lang="en" dir="ltr" class="mw-content-ltr"> ==== Method 2: Using mozilla/nixpkgs-mozilla ==== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> This method is not necessarily reproducible without a flake-like system but will always be the latest version. </div> {{code|lang=nix|line=no|1= nixpkgs.overlays = [ (import (builtins.fetchTarball "https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz")) ]; programs.firefox.package = pkgs.latest.firefox-nightly-bin; }} <div lang="en" dir="ltr" class="mw-content-ltr"> Using this method requires the <code>--impure</code> flag for Nix commands, for example: </div> {{code|lang=bash|line=no|1=$ nixos-rebuild switch --impure}} <div lang="en" dir="ltr" class="mw-content-ltr"> == Tips and Tricks == </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ==== Force XWayland (X11) instead of Wayland ==== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Firefox defaults to native Wayland when running under a Wayland compositor. To force it to use XWayland (X11) instead: </div> {{code|lang=nix|line=no|1=environment.sessionVariables.MOZ_ENABLE_WAYLAND = "0";}} <div lang="en" dir="ltr" class="mw-content-ltr"> This is useful when troubleshooting Wayland-specific issues or when certain features work better under X11. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ==== Touchpad Gestures and Smooth Scrolling ==== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Enable <code>xinput2</code> to improve touchscreen support and enable additional touchpad gestures and smooth scrolling. </div> {{code|lang=nix|line=no|1= environment.sessionVariables.MOZ_USE_XINPUT2 = "1"; }} <div lang="en" dir="ltr" class="mw-content-ltr"> ==== KDE Plasma Integration ==== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> 1. Add the native messaging host package to your configuration: </div> {{code|lang=nix|line=no|1=programs.firefox.nativeMessagingHosts.packages = [ pkgs.kdePackages.plasma-browser-integration ];}} <div lang="en" dir="ltr" class="mw-content-ltr"> 2. Install the corresponding [https://addons.mozilla.org/en-US/firefox/addon/plasma-integration/ browser add-on]. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ==== Use KDE file picker ==== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> To use the KDE file picker instead of the GTK one, set the following preference: </div> {{code|lang=nix|line=no|1= programs.firefox.preferences = { "widget.use-xdg-desktop-portal.file-picker" = 1; }; }} <div lang="en" dir="ltr" class="mw-content-ltr"> == Troubleshooting == </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ==== Native Messaging Hosts Fail to Load ==== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Native messaging hosts (used for extensions like Plasma Integration) do not work with the <code>-bin</code> variants of Firefox or with Firefox installed imperatively via <code>nix-env</code>. You must use a variant built from source via your NixOS or Home Manager configuration. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ==== ALSA audio instead of PulseAudio ==== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> To force Firefox to use ALSA, you can override it with a wrapper: </div> {{code|lang=nix|line=no|1=programs.firefox.package = pkgs.wrapFirefox pkgs.firefox-unwrapped { libpulseaudio = pkgs.libalsa; };}} <div lang="en" dir="ltr" class="mw-content-ltr"> ==== Screen Sharing under Wayland ==== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Screen sharing on Wayland requires enabling PipeWire and the appropriate XDG Desktop Portals. </div> {{code|lang=nix|line=no|1= services.pipewire.enable = true; xdg.portal = { enable = true; # Add the portal for your compositor, e.g.: extraPortals = with pkgs; [ xdg-desktop-portal-wlr # For Sway/wlroots # xdg-desktop-portal-gtk # For GNOME # xdg-desktop-portal-kde # For KDE ]; }; }} <div lang="en" dir="ltr" class="mw-content-ltr"> == See also == </div> <div lang="en" dir="ltr" class="mw-content-ltr"> * [[Home Manager]] – Declarative per-user configuration * [https://search.nixos.org/options?channel=unstable&query=programs.firefox NixOS options for Firefox] * [https://discourse.nixos.org/tag/firefox Firefox topics on NixOS Discourse] </div> <div lang="en" dir="ltr" class="mw-content-ltr"> == References == </div> [[Category:Applications]] [[Category:Web Browser]]