1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-10 23:00:39 +02:00

feat(guests): derive stable machine-id for containers; always start sshd in containers

This commit is contained in:
oddlama 2023-12-19 01:15:51 +01:00
parent 054103a004
commit eafe3b673c
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
6 changed files with 74 additions and 43 deletions

View file

@ -109,7 +109,9 @@ in {
environment.persistence."/persist" = {
hideMounts = true;
files = [
"/etc/machine-id"
# For ephemeral nixos-containers we cannot link the /etc/machine-id file,
# because it will be generated based on a stable container uuid.
(lib.mkIf (!config.boot.isContainer) "/etc/machine-id")
"/etc/ssh/ssh_host_ed25519_key"
"/etc/ssh/ssh_host_ed25519_key.pub"
];