fix(tazjin/nixos): only persist /etc/machine-id if its unset via nix

otherwise the files end up clashing with each other, causing annoying
errors on activation

Change-Id: Iaa4df8c50aa183f4a12749c66ee1b7a746d785da
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5949
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
This commit is contained in:
Vincent Ambo 2022-07-14 18:25:00 +03:00 committed by clbot
parent 9b86f8f208
commit 6dd8c0e40e

View file

@ -1,5 +1,5 @@
# Configuration for persistent (non-home) data.
{ depot, pkgs, lib, ... }:
{ config, depot, pkgs, lib, ... }:
{
imports = [
@ -17,7 +17,7 @@
"/var/log"
];
files = [
files = lib.optional (builtins.isNull config.networking.hostId) [
"/etc/machine-id"
];
};