this post was submitted on 03 Oct 2023
15 points (94.1% liked)

nixos

1262 readers
3 users here now

All about NixOS - https://nixos.org/

founded 4 years ago
15
Tried NixOS ! (dvd.chat)
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/[email protected]
 

Tried NixOS !

So I tried nixos and I love how things work, I am glad that it exists. Will learn about Flakes today. Any recommended resource to learn it? :)

@[email protected]

top 11 comments
sorted by: hot top controversial new old
[–] [email protected] 5 points 1 year ago (1 children)

Congrats! It took me three months to get everything running the way I wanted. Now I run a bunch of machines off of a single flake, managing family and friend's machines too. Next is moving my server over to nixos. Read through the wiki and site, get on the nixos discord or matrix site, ask questions, use the discourse, and when you feel confident nixos-rebuild switch --flake .#!

[–] [email protected] 1 points 1 year ago (1 children)

The --flake .# is redundant, just FYI ;)

[–] [email protected] 4 points 1 year ago (1 children)

There's a difference. Without it, it loads the flake from /etc/nixos/flake.nix instead of the current directory. (What is redundant is the #, you can just write --flake .)

[–] [email protected] 1 points 1 year ago (2 children)

Yeah, true, valid point. Guess I never thoughg about rebuilding from anywhere not /etc/nixos

[–] [email protected] 2 points 11 months ago

FYI you can do:

nixos-rebuild switch --flake git+https://yourgithost.com/yourrepo

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago) (1 children)

Also, depending on how the flake is setup, you might also have to add .#hostname, at least for the initial run. After that .# can evaluate which host is being rebuilt.

[–] [email protected] 1 points 1 year ago

@[email protected] @ck_ haha, on lemmy, I was trying to add .#\, but \ kept getting deleted. Markdown??

[–] [email protected] 2 points 1 year ago (2 children)

The nix wiki, packages an options pages are all I need most of the time.

[–] [email protected] 1 points 1 year ago

Documentation isn't stellar IMHO: I end up reading the nixpkgs sources most often than not (it probably depends on what you are doing, though)

[–] [email protected] 0 points 1 year ago

@zwerdlds @canute How about nixos-option, lib.mkoption ?

[–] [email protected] 0 points 1 year ago