Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2c14ad4a2a | ||
|
|
8f7868b0a4 |
+14
-1
@@ -49,6 +49,10 @@ fi
|
|||||||
|
|
||||||
cd /bootstrap_nix
|
cd /bootstrap_nix
|
||||||
|
|
||||||
|
# fix origin
|
||||||
|
git remote remove origin
|
||||||
|
git remote add origin ssh://gitea@git.blakedheld.xyz:7567/blake/nix.git
|
||||||
|
|
||||||
# --- disk setup ---
|
# --- disk setup ---
|
||||||
if [[ "$MODE" == "1" ]]; then
|
if [[ "$MODE" == "1" ]]; then
|
||||||
echo
|
echo
|
||||||
@@ -61,6 +65,7 @@ if [[ "$MODE" == "1" ]]; then
|
|||||||
|
|
||||||
nix run github:nix-community/disko --extra-experimental-features "nix-command flakes" -- \
|
nix run github:nix-community/disko --extra-experimental-features "nix-command flakes" -- \
|
||||||
--mode destroy,format,mount \
|
--mode destroy,format,mount \
|
||||||
|
--yes-wipe-all-disks \
|
||||||
/bootstrap_nix/hosts/nixos/$HOSTNAME/disko.nix
|
/bootstrap_nix/hosts/nixos/$HOSTNAME/disko.nix
|
||||||
|
|
||||||
elif [[ "$MODE" == "2" ]]; then
|
elif [[ "$MODE" == "2" ]]; then
|
||||||
@@ -86,10 +91,11 @@ mkdir -p /mnt/home/blake/.config/sops/age
|
|||||||
|
|
||||||
# --- move config ---
|
# --- move config ---
|
||||||
echo "moving nix config into /mnt/home/blake/.nix ..."
|
echo "moving nix config into /mnt/home/blake/.nix ..."
|
||||||
cp /bootstrap_nix /mnt/home/blake/.nix
|
cp -r /bootstrap_nix /mnt/home/blake/.nix
|
||||||
#echo "moving hardware into /mnt/home/blake/.nix/hosts/nixos/$HOSTNAME ..."
|
#echo "moving hardware into /mnt/home/blake/.nix/hosts/nixos/$HOSTNAME ..."
|
||||||
#cp /mnt/etc/nixos/hardware-configuration.nix /mnt/home/blake/.nix/hosts/nixos/$HOSTNAME
|
#cp /mnt/etc/nixos/hardware-configuration.nix /mnt/home/blake/.nix/hosts/nixos/$HOSTNAME
|
||||||
|
|
||||||
|
|
||||||
# --- write age key ---
|
# --- write age key ---
|
||||||
echo "writing age key..."
|
echo "writing age key..."
|
||||||
echo "$AGE_KEY" | tee \
|
echo "$AGE_KEY" | tee \
|
||||||
@@ -117,4 +123,11 @@ echo "installation complete!"
|
|||||||
echo "set root password if needed, then reboot."
|
echo "set root password if needed, then reboot."
|
||||||
echo "after reboot: sudo chown -R blake:blake /home/blake"
|
echo "after reboot: sudo chown -R blake:blake /home/blake"
|
||||||
|
|
||||||
|
nixos-enter --root /mnt -- run --login bash <<'EOF'
|
||||||
|
set -e
|
||||||
|
chown -R blake:blake /home/blake
|
||||||
|
nixos-rebuild switch --flake /home/blake/.nix
|
||||||
|
systemd-cryptenroll --tpm2-device=auto /dev/nvme0n1p2
|
||||||
|
EOF
|
||||||
|
|
||||||
echo "fin."
|
echo "fin."
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ config, lib, inputs, stable_pkgs, unstable_pkgs, ... }:
|
{ config, lib, inputs, modulesPath, stable_pkgs, unstable_pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
pkgs = stable_pkgs.x86_64;
|
pkgs = stable_pkgs.x86_64;
|
||||||
@@ -7,7 +7,7 @@ in
|
|||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[ # Include the results of the hardware scan.
|
[ # Include the results of the hardware scan.
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
#./hardware-configuration.nix
|
#./hardware-configuration.nix
|
||||||
./disko.nix
|
./disko.nix
|
||||||
../../nixos
|
../../nixos
|
||||||
|
|||||||
Reference in New Issue
Block a user