diff options
Diffstat (limited to 'os/host_TOREWORK/cluster/staging/node/spoutnik.nix')
-rw-r--r-- | os/host_TOREWORK/cluster/staging/node/spoutnik.nix | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/os/host_TOREWORK/cluster/staging/node/spoutnik.nix b/os/host_TOREWORK/cluster/staging/node/spoutnik.nix new file mode 100644 index 0000000..060d77d --- /dev/null +++ b/os/host_TOREWORK/cluster/staging/node/spoutnik.nix @@ -0,0 +1,58 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running ‘nixos-help’). + +{ config, pkgs, ... }: + +{ + boot.loader.grub.enable = true; + boot.loader.grub.version = 2; + boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only + + networking.hostName = "spoutnik"; + services.openssh.ports = [ 220 ]; + + deuxfleurs.network_interface = "enp0s25"; + deuxfleurs.lan_ip = "192.168.0.40"; + deuxfleurs.ipv6 = "::"; #TODO + + deuxfleurs.cluster_ip = "10.14.0.0"; + deuxfleurs.is_raft_server = false; #TODO + + # Nginx configuration: + + services.nginx = { + enable = true; + + # Use recommended settings + recommendedGzipSettings = true; + recommendedOptimisation = true; + recommendedProxySettings = true; + recommendedTlsSettings = true; + + # Add any further config to match your needs, e.g.: + virtualHosts = let + base = locations: { + inherit locations; + + forceSSL = true; + enableACME = true; + }; + proxy = addr: port: base { + "/".proxyPass = "http://" + addr + ":" + toString(port); + }; + in { + "axl.deuxfleurs.fr" = proxy "192.168.0.60" 80; + "warez.luxeylab.net" = proxy "192.168.0.50" 80; + }; + }; + + + # ACME: + + security.acme = { + acceptTerms = true; + email = "adrien@luxeylab.net"; + }; +} + |