adjustments

This commit is contained in:
Ingolf Wagner 2023-05-28 21:24:20 +02:00
parent a267afe6ef
commit 9413ff053f
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
5 changed files with 160 additions and 164 deletions

View file

@ -1,6 +1,5 @@
{ {
networking.extraHosts = '' networking.extraHosts = ''
192.168.0.24 scanner
144.76.13.147 robi 144.76.13.147 robi
''; '';
} }

View file

@ -1,11 +1,9 @@
{ pkgs, config, lib, ... }: { pkgs, config, lib, ... }:
with lib; with lib;
with types; with types;
let let
cfg = config.components.network.sshd;
defaultRootKeyFiles = [ (toString ../../../assets/ssh/palo_rsa.pub) ]; defaultRootKeyFiles = [ (toString ../../../assets/ssh/palo_rsa.pub) ];
cfg = config.components.network.sshd;
in in
{ {
@ -19,18 +17,12 @@ in
enable = mkOption { enable = mkOption {
type = bool; type = bool;
default = true; default = true;
description = "add ssh tools";
}; };
rootKeyFiles = mkOption { rootKeyFiles = mkOption {
type = with types; listOf path; type = with types; listOf path;
default = [ ]; default = [ ];
description = "keys to root login"; description = "keys to root login";
}; };
tools.enable = mkOption {
type = bool;
default = true;
description = "add ssh tools";
};
onlyTincAccess = mkOption { onlyTincAccess = mkOption {
type = bool; type = bool;
default = false; default = false;
@ -42,12 +34,10 @@ in
config = mkMerge [ config = mkMerge [
(mkIf cfg.tools.enable {
environment.systemPackages = [ pkgs.sshfs ];
})
(mkIf cfg.enable { (mkIf cfg.enable {
environment.systemPackages = [ pkgs.sshfs ];
services.openssh = { services.openssh = {
enable = true; enable = true;
forwardX11 = false; forwardX11 = false;

View file

@ -18,6 +18,8 @@ let
in in
{ {
config = mkIf (config.components.network.sshd.enable) {
services.openssh.knownHosts = { services.openssh.knownHosts = {
"robi-init-ssh" = { "robi-init-ssh" = {
hostNames = [ hostNames = [
@ -64,4 +66,5 @@ in
in in
sshTor ++ passwordTor; sshTor ++ passwordTor;
};
} }

View file

@ -1,4 +1,7 @@
{ config, lib, ... }: { { config, lib, ... }:
with lib;
{
config = mkIf (config.components.network.sshd.enable) {
services.openssh.knownHosts = { services.openssh.knownHosts = {
#"robi_init" = { #"robi_init" = {
@ -22,4 +25,5 @@
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK2PGX6cZuBUGX4VweMzi0aRh4uQ61yngCzZGcK3w5XV"; publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK2PGX6cZuBUGX4VweMzi0aRh4uQ61yngCzZGcK3w5XV";
}; };
}; };
};
} }

View file

@ -1,8 +1,7 @@
{ config, pkgs, lib, ... }: { pkgs, config, lib, ... }:
with lib; with lib;
{ {
config = mkIf (config.components.network.sshd.enable) {
services.openssh.knownHosts = { services.openssh.knownHosts = {
github = { github = {
@ -91,4 +90,5 @@ with lib;
}; };
}; };
};
} }