started new ssh module with janus
This commit is contained in:
@@ -4,13 +4,15 @@ let
|
||||
hostname = "janus";
|
||||
ipv4 = "192.168.1.32";
|
||||
ipv6 = "fded:fb16:653e:25da:be24:11ff:fe6b:4d57";
|
||||
names = [ "${hostname}.john-stream.com" ipv4 ipv6 ];
|
||||
in
|
||||
{
|
||||
flake.nixosConfigurations."${hostname}" = inputs.nixpkgs.lib.nixosSystem {
|
||||
modules = with inputs.self.modules; [
|
||||
nixos.lxc
|
||||
nixos.mysops
|
||||
nixos.ssh-certs
|
||||
# nixos.ssh-certs
|
||||
nixos.ssh-new
|
||||
nixos.step-client
|
||||
nixos.step-ca
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
@@ -24,18 +26,19 @@ in
|
||||
"Step-CA" = "step-ca";
|
||||
};
|
||||
sops.defaultSopsFile = ./secrets.yaml;
|
||||
ssh-certs = {
|
||||
ssh-new.certificates = {
|
||||
provisioner = "admin";
|
||||
extraPrincipals = [ "janus.john-stream.com" ipv4 ipv6 ];
|
||||
host = {
|
||||
enable = true;
|
||||
extraPrincipals = names;
|
||||
autoRenew = true;
|
||||
};
|
||||
user.enable = true;
|
||||
};
|
||||
step-ca = {
|
||||
rootCertPath = ./public/root_ca.crt;
|
||||
intermediateCertPath = ./public/intermediate_ca.crt;
|
||||
dnsNames = [
|
||||
"${hostname}.john-stream.com"
|
||||
ipv4
|
||||
ipv6
|
||||
];
|
||||
dnsNames = names;
|
||||
secrets = {
|
||||
sopsFile = ./secrets.yaml;
|
||||
caPassword = "janus/ca_password";
|
||||
@@ -67,10 +70,6 @@ in
|
||||
);
|
||||
};
|
||||
|
||||
# users.users."${username}".openssh.authorizedKeys.keys = [
|
||||
# "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMOkGLo4N/L3RYvaIZ1FmePlxa1HK0fMciZxKtRhN58F root@janus"
|
||||
# ];
|
||||
|
||||
home-manager.users."${username}" = {
|
||||
imports = with inputs.self.modules.homeManager; [
|
||||
mysops
|
||||
|
||||
Reference in New Issue
Block a user