From 5bb1b0c6a13e73902fa3c16d52c3871d442f6cfd Mon Sep 17 00:00:00 2001 From: beatzaplenty Date: Mon, 21 Jul 2025 12:08:08 +1000 Subject: [PATCH] modified: auto-installer/installer.nix --- auto-installer/installer.nix | 45 ++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 17 deletions(-) diff --git a/auto-installer/installer.nix b/auto-installer/installer.nix index 7176c1d..f21aab2 100644 --- a/auto-installer/installer.nix +++ b/auto-installer/installer.nix @@ -3,6 +3,7 @@ { imports = [ "${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix" + "../common/configuration.nix" ]; networking.useDHCP = lib.mkDefault true; @@ -53,6 +54,16 @@ environment.etc."git-credentials".text = ''; environment.etc."auto-install.sh".mode = "0755"; +environment.etc."nixos/.bash_profile".text = '' + if [[ $- == *i* ]]; then + echo "Launching installer script..." + sudo /etc/auto-install.sh + mv ~/.bash_profile ~/.bash_profile.done 2>/dev/null || true + exit + fi +''; +environment.etc."nixos/.bash_profile".mode = "0755"; + # systemd.services.autoInstallInteractive = { # description = "Interactive NixOS installer on tty1"; # conflicts = [ "getty@tty1.service" ]; @@ -68,26 +79,26 @@ environment.etc."git-credentials".text = # TTYVHangup = true; # }; -systemd.services."autovt@tty1" = { - description = "Run installer script on TTY1"; - after = [ "getty@tty1.service" ]; - wantedBy = [ "multi-user.target" ]; +# systemd.services."autovt@tty1" = { +# description = "Run installer script on TTY1"; +# after = [ "getty@tty1.service" ]; +# wantedBy = [ "multi-user.target" ]; - serviceConfig = { - ExecStart = [ "" "@${pkgs.util-linux}/sbin/agetty" "agetty --noclear --autologin root --login-program /etc/auto-install.sh %I $TERM" ]; - Type = "idle"; # wait for console initialization - Restart = "no"; - }; +# serviceConfig = { +# ExecStart = [ "" "@${pkgs.util-linux}/sbin/agetty" "agetty --noclear --autologin root --login-program /etc/auto-install.sh %I $TERM" ]; +# Type = "idle"; # wait for console initialization +# Restart = "no"; +# }; - path = [ - pkgs.bash - pkgs.parted - pkgs.util-linux - pkgs.e2fsprogs - pkgs.nixos-install - pkgs.git - ]; +# path = [ +# pkgs.bash +# pkgs.parted +# pkgs.util-linux +# pkgs.e2fsprogs +# pkgs.nixos-install +# pkgs.git +# ]; # Run script attached to tty1 # script = "exec /etc/auto-install.sh"; };