oliverdavies.uk/source/_daily_emails/2024-11-27.md
2024-12-01 01:19:43 +00:00

1.5 KiB

title date permalink tags cta snippet
Nix as an operating system 2024-11-27 daily/2024/11/27/nix-as-an-operating-system
software-development
linux
nix
nixos
~ If you like the declarative approach to installing and configuring packages with Nix, you do the same with your entire operating system with NixOS.

Yesterday, I showed some of the Nix programming language and how to use it to perform tasks such as installing and configuring packages.

I like this declarative approach as you know everything installed on your system and its configuration.

There are no random or leftover packages or configuration files.

The Nix package manager can be installed on Linux or macOS, but you can also use Nix to configure your whole operating system in a declarative way thanks to NixOS.

As well as installing and configuring packages, you can define your firmware version, boot loader, disk partitioning, user accounts and more.

I used to do this type of automation with Ansible but switched to NixOS soon after trying Nix on another Linux distribution.

If I need to work on a different laptop, like when mine recently died, I can apply the same configuration and get all the same programs and configurations as before.

If you want to see my current NixOS setup, you can see it on my GitHub.