Downloading packages with Nixos issue

environment.systemPackages = [ pkgs.firefox ]; so for this is what the link should be to input into the console ?

sorry I will rewrite sorry this the correct why to input into the console/terminal environment.systemPackages = [ pkgs.firefox ] and then after that I input sudo nixos-rebuild switch for all applications ?

NO, you do not put that in the terminal. This is not a command. That is a snippet of nixos configuration, written in the nix expression language.

If you already have some mention environment.systemPackages in your configuration (usually /etc/nixos/configuration.nix) then you add pkgs.firefox there. If you do not have such a mention so far, you add the complete section as above.

In gnome for example the environment.systemPackages in your configuration (usually /etc/nixos/configuration.nix ) is that already installed ? so I go ahead and just input into the terminal: pkgs.firefox

Can you please re-read what you write and order thoughts and words properly in a sentence?

It is really hard to follow.

Especially as I can not see how Gnome is related.

And again, the only thing to run in the terminal is sudo nixos-rebuild switch to build and apply a new configuration.

Everything else is editing files.

I just wish that you guys had made a video on this on youtube on how to follow the procedure thank your for all the explanation

There are videos on available on youtube.

The series made by William T are often recommendet (I have not watched it).

1 Like

NixOS is not really designed for administration with GUI tools. Some people have made GUI tools for this purpose anyway, like the nix software center, but they are generally rather new, not widely used by the NixOS community, and surely have bugs. Most of us have probably never even tried them. There wasn’t even a GUI installer for NixOS until the most recent stable release. (I’ve still never used it)

The expected use model for NixOS is to edit text files and run commands from the terminal for administration tasks. This is the well-travelled, tested, and optimized path. If you need a GUI to feel comfortable, and don’t want to learn a new paradigm, NixOS, as it currently exists, is probably not for you. (Yet, anyway. People keep working on those GUI tools. Perhaps it will become reasonable in a few more years.)

3 Likes

I think this is a bit besides the point. “Just edit text file” isn’t necessarily obvious, especially with language barriers involved. It breaks the pattern of how Linux distros work - you may be very comfortable with the command line and yet not understand how this works at first glance.

A little bit more handholding, like what the video @NobbZ linked seems to do, is probably all that’s needed here.

@Batman123 you probably want the second video in the playlist (it uses the non-gnome installer, unfortunately, so if you want to follow it exactly you may need to reinstall), though the first will explain why this distro does things the way it does, so it’s worth watching.

Sorry for the rough intro @Batman123, it can be a bit hard to judge what kind of help people need, especially when coming from people very experienced with something. A pattern you’ll come across often around here, unfortunately.

4 Likes

While I hope in the future nix-software-center could help guide people into learning Nix, in its current state it is definitely not ready for someone to only rely on it for managing NixOS. I would highly recommend learning Nix from either reading documentation, blog post, or youtube videos. And if you run into any more hurdles always feel free to ask for help!

2 Likes

Please just one info if I want to download steam what is the command line I tried NIV-E steam and it didnt work

You enable programs.steam.enable in your configuration, then you rebuild the system using sudo nixos-rebuild switch. It always boild down to this:

  • find option(s)
  • set option(s)
  • rebuild/switch

PS: I have no clue what “NIV-E” is, though if you meant to write nix-env, then yes, that does not work, as steam requires extra setup on the system level, which is done by enabling aforementioned option. In general: don’t use nix-env

Yes t tried niv-env steam I mispelled before please what do you mean when you say You enable [ programs.steam.enable

As mentioned several times, it means that you:

  1. open your systems configuration file (usually /etc/nixos/configuration.nix) in an editor (eg. sudoedit /etc/nixos/configuration.nix).
  2. Integrate the programs.steam.enable = true; setting in the returned attributes set, such that the configuration remains syntactically and semantically valid.
  3. Save the file and quit the editor
  4. Run the command sudo nixos-rebuild switch

Is there any direct video that shows how to do this

Have you watched the series by Will that I already linked?

The should show the general process, there is probably not a video that shows enabling the steam option specifically.

yes I did but on youtube there are so many videos that show you on how nix os works some of them are very long

I skimmed the first three videos from Will. In the second and third video he opens the configuration several times and also edits it.

I assume your question is covered in those videos.

If you prefer to run arbitrary commands that change your system state arbitrarily, thats fine, though that is not what NixOS will give you.

In NixOS everything is build around the central configuration, written in the nix expression language. Quite a lot of other configuration of system services, cronjobs, editor configuration even can be done through that file and should be done there!

You do not learn nix expression language in 5 minutes, though thats enough for the basics.

You do not learn how to configure NixOS in an hour, but its enough to flip some options on and off.

NixOS will throw a lot of sticks between your feets, especially if you are not willing to unlearn. Though once you crossed the line, there is really no way back.

On the third video he opens the configuration several times and also edits please do you have the direct link that video regarding Nix os it is different to Ubuntu Arch there you just go and software center in Ubuntu and Arch also and download steam that’s it. Nix os is different takes time to learn.

Here I linked the playlist.

You won’t gain anything from a snippet where he opens and closes the editor for a quick change without the context.

Please do yourself a favour and watch the full series.

Alternatively the manual has a full part about configuration. Read it.

It even references back into the installation part to explain how to open the configuration.