View flake.nix
This file contains 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
# https://www.tweag.io/blog/2020-07-31-nixos-flakes/ | |
# To switch from channels to flakes execute: | |
# cd /etc/nixos | |
# sudo wget -O flake.nix https://gist.githubusercontent.com/misuzu/80af74212ba76d03f6a7a6f2e8ae1620/raw/flake.nix | |
# sudo git init | |
# sudo git add . # won't work without this | |
# nix-shell -p nixFlakes --run "sudo nix --experimental-features 'flakes nix-command' build .#nixosConfigurations.$(hostname).config.system.build.toplevel" | |
# sudo ./result/bin/switch-to-configuration switch |