quick-setup.nix 504 B

12345678910111213141516171819202122232425
  1. {
  2. coreutils,
  3. git,
  4. lib,
  5. nix,
  6. writeShellScriptBin,
  7. }:
  8. let
  9. mkdirBin = lib.getExe' coreutils "mkdir";
  10. rmBin = lib.getExe' coreutils "rm";
  11. gitBin = lib.getExe git;
  12. nixBin = lib.getExe nix;
  13. in
  14. writeShellScriptBin "quick-setup" ''
  15. set -e
  16. ${mkdirBin} -p ~/workspace/control
  17. cd ~/workspace/control
  18. ${gitBin} clone [email protected]:control/home
  19. cd home
  20. ${rmBin} -r ~/.config/fish/
  21. ${nixBin} run github:nix-community/home-manager -- \
  22. switch --flake .#$(whoami)@$(hostname)
  23. ''