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]
Just a skeleton for now: https://nixos.asia/en/nixos
First attempt: https://github.com/nixos-asia/website/pull/12
Feedback on this ^ welcome. Planning to publish tomorrow.
First tutorial :right: https://nixos.asia/en/tutorial/nixos-install
@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':
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.
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
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?
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.
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
I tried this out as an experiment, it does work, I will do it again and take screenshots while I am at it
This would be manual (not graphical) install + disko + nixos-install --flake
? Yes, a tutorial on that would be great as well!
Let's do that one next, actually. nixos-anywhere can come latter if necessary
Then, we can say: "here are 3 ways to install NixOS" - each progressively more automated.
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.
Great, sounds good
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)
I was considering to explore https://github.com/nixos/nixos-hardware for the final automated tutorial of this series
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
@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.
What does it fail with while trying to build packages like nixvim?
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}
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.
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
disko-install
https://github.com/nix-community/disko/pull/548
https://tinkering.xyz/installing-nixos/
3 messages were moved from this topic to #nixos > disko-install by Srid.
Last updated: Nov 15 2024 at 12:33 UTC