Disable DNS and GSSAPI auth on sshd

Remove NixNG code
This commit is contained in:
Pim Kunis 2024-09-24 22:45:07 +02:00
parent 3d456b1a43
commit fcc2848523
5 changed files with 3 additions and 72 deletions

View file

@ -52,6 +52,8 @@
settings = { settings = {
PasswordAuthentication = false; PasswordAuthentication = false;
KbdInteractiveAuthentication = false; KbdInteractiveAuthentication = false;
GSSAPIAuthentication = false;
UseDns = false;
}; };
}; };
}; };

View file

@ -164,33 +164,6 @@ in
cp -f ${./k3s-ca/etcd/server-ca.crt} /var/lib/rancher/k3s/server/tls/etcd/server-ca.crt cp -f ${./k3s-ca/etcd/server-ca.crt} /var/lib/rancher/k3s/server/tls/etcd/server-ca.crt
''; '';
}; };
nixng = lib.mkIf (cfg.role == "server")
(
let
dnsmasqStream = (import ./dnsmasq.nix {
inherit (inputs) nixpkgs nixng;
inherit (inputs.nixng) nglib;
inherit (self) globals;
}).config.system.build.ociImage.stream;
dnsmasqImage = pkgs.stdenv.mkDerivation {
name = "dnsmasq.tar";
src = dnsmasqStream;
dontUnpack = true;
buildPhase = ''
$src > $out
'';
};
in
{
text = ''
rm -rf ${self.globals.imageDir}
mkdir -p ${self.globals.imageDir}
ln -sf ${dnsmasqImage} ${self.globals.imageDir}/dnsmasq.tar
'';
}
);
}; };
sops.secrets = sops.secrets =

View file

@ -1,41 +0,0 @@
{ globals, nixpkgs, nglib, ... }:
nglib.makeSystem {
inherit nixpkgs;
system = "x86_64-linux";
name = "nixng-dnsmasq";
config = { ... }: {
dumb-init = {
enable = true;
type.services = { };
};
init.services.dnsmasq = {
shutdownOnExit = true;
};
services.dnsmasq = {
enable = true;
settings = {
address = [
"/kms.kun.is/${globals.kmsIPv4}"
"/ssh.git.kun.is/${globals.gitIPv4}"
];
alias = "${globals.routerPublicIPv4},${globals.traefikIPv4}";
expand-hosts = true;
local = "/dmz/";
log-queries = true;
no-hosts = true;
no-resolv = true;
port = 53;
server = [
"192.168.30.1"
"/kun.is/${globals.bind9IPv4}"
];
};
};
};
}

View file

@ -10,9 +10,8 @@ let
net = import ./net.nix lib; net = import ./net.nix lib;
}); });
nonSystemAttrs = rec { nonSystemAttrs = {
globals = import ./globals.nix; globals = import ./globals.nix;
imagePath = name: "nix:0${globals.imageDir}/${name}.tar";
}; };
allAttrs = systemAttrs // nonSystemAttrs; allAttrs = systemAttrs // nonSystemAttrs;

View file

@ -25,6 +25,4 @@
freshrssIPv4 = "192.168.30.146"; freshrssIPv4 = "192.168.30.146";
immichIPv4 = "192.168.30.147"; immichIPv4 = "192.168.30.147";
nextcloudIPv4 = "192.168.30.148"; nextcloudIPv4 = "192.168.30.148";
imageDir = "/var/container_images";
} }