Files
nixos/hosts/alt/configuration.nix
Alexander Wainwright 2b1e9119dc Add some labels
2025-09-30 21:37:07 +10:00

126 lines
3.3 KiB
Nix
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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, modulesPath, pkgs, inputs, ... }:
{
imports =
[ # Include the results of the hardware scan.
(modulesPath + "/virtualisation/proxmox-lxc.nix")
../modules/base.nix
../modules/kafka-mounts.nix
../modules/server.nix
./caddy.nix
];
nix.settings = { sandbox = false; };
proxmoxLXC = {
manageNetwork = false;
privileged = true;
};
networking.firewall.allowedTCPPorts = [
80 443 # caddy
8000
8001
8010 # audio bookshelf
8080 # file browser
8234 # shiori (non-standard)
9117
8191 # flaresolverr
];
networking.hostName = "alt"; # Define your hostname.
environment.systemPackages = with pkgs; [
audiobookshelf
flaresolverr
filebrowser
shiori
];
# run audiobookshelf
systemd.services.audiobookshelf = {
description = "Audiobookshelf server";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "simple";
User = "alex";
WorkingDirectory = "/home/alex/audiobookshelf";
ExecStart = "${pkgs.audiobookshelf}/bin/audiobookshelf --port 8010";
Restart = "on-failure";
RestartSec = "5s";
};
};
# run filebrowser
systemd.services.filebrowser = {
description = "Filebrowser server";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "simple";
User = "alex";
WorkingDirectory = "/home/alex/filebrowser";
ExecStart = "${pkgs.filebrowser}/bin/filebrowser --root files --address 0.0.0.0";
Restart = "on-failure";
RestartSec = "5s";
};
};
# run shiori
systemd.services.shiori = {
description = "Shiory bookmark manager";
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${pkgs.shiori}/bin/shiori server -p 8234";
User = "alex";
Restart = "always";
RestartSec = "5s";
};
};
# run sonarr
services.sonarr = {
enable = true;
openFirewall = true;
};
users.users.sonarr.extraGroups = [ "users" ];
# run radarr
services.radarr = {
enable = true;
openFirewall = true;
};
users.users.radarr.extraGroups = [ "users" ];
# run prowlarr
services.prowlarr = {
enable = true;
openFirewall = true;
};
# run flaresolverr
systemd.services.flaresolverr = {
description = "Flaresolverr headless browser proxy";
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${pkgs.flaresolverr}/bin/flaresolverr --root files --address 0.0.0.0";
Restart = "always";
RestartSec = "5s";
};
};
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# 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 = "25.05"; # Did you read the comment?
}