pull down to refresh

Thank you for the tip. I’m just getting familiar with Nix. What are your favorite features, and what is still giving you trouble?
What are your favorite features
The declarative configuration via configuration.nix and applying it with nixos-rebuild.1
For example, knowing which packages are installed and how the firewall is configured at all times gives me peace. I also intend to check this file into version control so I will never lose it. I can simply copy this file into a new NixOS install and run nixos-rebuild switch and then I should have everything up and running again iiuc.
Additionally, having to configure the system in this declarative way seems to be well-enforced: I literally can't change the system configuration myself since the system is mounted read-only.
what is still giving you trouble?
Imperative vs declarative user management. Not sure yet which one I should use. Imperative with manual password configuration via passwd seems to be recommended but feels weird to not go full declarative and set hashedPassword inside configuration.nix.
But I probably don't want to expose my hashed passwords or I can't share my configuration.nix publicly in a git repository.
Also currently figuring out basic workflows with nix-env and how to configure dwm.

Footnotes

  1. I guess that's the obvious killer feature of NixOS.
reply
I absolutely love NixOS! I use it as my main OS both on my desktop and my VPS.
What is truly magical is the ability to configure even projects with pinned dependencies via shell.nixand if you have NixOS on a server you can also write and import a default.nix to set up a reproducible deploy on any NixOS machine.
Here a couple of tips I learned myself:
  • If you want you can also use the passwordFile rule to store the encrypted passwords outside of your config code.
  • It's better to avoid nix-env entirely as it's NOT reproducible, it's better to use nix-shell for occasional use or add them to the environment directly.
  • Even cooler, you can write scripts with a special shebang that let you automatically load various languages or packages.
reply
10 sats \ 2 replies \ @nym 20 Apr
Thank you!
reply
6 sats \ 1 reply \ @ek OP 20 Apr
I’m just getting familiar with Nix
Did you install only nix, the package manager, or NixOS?
Can you share some experiences?
reply
10 sats \ 0 replies \ @nym 20 Apr
I installed NixOS only.
I tried to implement a custom network configuration script to automate VPN connections based on specific network conditions, but I couldn't quite figure it out.
reply