Some notes on nix flakes

Some notes on nix flakes

Julia Evans

a few people in the replies are asking why someone might want to use nix as an OS / to manage your python packages / to manage your config files.

does anyone want to share their reasons for doing those things? I don't really know.

(please give examples of some specific problems Nix solves for you and what you like about it, don't just say "it's reproducible/declarative” :) )

@b0rk Nix has made computing fun again!

I run NixOS on my laptop, desktop, NAS, home server, and multiple VPSs. There are a couple reasons why I switched away from other OSs and tools:

- Everything is configured with code, stored in Git
- This code can be shared easily between machines
- Upgrades to machines are incredibly safe, with the safety net of rollbacks or even booting an older config directly!
- One and done! Now that I have these configs, OS install is a single command.

@b0rk I find much of the benefit of Nix comes from using it on multiple computers. Whether that is your own set of devices or sharing configuration, shell environments, packages with others. I'm able to share my user environment with its packages, program configs, etc between all of my devices including my MacBook thanks to Home-Manager. Other ecosystem tools like nix-darwin bring the magic of NixOS to macOS making it a single command for me to configure a new Mac just the way I like it.

@b0rk I have however found that there are a number of things that you'll end up implementing yourself that are necessary for managing these more complex setups. There are a handful of tools in the ecosystem to try and make this easier like flake-utils, flake-utils-plus, flake-parts, etc. They all try to solve different problems in different ways, Nix is still finding its footing here. Though I'm happy with Snowfall Lib :)

https://snowfall.org/guides/lib/quickstart/

Quickstart

Get started with Snowfall Lib.

Snowfall
@jakehamilton @b0rk
It does feel like great infrastructure that's still waiting for a userland layer.

@b0rk in case anyone is curious what this setup looks like, it's all on GitHub!

This repo has all of my system configs and some packages: https://github.com/jakehamilton/config

I made my own custom neovim that comes with my config and plugins: https://github.com/jakehamilton/neovim

I also did the same for tmux: https://github.com/jakehamilton/tmux

GitHub - jakehamilton/config: My Nix configuration for packages, systems, etc.

My Nix configuration for packages, systems, etc. Contribute to jakehamilton/config development by creating an account on GitHub.

GitHub
@jakehamilton @b0rk that actually sounds really nice, especially since I am procrastinating doing a clean install of Fedora since I’ve accumulated so much cruft over the last year on it. Lol