parent
c9951e3774
commit
1641ade4b2
2 changed files with 8 additions and 2 deletions
|
@ -23,9 +23,13 @@ in {
|
||||||
# Set your time zone
|
# Set your time zone
|
||||||
time.timeZone = "Europe/Rome";
|
time.timeZone = "Europe/Rome";
|
||||||
|
|
||||||
build.activation.sshd = ''
|
build.activation.sshd = let
|
||||||
|
hosts = (builtins.import ../../lib).keys.hosts;
|
||||||
|
in ''
|
||||||
$DRY_RUN_CMD mkdir $VERBOSE_ARG --parents "${config.user.home}/.ssh"
|
$DRY_RUN_CMD mkdir $VERBOSE_ARG --parents "${config.user.home}/.ssh"
|
||||||
$DRY_RUN_CMD cat ${pathToPubKey} > "${config.user.home}/.ssh/authorized_keys"
|
$DRY_RUN_CMD echo ${hosts.picard} > "${config.user.home}/.ssh/authorized_keys"
|
||||||
|
$DRY_RUN_CMD echo ${hosts.sisko} >> "${config.user.home}/.ssh/authorized_keys"
|
||||||
|
$DRY_RUN_CMD echo ${hosts.kirk} >> "${config.user.home}/.ssh/authorized_keys"
|
||||||
|
|
||||||
if [[ ! -d "${sshdDirectory}" ]]; then
|
if [[ ! -d "${sshdDirectory}" ]]; then
|
||||||
$DRY_RUN_CMD rm $VERBOSE_ARG --recursive --force "${sshdTmpDirectory}"
|
$DRY_RUN_CMD rm $VERBOSE_ARG --recursive --force "${sshdTmpDirectory}"
|
||||||
|
|
|
@ -291,6 +291,7 @@ in {
|
||||||
internal = true;
|
internal = true;
|
||||||
default = hostname: config:
|
default = hostname: config:
|
||||||
inputs.nix-on-droid.lib.nixOnDroidConfiguration {
|
inputs.nix-on-droid.lib.nixOnDroidConfiguration {
|
||||||
|
pkgs = inputs.nixpkgsUnstable.legacyPackages.aarch64-linux;
|
||||||
modules = [
|
modules = [
|
||||||
({
|
({
|
||||||
lib,
|
lib,
|
||||||
|
@ -298,6 +299,7 @@ in {
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
nixpkgs.overlays = config.overlays;
|
nixpkgs.overlays = config.overlays;
|
||||||
|
_module.args.fleetFlake = self;
|
||||||
})
|
})
|
||||||
"${self.outPath}/hosts/${hostname}"
|
"${self.outPath}/hosts/${hostname}"
|
||||||
];
|
];
|
||||||
|
|
Loading…
Add table
Reference in a new issue