Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d5cb84ed00 | ||
|
|
6e81791188 | ||
|
|
b77fb6e925 | ||
|
|
0f39cfdf32 |
@@ -1,12 +1,9 @@
|
|||||||
{
|
{
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
git-credential-oauth
|
|
||||||
git-crypt
|
git-crypt
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -15,10 +12,6 @@
|
|||||||
settings = {
|
settings = {
|
||||||
user.name = "Leonhard Kost";
|
user.name = "Leonhard Kost";
|
||||||
user.email = "leonhard.kost@gmail.com";
|
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
|
./hardware-configuration.nix
|
||||||
./secrets
|
./secrets
|
||||||
./dyndns
|
./dyndns
|
||||||
|
./gitea.nix
|
||||||
./vaultwarden.nix
|
./vaultwarden.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -47,7 +48,25 @@
|
|||||||
PasswordAuthentication = false;
|
PasswordAuthentication = false;
|
||||||
KbdInteractiveAuthentication = false;
|
KbdInteractiveAuthentication = false;
|
||||||
PermitRootLogin = "no";
|
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 = {
|
security.acme.certs.${domain}.extraDomainNames = [
|
||||||
acceptTerms = true;
|
vaultDomain
|
||||||
defaults.email = "admin@${domain}";
|
];
|
||||||
};
|
|
||||||
|
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
virtualHosts.${vaultDomain} = {
|
virtualHosts.${vaultDomain} = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
enableACME = true;
|
useACMEHost = config.kekleo.domain;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://127.0.0.1:${toString config.services.vaultwarden.config.ROCKET_PORT}";
|
proxyPass = "http://127.0.0.1:${toString config.services.vaultwarden.config.ROCKET_PORT}";
|
||||||
proxyWebsockets = true;
|
proxyWebsockets = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user