Files
frank-nix/hosts/vergil/configuration.nix
T

99 lines
1.9 KiB
Nix

{
pkgs,
inputs,
...
}:
let
unstable = inputs.nixpkgs-unstable.legacyPackages.${pkgs.stdenv.hostPlatform.system};
in
{
imports = [
../shared/nixos-server.nix
../../features/jmusicbot.nix
];
systemd.services.mount-vm-disk = {
description = "Mount Proxmox VM disk via kpartx";
after = [ "storage-vm--100--disk--0.device" ];
wants = [ "storage-vm--100--disk--0.device" ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
ExecStart = "${pkgs.multipath-tools}/sbin/kpartx -av /dev/storage/vm-100-disk-0";
ExecStop = "${pkgs.multipath-tools}/sbin/kpartx -dv /dev/storage/vm-100-disk-0";
};
wantedBy = [ "multi-user.target" ];
};
systemd.network = {
networks."30-br0" = {
address = [
"fd09:dead:beef::181/64"
];
};
};
services = {
nginx = {
enable = true;
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
virtualHosts = {
"jellyfin.cfl.rr.com" = {
locations."/" = {
proxyPass = "http://localhost:8096";
};
};
};
};
pihole-ftl = {
enable = true;
openFirewallDNS = true;
settings = {
dns = {
domain = "cfl.rr.com";
upstreams = [
"1.1.1.1"
"1.0.0.1"
];
hosts = [
"192.168.1.181 vergil.cfl.rr.com"
"192.168.1.181 jellyfin.cfl.rr.com"
"192.168.1.181 pihole.cfl.rr.com"
];
};
};
};
jellyfin = {
enable = true;
openFirewall = true;
user = "frank";
};
};
environment.systemPackages = with pkgs; [
multipath-tools
];
networking = {
hostName = "vergil";
firewall = {
allowedTCPPorts = [
80
443
];
};
};
}