diff options
author | Preston Pan <ret2pop@gmail.com> | 2025-01-16 00:13:06 -0800 |
---|---|---|
committer | Preston Pan <ret2pop@gmail.com> | 2025-01-16 00:13:06 -0800 |
commit | 2dff9d2b61244fed49136028d0e0f6ae3ae759cf (patch) | |
tree | b94dabd4a159ed19705c109cd9047a724ddbd4e2 /nix/systems/installer | |
parent | dd461e48043dabee4694e2b200f4c1d9cfdbc3d9 (diff) |
modules about done
Diffstat (limited to 'nix/systems/installer')
-rw-r--r-- | nix/systems/installer/commits.nix | 2 | ||||
-rw-r--r-- | nix/systems/installer/iso.nix | 29 |
2 files changed, 12 insertions, 19 deletions
diff --git a/nix/systems/installer/commits.nix b/nix/systems/installer/commits.nix index f652035..18089f2 100644 --- a/nix/systems/installer/commits.nix +++ b/nix/systems/installer/commits.nix @@ -1,4 +1,4 @@ { diskoCommitHash = "latest"; - toughnixCommitHash = "HEAD"; + monorepoCommitHash = "HEAD"; } diff --git a/nix/systems/installer/iso.nix b/nix/systems/installer/iso.nix index 2fcc08f..84b8560 100644 --- a/nix/systems/installer/iso.nix +++ b/nix/systems/installer/iso.nix @@ -128,33 +128,26 @@ in (writeShellScriptBin "nix_installer" '' #!/usr/bin/env bash -set -euo pipefail +set -euo pipefail if [ "$(id -u)" -eq 0 ]; then echo "ERROR! $(basename "$0") should be run as a regular user" exit 1 fi - ping -q -c1 google.com &>/dev/null && echo "online! Proceeding with the installation..." || nmtui - +cd if [ ! -d "$HOME/toughnix/" ]; then - cd $HOME - git clone https://git.nullring.xyz/toughnix.git - cd toughnix - git checkout "${commits.toughnixCommitHash}" - cd $HOME + git clone https://git.nullring.xyz/monorepo.git + cd monorepo + git checkout "${commits.monorepoCommitHash}" fi - -vim "$HOME/toughnix/systems/desktop/vars.nix" -vim "$HOME/toughnix/systems/desktop/sda-simple.nix" -sudo nix --experimental-features "nix-command flakes" run "github:nix-community/disko/${commits.diskoCommitHash}" -- --mode destroy,format,mount "$HOME/toughnix/systems/desktop/sda-simple.nix" +vim "$HOME/monorepo/nix/modules/default.nix" +vim "$HOME/monorepo/nix/modules/vars.nix" +sudo nix --experimental-features "nix-command flakes" run "github:nix-community/disko/${commits.diskoCommitHash}" -- --mode destroy,format,mount "$HOME/monorepo/nix/systems/desktop/sda-simple.nix" cd /mnt - -sudo nixos-install --flake $HOME/toughnix#continuity -sudo cp $HOME/toughnix "/mnt/home/$(ls /mnt/home/)/" -echo "Installation complete! Rebooting..." -sleep 3 -reboot +sudo nixos-install --flake $HOME/monorepo/nix#continuity +sudo cp $HOME/monorepo "/mnt/home/$(ls /mnt/home/)/" +echo "rebooting..."; sleep 3; reboot '') ]; }; |