diff options
author | Preston Pan <ret2pop@gmail.com> | 2025-01-09 02:10:54 -0800 |
---|---|---|
committer | Preston Pan <ret2pop@gmail.com> | 2025-01-09 02:10:54 -0800 |
commit | 6bcb69df8eb40a95bd758a5775eb9afdd86239ae (patch) | |
tree | e775faf33e430dc96d18092e9841f3c370beb7a9 /iso.nix | |
parent | 04155acbb8967f2425d9b7a690890e6178fc898a (diff) |
iso built
Diffstat (limited to 'iso.nix')
-rw-r--r-- | iso.nix | 33 |
1 files changed, 14 insertions, 19 deletions
@@ -1,10 +1,5 @@ -{ pkgs, ... }: +{ pkgs, lib, ... }: { - imports = - [ - ./hardware-configuration.nix - ]; - documentation = { enable = true; man.enable = true; @@ -22,6 +17,7 @@ networking = { hostName = "iso"; + wireless.enable = lib.mkForce false; networkmanager = { enable = true; # wifi.macAddress = ""; @@ -88,8 +84,8 @@ enable = true; settings = { PasswordAuthentication = true; - AllowUsers = [ ]; - PermitRootLogin = "no"; + AllowUsers = [ "nixos" ]; + PermitRootLogin = "yes"; KbdInteractiveAuthentication = false; }; }; @@ -133,23 +129,22 @@ if [ "$(id -u)" -eq 0 ]; then echo "ERROR! $(basename "$0") should be run as a regular user" exit 1 fi + if [ ! -d "$HOME/toughnix/" ]; then cd $HOME git clone https://git.nullring.xyz/toughnix.git fi +sudo nixos-generate-config +sudo cp /etc/nixos/hardware-configuration.nix ~/toughnix/ +sudo chown -R nixos:users "$HOME/toughnix" +cd "$HOME/toughnix" +git add . +cd "$HOME" +vim "$HOME/toughnix/vars.nix" gum confirm --default=false \ -"🔥 🔥 🔥 WARNING!!!! This will ERASE ALL DATA on the disk $TARGET_HOST. Are you sure you want to continue?" - -echo "Partitioning Disks" -sudo nix run github:nix-community/disko \ - --extra-experimental-features "nix-command flakes" \ - --no-write-lock-file \ - -- \ - --mode zap_create_mount \ - "$HOME/toughnix/disk-config.nix" - -sudo nixos-install --flake "$HOME/toughnix#.continuity-dell + "🔥 🔥 🔥 WARNING!!!! This will ERASE ALL DATA on the disk $DISK. Are you sure you want to continue?" +sudo nix run 'github:nix-community/disko/latest#disko-install' -- --write-efi-boot-entries --flake './toughnix#continuity-dell' --disk main "$DISK" '' ) ]; |