refactor: Improve VM serial console and auto-login configuration
This commit is contained in:
20
flake.nix
20
flake.nix
@@ -76,20 +76,22 @@
|
|||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
networking.firewall.enable = false;
|
networking.firewall.enable = false;
|
||||||
|
|
||||||
|
# Serial console configuration - the RIGHT way
|
||||||
|
boot.kernelParams = [ "console=ttyS0,115200" "console=tty1" ];
|
||||||
|
|
||||||
|
# VM specific settings
|
||||||
|
virtualisation.memorySize = 4096;
|
||||||
|
virtualisation.diskSize = 40000;
|
||||||
|
|
||||||
|
# Force serial console as primary
|
||||||
|
virtualisation.qemu.options = [
|
||||||
|
"-nographic"
|
||||||
|
];
|
||||||
# Fix the auto-login conflict with mkForce
|
# Fix the auto-login conflict with mkForce
|
||||||
services.displayManager.autoLogin = lib.mkForce {
|
services.displayManager.autoLogin = lib.mkForce {
|
||||||
enable = true;
|
enable = true;
|
||||||
user = "workshop";
|
user = "workshop";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Auto-start terminal with welcome message
|
|
||||||
services.xserver.displayManager.sessionCommands = ''
|
|
||||||
${pkgs.xfce.xfce4-terminal}/bin/xfce4-terminal --fullscreen --title="Workshop Terminal" &
|
|
||||||
'';
|
|
||||||
|
|
||||||
# VM specific settings
|
|
||||||
virtualisation.memorySize = 4096; # 4GB RAM
|
|
||||||
virtualisation.diskSize = 40000; # 40GB disk
|
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user