summary refs log tree commit diff
path: root/nixos/modules/profiles
diff options
context:
space:
mode:
authoradisbladis <adisbladis@gmail.com>2020-04-25 16:25:15 +0200
committerGitHub <noreply@github.com>2020-04-25 16:25:15 +0200
commit1ca69095145758d51cb9b0f086d5fa7dd3fe65ca (patch)
treee31eb56b2f87204da679157297820f4bda682d76 /nixos/modules/profiles
parent002b553b14280e69f9f6654bc806c16002756b0b (diff)
parent757c7f377326205f3e04afe5d053c371600457f7 (diff)
downloadnixpkgs-1ca69095145758d51cb9b0f086d5fa7dd3fe65ca.tar
nixpkgs-1ca69095145758d51cb9b0f086d5fa7dd3fe65ca.tar.gz
nixpkgs-1ca69095145758d51cb9b0f086d5fa7dd3fe65ca.tar.bz2
nixpkgs-1ca69095145758d51cb9b0f086d5fa7dd3fe65ca.tar.lz
nixpkgs-1ca69095145758d51cb9b0f086d5fa7dd3fe65ca.tar.xz
nixpkgs-1ca69095145758d51cb9b0f086d5fa7dd3fe65ca.tar.zst
nixpkgs-1ca69095145758d51cb9b0f086d5fa7dd3fe65ca.zip
Merge pull request #74378 from ttuegel/lxc-container
docker-container: Remove /etc symlink
Diffstat (limited to 'nixos/modules/profiles')
-rw-r--r--nixos/modules/profiles/docker-container.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/nixos/modules/profiles/docker-container.nix b/nixos/modules/profiles/docker-container.nix
index 5d6b11498b5..183645de36f 100644
--- a/nixos/modules/profiles/docker-container.nix
+++ b/nixos/modules/profiles/docker-container.nix
@@ -2,6 +2,8 @@
 
 with lib;
 
+let inherit (pkgs) writeScript; in
+
 let
  pkgs2storeContents = l : map (x: { object = x; symlink = "none"; }) l;
 
@@ -30,7 +32,12 @@ in {
     ];
 
     # Some container managers like lxc need these
-    extraCommands = "mkdir -p proc sys dev";
+    extraCommands =
+      let script = writeScript "extra-commands.sh" ''
+            rm etc
+            mkdir -p proc sys dev etc
+          '';
+      in script;
   };
 
   boot.isContainer = true;