mirror of
https://gitlab.com/TECHNOFAB/coder-templates.git
synced 2025-12-11 17:50:06 +01:00
32 lines
673 B
Nix
32 lines
673 B
Nix
{
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
pkgs.dockerTools.buildImage {
|
|
name = "nix-coder";
|
|
tag = "latest";
|
|
|
|
copyToRoot = pkgs.buildEnv {
|
|
name = "image-root";
|
|
paths = [
|
|
pkgs.bashInteractive
|
|
pkgs.nixFlakes
|
|
pkgs.coreutils-full
|
|
pkgs.curl
|
|
pkgs.home-manager
|
|
pkgs.direnv
|
|
(pkgs.writeTextDir "etc/nix/nix.conf" "experimental-features = nix-command flakes")
|
|
(pkgs.writeTextDir "etc/passwd" "coder:x:1000:1000::/home/coder:/bin/bash")
|
|
];
|
|
pathsToLink = ["/bin" "/etc"];
|
|
};
|
|
|
|
config = {
|
|
Cmd = ["/bin/bash"];
|
|
Env = [
|
|
"SSL_CERT_FILE=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"
|
|
"HOME=/home/coder"
|
|
];
|
|
};
|
|
}
|