5 ms·
I have a Makefile that I use when I need to spin up a new laptop [1]. For your description it sounds like it is functionally similar. What does nix bring that a
by revscat 5y ago
I have a Makefile that I use when I need to spin up a new laptop [1]. For your description it sounds like it is functionally similar. What does nix bring that a Makefile like this one doesn’t?
[1] https://github.com/jchilders/dotfiles/blob/main/Makefile https://github.com/jchilders/dotfiles/blob/main/Makefile
- mateuszf 5y agoI guess it's reproducible - creates a system that has exactly the same versions of all programs and all libraries.
- amarshall 5y agoDrift. Nix (effectively) does not mutate in-place, it rebuilds and links. Delete a target from that Makefile and it doesn’t actually remove that thing. It’s the same problem Ansible etc. have. It’s not till actually fully reinstalling the OS that all the implicit dependencies reveal themselves. Sure one can write “clean” targets but the point of Nix is that such manual management is unneeded.
- muxator 5y agoNot an answer to you're question, but do you feel safe doing (https://github.com/jchilders/dotfiles/blob/main/Makefile#L34 https://github.com/jchilders/dotfiles/blob/main/Makefile#L34) > sudo curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh https://raw.githubusercontent.com/Homebrew/install/master/in... | /bin/bash piping the output of a curl command to sh without first checking the sha256 of the file you just got? In a similar situation I would not be comfortable without at least getting a specific version of the tool I'm downloading and then hardcoding an hash of its content I computed after manually downloading and inspecting its content.
- kohlerm 5y agoYour Makefile is not a reproducible build. You would need to pin all the versions of the tools being used. Also as others have mentioned, Nix ensures that you do not rely on unspecified dependencies.