From dd4fd233456245807d5318ba4c7d8012299d0d82 Mon Sep 17 00:00:00 2001 From: Appelmans Date: Mon, 25 Nov 2024 17:18:21 -0800 Subject: [PATCH 1/3] Installs nix in ktls buildspec --- codebuild/spec/buildspec_al2023_ktls.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/codebuild/spec/buildspec_al2023_ktls.yml b/codebuild/spec/buildspec_al2023_ktls.yml index 6b95d5df73b..e6e19c97953 100644 --- a/codebuild/spec/buildspec_al2023_ktls.yml +++ b/codebuild/spec/buildspec_al2023_ktls.yml @@ -11,8 +11,10 @@ phases: - yum update -y; yum upgrade -y pre_build: commands: - # Nix is installed, but intentionally not setup for root, fix that - - cp -aR /home/nix/.nix-profile ~/; chown -R root /root/.nix-profile; export PATH=$HOME/.nix-profile/bin:$PATH + # Install nix + - sh <(curl -L https://nixos.org/nix/install) --no-daemon + # Ensure nix command can be found + - . /root/.nix-profile/etc/profile.d/nix.sh # Turn on flakes - mkdir -p ~/.config/nix; echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf # Populate the store from the nix cache From c738cedc179a030f3d0023e21c847a68ab089536 Mon Sep 17 00:00:00 2001 From: Appelmans Date: Mon, 25 Nov 2024 17:29:39 -0800 Subject: [PATCH 2/3] Fixes --- codebuild/spec/buildspec_al2023_ktls.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/codebuild/spec/buildspec_al2023_ktls.yml b/codebuild/spec/buildspec_al2023_ktls.yml index e6e19c97953..0f2975a341b 100644 --- a/codebuild/spec/buildspec_al2023_ktls.yml +++ b/codebuild/spec/buildspec_al2023_ktls.yml @@ -11,10 +11,9 @@ phases: - yum update -y; yum upgrade -y pre_build: commands: - # Install nix - sh <(curl -L https://nixos.org/nix/install) --no-daemon - # Ensure nix command can be found - - . /root/.nix-profile/etc/profile.d/nix.sh + # Nix is installed, but intentionally not setup for root, fix that + - chown -R root /root/.nix-profile; export PATH=$HOME/.nix-profile/bin:$PATH # Turn on flakes - mkdir -p ~/.config/nix; echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf # Populate the store from the nix cache From 80bcbf9781ecfbb88cfc953667c832ce4a06dcd4 Mon Sep 17 00:00:00 2001 From: Appelmans Date: Mon, 25 Nov 2024 17:31:38 -0800 Subject: [PATCH 3/3] Comments --- codebuild/spec/buildspec_al2023_ktls.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/codebuild/spec/buildspec_al2023_ktls.yml b/codebuild/spec/buildspec_al2023_ktls.yml index 0f2975a341b..df7b73f12e8 100644 --- a/codebuild/spec/buildspec_al2023_ktls.yml +++ b/codebuild/spec/buildspec_al2023_ktls.yml @@ -11,9 +11,10 @@ phases: - yum update -y; yum upgrade -y pre_build: commands: + # Install nix - sh <(curl -L https://nixos.org/nix/install) --no-daemon - # Nix is installed, but intentionally not setup for root, fix that - - chown -R root /root/.nix-profile; export PATH=$HOME/.nix-profile/bin:$PATH + # Make sure nix exists in the PATH + - export PATH=$HOME/.nix-profile/bin:$PATH # Turn on flakes - mkdir -p ~/.config/nix; echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf # Populate the store from the nix cache