Stream: nixos

Topic: NixOS tutorial series


view this post on Zulip Srid (Dec 09 2023 at 13:37):

Zapier said:

flake-parts system config + hm

Date: 2023-12-08T07:33:48+00:00
Link: https://old.reddit.com/r/NixOS/comments/18dhmb5/flakeparts_system_config_hm/

Is there a step-by-step tutorial on how to use flake-parts for system configuration (ideally with home-manager)? The documentation is too abstract for me.

The published repos on github of people using flake-parts all look very different, and I cannot comprehend why they do things different.

submitted by /u/zeec123

[link] [comments]

view this post on Zulip Srid (Dec 09 2023 at 18:46):

Just a skeleton for now: https://nixos.asia/en/nixos

image.png

view this post on Zulip Srid (Dec 10 2023 at 00:44):

First attempt: https://github.com/nixos-asia/website/pull/12

view this post on Zulip Srid (Dec 10 2023 at 01:03):

Feedback on this ^ welcome. Planning to publish tomorrow.

view this post on Zulip Srid (Dec 11 2023 at 13:29):

First tutorial :right: https://nixos.asia/en/tutorial/nixos-install

view this post on Zulip Srid (Dec 12 2023 at 14:39):

@Shivaraj B H

I propose that we repurpose this blog post into a general tutorial that complements our first one.

To give an idea of the 'larger scheme':

image.png

view this post on Zulip Shivaraj B H (Dec 12 2023 at 14:47):

I think likewise, I was having second thoughts about publishing the above mentioned post primarily because this minimal configuration was way too specific for the device we are using.

view this post on Zulip Shivaraj B H (Dec 12 2023 at 14:48):

There is actually a third way of installing as well that can compliment the first tutorial you had written: Disko to partition your disk and Nixos-install —flake to install the OS

view this post on Zulip Srid (Dec 12 2023 at 14:48):

Let's do it. You can rewrite it such that it achieves the same goal of first tutorial (nixos deployed with flakes enabled and config in git), but nearly automated.

Yea, I assume we would be using disko for tutorial 2?

view this post on Zulip Srid (Dec 12 2023 at 14:49):

Also, screenshots are plenty useful. I liberally take screenshots and put them in Google photos. I think I took like 15 screenshots for first post, and ended up using 2 or 3 of them.

view this post on Zulip Shivaraj B H (Dec 12 2023 at 14:50):

Yes we will be using disko combined with nixos-anywhere but there can also be a scenario where nixos-anywhere is not an option, like the situation I am facing now (no wired Ethernet), what if I still want to maintain my partitioning scheme in nix

view this post on Zulip Shivaraj B H (Dec 12 2023 at 14:51):

I tried this out as an experiment, it does work, I will do it again and take screenshots while I am at it

view this post on Zulip Srid (Dec 12 2023 at 14:56):

This would be manual (not graphical) install + disko + nixos-install --flake? Yes, a tutorial on that would be great as well!

view this post on Zulip Srid (Dec 12 2023 at 14:56):

Let's do that one next, actually. nixos-anywhere can come latter if necessary

view this post on Zulip Srid (Dec 12 2023 at 14:57):

Then, we can say: "here are 3 ways to install NixOS" - each progressively more automated.

view this post on Zulip Srid (Dec 12 2023 at 14:57):

I will do it again and take screenshots while I am at it

Try it on VM, better for screenshots. I used Parallels (could be VirtualBox) running aarch64-linux.

view this post on Zulip Shivaraj B H (Dec 12 2023 at 15:02):

Great, sounds good

view this post on Zulip Srid (Dec 15 2023 at 18:17):

Source for some ideas

Note what George says at some point: “I am interested in being able to use Nix to quickly deploy cloud instances.”

So wouldn’t it be great if we had documentation for that use case?

--APCodes (who is looking to join their documentation team)

(Not recommending that we read the rest of the thread which appears to be idle debate that goes nowhere)

view this post on Zulip Shivaraj B H (Dec 20 2023 at 09:58):

I was considering to explore https://github.com/nixos/nixos-hardware for the final automated tutorial of this series

view this post on Zulip Srid (Feb 20 2024 at 12:07):

Srid said:

First tutorial :right: https://nixos.asia/en/tutorial/nixos-install

Second tutorial using disko, written by @Shivaraj B H :right: https://nixos.asia/en/nixos-install-disko

view this post on Zulip Srid (Feb 20 2024 at 21:42):

@Shivaraj B H I just tried nixos-anywhere to install a flake on a VM.

I couldn't find a rescue image for arm linux, so I just booted into the NixOS installer. And then setup its root user for ssh'ing:

# from installer booted machine, set a root password
sudo passwd root

# from macos
ssh-copy-id -o PreferredAuthentications=password  [email protected]

# then install the flake
nix run github:nix-community/nixos-anywhere -- --build-on-remote --flake .#here [email protected]

Since the core 'steps' are small, I suppose a large part of our 3rd tutorial should focus on getting it working right when deploying from macOS or Linux. I also noticed that when the configuration included packages like nixvim, nixos-anywhere fails to remotely build it.

view this post on Zulip Shivaraj B H (Feb 21 2024 at 06:25):

What does it fail with while trying to build packages like nixvim?

view this post on Zulip Srid (Feb 21 2024 at 10:58):

It was more along the lines of,

a 'aarch64-linux' with features {} is required to build '/nix/store/ziz2sfr9h5w1sss2w2bzhjf4vl2g314g-source.drv', but I am a 'aarch64-darwin' with features {benchmark, big-parallel, kvm, nixos-test}

view this post on Zulip Srid (Feb 21 2024 at 13:17):

Since the core 'steps' are small, I suppose a large part of our 3rd tutorial should focus on getting it working right when deploying from macOS or Linux.

And it may also include nix-dev-home automatically? Then we can point Linux users in our company directly to this tutorial.

view this post on Zulip Srid (Feb 21 2024 at 19:53):

Srid said:

It was more along the lines of,

a 'aarch64-linux' with features {} is required to build '/nix/store/ziz2sfr9h5w1sss2w2bzhjf4vl2g314g-source.drv', but I am a 'aarch64-darwin' with features {benchmark, big-parallel, kvm, nixos-test}

Related: https://github.com/zhaofengli/colmena/issues/178

view this post on Zulip Srid (Mar 26 2024 at 12:22):

disko-install

https://github.com/nix-community/disko/pull/548

https://tinkering.xyz/installing-nixos/

image.png

view this post on Zulip Notification Bot (Mar 26 2024 at 12:45):

3 messages were moved from this topic to #nixos > disko-install by Srid.


Last updated: Nov 15 2024 at 12:33 UTC