add cert as module

This commit is contained in:
Sakooooo 2023-10-08 14:46:05 +04:00
parent 8e58ca3115
commit 33f2125268
Signed by: sako
GPG key ID: 3FD715D87D7725E0
4 changed files with 42 additions and 2 deletions

View file

@ -110,6 +110,7 @@
security = { security = {
age.enable = true; age.enable = true;
sops.enable = true; sops.enable = true;
certs.enable = true;
}; };
}; };
@ -124,8 +125,6 @@
age.sshKeyPaths = ["/home/sako/.ssh/id_ed25519"]; age.sshKeyPaths = ["/home/sako/.ssh/id_ed25519"];
}; };
security.pki.certificateFiles = [./trust/homelab.pem];
networking.wireguard.interfaces = { networking.wireguard.interfaces = {
}; };

View file

@ -0,0 +1,19 @@
{
outputs,
options,
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.modules.security.certs;
in {
options.modules.security.certs = {
enable = mkEnableOption false;
};
config = mkIf cfg.enable {
security.pki.certificateFiles = [./trust/homelab.pem];
};
}

View file

View file

@ -0,0 +1,22 @@
-----BEGIN CERTIFICATE-----
MIIDjTCCAnUCFHMHoQwSTvnFMmBpncLHmiB5gITGMA0GCSqGSIb3DQEBCwUAMIGC
MQswCQYDVQQGEwJBRTENMAsGA1UECAwEWm9uZTENMAsGA1UEBwwEaG9tZTERMA8G
A1UECgwIYmFzZW1lbnQxDTALBgNVBAsMBHRydWUxETAPBgNVBAMMCHNha28uYm94
MSAwHgYJKoZIhvcNAQkBFhFzYWtvQGlzc29jb29sLmNvbTAeFw0yMzA1MTMxNTIx
MzdaFw0yODA1MTExNTIxMzdaMIGCMQswCQYDVQQGEwJBRTENMAsGA1UECAwEWm9u
ZTENMAsGA1UEBwwEaG9tZTERMA8GA1UECgwIYmFzZW1lbnQxDTALBgNVBAsMBHRy
dWUxETAPBgNVBAMMCHNha28uYm94MSAwHgYJKoZIhvcNAQkBFhFzYWtvQGlzc29j
b29sLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAIfsXZqAG12A
oQsMP4TU3rTFhwjprHqau7LLg9vGEWaKmmTSnBD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