2023-07-21 09:23:10 +00:00
|
|
|
{ lib
|
2023-07-21 09:14:54 +00:00
|
|
|
, pkgs
|
|
|
|
, ...
|
2023-07-12 17:50:23 +00:00
|
|
|
}: {
|
2023-07-07 13:55:13 +00:00
|
|
|
systemd.tmpfiles.rules = [
|
|
|
|
"d /var/shared 0777 root root - -"
|
|
|
|
];
|
|
|
|
services.openssh.settings.PermitRootLogin = "yes";
|
|
|
|
system.activationScripts.root-password = ''
|
|
|
|
${pkgs.pwgen}/bin/pwgen -s 16 1 > /var/shared/root-password
|
|
|
|
echo "root:$(cat /var/shared/root-password)" | chpasswd
|
|
|
|
'';
|
|
|
|
hidden-announce = {
|
|
|
|
enable = true;
|
|
|
|
script = pkgs.writers.writeDash "write-hostname" ''
|
|
|
|
echo "$1" > /var/shared/onion-hostname
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
services.getty.autologinUser = lib.mkForce "root";
|
|
|
|
programs.bash.interactiveShellInit = ''
|
|
|
|
if [ "$(tty)" = "/dev/tty1" ]; then
|
|
|
|
echo "ssh://root:$(cat /var/shared/root-password)@$(cat /var/shared/onion-hostname)"
|
|
|
|
fi
|
|
|
|
'';
|
2023-07-07 14:05:20 +00:00
|
|
|
formatConfigs.install-iso = {
|
|
|
|
isoImage.squashfsCompression = "zstd -Xcompression-level 1";
|
|
|
|
};
|
2023-07-07 13:55:13 +00:00
|
|
|
}
|