Compare commits
4
Commits
17e85e83b9
...
d5cb84ed00
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d5cb84ed00 | ||
|
|
6e81791188 | ||
|
|
b77fb6e925 | ||
|
|
0f39cfdf32 |
@@ -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")
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user