initial retooling #1

Merged
naturallaw777 merged 1130 commits from staging-dev into stable 2026-05-21 08:10:11 -05:00
Showing only changes of commit 13598f5465 - Show all commits
+4 -5
View File
@@ -3,15 +3,15 @@
let
userName = "free";
keyPath = "/home/${userName}/.ssh/factory_login";
userExists = builtins.hasAttr userName config.users.users;
in
{
# Ensure SSH dirs exist with correct perms
lib.mkIf userExists {
systemd.tmpfiles.rules = [
"d /root/.ssh 0700 root root -"
"d /home/${userName}/.ssh 0700 ${userName} users -"
];
# Generate keypair if missing (runs once)
systemd.services.factory-ssh-keygen = {
description = "Generate factory SSH key for ${userName} if missing";
wantedBy = [ "multi-user.target" ];
@@ -30,7 +30,6 @@ in
'';
};
# Pull the public key into root's authorized_keys once it exists
systemd.services.factory-ssh-authorize = {
description = "Authorize factory SSH key for root";
wantedBy = [ "multi-user.target" ];
@@ -51,4 +50,4 @@ in
fi
'';
};
}
}