Configured remote deployments

Also includes some misc fixes for bugs I ran into along the way.
This commit is contained in:
Alejandro Angulo 2023-04-16 10:07:42 -07:00
parent 7d8328b880
commit 58efac7f13
Signed by: alejandro-angulo
GPG key ID: 75579581C74554B6
9 changed files with 107 additions and 32 deletions

View file

@ -7,7 +7,7 @@
}:
with lib; let
cfg = config.aa.nix;
selfHostedCacheHost = "192.168.113.69";
selfHostedCacheHost = "http://192.168.113.69/";
in {
options.aa.nix = with types; {
enable = mkEnableOption "manage nix configuration.";
@ -41,7 +41,7 @@ in {
if cfg.useSelfhostedCache
then [
selfHostedCacheHost
"https://cache.nixos.org"
"https://cache.nixos.org/"
]
else [];
trusted-public-keys =

View file

@ -22,6 +22,8 @@ in {
};
config = mkIf cfg.enable {
nix.settings.allowed-users = ["nix-serve"];
services = {
nix-serve = {
enable = true;

View file

@ -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;
};
};
}

View file

@ -14,13 +14,16 @@ in {
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
alejandra
bat
curl
deploy-rs
fd
file
htop
jq
killall
pre-commit
ripgrep
usbutils
wget

View file

@ -6,7 +6,7 @@
...
}:
with lib; let
cfg = config.aa.tools.git;
cfg = config.aa.tools.gpg;
user = config.aa.user;
in {
options.aa.tools.gpg = with types; {

View file

@ -32,7 +32,7 @@ in {
extraOptions = mkOption {
type = attrs;
default = {};
description = "Extra options passed to <option>users.user.<name></option>.";
description = "Extra options passed to <option>users.users.<name></option>.";
};
};