run installer as root

This commit is contained in:
Valentin Gagarin 2024-09-26 10:58:26 +02:00
parent 591dd87752
commit 6bbda4b4b3

View file

@ -5,7 +5,7 @@
*/ */
nixpkgs: machine: nixpkgs: machine:
let let
installer = { config, pkgs, ... }: installer = { config, pkgs, lib, ... }:
let let
bootstrap = pkgs.writeShellApplication { bootstrap = pkgs.writeShellApplication {
name = "bootstrap"; name = "bootstrap";
@ -21,6 +21,7 @@ nixpkgs: machine:
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix" "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"
]; ];
nixpkgs.hostPlatform = "x86_64-linux"; nixpkgs.hostPlatform = "x86_64-linux";
services.getty.autologinUser = lib.mkForce "root";
programs.bash.loginShellInit = '' programs.bash.loginShellInit = ''
${nixpkgs.lib.getExe bootstrap} ${nixpkgs.lib.getExe bootstrap}
''; '';