This commit is contained in:
catvayor 2024-10-01 11:00:15 +02:00
parent ae78f9aafd
commit 8c97f3e257
Signed by: lbailly
GPG key ID: CE3E645251AC63F3

View file

@ -1,9 +1,53 @@
{ pkgs, ... }: { pkgs, ... }:
let let
inherit (pkgs.pseudofile) dir symlink; inherit (pkgs.pseudofile) dir symlink;
"getty.service" = {
file =
let
login = pkgs.writeScript "login" ''
#!/bin/ash
exec /bin/ash
'';
in
''
[Unit]
Description="Serial shell"
[Service]
ExecStart=${pkgs.util-linux}/bin/agetty --login-program ${login} ttyS0
'';
mode = "0644";
};
"default.target" = {
file = ''
[Unit]
Description="target to boot"
Wants=getty.service
After=getty.service
AllowIsolate=yes
'';
};
"sysinit.target" = {
file = ''
[Unit]
Description="sysinit.target"
'';
};
in in
{ {
config = { config = {
kernel.config = {
CGROUPS = "y";
DEVTMPFS = "y";
INOTIFY_USER = "y";
SIGNALFD = "y";
TIMERFD = "y";
EPOLL = "y";
UNIX = "y";
SYSFS = "y";
PROC_FS = "y";
FHANDLE = "y";
};
boot.commandLine = [ boot.commandLine = [
"systemd.log_level=7" "systemd.log_level=7"
#"systemd.crash_shell=true" #"systemd.crash_shell=true"
@ -11,9 +55,8 @@ in
filesystem = dir { filesystem = dir {
etc = dir { etc = dir {
systemd = dir { systemd = dir {
"system.conf" = { system = dir {
file = ''''; inherit "default.target" "getty.service" "sysinit.target";
mode = "0444";
}; };
}; };
}; };