Hello everyone,
I’m a complete NixOS beginner, I installed it just a few hours ago. So far, I’m very happy with how smooth the installation process was. I’ve managed to get of my apps working and I am already productive. However, I encountered a number of small issues and would appreciate any advice
Issue 1: App Installation Workflow
Currently, my workflow for installing software is:
- Visit NixOS Search to find the correct package name.
- Add the package to my
configuration.nix
in eitherenvironment.systemPackages
orusers.users.<username>.packages
. - Run
nixos-rebuild switch --use-remote-sudo
.
Questions:
- Is this the right/best/standard workflow for installing software in NixOS?
- The documentation on
search.nixos.org
only suggests adding apps toenvironment.systemPackages = [ app-name ];
, but shouldn’t I useusers.users.<username>.packages
for most user-specific packages instead?
Issue 2: Bash vs Sh
Some of my project build scripts failed initially because they require bash
instead of sh
. I fixed the issue by adding the following to my configuration.nix
:
system.activationScripts.binbash = {
deps = [ "binsh" ];
text = ''
ln -s /bin/sh /bin/bash
'';
};
This solves the problem, but now I get an error every time I run nixos-rebuild switch --use-remote-sudo
(l guess because the symlink already exists). Should it not be the case that the result of rebuilduing the system does not depend on the current state?
Issue 3: Missing Icons and some undefined Packages
Some apps I installed are missing icons. I tried reinstalling adwaita-icon-theme
, but the package was not found. I got this error: error: undefined variable 'adwaita-icon-theme'
. Similarly, some package names from NixOS search don’t seem to match. For instance, I could only install gnome-tweaks
by using gnome3.gnome-tweaks
.
Many thanks!