1 Nix Dockerfile
thomasave edited this page 2024-06-22 00:23:10 +02:00
FROM nixos/nix

RUN nix-env -e man-db git
RUN nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
RUN nix-channel --update
RUN nix-shell '<home-manager>' -A install
RUN nix profile install github:cachix/cachix/latest --accept-flake-config --extra-experimental-features flakes --extra-experimental-features nix-command
RUN cachix use cuda-maintainers
RUN cachix use nix-community
RUN rm ~/.config/home-manager/home.nix

RUN nix-shell -p git --command "git clone https://git.thomasave.be/thomasave/dotfiles.git ~/.dotfiles"
RUN ln -s ~/.dotfiles/home/Docker.nix ~/.config/home-manager/home.nix
RUN source ~/.nix-profile/etc/profile.d/hm-session-vars.sh
RUN home-manager switch
RUN zsh -c "nvim --headless \"+Lazy! sync\" +qa"

CMD ["zsh"]