public inbox for kdevops@lists.linux.dev
 help / color / mirror / Atom feed
From: Andreas Hindborg <nmi@metaspace.dk>
To: Luis Chamberlain <mcgrof@kernel.org>
Cc: Daniel Gomez <da.gomez@kernel.org>,
	kdevops@lists.linux.dev, Joel Granados <joel.granados@kernel.org>
Subject: Re: [RFC] bringup: add semantics to start NixOS support
Date: Wed, 02 Apr 2025 10:24:45 +0000	[thread overview]
Message-ID: <87y0wic19z.fsf@metaspace.dk> (raw)
In-Reply-To: <Z-xX1aT8MeB_hJaK@bombadil.infradead.org>

"Luis Chamberlain" <mcgrof@kernel.org> writes:

> On Tue, Apr 01, 2025 at 01:30:30PM +0200, Daniel Gomez wrote:
>> On Mon, Mar 31, 2025 at 03:09:28AM +0100, Luis Chamberlain wrote:
>> > Tons still left to do... but hey, at least we get to trim clutter out
>> > and can aim for a simple setup. TODO:
>> >
>> > - playbooks/bringup_nixos.yml
>> > - playbooks/update_ssh_config_nixos.yml
>> >
>> > We can probably just trim nixos.nix.j2 so to at least bring up
>> > a libvirt guest first, and then the second step is to use process
>> > a set of target nodes under a simple workflow.
>> >
>> > So the only thing here this does is show how we need to first
>> > add tons of "support" bools and make terraform and guestfs to select
>> > them. That should probably just be its own patch before all this.
>> >
>> > Then the makefile shows the bare bones bringup we need. But we can
>> > probably simplify that more.
>> >
>> > Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
>>
>> I have a WIP branch with some cleanup needed for this:
>>
>> https://github.com/dkruces/kdevops/commits/nixos/
>
> OK that and this patch can likely get us going somewhere fast.
>
>> * kdevops: add nixos support
>> This simply makes kdevops runnable in NixOS by
>> chaning all the shebangs in scripts/.
>>
>> * Makefile.kdevops: drop ansible_python_intepreter
>> Once ansible cfg series are merged, I think we an get rid of the python
>> interperter in the ansible calls and configure that in Kconfig -> ansible.cfg.
>>
>> * shell.nix
>> Just to launch a Nix shell with all kdevops dependencies.

Would be cool if that was a flake with a devshell.

>>
>> * libvirt_user: add nixos support
>> Generates a kdevops/ in your Nix configuration/ folder. Output:
>> https://github.com/dkruces/nixos-config/tree/main/kdevops
>>
>> My initial idea was to generate NixOS configuration with Ansible [1].
>
> If folks don't want to use libvirt they can just a config yaml entry
> describing their qemu junk, and Kconfig should be able then to read that
> in and populate pool crap and all that. Do nixos users with
> virtualization who are on debian use session URI or system URI? I ask
> as system URI crap requires privileges, which is why we do tons of
> hoops with sudo for system URI.
>
> Fedora based distros use session URI by default
> Debian based distros use system  URI by default
>
> What do we want to assume for nix os users?
>
>> But Joel
>> tried something different with flakes I think. Adding him to get more feeback
>> on it.
>>
>> One thing he found was the need of a hack to be able to launch virt-builder [2]:
>
> Hrm, so the use case was to use virt-builder with nix? Is that the nixy
> way to deal with things?

I would suggest just spawning qemu directly with user mode networking.
No need for root for any of this. Specifically, no need for virsh for
just piecing together a few command line arguments.


Best regards,
Andreas Hindborg




  parent reply	other threads:[~2025-04-02 10:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-31 10:09 [RFC] bringup: add semantics to start NixOS support Luis Chamberlain
2025-04-01 11:30 ` Daniel Gomez
2025-04-01 21:17   ` Luis Chamberlain
2025-04-02  6:22     ` Daniel Gomez
2025-04-02 10:24       ` Andreas Hindborg
2025-04-02 10:24     ` Andreas Hindborg [this message]
2025-04-04 11:07   ` Joel Granados

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y0wic19z.fsf@metaspace.dk \
    --to=nmi@metaspace.dk \
    --cc=da.gomez@kernel.org \
    --cc=joel.granados@kernel.org \
    --cc=kdevops@lists.linux.dev \
    --cc=mcgrof@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox