[Nix-dev] Nixos basic Qs

Vladimír Čunát vcunat at gmail.com
Thu Jul 31 23:02:51 CEST 2014


Hi and welcome!

On 07/31/2014 10:45 PM, Ben B wrote:
> - is there a way to list the files that were installed by a package?

The path /nix/store/hash-pkgname-version contains the whole tree 
installed by that package. You can get to that path e.g. by inspecting 
the canonical path of any of its files (readlink -f file).

> The files that would be installed by a package?

If you have that package on your system, you can use the same approach 
as above. Otherwise, you can judge from what other distros, as they 
often have file lists available via some web service. We don't have any 
better way (yet).

> Is there a way to search for a package that would install a given file?

There's command-not-found for commands (in channels). Otherwise, 
estimate via e.g. http://packages.ubuntu.com/ (they have filename search).

> - is there a way to get the nix expression for a package?

Inspect the source, that's the best way. Typically just searching in 
<nixpkgs>/pkgs/top-level/all-packages.nix points you to it.

> - I have xmonad as my window manager, and it defaults to slim as display
> manager/login gadget.  My problem is that one of those two opens a terminal
> by default.  [...]
> I would configure that behavior.

No idea about that. BTW, I'm happily running XMonad on top of Xfce 
session without any problems (for a few years now).

> - the 'locate' command doesn't work.  According to google I should run
> updatedb to make it work, however that gives me a 'readonly filesystem' error.

I'd try services.locate.enable. See man configuration.nix for description.


Vlada



-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3251 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20140731/f2c8b14e/attachment-0001.bin 


More information about the nix-dev mailing list