pull down to refresh
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
passwordFilerule to store the encrypted passwords outside of your config code. -
It's better to avoid
nix-enventirely as it's NOT reproducible, it's better to usenix-shellfor 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.More info about that here: https://nixos.wiki/wiki/Nix-shell_shebang
reply
Thank you!
reply
I’m just getting familiar with Nix
Did you install only nix, the package manager, or NixOS?
Can you share some experiences?
reply
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
nixos-rebuild.1nixos-rebuild switchand then I should have everything up and running again iiuc.passwdseems to be recommended but feels weird to not go full declarative and sethashedPasswordinside configuration.nix.nix-envand how to configuredwm.Footnotes