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
|
@ -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 =
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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; {
|
||||
|
|
|
@ -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>.";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue