Setup audiobookshelf

This commit is contained in:
Daniel Flanagan 2024-08-13 14:35:09 -05:00
parent 20b836dd9d
commit 1b09e32625
4 changed files with 27 additions and 61 deletions

View file

@ -1145,7 +1145,7 @@ sudo nix run nixpkgs#ipmitool -- raw 0x30 0x30 0x02 0xff 0x00
};
users.users."${user}-unixd" = {
group = "${group}-unixd";
description = "kanidm PAM daemon";
description = lib.mkForce "kanidm PAM daemon";
isSystemUser = true;
};
@ -1308,6 +1308,16 @@ sudo nix run nixpkgs#ipmitool -- raw 0x30 0x30 0x02 0xff 0x00
};
};
})
{
services.audiobookshelf = {
enable = true;
# dataDir = "/storage/audiobookshelf";
port = 8523;
};
services.caddy.virtualHosts."audio.lyte.dev" = {
extraConfig = ''reverse_proxy :8523'';
};
}
];
# TODO: non-root processes and services that access secrets need to be part of

View file

@ -21,7 +21,7 @@
];
boot = {
kernelPackages = pkgs.linuxPackages_zen;
# kernelPackages = pkgs.linuxPackages_zen;
loader.efi.canTouchEfiVariables = true;
loader.systemd-boot.enable = true;
initrd.availableKernelModules = ["xhci_pci" "nvme" "ahci" "usbhid"];

View file

@ -49,6 +49,7 @@
"idm.h.lyte.dev"
"git.lyte.dev"
"video.lyte.dev"
"audio.lyte.dev"
"a.lyte.dev"
"bw.lyte.dev"
"files.lyte.dev"

View file

@ -1,18 +1,20 @@
{
# inputs.nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
inputs.nixpkgs.url = "github:nixos/nixpkgs?rev=ae34cb9560a578b6354655538e98fb69e8bc8d39";
outputs = inputs: let
supportedSystems = ["aarch64-linux" "x86_64-linux" "x86_64-darwin" "aarch64-darwin"];
forAllSystems = inputs.nixpkgs.lib.genAttrs supportedSystems;
overlay = final: prev: {
erlangPackages = prev.beam.packagesWith prev.erlang_26;
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
outputs = {
self,
nixpkgs,
...
}: let
systems = ["aarch64-linux" "x86_64-linux" "x86_64-darwin" "aarch64-darwin"];
forSystems = nixpkgs.lib.genAttrs systems;
pkgsFor = system: (import nixpkgs {inherit system;}).extend self.outputs.overlays.default;
genPkgs = func: (forSystems (system: func (pkgsFor system)));
in {
overlays.default = final: prev: {
erlangPackages = prev.beam.packagesWith prev.erlang_27;
erlang = final.erlangPackages.erlang;
};
nixpkgsFor = system: ((import inputs.nixpkgs {inherit system;}).extend overlay);
in {
devShells = forAllSystems (system: let
pkgs = nixpkgsFor system;
in {
devShells = genPkgs (pkgs: {
default = pkgs.mkShell {
buildInputs = with pkgs; [
erlang
@ -23,50 +25,3 @@
});
};
}
/*
# a useful overlay for setting packages to certain versions
overlay = final: prev: {
# erlangPackages = prev.beam.packagesWith prev.erlang_26;
# erlang = final.erlangPackages.erlang;
# elixir = final.erlangPackages.elixir_1_16;
# mixRelease = final.erlangPackages.mixRelease.override {
# elixir = final.elixir;
# };
# fetchMixDeps = final.erlangPackages.fetchMixDeps.override {
# elixir = final.elixir;
# };
# elixir-ls = prev.elixir-ls.override {elixir = final.elixir;};
};
# have a package
packages = forAllSystems (system: let
pkgs = nixpkgsFor system;
# inherit (pkgs) beamPackages;
# inherit (beamPackages) mixRelease fetchMixDeps;
version = "0.1.0";
src = ./.;
pname = "gleam-project";
in {
# this-package = mixRelease {
# inherit pname version src;
# mixFodDeps = fetchMixDeps {
# inherit version src;
# pname = "mix-deps-${pname}";
# hash = pkgs.lib.fakeSha256;
# };
# buildInputs = with pkgs; [sqlite];
# HOME = "$(pwd)";
# MIX_XDG = "$HOME";
# };
# default = outputs.packages.${system}.this-package;
});
*/