Last active
July 27, 2020 23:31
-
-
Save thomasjm/34359046fbb036453b0932dfa6830b8c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:20.04 | |
RUN apt-get update | |
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y sudo curl emacs git | |
RUN mkdir /nix | |
RUN chmod a+rwx /nix | |
RUN adduser user --home /home/user --disabled-password --gecos "" --shell /bin/bash | |
USER user | |
WORKDIR /home/user | |
RUN curl -L https://nixos.org/nix/install | sh | |
ENV NIX_SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt | |
ENV NIX_PATH=/home/user/.nix-defexpr/channels | |
ENV NIX_PROFILES="/nix/var/nix/profiles/default /home/user/.nix-profile" | |
ENV PATH="/home/user/.nix-profile/bin:$PATH" | |
COPY nix_static.nix nix_static.nix | |
RUN nix-build nix_static.nix |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
nixpkgs = builtins.fetchGit { | |
url = "https://github.com/NixOS/nixpkgs.git"; | |
rev = "a6133b7a396816e3e9248ee657f21e4245607e75"; # f1680774340d5443a1409c3421ced84ac1163ba9"; | |
ref = "master"; | |
}; | |
config = { | |
nix = { | |
storeDir = "/nix_frozen/store"; | |
stateDir = "/nix_frozen/var"; | |
}; | |
}; | |
pkgs = import nixpkgs { inherit config; }; | |
in | |
pkgs.pkgsStatic.nix |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment