From 0661792f33389e2ef4ad86cc4c3c52249cdf4574 Mon Sep 17 00:00:00 2001 From: Vladimir Timofeenko Date: Fri, 26 Jan 2024 08:36:18 -0800 Subject: [PATCH] fix: run fixup-env during container building --- packages/ttydContainer/package.nix | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/packages/ttydContainer/package.nix b/packages/ttydContainer/package.nix index a6c1436..f49ac4e 100644 --- a/packages/ttydContainer/package.nix +++ b/packages/ttydContainer/package.nix @@ -50,7 +50,7 @@ let htop# Some monitoring ; }) - ++ [ nixConfig fixUpEnv ]; + ++ [ nixConfig ]; in pkgs.dockerTools.buildImage { name = "ttyd-container"; @@ -69,25 +69,9 @@ pkgs.dockerTools.buildImage { }) ++ commonPackages; }; - /* runAsRoot needs nix with `kvm`. This can be achieved with cachix action: - - - uses: cachix/install-nix-action@vXX - with: - extra_nix_config: "system-features = nixos-test benchmark big-parallel kvm" - - which might need udevadm action: - - - name: Enable KVM group perms - run: | - echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules - sudo udevadm control --reload-rules - sudo udevadm trigger --name-match=kvm - - source: https://github.blog/changelog/2023-02-23-hardware-accelerated-android-virtualization-on-actions-windows-and-linux-larger-hosted-runners/ - - TODO: try with cachix and try with det sys action for the magic cache. - */ - # runAsRoot = ""; + runAsRoot = '' + ${pkgs.lib.getExe fixUpEnv} + ''; architecture = "amd64";