From 6086f27263e9456b80826ba576be3d44f5c19368 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 21 Jun 2024 16:51:40 +0200 Subject: [PATCH] fix fake-etc build on machines without sandbox If we have no sandbox enabled or on macos with sandbox enabled, /etc contains a lot more files than we actually want. Instead of copying some random files, we now just create those files ourself. --- nixosModules/clanCore/facts/default.nix | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/nixosModules/clanCore/facts/default.nix b/nixosModules/clanCore/facts/default.nix index 51a44a48..841eeb90 100644 --- a/nixosModules/clanCore/facts/default.nix +++ b/nixosModules/clanCore/facts/default.nix @@ -123,13 +123,23 @@ # prepare sandbox user mkdir -p /etc - cp ${ - pkgs.runCommand "fake-etc" { } '' - export PATH="${pkgs.coreutils}/bin" - mkdir -p $out - cp /etc/* $out/ - '' - }/* /etc/ + + cat > /etc/group < /etc/passwd < /etc/hosts <