Configured remote deployments
Also includes some misc fixes for bugs I ran into along the way.
This commit is contained in:
parent
7d8328b880
commit
58efac7f13
9 changed files with 107 additions and 32 deletions
|
@ -22,6 +22,8 @@ in {
|
|||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
nix.settings.allowed-users = ["nix-serve"];
|
||||
|
||||
services = {
|
||||
nix-serve = {
|
||||
enable = true;
|
||||
|
|
|
@ -21,22 +21,23 @@ in {
|
|||
default = [default-key];
|
||||
description = "The public keys to authorize";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf config.enable {
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
PermitRootLogin =
|
||||
if format == "install-iso"
|
||||
then true
|
||||
else false;
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
PermitRootLogin = mkDefault (
|
||||
if format == "install-iso"
|
||||
then "yes"
|
||||
else "no"
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
aa.home.extraOptions = {
|
||||
programs.openssh.authorizedKeys.keys = cfg.authorizedKeys;
|
||||
};
|
||||
aa.user.extraOptions = {
|
||||
openssh.authorizedKeys.keys = cfg.authorizedKeys;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue