Fixup klipper container

Signed-off-by: Magic_RB <magic_rb@redalder.org>
This commit is contained in:
Magic_RB 2023-05-28 12:47:48 +02:00
parent 602b194cf8
commit 2b707885ab
No known key found for this signature in database
GPG key ID: 08D5287CC5DDCA0E

View file

@ -41,6 +41,10 @@ in
fsType = "zfs"; fsType = "zfs";
}; };
systemd.services."container@klipper" = {
restartIfChanged = lib.mkForce false;
};
containers.klipper = { containers.klipper = {
ephemeral = true; ephemeral = true;
autoStart = true; autoStart = true;
@ -58,12 +62,20 @@ in
hostPath = "/var/lib/klipper"; hostPath = "/var/lib/klipper";
isReadOnly = false; isReadOnly = false;
}; };
"/var/lib/moonraker/gcodes" = {
hostPath = "/var/lib/klipper/gcodes";
isReadOnly = false;
};
"/dev/serial/by-id/" = {
hostPath = "/dev/serial/by-id/";
isReadOnly = false;
};
}; };
allowedDevices = [ allowedDevices = [
{ {
node = "/dev/serial/by-id/usb-Klipper_lpc1768_13E0FF0C469027AEBAA84A52871E00F5-if00"; node = "/dev/serial/by-id/usb-Klipper_lpc1768_13E0FF0C469027AEBAA84A52871E00F5-if00";
modifier = "rw"; modifier = "rwm";
} }
]; ];
@ -93,7 +105,7 @@ in
address = "10.64.99.6:19000"; address = "10.64.99.6:19000";
adminBind = "127.0.0.1:19100"; adminBind = "127.0.0.1:19100";
hotRestart = true; hotRestart = false;
}; };
users.users.klipper = { users.users.klipper = {
@ -217,7 +229,7 @@ in
}; };
virtual_sdcard = { virtual_sdcard = {
path = "/var/lib/klipper/sdcard"; path = "/var/lib/moonraker/gcodes";
}; };
### Mainsail ### Mainsail
@ -451,6 +463,8 @@ in
services.moonraker = { services.moonraker = {
enable = true; enable = true;
group = "klipper";
settings = { settings = {
authorization = { authorization = {
trusted_clients = with secret.network.ips; [ trusted_clients = with secret.network.ips; [