From: Luis Chamberlain <mcgrof@kernel.org>
To: Chuck Lever <cel@kernel.org>, Daniel Gomez <da.gomez@kruces.com>,
kdevops@lists.linux.dev
Cc: Luis Chamberlain <mcgrof@kernel.org>
Subject: [PATCH 0/3] kdevops: add initial nixos support
Date: Wed, 27 Aug 2025 02:32:11 -0700 [thread overview]
Message-ID: <20250827093215.3540056-1-mcgrof@kernel.org> (raw)
This adds a barebones nixos support. Enough to get ssh going and initial
mirror support. The mirror works but its empty as it has no packages.
So all we can do is bringup. Enough to kick the tires off. Some initial
packages are added in preparation for future workflows suppor but that
is a bit more complex and requires moer work. This should be enough to
let the ball get rolling.
Luis Chamberlain (3):
common: use fallback for group inference on remote systems
nixos: add NixOS support as third bringup option with libvirt
integration
mirror: add Nix binary cache mirroring support
.gitignore | 3 +
defconfigs/mirror | 1 +
defconfigs/nixos | 27 +
docs/kdevops-nixos.md | 404 +++++++++++++
kconfigs/Kconfig.bringup | 22 +-
kconfigs/Kconfig.mirror | 68 ++-
kconfigs/Kconfig.nixos | 130 +++++
nixos/flake.nix | 32 ++
.../files/scripts/detect_libvirt_session.sh | 26 +
playbooks/linux-mirror.yml | 2 +
playbooks/nixos.yml | 540 ++++++++++++++++++
playbooks/roles/common/tasks/main.yml | 29 +-
.../devconfig/tasks/install-deps/main.yml | 1 +
playbooks/roles/devconfig/tasks/main.yml | 4 +-
playbooks/roles/gen_hosts/tasks/main.yml | 15 +
.../roles/gen_hosts/templates/fstests.j2 | 20 +
playbooks/roles/gen_hosts/templates/hosts.j2 | 16 +
playbooks/roles/gen_nodes/tasks/main.yml | 24 +
.../roles/gen_nodes/templates/nixos_nodes.j2 | 14 +
.../linux-mirror/python/start-mirroring.py | 29 +-
.../roles/nix-cache-mirror/defaults/main.yml | 7 +
.../roles/nix-cache-mirror/handlers/main.yml | 11 +
.../roles/nix-cache-mirror/tasks/main.yml | 161 ++++++
.../templates/nix-cache-mirror-cache.conf.j2 | 3 +
.../templates/nix-cache-mirror.nginx.j2 | 81 +++
.../templates/nix-cache-sync.service.j2 | 17 +
.../templates/nix-cache-sync.timer.j2 | 11 +
.../roles/update_etc_hosts/tasks/main.yml | 2 +
.../templates/nixos/configuration.nix.j2 | 138 +++++
playbooks/templates/nixos/flake.nix.j2 | 38 ++
.../nixos/hardware-configuration.nix.j2 | 42 ++
.../templates/nixos/run-vm-wrapper.sh.j2 | 159 ++++++
playbooks/templates/nixos/vm-libvirt.xml.j2 | 96 ++++
playbooks/templates/nixos/vms.nix.j2 | 45 ++
.../templates/nixos/workflow-deps.nix.j2 | 127 ++++
playbooks/update_ssh_config_nixos.yml | 57 ++
scripts/check_nix_mirror.sh | 66 +++
scripts/detect_libvirt_session.sh | 26 +
scripts/nixos.Makefile | 93 +++
scripts/nixos_ssh_key_name.py | 55 ++
scripts/provision.Makefile | 4 +
scripts/status_nixos.sh | 57 ++
scripts/update_ssh_config_nixos.py | 133 +++++
43 files changed, 2826 insertions(+), 10 deletions(-)
create mode 100644 defconfigs/nixos
create mode 100644 docs/kdevops-nixos.md
create mode 100644 kconfigs/Kconfig.nixos
create mode 100644 nixos/flake.nix
create mode 100755 playbooks/files/scripts/detect_libvirt_session.sh
create mode 100644 playbooks/nixos.yml
create mode 100644 playbooks/roles/gen_nodes/templates/nixos_nodes.j2
create mode 100644 playbooks/roles/nix-cache-mirror/defaults/main.yml
create mode 100644 playbooks/roles/nix-cache-mirror/handlers/main.yml
create mode 100644 playbooks/roles/nix-cache-mirror/tasks/main.yml
create mode 100644 playbooks/roles/nix-cache-mirror/templates/nix-cache-mirror-cache.conf.j2
create mode 100644 playbooks/roles/nix-cache-mirror/templates/nix-cache-mirror.nginx.j2
create mode 100644 playbooks/roles/nix-cache-mirror/templates/nix-cache-sync.service.j2
create mode 100644 playbooks/roles/nix-cache-mirror/templates/nix-cache-sync.timer.j2
create mode 100644 playbooks/templates/nixos/configuration.nix.j2
create mode 100644 playbooks/templates/nixos/flake.nix.j2
create mode 100644 playbooks/templates/nixos/hardware-configuration.nix.j2
create mode 100644 playbooks/templates/nixos/run-vm-wrapper.sh.j2
create mode 100644 playbooks/templates/nixos/vm-libvirt.xml.j2
create mode 100644 playbooks/templates/nixos/vms.nix.j2
create mode 100644 playbooks/templates/nixos/workflow-deps.nix.j2
create mode 100644 playbooks/update_ssh_config_nixos.yml
create mode 100755 scripts/check_nix_mirror.sh
create mode 100755 scripts/detect_libvirt_session.sh
create mode 100644 scripts/nixos.Makefile
create mode 100755 scripts/nixos_ssh_key_name.py
create mode 100755 scripts/status_nixos.sh
create mode 100755 scripts/update_ssh_config_nixos.py
--
2.50.1
next reply other threads:[~2025-08-27 9:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-27 9:32 Luis Chamberlain [this message]
2025-08-27 9:32 ` [PATCH 1/3] common: use fallback for group inference on remote systems Luis Chamberlain
2025-08-27 9:32 ` [PATCH 2/3] nixos: add NixOS support as third bringup option with libvirt integration Luis Chamberlain
2025-08-27 9:32 ` [PATCH 3/3] mirror: add Nix binary cache mirroring support Luis Chamberlain
2025-08-29 7:50 ` [PATCH 0/3] kdevops: add initial nixos support Luis Chamberlain
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=20250827093215.3540056-1-mcgrof@kernel.org \
--to=mcgrof@kernel.org \
--cc=cel@kernel.org \
--cc=da.gomez@kruces.com \
--cc=kdevops@lists.linux.dev \
/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