From 00e2703aca423e1087dc2d1819d16f1d5cdc1601 Mon Sep 17 00:00:00 2001 From: Thomas Kosiewski Date: Tue, 18 Feb 2025 16:24:47 +0100 Subject: [PATCH] fix(flake.nix): add procps to nix dogfood image (#16607) Add procps to flake.nix and release name to Docker image Adds the `procps` package to flake.nix to enable the `free` command, and includes a release name file in the Docker image at `/etc/coderniximage-release`. Change-Id: I85432acc06a204229fa3675e0020bd3acacf775a Signed-off-by: Thomas Kosiewski --- flake.nix | 1 + nix/docker.nix | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/flake.nix b/flake.nix index 62260214f1..e5ce3d4a79 100644 --- a/flake.nix +++ b/flake.nix @@ -281,6 +281,7 @@ unzip zip gzip + procps # free ]) ++ oldAttrs.buildInputs; }); diff --git a/nix/docker.nix b/nix/docker.nix index 785fb3283b..84c1a34e79 100644 --- a/nix/docker.nix +++ b/nix/docker.nix @@ -50,6 +50,10 @@ let experimental-features = nix-command flakes ''; + etcReleaseName = writeTextDir "etc/coderniximage-release" '' + 0.0.0 + ''; + etcPamdSudoFile = writeText "pam-sudo" '' # Allow root to bypass authentication (optional) auth sufficient pam_rootok.so @@ -271,6 +275,7 @@ let etcNixConf etcSudoers etcPamdSudo + etcReleaseName (fakeNss.override { # Allows programs to look up the build user's home directory # https://github.com/NixOS/nix/blob/ffe155abd36366a870482625543f9bf924a58281/src/libstore/build/local-derivation-goal.cc#L906-L910