mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-10 04:49:19 -08:00
feat: add domain-auth group for privilege sharing
This commit is contained in:
parent
8df455a82c
commit
6caf15b9e4
3 changed files with 8 additions and 5 deletions
|
|
@ -273,12 +273,12 @@
|
|||
nameValuePair "${hostname}-cert" {
|
||||
text = tf.acme.certs.${hostname}.out.refFullchainPem;
|
||||
owner = "nginx";
|
||||
group = "nginx";
|
||||
group = "domain-auth";
|
||||
}) hostnames) // listToAttrs (map (hostname:
|
||||
nameValuePair "${hostname}-key" {
|
||||
text = tf.acme.certs.${hostname}.out.refPrivateKeyPem;
|
||||
owner = "nginx";
|
||||
group = "nginx";
|
||||
group = "domain-auth";
|
||||
}) hostnames);
|
||||
|
||||
services.nginx.virtualHosts = let
|
||||
|
|
@ -291,6 +291,11 @@
|
|||
sslCertificateKey = config.secrets.files."${hostname}-key".path;
|
||||
}) hostnames);
|
||||
|
||||
users.groups.domain-auth = {
|
||||
gid = 10600;
|
||||
members = [ "nginx" "openldap" "keycloak" ];
|
||||
};
|
||||
|
||||
networking.firewall = {
|
||||
interfaces = mkMerge (mapAttrsToList (network: settings:
|
||||
genAttrs settings.interfaces (_: { allowedTCPPortRanges = settings.tcp; allowedUDPPortRanges = settings.udp; })
|
||||
|
|
@ -300,7 +305,6 @@
|
|||
allowedUDPPorts = [ config.services.tailscale.port ];
|
||||
};
|
||||
|
||||
|
||||
services.tailscale.enable = true;
|
||||
|
||||
systemd.services.tailscale-autoconnect = mkIf (builtins.getEnv "TF_IN_AUTOMATION" != "" || tf.state.enable) {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ in {
|
|||
};
|
||||
|
||||
|
||||
users.groups.domain-auth.members = [ "nginx" "openldap" "keycloak" ];
|
||||
/* security.acme.certs.domain-auth = {
|
||||
group = "domain-auth";
|
||||
postRun = ''
|
||||
|
|
|
|||
2
tf
2
tf
|
|
@ -1 +1 @@
|
|||
Subproject commit e4898b63141b7be8bd96c0f91fecc807d732aa58
|
||||
Subproject commit 04fe3396694d5a10317c37f0376e2397f0323a30
|
||||
Loading…
Add table
Add a link
Reference in a new issue