File utility not included in base NixOS install

#1

I was surprised to find out that the file utility is not installed by default on NixOS systems.

Considering that it’s definitely a standard utility on Debian (and derivatives) and macOS, and probably on many more distros, has its inclusion by default been considered for NixOS?

If so, where would it fit? utilLinux?

If not, is there a NixOS-specific reason?

0 Likes

#2

Definitely file, that’s where everyone expects to find it.

And sorry, file is not an ‘essential’ package in debian, not even close. It is included in ‘standard’ task, but that designation does not really mean anything. There should be a line that separates the default package set from our blurry notion of what constitutes ‘standard utilities’. Debian has two lines, NixOS has one and I’m totally fine with that line excluding ‘file’.

0 Likes

#3

I think there might be a NixOS-specific factor: a dependency of a command/daemon doesn’t necessarily need to be in the global $PATH.

0 Likes

#4

Is there a community policy that the NixOS baseline is the bare minimum for POSIX plus Nix functionality ? Or a clear enunciation of what the baseline is?

1 Like

#5

file is not a dependency of anything standard in NixOS, judging from my experience. You can have stdenv, a default installation or a full-blown desktop with KDE without anything pulling it in, even indirectly.

0 Likes

#6

Yes I think there is unspoken agreement, that the “base” system you get when you don’t specify anything in environment.systemPackages explicitly, is as minimal as it can be.
It is easy to build on this clean sheat by putting things into your configuration, while it would be rather hard to get rid of things, if they were included by default.

0 Likes

#7

In fact even just satisfying Posix can be quite a nuisance, as witnessed by the /bin/sh problem.

0 Likes