nixin-krops/config/arachnide/configuration.nix

139 lines
3.3 KiB
Nix
Raw Normal View History

{
config,
pkgs,
lib,
...
}:
2024-12-18 21:54:04 +00:00
{
imports = [
./hardware-configuration.nix
./network-configuration.nix
./proxy-configuration.nix
/var/src/modules/nixin-base.nix
/var/src/modules/users.nix
/var/src/modules/wireguard-client.nix
/var/src/modules/reverse-proxy-traefik.nix
/var/src/modules/nginx.nix
/var/src/modules/nixin-web.nix
/var/src/modules/forgejo.nix
/var/src/modules/forgejo-runner.nix
/var/src/modules/nextcloud.nix
/var/src/modules/etherpad.nix
/var/src/modules/excalidraw.nix
];
2024-12-18 21:54:04 +00:00
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Enable ip forwarding to route packets
boot.kernel.sysctl = {
"net.ipv4.ip_forward" = 1;
"net.ipv6.conf.all.forwarding" = 1;
};
nixin.wg.client = {
ipv4 = "192.168.12.2";
ipv6 = "2a01:4f9:1a:9a05::2";
allowedIPs = [
"0.0.0.0/0"
"::/0"
];
2024-12-25 17:24:33 +00:00
endpoint = "vpn.lab12.fr:51812";
endpointKey = "cUmp55I20JEhxr+RMmOsX+6U9kcDiAq3grnvzjQ642w=";
2024-12-18 21:54:04 +00:00
};
2024-12-21 23:00:31 +00:00
nixin.traefik = {
dashboard-domain = "traefik.lab12.fr";
};
nixin.web = {
domain = "nixin.lab12.fr";
http-port = 8081;
};
2024-12-21 23:15:31 +00:00
nixin.forgejo = {
2024-12-20 17:56:01 +00:00
http-port = 8082;
domain = "forge.lab12.fr";
smtp-addr = "lab12.org";
smtp-user = "mr.robot@lab12.org";
smtp-from = "no-reply@lab12.org";
smtp-pwd-file = toString <secrets/smtp>;
#smtp-pwd = let
2024-12-20 17:56:01 +00:00
# pwd = builtins.readFile <secrets/smtp>;
#in lib.strings.trim pwd;
admin-email = "sysadmin@lab12.fr";
admin-user = "operator";
admin-pwd =
let
pwd = builtins.readFile <secrets/forgejo>;
in
lib.strings.trim pwd;
2024-12-20 17:56:01 +00:00
};
2024-12-21 23:15:31 +00:00
nixin.forgejo-runner = {
2024-12-20 23:28:35 +00:00
token-file = "/etc/forgejo/runner.token";
#token = let
2024-12-20 23:28:35 +00:00
# pwd = builtins.readFile <secrets/forgejo-runner-token>;
#in lib.strings.trim pwd;
url = "https://forge.lab12.fr";
};
nixin.nextcloud = {
domain = "nuage.lab12.fr";
admin-user = "operator";
admin-pwd =
let
pwd = builtins.readFile <secrets/nextcloud-admin>;
in
lib.strings.trim pwd;
host-address = "10.10.2.1";
container-address = "10.10.2.2";
address-prefix = "/24";
};
nixin.etherpad = {
domain = "pad.lab12.fr";
};
2024-12-22 18:57:51 +00:00
nixin.excalidraw = {
domain = "draw.lab12.fr";
};
2024-12-19 16:14:56 +00:00
# Open ports in the firewall.
networking.firewall.allowedTCPPorts = [
80
144
443
];
networking.firewall.allowedUDPPorts = [ 53 ];
2024-12-19 16:14:56 +00:00
# allow UDP port range for mosh
networking.firewall.allowedUDPPortRanges = [
{
from = 60000;
to = 61000;
}
2024-12-19 16:14:56 +00:00
];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
2024-12-18 21:54:04 +00:00
# Configure console keymap
#console.keyMap = "fr";
2024-12-18 21:54:04 +00:00
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
mtr
];
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
2024-12-19 12:25:04 +00:00
# on your system were taken. It's perfectly fine and recommended to leave
2024-12-18 21:54:04 +00:00
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.05"; # Did you read the comment?
}