nixos-config/machines/gitea/configuration.nix

91 lines
1.6 KiB
Nix
Raw Normal View History

2023-05-23 17:12:31 +02:00
{ self, ... }:
2024-02-05 11:46:52 +01:00
{ modulesPath, ... }:
{
imports = [
(modulesPath + "/virtualisation/lxc-container.nix")
2023-05-23 17:12:31 +02:00
../../users/root
../../users/erwin
2022-10-30 21:06:18 +01:00
./backup.nix
./forgejo
2024-03-14 09:19:40 +01:00
./caddy.nix
];
eboskma = {
2023-05-30 15:36:25 +02:00
users.erwin = {
enable = true;
server = true;
};
2022-08-07 11:24:24 +02:00
nix-common = {
enable = true;
2022-08-14 16:38:25 +02:00
remote-builders = true;
2022-08-07 11:24:24 +02:00
};
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";
};
2022-10-26 17:12:39 +02:00
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";
};
2022-10-30 21:06:18 +01:00
gitea_backup_ssh_key = { };
gitea_backup_pass = { };
2024-03-14 09:19:40 +01:00
caddy-env = { };
};
system.stateVersion = "22.05";
}