Files
nixos/hosts/alt/configuration.nix
Alexander Wainwright 7610e83b87 Add audiobookshelf
The package, a systetmd service and open the port.
2025-06-29 22:35:05 +10:00

100 lines
2.7 KiB
Nix
Raw 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
];
nix.settings = { sandbox = false; };
proxmoxLXC = {
manageNetwork = false;
privileged = true;
};
networking.firewall.allowedTCPPorts = [
8000
8010
8080
9117
8191
];
networking.hostName = "alt"; # Define your hostname.
environment.systemPackages = with pkgs; [
audiobookshelf
flaresolverr
filebrowser
];
# 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 sonarr
services.sonarr = {
enable = true;
openFirewall = true;
};
users.users.sonarr.extraGroups = [ "users" ];
services.prowlarr = {
enable = true;
openFirewall = true;
};
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?
}