From e757a950bfc57af9534994577fd2c9b3bd936faf Mon Sep 17 00:00:00 2001 From: Emmet Date: Sun, 25 Feb 2024 13:04:02 -0600 Subject: [PATCH] Retesting install.sh as script bin --- flake.nix | 4 +--- install.sh | 20 +++++++++----------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/flake.nix b/flake.nix index 99037f7d..afed8b76 100644 --- a/flake.nix +++ b/flake.nix @@ -127,9 +127,7 @@ { default = self.packages.${system}.install; - install = pkgs.writeScriptBin "install" '' - echo "echo works" - ''; + install = pkgs.writeScriptBin "install" ./install.sh; }); apps = forAllSystems (system: { diff --git a/install.sh b/install.sh index 9e0efb17..1c381971 100755 --- a/install.sh +++ b/install.sh @@ -2,14 +2,12 @@ # Automated script to install my dotfiles -echo "echo works" - -# nix-shell -p git --command "git clone https://gitlab.com/librephoenix/nixos-config ~/.dotfiles" -# sudo nixos-generate-config --show-hardware-config > ~/.dotfiles/system/hardware-configuration.nix -# if [ -z "$EDITOR" ]; then -# EDITOR=nano; -# fi -# $EDITOR ~/.dotfiles/flake.nix; -# sudo nixos-rebuild switch --flake ~/.dotfiles#system; -# nix run home-manager/master -- switch --flake ~/.dotfiles#user; -# sudo ~/.dotfiles/harden.sh; +nix-shell -p git --command "git clone https://gitlab.com/librephoenix/nixos-config ~/.dotfiles" +sudo nixos-generate-config --show-hardware-config > ~/.dotfiles/system/hardware-configuration.nix +if [ -z "$EDITOR" ]; then + EDITOR=nano; +fi +$EDITOR ~/.dotfiles/flake.nix; +sudo nixos-rebuild switch --flake ~/.dotfiles#system; +nix run home-manager/master -- switch --flake ~/.dotfiles#user; +sudo ~/.dotfiles/harden.sh;