Compare commits

...
4 Commits
4 changed files with 58 additions and 13 deletions
-7
View File
@@ -1,12 +1,9 @@
{
config,
lib,
pkgs,
...
}:
{
home.packages = with pkgs; [
git-credential-oauth
git-crypt
];
@@ -15,10 +12,6 @@
settings = {
user.name = "Leonhard Kost";
user.email = "leonhard.kost@gmail.com";
credential.helper = [
"cache --timeout 21600"
("oauth" + lib.optionalString (!config.kekleo.graphical) " -device")
];
};
};
}
+20 -1
View File
@@ -7,6 +7,7 @@
./hardware-configuration.nix
./secrets
./dyndns
./gitea.nix
./vaultwarden.nix
];
@@ -47,7 +48,25 @@
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
PermitRootLogin = "no";
AllowUsers = [ "leonhard" ];
};
};
security.acme = {
acceptTerms = true;
defaults.email = "admin@${config.kekleo.domain}";
defaults.webroot = "/var/lib/acme/acme-challenge/";
certs.${config.kekleo.domain} = {
group = config.services.nginx.group;
};
};
services.nginx = {
enable = true;
virtualHosts.${config.kekleo.domain} = {
forceSSL = true;
useACMEHost = config.kekleo.domain;
locations."/.well-known/".root = config.security.acme.defaults.webroot;
};
};
}
+34
View File
@@ -0,0 +1,34 @@
{
config,
...
}:
let
domain = config.kekleo.domain;
gitDomain = "git.${domain}";
in
{
services.gitea = {
enable = true;
settings.server.ROOT_URL = "https://${gitDomain}";
settings.server.SSH_PORT = builtins.elemAt config.services.openssh.ports 0;
settings.service.DISABLE_REGISTRATION = true;
settings.log.LEVEL = "Critical";
};
security.acme.certs.${domain}.extraDomainNames = [
gitDomain
];
services.nginx = {
enable = true;
virtualHosts.${gitDomain} = {
forceSSL = true;
useACMEHost = config.kekleo.domain;
locations."/" = {
proxyPass = "http://127.0.0.1:${toString config.services.gitea.settings.server.HTTP_PORT}";
proxyWebsockets = true;
};
};
};
}
+4 -5
View File
@@ -20,17 +20,16 @@ in
};
};
security.acme = {
acceptTerms = true;
defaults.email = "admin@${domain}";
};
security.acme.certs.${domain}.extraDomainNames = [
vaultDomain
];
services.nginx = {
enable = true;
virtualHosts.${vaultDomain} = {
forceSSL = true;
enableACME = true;
useACMEHost = config.kekleo.domain;
locations."/" = {
proxyPass = "http://127.0.0.1:${toString config.services.vaultwarden.config.ROCKET_PORT}";
proxyWebsockets = true;