mirror of
https://gitlab.com/TECHNOFAB/coder-templates.git
synced 2025-12-12 02:00:11 +01:00
fix(image): fix default profile link + stop linking it to user profile
This commit is contained in:
parent
59b9800e53
commit
e8f02cfd74
1 changed files with 7 additions and 6 deletions
13
image.nix
13
image.nix
|
|
@ -96,8 +96,10 @@
|
|||
echo "coder:100000:65536" > $out/etc/subgid
|
||||
|
||||
ln -s ${profile} $out/nix/var/nix/profiles/default-1-link
|
||||
ln -s $out/nix/var/nix/profiles/default-1-link $out/nix/var/nix/profiles/default
|
||||
ln -s /nix/var/nix/profiles/default $out/home/coder/.nix-profile
|
||||
ln -s /nix/var/nix/profiles/default-1-link $out/nix/var/nix/profiles/default
|
||||
|
||||
# prevents the profiles from being cleaned up by the GC
|
||||
ln -s /nix/var/nix/profiles $out/nix/var/nix/gcroots/profiles
|
||||
|
||||
ln -s ${pkgs.coreutils}/bin/env $out/usr/bin/env
|
||||
ln -s ${pkgs.bashInteractive}/bin/bash $out/bin/sh
|
||||
|
|
@ -113,9 +115,6 @@ in
|
|||
|
||||
uid = 1000;
|
||||
gid = 1000;
|
||||
extraCommands = ''
|
||||
ln -s /nix/var/nix/profiles nix/var/nix/gcroots/profiles
|
||||
'';
|
||||
fakeRootCommands = ''
|
||||
chown -R 1000:1000 ./
|
||||
chmod 1777 tmp
|
||||
|
|
@ -123,7 +122,7 @@ in
|
|||
'';
|
||||
|
||||
config = {
|
||||
Cmd = ["/home/coder/.nix-profile/bin/bash"];
|
||||
Cmd = ["/bin/bash"];
|
||||
User = "1000:1000";
|
||||
Env = [
|
||||
"USER=coder"
|
||||
|
|
@ -132,6 +131,8 @@ in
|
|||
"XDG_RUNTIME_DIR=/tmp"
|
||||
"PATH=${lib.concatStringsSep ":" [
|
||||
"/home/coder/.nix-profile/bin"
|
||||
# this makes all the packages defined at the top available
|
||||
# in the workspace
|
||||
"/nix/var/nix/profiles/default/bin"
|
||||
"/nix/var/nix/profiles/default/sbin"
|
||||
]}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue