this post was submitted on 03 Oct 2023
10 points (100.0% liked)

nixos

46 readers
1 users here now

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

founded 4 years ago
10
Tried NixOS ! (dvd.chat)
submitted 1 year ago* (last edited 1 year ago) by canute@dvd.chat to c/nixos@lemmy.ml
 

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? :)

@nixos@lemmy.ml

you are viewing a single comment's thread
view the rest of the comments
[–] ck_@discuss.tchncs.de 1 points 1 year ago (1 children)

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

[–] 2xsaiko@discuss.tchncs.de 3 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 .)

[–] ck_@discuss.tchncs.de 1 points 1 year ago (2 children)

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

[–] eneff@discuss.tchncs.de 2 points 11 months ago

FYI you can do:

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

[–] zonsopkomst@lemmy.ml 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.

[–] zonsopkomst@mastodon.social 1 points 1 year ago

@zonsopkomst@lemmy.ml @ck_ haha, on lemmy, I was trying to add .#\, but \ kept getting deleted. Markdown??