From 6dd8c0e40ea2d733892ee7ffd4f6a20afef6825e Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Thu, 14 Jul 2022 18:25:00 +0300 Subject: 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 Autosubmit: tazjin Tested-by: BuildkiteCI --- users/tazjin/nixos/modules/persistence.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/users/tazjin/nixos/modules/persistence.nix b/users/tazjin/nixos/modules/persistence.nix index 5ed3683740..b864d13a8d 100644 --- a/users/tazjin/nixos/modules/persistence.nix +++ b/users/tazjin/nixos/modules/persistence.nix @@ -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" ]; }; -- cgit 1.4.1