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:
parent
9b3a3b9ff7
commit
8b69dcc209
3 changed files with 33 additions and 8 deletions
21
NEWS
21
NEWS
|
@ -83,4 +83,23 @@ sponsoring this development (and funding the hardware)
|
||||||
2024-02-21
|
2024-02-21
|
||||||
|
|
||||||
New port! Thanks to Raito Bezarius, Liminix now runs on the Zyxel NWA50AX,
|
New port! Thanks to Raito Bezarius, Liminix now runs on the Zyxel NWA50AX,
|
||||||
an MT7621 (MIPS EL) dual radio WiFi AP.
|
an MT7621 (MIPS EL) dual radio WiFi AP.
|
||||||
|
|
||||||
|
2024-04-29
|
||||||
|
|
||||||
|
The setup for using `levitate` has changed: now it accepts an entire
|
||||||
|
config fragment, not just a list of services. Hopefully this makes it
|
||||||
|
a bit more useful :-)
|
||||||
|
|
||||||
|
defaultProfile.packages = with pkgs; [
|
||||||
|
...
|
||||||
|
(levitate.override {
|
||||||
|
config = {
|
||||||
|
services = {
|
||||||
|
inherit (config.services) dhcpc sshd watchdog;
|
||||||
|
};
|
||||||
|
defaultProfile.packages = [ mtdutils ];
|
||||||
|
users.root.openssh.authorizedKeys.keys = secrets.root.keys;
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
|
@ -141,9 +141,13 @@ in rec {
|
||||||
e2fsprogs
|
e2fsprogs
|
||||||
mtdutils
|
mtdutils
|
||||||
(levitate.override {
|
(levitate.override {
|
||||||
services = {
|
config = {
|
||||||
inherit (config.services) dhcpc sshd;
|
services = {
|
||||||
}; }
|
inherit (config.services) dhcpc sshd watchdog;
|
||||||
)
|
};
|
||||||
|
defaultProfile.packages = [ mtdutils ];
|
||||||
|
users.root.openssh.authorizedKeys.keys = secrets.root.keys;
|
||||||
|
};
|
||||||
|
})
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
, systemconfig
|
, systemconfig
|
||||||
, execline
|
, execline
|
||||||
, lib
|
, lib
|
||||||
, services ? null
|
, config ? {}
|
||||||
, liminix
|
, liminix
|
||||||
, pseudofile
|
, pseudofile
|
||||||
, pkgs
|
, pkgs
|
||||||
|
@ -12,6 +12,7 @@
|
||||||
let
|
let
|
||||||
inherit (pseudofile) dir symlink;
|
inherit (pseudofile) dir symlink;
|
||||||
inherit (liminix.services) oneshot;
|
inherit (liminix.services) oneshot;
|
||||||
|
paramConfig = config;
|
||||||
newRoot = "/run/maintenance";
|
newRoot = "/run/maintenance";
|
||||||
sysconfig =
|
sysconfig =
|
||||||
let
|
let
|
||||||
|
@ -25,8 +26,8 @@ let
|
||||||
emptyenv chroot . /bin/init
|
emptyenv chroot . /bin/init
|
||||||
'';
|
'';
|
||||||
base = {...} : {
|
base = {...} : {
|
||||||
config = {
|
config = {
|
||||||
services = services // {
|
services = {
|
||||||
banner = oneshot {
|
banner = oneshot {
|
||||||
name = "banner";
|
name = "banner";
|
||||||
up = "cat /etc/banner > /dev/console";
|
up = "cat /etc/banner > /dev/console";
|
||||||
|
@ -60,6 +61,7 @@ let
|
||||||
../../modules/users.nix
|
../../modules/users.nix
|
||||||
../../modules/busybox.nix
|
../../modules/busybox.nix
|
||||||
base
|
base
|
||||||
|
({ ... } : paramConfig)
|
||||||
../../modules/s6
|
../../modules/s6
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue