aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPreston Pan <ret2pop@gmail.com>2025-01-09 02:10:54 -0800
committerPreston Pan <ret2pop@gmail.com>2025-01-09 02:10:54 -0800
commit6bcb69df8eb40a95bd758a5775eb9afdd86239ae (patch)
treee775faf33e430dc96d18092e9841f3c370beb7a9
parent04155acbb8967f2425d9b7a690890e6178fc898a (diff)
iso built
-rw-r--r--.gitignore3
-rw-r--r--iso.nix33
2 files changed, 16 insertions, 20 deletions
diff --git a/.gitignore b/.gitignore
index 4c7f2b9..305e3b2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
-hardware-configuration.nix \ No newline at end of file
+hardware-configuration.nix
+result/** \ No newline at end of file
diff --git a/iso.nix b/iso.nix
index 40c1b70..95d0750 100644
--- a/iso.nix
+++ b/iso.nix
@@ -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"
''
)
];