fix(photoprism): networking

This commit is contained in:
Constantin Gierczak--Galle 2024-11-03 12:53:28 +01:00
parent e23b49d9e2
commit d072b19c00
No known key found for this signature in database

View file

@ -1,11 +1,14 @@
{ lib, pkgs, ... }: { lib, pkgs, ... }:
let address = "129.199.146.101";
in
{ {
imports = [ imports = [
./hardware.nix ./hardware.nix
./photoprism.nix # NOTE: For now, only deploy the bare minimum
./immich.nix #./photoprism.nix
#./immich.nix
]; ];
# Bootloader. # Bootloader.
@ -15,7 +18,6 @@
disko.devices = import ./disko.nix; disko.devices = import ./disko.nix;
# TODO: ipv6 address
deployment.targetHost = ""; deployment.targetHost = "";
# Set your time zone. # Set your time zone.
@ -32,19 +34,20 @@
security.acme.acceptTerms = true; security.acme.acceptTerms = true;
security.acme.defaults.email = "webmaster@nixos.org"; security.acme.defaults.email = "webmaster@nixos.org";
# TODO: open the right ports
networking.firewall.allowedTCPPorts = [ 80 443 8007 ]; networking.firewall.allowedTCPPorts = [ 80 443 8007 ];
networking.firewall.allowedUDPPorts = [ ]; networking.firewall.allowedUDPPorts = [ ];
networking.useNetworkd = true; networking.useNetworkd = true;
# TODO: systemd.network.networks."ens18" = {
systemd.network.networks."10-wan" = {
matchConfig.Name = "ens18"; matchConfig.Name = "ens18";
networkConfig = { networkConfig = {
DHCP = "ipv4"; DHCP = "ipv4";
Address = "2a01:e0a:de4:a0e1:eb2:caa1::4";
}; };
ipv4.addresses = [
{ address = address; }
];
gateway = "129.199.146.254";
# make routing on this interface a dependency for network-online.target # make routing on this interface a dependency for network-online.target
linkConfig.RequiredForOnline = "routable"; linkConfig.RequiredForOnline = "routable";
}; };