host/asus: persist docker

This commit is contained in:
Dmitriy Pleshevskiy 2024-06-01 00:00:07 +03:00
parent 57d8d2a610
commit 0fe23e8bf8
Signed by: pleshevskiy
GPG key ID: 17041163DA10A9A2

View file

@ -1,4 +1,4 @@
{ lib, ... }:
{ config, lib, ... }:
{
# A setup which would clean root subvolume between boots remove automatically removed roots that
@ -36,7 +36,8 @@
"ssh_host_ed25519_key"
];
environment.persistence."/persistent/system" = {
environment.persistence = {
"/persistent/system" = {
hideMounts = true;
directories = [
"/var/lib/bluetooth"
@ -52,4 +53,16 @@
"/etc/ssh/ssh_host_ed25519_key.pub"
];
};
"/persistent/docker" = lib.mkIf config.virtualisation.docker.enable {
hideMounts = true;
directories = map (v: "/var/lib/docker/${v}") [
"containers"
"volumes"
"image"
"overlay2"
"network"
];
files = [ "/var/lib/docker/engine-id" ];
};
};
}