News for hackers. Stuff that matters.
Re:NixOS 22.11 “Raccoon” Released by pxc on Thursday December 01, 2022 @11:15AM (#33818291)
The Nix idioms that are used in configuring NixOS are super simple, mostly just turning things on and off.

You can browse some here: https://search.nixos.org/options

For example, to install an OpenSSH server and run it, you'd write:

  services.openssh.enable = true;
and to run it on an additional port, 2222, instead of just the default of 22, you'd write:

  services.openssh.ports = [
    22
    2222
  ];
For programs you don't need to configure but just want to put on your PATH, you just add them to a list like

  environment.systemPackages = [
    pkgs.firefox
    pkgs.jq
  ];
If configuration management isn't for you, go ahead and mess around with Nix as a standalone package manager. But it really doesn't require much effort or prior knowledge to get up and running and start playing with it!

(For NixOS, the Nix you write only starts looking like real code when you want to add new features or some packages to NixOS.)

There are no comments on this comment yet.