From 1804b8ecd2dcd822fdd6185aeb84fb4c2a5064c6 Mon Sep 17 00:00:00 2001
From: Daiderd Jordan <daiderd@gmail.com>
Date: Sun, 25 Oct 2020 16:02:23 +0100
Subject: [PATCH] include etc in activate-system

Since the etc actiation now includes a content whitelist files might get
replaced automatically after system updates.  So including it in the
activation here should resolve most issues.
---
 modules/services/activate-system/default.nix | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/services/activate-system/default.nix b/modules/services/activate-system/default.nix
index f8b30434..5d720063 100644
--- a/modules/services/activate-system/default.nix
+++ b/modules/services/activate-system/default.nix
@@ -25,6 +25,8 @@ in
         set -o pipefail
         export PATH="${pkgs.gnugrep}/bin:${pkgs.coreutils}/bin:@out@/sw/bin:/usr/bin:/bin:/usr/sbin:/sbin"
 
+        systemConfig=$(cat ${config.system.profile}/systemConfig)
+
         # Make this configuration the current configuration.
         # The readlink is there to ensure that when $systemConfig = /system
         # (which is a symlink to the store), /run/current-system is still
@@ -34,6 +36,7 @@ in
         # Prevent the current configuration from being garbage-collected.
         ln -sfn /run/current-system /nix/var/nix/gcroots/current-system
 
+        ${config.system.activationScripts.etc.text}
         ${config.system.activationScripts.keyboard.text}
       '';
       serviceConfig.RunAtLoad = true;