From 3f1e51533a51536b5beda0a3dc73a17c7bde6c39 Mon Sep 17 00:00:00 2001 From: zimbatm Date: Fri, 20 Dec 2019 22:07:10 +0100 Subject: [PATCH] devcontainer: add grep and direnv --- images/devcontainer/default.nix | 21 +++++++++++---------- images/devcontainer/root/etc/bashrc | 2 ++ 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/images/devcontainer/default.nix b/images/devcontainer/default.nix index 13e272b..088bbcd 100644 --- a/images/devcontainer/default.nix +++ b/images/devcontainer/default.nix @@ -5,9 +5,11 @@ , cacert , coreutils , curl +, direnv , gcc-unwrapped , gitReallyMinimal , glibc +, gnugrep , gnutar , gzip , iana-etc @@ -44,10 +46,15 @@ let # for user management shadow + # more userland tools + gnugrep + direnv + # for the vscode extension gcc-unwrapped iproute sedutil + ]; }; @@ -73,20 +80,14 @@ let # might as well... ln -s /nix/var/nix/profiles/default/bin/bash bin/bash + # setup shadow, bashrc + cp -r ${./root/etc} etc + chmod +w etc etc/group etc/passwd etc/shadow + # setup iana-etc for haskell binaries - mkdir etc ln -s /nix/var/nix/profiles/default/etc/protocols etc/protocols ln -s /nix/var/nix/profiles/default/etc/services etc/services - # setup shadow - mkdir etc/pam.d - cp ${./root/etc/bashrc} etc/bashrc - cp ${./root/etc/group} etc/group - cp ${./root/etc/passwd} etc/passwd - cp ${./root/etc/shadow} etc/shadow - cp ${./root/etc/nsswitch.conf} etc/nsswitch.conf - cp ${./root/etc/pam.d/other} etc/pam.d/other - # make sure /tmp exists mkdir -m 0777 tmp diff --git a/images/devcontainer/root/etc/bashrc b/images/devcontainer/root/etc/bashrc index 814bc54..f5c1ee7 100644 --- a/images/devcontainer/root/etc/bashrc +++ b/images/devcontainer/root/etc/bashrc @@ -3,4 +3,6 @@ if [[ $- == *i* ]]; then PS1='\[\033[0;32;40m\][nix]$\[\033[0m\] ' +# setup direnv +eval "$(direnv hook bash)" fi