nixos-config/machines/gitea/configuration.nix

86 lines
1.6 KiB
Nix
Raw Normal View History

2023-05-23 17:12:31 +02:00
{ self, ... }:
{ 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
];
eboskma = {
2023-05-30 15:36:25 +02:00
users.erwin = {
enable = true;
server = true;
};
gitea.enable = 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 = "ci";
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;
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 = { };
};
system.stateVersion = "22.05";
}