99 lines
1.9 KiB
Nix
99 lines
1.9 KiB
Nix
{ self, caddy-with-plugins, ... }:
|
|
{ pkgs, modulesPath, ... }:
|
|
{
|
|
imports = [
|
|
(modulesPath + "/virtualisation/lxc-container.nix")
|
|
|
|
../../users/root
|
|
../../users/erwin
|
|
./backup.nix
|
|
./forgejo
|
|
];
|
|
|
|
eboskma = {
|
|
users.erwin = {
|
|
enable = true;
|
|
server = true;
|
|
};
|
|
caddy-proxy = {
|
|
enable = true;
|
|
package = caddy-with-plugins.packages.${pkgs.system}.caddy-with-cloudflare;
|
|
proxyHosts = [
|
|
{
|
|
externalHostname = "git.datarift.nl";
|
|
proxyAddress = "localhost:3000";
|
|
}
|
|
];
|
|
};
|
|
nix-common = {
|
|
enable = true;
|
|
remote-builders = true;
|
|
};
|
|
tailscale.enable = true;
|
|
};
|
|
|
|
boot.isContainer = true;
|
|
|
|
time.timeZone = "Europe/Amsterdam";
|
|
|
|
system.configurationRevision = self.inputs.nixpkgs.lib.mkIf (self ? rev) self.rev;
|
|
|
|
networking = {
|
|
hostName = "gitea";
|
|
useDHCP = false;
|
|
useHostResolvConf = false;
|
|
networkmanager.enable = false;
|
|
useNetworkd = true;
|
|
nftables.enable = false;
|
|
|
|
firewall = {
|
|
trustedInterfaces = [ "tailscale0" ];
|
|
interfaces."podman+" = {
|
|
allowedUDPPorts = [ 53 ];
|
|
allowedTCPPorts = [ 53 ];
|
|
};
|
|
};
|
|
};
|
|
|
|
systemd.network = {
|
|
enable = true;
|
|
|
|
wait-online.anyInterface = true;
|
|
|
|
networks = {
|
|
"40-eth0" = {
|
|
matchConfig = {
|
|
Name = "eth0";
|
|
};
|
|
|
|
networkConfig = {
|
|
Address = "10.0.0.203/24";
|
|
Gateway = "10.0.0.1";
|
|
DNS = "10.0.0.206";
|
|
DHCP = "no";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
security = {
|
|
sudo-rs = {
|
|
enable = true;
|
|
execWheelOnly = true;
|
|
wheelNeedsPassword = false;
|
|
};
|
|
sudo.enable = false;
|
|
};
|
|
|
|
sops.defaultSopsFile = ./secrets.yaml;
|
|
sops.secrets = {
|
|
gitea_db_password = {
|
|
owner = "git";
|
|
};
|
|
gitea_backup_ssh_key = { };
|
|
gitea_backup_pass = { };
|
|
caddy-env = { };
|
|
};
|
|
|
|
system.stateVersion = "22.05";
|
|
}
|