# Why is firefox outside of either "with pkgs"

**URL:** https://discourse.nixos.org/t/why-is-firefox-outside-of-either-with-pkgs/80978
**Category:** Help
**Created:** [November 5, 2026, 10:02pm UTC](https://discourse.nixos.org/t/why-is-firefox-outside-of-either-with-pkgs/80978 "2026-11-05T22:02:39Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![strider22](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/s/a8b319/32.png) [@strider22](https://discourse.nixos.org/u/strider22)
#### Post date: [November 5, 2026, 10:02pm UTC](https://discourse.nixos.org/t/why-is-firefox-outside-of-either-with-pkgs/80978/1 "2026-11-05T22:02:40Z")

</div>

I’m trying to understand the proper way to edit configuration.nix.

Why is firefox outside of either “with pkgs”?

thunderbird is in the user section because that makes sense.

```auto
 users.users.chris" = {
    isNormalUser = true;
    description = "Christopher";
    extraGroups = ["networkmanager" "wheel"];
    packages = with pkgs; [
      thunderbird
    ];
  };

```

I put the rest in environment.systemPackages = with pkgs; [ so sudo could use them too.

```auto
environment.systemPackages = with pkgs; [ 
      pkgs.libreoffice-qt
      hunspell
      hunspellDicts.en_CA  
];

```

But firefox was installed by the install program for xfce between those two “with pkgs” blocks as;

```auto
#Install firefox.

programs.firefox.enable = true;

```

Isn’t firefox a package? Why is it like that?

Thanks. just asking.

---

<div class="post-metadata">

### Author: ![Mapybara](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/m/8dc957/32.png) [@Mapybara](https://discourse.nixos.org/u/Mapybara)
#### Post date: [November 5, 2026, 10:32pm UTC](https://discourse.nixos.org/t/why-is-firefox-outside-of-either-with-pkgs/80978/2 "2026-11-05T22:32:55Z")

</div>

Programs which ONLY need their binaries to be available can be installed by listing them in `environment.systemPackages`. All other programs (which fortunately is not that many) - i.e., programs which need other things to be set up before they’ll work well - need to be in `programs`(or have their own options at the same level as `programs`, like for example `systemd`). That way they can use a wrapper script. (You can generally also use them without a wrapper script if you really want to - for example, there is `environment.systemPackages.pkgs.firefox-unwrapped`. You don’t want to though!)

I’m not the best person to ask about what the wrapper script for firefox does, but I think you were after that general answer which also applies to other programs?

There’s been lots of discussion about how to find out which programs are in which category, but there isn’t a complete solution to that problem yet, so it’s best for any big program to start by seeing whether it has an option under `programs` and, if it does, use that.

> thunderbird is in the user section because that makes sense.

Putting it in the `users` section sequesters it from other users. That may indeed make sense, but it’s a completely separate issue from the issue about some programs needing to be under `programs`.

---

<div class="post-metadata">

### Author: ![bitbloxhub](https://discourse.nixos.org/user_avatar/discourse.nixos.org/bitbloxhub/32/35210_2.png) [@bitbloxhub](https://discourse.nixos.org/u/bitbloxhub)
#### Post date: [November 6, 2026, 12:01am UTC](https://discourse.nixos.org/t/why-is-firefox-outside-of-either-with-pkgs/80978/3 "2026-11-06T00:01:41Z")

</div>

You can check the source code of the Firefox module here. Looks like it’s mostly installing and wrapping with autoconfig (like [GitHub - MrOtherGuy/fx-autoconfig: Load custom javascript in browser context · GitHub](https://github.com/MrOtherGuy/fx-autoconfig)) and native messaging hosts, and adding system-wide policies to `/etc`.  
[nixpkgs/nixos/modules/programs/firefox.nix at a6adde9f45e0ed3717c9c3cc1d1c0a257aee262e · NixOS/nixpkgs · GitHub](https://github.com/NixOS/nixpkgs/blob/a6adde9f45e0ed3717c9c3cc1d1c0a257aee262e/nixos/modules/programs/firefox.nix)
