2

Is there any practical difference between

users.users.default.packages = [
  pkgs.foo
];

and

home-manager = {
  users.default = {
    config,
    pkgs,
    nixpkgs,
    lib,
    specialArgs,
    options,
    modulesPath,
    nixosConfig,
    osConfig,
  }: {
    home = {
      packages = [
        pkgs.foo
      ];
    };

  };
  useGlobalPkgs = true;
};
l0b0
  • 50,672
  • 41
  • 197
  • 360

1 Answers1

1

The former is configured by the system owner and the latter by the user. The former thus requires root privileges. Other than that, there is no difference.

FRidh
  • 59
  • 2
  • As [mentioned by tejing](https://discourse.nixos.org/t/users-users-name-packages-vs-home-manager-packages/22240/4), there are some practical differences with `$PATH` priority and package conflicts. – l0b0 Oct 07 '22 at 00:14