pass entire config fragment to levitate, not just services

to make it useful we need to be able to set packages, passwords, ssh
keys etc
This commit is contained in:
Daniel Barlow
2024-04-29 19:58:25 +01:00
parent 9b3a3b9ff7
commit 8b69dcc209
3 changed files with 33 additions and 8 deletions

View File

@@ -4,7 +4,7 @@
, systemconfig
, execline
, lib
, services ? null
, config ? {}
, liminix
, pseudofile
, pkgs
@@ -12,6 +12,7 @@
let
inherit (pseudofile) dir symlink;
inherit (liminix.services) oneshot;
paramConfig = config;
newRoot = "/run/maintenance";
sysconfig =
let
@@ -25,8 +26,8 @@ let
emptyenv chroot . /bin/init
'';
base = {...} : {
config = {
services = services // {
config = {
services = {
banner = oneshot {
name = "banner";
up = "cat /etc/banner > /dev/console";
@@ -60,6 +61,7 @@ let
../../modules/users.nix
../../modules/busybox.nix
base
({ ... } : paramConfig)
../../modules/s6
];
};