From 29e40eb4e4dc69ac365db617f2f88ea0cccda29e Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Thu, 7 Mar 2024 16:50:35 +0100 Subject: [PATCH] Disable OpenSSH in Lagarto Hun --- configuration.nix | 3 --- fpga/boot.sh | 5 ++++- lagarto-hun.nix | 10 ++++++++++ vm.nix | 3 +++ 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/configuration.nix b/configuration.nix index de6d5d9..85296fa 100644 --- a/configuration.nix +++ b/configuration.nix @@ -12,9 +12,6 @@ networking.hostName = "nixos-riscv"; - # Enable ssh on boot - services.openssh.enable = true; - system.stateVersion = "24.05"; services.getty.autologinUser = "test"; diff --git a/fpga/boot.sh b/fpga/boot.sh index 9cb5015..2de91b4 100755 --- a/fpga/boot.sh +++ b/fpga/boot.sh @@ -5,5 +5,8 @@ set -e source ./env.sh -./fpgactl -b opensbi.bin -k kernel.bin -i initrd.bin +#bitstream="-w system-acme_ea-4h2v.bit" + +./fpgactl $bitstream -b opensbi.bin -k kernel.bin -i initrd.bin -r rootfs.img + picocom -b 115200 /dev/ttyUSB2 diff --git a/lagarto-hun.nix b/lagarto-hun.nix index 1fececa..0e866ba 100644 --- a/lagarto-hun.nix +++ b/lagarto-hun.nix @@ -47,6 +47,16 @@ }; }; + # No network + services.openssh.enable = false; + + # Run getty on /dev/console and restartt until it works + systemd.services."serial-getty@console" = { + enable = true; + wantedBy = [ "getty.target" ]; # to start at boot + serviceConfig.Restart = "always"; + }; + sdImage = { # The image will be loaded as-is in memory, so no compression compressImage = false; diff --git a/vm.nix b/vm.nix index e6d344f..ff03e65 100644 --- a/vm.nix +++ b/vm.nix @@ -7,6 +7,9 @@ "${modulesPath}/virtualisation/qemu-vm.nix" ]; + # Enable ssh on boot + services.openssh.enable = true; + boot = { kernelParams = [ "console=tty1"