2023-05-23 17:12:31 +02:00
|
|
|
{ self, ... }:
|
2024-02-05 11:46:52 +01:00
|
|
|
{ modulesPath, ... }:
|
|
|
|
{
|
2022-04-26 10:59:48 +02:00
|
|
|
imports = [
|
2024-01-02 22:01:55 +01:00
|
|
|
(modulesPath + "/virtualisation/lxc-container.nix")
|
2023-05-23 17:12:31 +02:00
|
|
|
|
2022-04-26 10:59:48 +02:00
|
|
|
../../users/root
|
|
|
|
../../users/erwin
|
2022-10-30 21:06:18 +01:00
|
|
|
./backup.nix
|
2024-01-22 20:27:45 +01:00
|
|
|
./forgejo
|
2024-03-14 09:19:40 +01:00
|
|
|
./caddy.nix
|
2022-04-26 10:59:48 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
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
|
|
|
};
|
2024-01-02 22:01:55 +01:00
|
|
|
tailscale.enable = true;
|
2022-04-26 10:59:48 +02:00
|
|
|
};
|
|
|
|
|
2022-04-27 00:21:19 +02:00
|
|
|
boot.isContainer = true;
|
2022-04-26 10:59:48 +02:00
|
|
|
|
|
|
|
time.timeZone = "Europe/Amsterdam";
|
|
|
|
|
|
|
|
system.configurationRevision = self.inputs.nixpkgs.lib.mkIf (self ? rev) self.rev;
|
|
|
|
|
2024-01-02 22:01:55 +01:00
|
|
|
networking = {
|
2024-01-22 20:27:45 +01:00
|
|
|
hostName = "gitea";
|
2024-01-02 22:01:55 +01:00
|
|
|
useDHCP = false;
|
|
|
|
useHostResolvConf = false;
|
|
|
|
networkmanager.enable = false;
|
|
|
|
useNetworkd = true;
|
|
|
|
nftables.enable = false;
|
|
|
|
|
|
|
|
firewall = {
|
|
|
|
trustedInterfaces = [ "tailscale0" ];
|
|
|
|
interfaces."podman+" = {
|
|
|
|
allowedUDPPorts = [ 53 ];
|
|
|
|
allowedTCPPorts = [ 53 ];
|
|
|
|
};
|
|
|
|
};
|
2022-04-26 10:59:48 +02:00
|
|
|
};
|
|
|
|
|
2024-01-02 22:01:55 +01:00
|
|
|
systemd.network = {
|
|
|
|
enable = true;
|
|
|
|
|
2024-01-29 10:27:21 +01:00
|
|
|
wait-online.anyInterface = true;
|
|
|
|
|
2024-01-02 22:01:55 +01:00
|
|
|
networks = {
|
|
|
|
"40-eth0" = {
|
|
|
|
matchConfig = {
|
|
|
|
Name = "eth0";
|
|
|
|
};
|
2022-10-26 17:12:39 +02:00
|
|
|
|
2024-01-02 22:01:55 +01: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;
|
|
|
|
};
|
2022-04-26 10:59:48 +02:00
|
|
|
|
|
|
|
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 = { };
|
2022-04-26 10:59:48 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
system.stateVersion = "22.05";
|
|
|
|
}
|