skipper: symlink /etc/machine-id instead of bind-mount

This commit is contained in:
Adithya 2024-11-16 19:30:35 +05:30
parent f97c01a604
commit 9ca9fb8ae3
Signed by: adtya
GPG key ID: B8857BFBA2C47B9C

View file

@ -1,25 +1,35 @@
_: {
environment.persistence."/persist/system" = {
hideMounts = true;
directories = [
"/etc/NetworkManager/system-connections"
"/etc/systemd/nspawn"
"/root/.local/share/nix"
"/var/cache/fwupd"
"/var/lib/bluetooth"
"/var/lib/btrfs"
"/var/lib/fwupd"
"/var/lib/iwd"
"/var/lib/libvirt"
"/var/lib/machines"
"/var/lib/NetworkManager"
"/var/lib/nixos"
"/var/lib/portables"
"/var/lib/systemd"
"/var/log"
];
files = [
"/etc/machine-id"
];
_:
let
persistant-path = "/persist/system";
in
{
environment = {
etc = {
"machine-id" = {
enable = true;
source = "${persistant-path}/machine-id";
mode = "symlink";
};
};
persistence."${persistant-path}" = {
hideMounts = true;
directories = [
"/etc/NetworkManager/system-connections"
"/etc/systemd/nspawn"
"/root/.local/share/nix"
"/var/cache/fwupd"
"/var/lib/bluetooth"
"/var/lib/btrfs"
"/var/lib/fwupd"
"/var/lib/iwd"
"/var/lib/libvirt"
"/var/lib/machines"
"/var/lib/NetworkManager"
"/var/lib/nixos"
"/var/lib/portables"
"/var/lib/systemd"
"/var/log"
];
};
};
}