Skip to content

Commit

Permalink
Preserve UIDs and GIDs between reboots on ephemeral systems (#101)
Browse files Browse the repository at this point in the history
On ephemeral systems, users and groups are recreated on each boot.
Therefore, adding new users or groups may shuffle UIDs and GIDs and
break persisted file permissions.

Persisting /var/lib/nixos is sufficient to preserve UIDs and GIDs
between boot.
  • Loading branch information
NoRePercussions authored Sep 24, 2024
1 parent 807b8cf commit c37c20f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions hosts/marlon/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@

directories = [
"/var/log"
"/var/lib/nixos" # preserve uids/gids between reboots
];
};
}
1 change: 1 addition & 0 deletions hosts/roland/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@

directories = [
"/var/log"
"/var/lib/nixos" # preserve uids/gids between reboots
];
};
}

0 comments on commit c37c20f

Please sign in to comment.