Compare commits

...

2 Commits

2 changed files with 8 additions and 3 deletions

View File

@ -6,6 +6,7 @@ let
_boot = specialArgs._boot or { };
_services = specialArgs._services or { };
includeHardware = specialArgs.includeHardware or true;
proj_root = builtins.toString ./../..;
in
with lib;
{
@ -36,7 +37,7 @@ with lib;
};
users.users.root = {
# openssh runs in root, no? This is because port < 1024 requires root.
openssh.authorizedKeys.keys = lib.strings.splitString "\n" (builtins.readFile ../ssh/authorized_keys);
openssh.authorizedKeys.keys = lib.strings.splitString "\n" (builtins.readFile "${proj_root}/ssh/authorized_keys");
};
# Some basic programs

View File

@ -7,8 +7,12 @@ set -xv
HOSTNAME=${1}
if [ -z $HOSTNAME ]; then
echo "Missing hostname as first param" 1>&2
exit 1
current_hostname=$(hostname)
echo "Missing hostname as first param."
echo "Type the hostname you want to be here"
read -p "[${current_hostname}] > " HOSTNAME
HOSTNAME=${HOSTNAME:-${current_hostname}}
read -p "Using hostname: ${HOSTNAME}. Press ENTER to continue." _WHATEVER_
fi
# Where is this script located