2024-10-08 23:50:47 +02:00
|
|
|
{ lib, pkgs, ... }:
|
|
|
|
|
2024-11-03 12:53:28 +01:00
|
|
|
let address = "129.199.146.101";
|
|
|
|
in
|
2024-10-08 23:50:47 +02:00
|
|
|
{
|
2024-10-09 17:07:27 +02:00
|
|
|
imports = [
|
|
|
|
./hardware.nix
|
2024-10-09 00:04:46 +02:00
|
|
|
|
2024-11-03 12:53:28 +01:00
|
|
|
# NOTE: For now, only deploy the bare minimum
|
|
|
|
#./photoprism.nix
|
|
|
|
#./immich.nix
|
2024-10-09 00:04:46 +02:00
|
|
|
];
|
2024-10-08 23:50:47 +02:00
|
|
|
|
|
|
|
# Bootloader.
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
|
|
|
|
|
|
|
networking.hostName = "photoprism";
|
|
|
|
|
|
|
|
disko.devices = import ./disko.nix;
|
|
|
|
|
|
|
|
deployment.targetHost = "";
|
|
|
|
|
|
|
|
# Set your time zone.
|
|
|
|
time.timeZone = "Europe/Paris";
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [ neovim ];
|
|
|
|
|
|
|
|
services.openssh.enable = true;
|
|
|
|
users.users.root.openssh.authorizedKeys.keys = [
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDMBW7rTtfZL9wtrpCVgariKdpN60/VeAzXkh9w3MwbO julien@enigma"
|
2024-10-09 17:06:24 +02:00
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKrijwPlb7KQkYPLznMPVzPPT69cLzhEsJzZi9tmxzTh cst1@x270"
|
2024-10-08 23:50:47 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
security.acme.acceptTerms = true;
|
|
|
|
security.acme.defaults.email = "webmaster@nixos.org";
|
|
|
|
|
2024-10-09 17:07:27 +02:00
|
|
|
networking.firewall.allowedTCPPorts = [ 80 443 8007 ];
|
2024-10-08 23:50:47 +02:00
|
|
|
networking.firewall.allowedUDPPorts = [ ];
|
|
|
|
|
|
|
|
networking.useNetworkd = true;
|
|
|
|
|
2024-11-03 12:53:28 +01:00
|
|
|
systemd.network.networks."ens18" = {
|
2024-10-08 23:50:47 +02:00
|
|
|
matchConfig.Name = "ens18";
|
|
|
|
networkConfig = {
|
|
|
|
DHCP = "ipv4";
|
|
|
|
};
|
2024-11-03 12:53:28 +01:00
|
|
|
ipv4.addresses = [
|
|
|
|
{ address = address; }
|
|
|
|
];
|
|
|
|
gateway = "129.199.146.254";
|
2024-10-08 23:50:47 +02:00
|
|
|
# make routing on this interface a dependency for network-online.target
|
|
|
|
linkConfig.RequiredForOnline = "routable";
|
|
|
|
};
|
|
|
|
|
2024-10-14 14:53:27 +02:00
|
|
|
# NOTE: for now, we use internal ports
|
|
|
|
# TODO: switch to unixsockets if supported
|
|
|
|
services.nginx = {
|
|
|
|
enable = true;
|
|
|
|
recommendedGzipSettings = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
system.stateVersion = "24.05";
|
2024-10-08 23:50:47 +02:00
|
|
|
}
|