unmanic, calibre

This commit is contained in:
mjallen18
2025-10-02 21:26:27 -05:00
parent e72d1b5d93
commit ee48ca08bd
11 changed files with 320 additions and 116 deletions

174
flake.lock generated
View File

@@ -30,11 +30,11 @@
"uv2nix": "uv2nix" "uv2nix": "uv2nix"
}, },
"locked": { "locked": {
"lastModified": 1758177015, "lastModified": 1759322529,
"narHash": "sha256-PCUWdbaxayY3YfSjVlyddBMYoGvSaRysd5AmZ8gqSFs=", "narHash": "sha256-yiv/g/tiJI3PI95F7vhTnaf1TDsIkFLrmmFTjWfb6pQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "authentik-nix", "repo": "authentik-nix",
"rev": "4c626ed84cc0f1278bfba0f534efd6cba2788d75", "rev": "69fac057b2e553ee17c9a09b822d735823d65a6c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -46,16 +46,16 @@
"authentik-src": { "authentik-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1758035356, "lastModified": 1759190535,
"narHash": "sha256-DkvxDwHCfSqEpZ9rRXNR8MP0Mz/y1kHAr38exrHQ39c=", "narHash": "sha256-pIzDaoDWc58cY/XhsyweCwc4dfRvkaT/zqsV1gDSnCI=",
"owner": "goauthentik", "owner": "goauthentik",
"repo": "authentik", "repo": "authentik",
"rev": "680feaefa17934471a6b33ebc35caf5b64120404", "rev": "8d3a289d12c7de2f244c76493af7880f70d08af2",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "goauthentik", "owner": "goauthentik",
"ref": "version/2025.8.3", "ref": "version/2025.8.4",
"repo": "authentik", "repo": "authentik",
"type": "github" "type": "github"
} }
@@ -63,16 +63,16 @@
"brew-src": { "brew-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1756059815, "lastModified": 1758543057,
"narHash": "sha256-UALOxoXoFIHbwKzcqbqCAqw5cC0MJEehLaWSet5vxfE=", "narHash": "sha256-lw3V2jOGYphUFHYQ5oARcb6urlbNpUCLJy1qhsGdUmc=",
"owner": "Homebrew", "owner": "Homebrew",
"repo": "brew", "repo": "brew",
"rev": "02947ea4edbdef5fcce9ee57fa289547f4d096c9", "rev": "5b236456eb93133c2bd0d60ef35ed63f1c0712f6",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "Homebrew", "owner": "Homebrew",
"ref": "4.6.7", "ref": "4.6.12",
"repo": "brew", "repo": "brew",
"type": "github" "type": "github"
} }
@@ -86,11 +86,11 @@
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
"lastModified": 1758033778, "lastModified": 1759348172,
"narHash": "sha256-oQH2wLOWLFHXT3NE+gcsFOX+Pq40bKjlOH1xw0wcmT8=", "narHash": "sha256-ZPUJX2ZA0ndcHndIA/S/nRESIJV0rifPr91SUpzJtEM=",
"owner": "chaotic-cx", "owner": "chaotic-cx",
"repo": "nyx", "repo": "nyx",
"rev": "b3efa297b9c6a9e55a44f3b6905d55f80738704f", "rev": "dd1af56ad79c965ee20c236ba6adbb2135ac02af",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -141,11 +141,11 @@
"nixpkgs": "nixpkgs_4" "nixpkgs": "nixpkgs_4"
}, },
"locked": { "locked": {
"lastModified": 1758447883, "lastModified": 1758805352,
"narHash": "sha256-yGA6MV0E4JSEXqLTb4ZZkmdJZcoQ8HUzihRRX12Bvpg=", "narHash": "sha256-BHdc43Lkayd+72W/NXRKHzX5AZ+28F3xaUs3a88/Uew=",
"owner": "LnL7", "owner": "LnL7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "25381509d5c91bbf3c30e23abc6d8476d2143cd1", "rev": "c48e963a5558eb1c3827d59d21c5193622a1477c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -485,11 +485,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1757920978, "lastModified": 1759261733,
"narHash": "sha256-Mv16aegXLulgyDunijP6SPFJNm8lSXb2w3Q0X+vZ9TY=", "narHash": "sha256-G104PUPKBgJmcu4NWs0LUaPpSOTD4jiq4mamLWu3Oc0=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "11cc5449c50e0e5b785be3dfcb88245232633eb8", "rev": "5a21f4819ee1be645f46d6b255d49f4271ef6723",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -505,11 +505,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1758464306, "lastModified": 1759337100,
"narHash": "sha256-i56XRXqjwJRdVYmpzVUQ0ktqBBHqNzQHQMQvFRF/acQ=", "narHash": "sha256-CcT3QvZ74NGfM+lSOILcCEeU+SnqXRvl1XCRHenZ0Us=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "939e91e1cff1f99736c5b02529658218ed819a2a", "rev": "004753ae6b04c4b18aa07192c1106800aaacf6c3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -521,11 +521,11 @@
"homebrew-cask": { "homebrew-cask": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1758498617, "lastModified": 1759453557,
"narHash": "sha256-z54nOZTorZH0K1rHgfDXB2c9/H5hFqh0TYm5pgW924k=", "narHash": "sha256-N2P5wIszwvh+aPRXgNusp03cb1PuMFk7mZrwlTMUQ9c=",
"owner": "homebrew", "owner": "homebrew",
"repo": "homebrew-cask", "repo": "homebrew-cask",
"rev": "e5dd26082702b3d467a84c50766fdcdfd32006de", "rev": "e159d2e969ae2cc9c1b19e88b3a9745e89d1a7b0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -537,11 +537,11 @@
"homebrew-core": { "homebrew-core": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1758500263, "lastModified": 1759450426,
"narHash": "sha256-zz8DFHZGJbhgwZbLkLOlj3AzI00wvS51SX8otGPyGxw=", "narHash": "sha256-f4SzMERQZ3Mhvhjk1ui9YIWt6n9v7K3GL5RVaM25Exw=",
"owner": "homebrew", "owner": "homebrew",
"repo": "homebrew-core", "repo": "homebrew-core",
"rev": "e885969cd983ef8e9fd780a31f6e396b6b15beb4", "rev": "afb62180b517ed7df9a2ebd9f0fb923670db0f34",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -574,11 +574,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1757230583, "lastModified": 1759217228,
"narHash": "sha256-4uqu7sFPOaVTCogsxaGMgbzZ2vK40GVGMfUmrvK3/LY=", "narHash": "sha256-P13ExJlhMVkrc5LxZLNkIJZhjNYo3LLXnxDsUNrdnMQ=",
"owner": "Jovian-Experiments", "owner": "Jovian-Experiments",
"repo": "Jovian-NixOS", "repo": "Jovian-NixOS",
"rev": "fc3960e6c32c9d4f95fff2ef84444284d24d3bea", "rev": "e52c15ab25f7dc68dde527c8df5bfa9d80d8e64f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -593,11 +593,11 @@
"nixpkgs": "nixpkgs_5" "nixpkgs": "nixpkgs_5"
}, },
"locked": { "locked": {
"lastModified": 1757230583, "lastModified": 1759387127,
"narHash": "sha256-4uqu7sFPOaVTCogsxaGMgbzZ2vK40GVGMfUmrvK3/LY=", "narHash": "sha256-uuwJAP92SkHmnI1zo7rrK/gEuHtb97vFZcMa5w+0SZA=",
"owner": "Jovian-Experiments", "owner": "Jovian-Experiments",
"repo": "Jovian-NixOS", "repo": "Jovian-NixOS",
"rev": "fc3960e6c32c9d4f95fff2ef84444284d24d3bea", "rev": "0cc290e05882745060fccfe6d7d073f913e0cce7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -726,11 +726,11 @@
"brew-src": "brew-src" "brew-src": "brew-src"
}, },
"locked": { "locked": {
"lastModified": 1756398546, "lastModified": 1758598228,
"narHash": "sha256-n4GVDLhKu65XFraJuCzap2AaZji4xhPaZMTJ8aQdD3s=", "narHash": "sha256-qr60maXGbZ4FX5tejPRI3nr0bnRTnZ3AbbbfO6/6jq4=",
"owner": "zhaofengli", "owner": "zhaofengli",
"repo": "nix-homebrew", "repo": "nix-homebrew",
"rev": "3aa475996cb3bc1ecefa88c99c466e6f0bc17431", "rev": "f36e5db56e117f7df701ab152d0d2036ea85218c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -746,11 +746,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1758427679, "lastModified": 1759032422,
"narHash": "sha256-xwjWRJTKDCjQ0iwfh7WhDhgcS0Wt3d1Yscg83mKBCn4=", "narHash": "sha256-WZf+FhebP2/1pK2np5xj/NuDjD6fXK2BHnq/tPUN18o=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "fd2569ca2ef7d69f244cd9ffcb66a0540772ff85", "rev": "ec7a78cb0e098832d8acac091a4df393259c4839",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -784,11 +784,11 @@
"nixpkgs": "nixpkgs_8" "nixpkgs": "nixpkgs_8"
}, },
"locked": { "locked": {
"lastModified": 1758420016, "lastModified": 1759369908,
"narHash": "sha256-xnS4Xp2nvtT+fwIfxz16ikSMs03pV9SpQW80btttVe4=", "narHash": "sha256-IIhaE6jAge64z+fIyi/8Vtu0JdTtapbp4CvwiuIkZ1E=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-vscode-extensions", "repo": "nix-vscode-extensions",
"rev": "c55175e19f142be0330b2579d7da043d2f22e324", "rev": "a66ad2141b1440a838ead278c6edfe8a4ce75e6c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -819,15 +819,14 @@
"nixos-apple-silicon": { "nixos-apple-silicon": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_4", "flake-compat": "flake-compat_4",
"nixpkgs": "nixpkgs_10", "nixpkgs": "nixpkgs_10"
"treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1756110286, "lastModified": 1759244631,
"narHash": "sha256-NE0HwcQCQTgM+HuYqmiemPf/5e+3fjwowceAyJj+ikU=", "narHash": "sha256-b8k+l2ygOZD3ABD8H2Nl/oiZ7byT52SLrqiU3D5FG88=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixos-apple-silicon", "repo": "nixos-apple-silicon",
"rev": "b99bf9bf7445416fe55da09034fc4a6cd733805c", "rev": "db555f5ac04144c5a56d60dbf4e15a3e58ccae08",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -838,11 +837,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1757943327, "lastModified": 1759261527,
"narHash": "sha256-w6cDExPBqbq7fTLo4dZ1ozDGeq3yV6dSN4n/sAaS6OM=", "narHash": "sha256-wPd5oGvBBpUEzMF0kWnXge0WITNsITx/aGI9qLHgJ4g=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "67a709cfe5d0643dafd798b0b613ed579de8be05", "rev": "e087756cf4abbe1a34f3544c480fc1034d68742f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -963,11 +962,11 @@
}, },
"nixpkgs-stable_3": { "nixpkgs-stable_3": {
"locked": { "locked": {
"lastModified": 1758346548, "lastModified": 1759281824,
"narHash": "sha256-afXE7AJ7MY6wY1pg/Y6UPHNYPy5GtUKeBkrZZ/gC71E=", "narHash": "sha256-FIBE1qXv9TKvSNwst6FumyHwCRH3BlWDpfsnqRDCll0=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "b2a3852bd078e68dd2b3dfa8c00c67af1f0a7d20", "rev": "5b5be50345d4113d04ba58c444348849f5585b4a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1011,11 +1010,11 @@
}, },
"nixpkgs_12": { "nixpkgs_12": {
"locked": { "locked": {
"lastModified": 1758277210, "lastModified": 1759381078,
"narHash": "sha256-iCGWf/LTy+aY0zFu8q12lK8KuZp7yvdhStehhyX1v8w=", "narHash": "sha256-gTrEEp5gEspIcCOx9PD8kMaF1iEmfBcTbO0Jag2QhQs=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "8eaee110344796db060382e15d3af0a9fc396e0e", "rev": "7df7ff7d8e00218376575f0acdcc5d66741351ee",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1043,11 +1042,11 @@
}, },
"nixpkgs_14": { "nixpkgs_14": {
"locked": { "locked": {
"lastModified": 1758262103, "lastModified": 1758976413,
"narHash": "sha256-aBGl3XEOsjWw6W3AHiKibN7FeoG73dutQQEqnd/etR8=", "narHash": "sha256-hEIDTaIqvW1NMfaNgz6pjhZPZKTmACJmXxGr/H6isIg=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "12bd230118a1901a4a5d393f9f56b6ad7e571d01", "rev": "e3a3b32cc234f1683258d36c6232f150d57df015",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1059,11 +1058,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1758029758, "lastModified": 1759147044,
"narHash": "sha256-fKqsvznISxVSBo6aaiGGXMRiBG4IIuV3sSySxx80pcQ=", "narHash": "sha256-3ZPFytJOcLjTChljeaGgoaNj+tOqzgEpqZAvRe3bU90=",
"owner": "PedroHLC", "owner": "PedroHLC",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "4eb5897225c3d7e78a0b9d1542197ee7c8d270a5", "rev": "18e83bbe13aa50992777832b52bd0e0d8585fb3b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1139,11 +1138,11 @@
}, },
"nixpkgs_7": { "nixpkgs_7": {
"locked": { "locked": {
"lastModified": 1758277210, "lastModified": 1759381078,
"narHash": "sha256-iCGWf/LTy+aY0zFu8q12lK8KuZp7yvdhStehhyX1v8w=", "narHash": "sha256-gTrEEp5gEspIcCOx9PD8kMaF1iEmfBcTbO0Jag2QhQs=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "8eaee110344796db060382e15d3af0a9fc396e0e", "rev": "7df7ff7d8e00218376575f0acdcc5d66741351ee",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1310,7 +1309,7 @@
"snowfall-lib": "snowfall-lib", "snowfall-lib": "snowfall-lib",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
"steam-rom-manager": "steam-rom-manager", "steam-rom-manager": "steam-rom-manager",
"treefmt-nix": "treefmt-nix_2" "treefmt-nix": "treefmt-nix"
} }
}, },
"rust-overlay": { "rust-overlay": {
@@ -1321,11 +1320,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1757930296, "lastModified": 1759286284,
"narHash": "sha256-Z9u5VszKs8rfEvg2AsFucWEjl7wMtAln9l1b78cfBh4=", "narHash": "sha256-JLdGGc4XDutzSD1L65Ni6Ye+oTm8kWfm0KTPMcyl7Y4=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "09442765a05c2ca617c20ed68d9613da92a2d96b", "rev": "f6f2da475176bb7cff51faae8b3fe879cd393545",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1403,11 +1402,11 @@
"nixpkgs": "nixpkgs_14" "nixpkgs": "nixpkgs_14"
}, },
"locked": { "locked": {
"lastModified": 1758425756, "lastModified": 1759188042,
"narHash": "sha256-L3N8zV6wsViXiD8i3WFyrvjDdz76g3tXKEdZ4FkgQ+Y=", "narHash": "sha256-f9QC2KKiNReZDG2yyKAtDZh0rSK2Xp1wkPzKbHeQVRU=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "e0fdaea3c31646e252a60b42d0ed8eafdb289762", "rev": "9fcfabe085281dd793589bdc770a2e577a3caa5d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1517,36 +1516,15 @@
"treefmt-nix": { "treefmt-nix": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixos-apple-silicon",
"nixpkgs" "nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1754847726, "lastModified": 1758728421,
"narHash": "sha256-2vX8QjO5lRsDbNYvN9hVHXLU6oMl+V/PsmIiJREG4rE=", "narHash": "sha256-ySNJ008muQAds2JemiyrWYbwbG+V7S5wg3ZVKGHSFu8=",
"owner": "numtide", "owner": "numtide",
"repo": "treefmt-nix", "repo": "treefmt-nix",
"rev": "7d81f6fb2e19bf84f1c65135d1060d829fae2408", "rev": "5eda4ee8121f97b218f7cc73f5172098d458f1d1",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"treefmt-nix_2": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1758206697,
"narHash": "sha256-/DbPkh6PZOgfueCbs3uzlk4ASU2nPPsiVWhpMCNkAd0=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "128222dc911b8e2e18939537bed1762b7f3a04aa",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -34,7 +34,7 @@ in
vscode-extensions.bbenoist.nix vscode-extensions.bbenoist.nix
vscode-extensions.brettm12345.nixfmt-vscode vscode-extensions.brettm12345.nixfmt-vscode
vscode-extensions.cweijan.vscode-database-client2 vscode-extensions.cweijan.vscode-database-client2
vscode-extensions.dendron.dendron-markdown-preview-enhanced # vscode-extensions.dendron.dendron-markdown-preview-enhanced
vscode-extensions.jnoortheen.nix-ide vscode-extensions.jnoortheen.nix-ide
vscode-extensions.mkhl.direnv vscode-extensions.mkhl.direnv
vscode-extensions.ms-python.debugpy vscode-extensions.ms-python.debugpy

View File

@@ -36,6 +36,7 @@
nixpkgs = { nixpkgs = {
config = { config = {
cudaSupport = lib.mkDefault config.${namespace}.hardware.nvidia.enable; cudaSupport = lib.mkDefault config.${namespace}.hardware.nvidia.enable;
rocmSupport = lib.mkDefault config.${namespace}.hardware.amd.enable;
allowUnsupportedSystem = true; allowUnsupportedSystem = true;
}; };
}; };

View File

@@ -49,7 +49,7 @@ in
}; };
upsd = { upsd = {
enable = true; enable = false;
listen = [ listen = [
{ {
address = "0.0.0.0"; address = "0.0.0.0";

View File

@@ -20,7 +20,7 @@ in
user = "nix-apps"; user = "nix-apps";
group = "jallen-nas"; group = "jallen-nas";
openFirewall = true; openFirewall = true;
acceleration = "cuda"; acceleration = "rocm";
home = "/media/nas/main/nix-app-data/ollama"; home = "/media/nas/main/nix-app-data/ollama";
}; };

View File

@@ -0,0 +1,152 @@
{
config,
pkgs,
lib,
namespace,
...
}:
with lib;
let
inherit (lib.${namespace}) mkOpt mkReverseProxyOpt;
cfg = config.${namespace}.services.calibre;
# dataDir = "/library";
# hostAddress = "10.0.1.3";
# calibreUserId = config.users.users.nix-apps.uid;
# calibreGroupId = config.users.groups.jallen-nas.gid;
# calibreConfig =
# { lib, ... }:
# {
# services.calibre-server = {
# enable = true;
# openFirewall = true;
# libraries = [
# dataDir
# ];
# };
# services.calibre-web = {
# enable = true;
# openFirewall = true;
# listen = {
# ip = "0.0.0.0";
# port = cfg.port;
# };
# options = {
# enableBookUploading = true;
# enableBookConversion = true;
# calibreLibrary = dataDir;
# };
# };
# users.users.calibre = {
# isSystemUser = true;
# uid = lib.mkForce calibreUserId;
# group = "calibre";
# };
# users.groups = {
# calibre-web = {
# gid = lib.mkForce calibreGroupId;
# };
# };
# networking = {
# firewall = {
# enable = true;
# allowedTCPPorts = [ cfg.port ];
# };
# # Use systemd-resolved inside the container
# # Workaround for bug https://github.com/NixOS/nixpkgs/issues/162686
# useHostResolvConf = lib.mkForce false;
# };
# services.resolved.enable = true;
# system.stateVersion = "23.11";
# };
# bindMounts = {
# ${dataDir} = {
# hostPath = cfg.dataDir;
# isReadOnly = false;
# };
# "/var/lib/calibre-web" = {
# hostPath = cfg.webDir;
# isReadOnly = false;
# };
# };
# Create reverse proxy configuration using mkReverseProxy
reverseProxyConfig = lib.${namespace}.mkReverseProxy {
name = "calibre";
subdomain = cfg.reverseProxy.subdomain;
url = "http://${cfg.localAddress}:${toString cfg.port}";
middlewares = cfg.reverseProxy.middlewares;
};
# calibreContainer =
# (lib.${namespace}.mkContainer {
# name = "calibre";
# localAddress = cfg.localAddress;
# port = cfg.port;
# bindMounts = bindMounts;
# config = calibreConfig;
# })
# { inherit lib; };
# fullConfig = {
# ${namespace}.services.traefik = lib.mkIf cfg.reverseProxy.enable {
# reverseProxies = [ reverseProxyConfig ];
# };
# }
# // calibreContainer;
in
{
options.${namespace}.services.calibre = {
enable = mkEnableOption "calibre service";
port = mkOpt types.int 8080 "Port for calibre to be hosted on";
webPort = mkOpt types.int 8083 "Port for calibre web to be hosted on";
localAddress = mkOpt types.str "127.0.0.1" "local address of the service";
dataDir = mkOpt types.str "/media/nas/main/books" "Path to the data dir";
webDir = mkOpt types.str "/media/nas/main/nix-app-data/calibre-web" "Path to the web data dir";
reverseProxy = mkReverseProxyOpt;
};
config = mkIf cfg.enable {
${namespace}.services.traefik = lib.mkIf cfg.reverseProxy.enable {
reverseProxies = [ reverseProxyConfig ];
};
services = {
calibre-server = {
enable = false;
openFirewall = true;
port = cfg.port;
libraries = [
cfg.dataDir
];
};
calibre-web = {
enable = true;
openFirewall = true;
dataDir = cfg.webDir;
listen = {
ip = "0.0.0.0";
port = cfg.webPort;
};
options = {
enableBookUploading = true;
enableBookConversion = true;
calibreLibrary = cfg.dataDir;
};
};
};
};
}

View File

@@ -183,8 +183,6 @@ in
# System packages # System packages
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
cudaPackages.cudnn
cudatoolkit
ffmpeg ffmpeg
# libtensorflow-bin # libtensorflow-bin
nextcloud31 nextcloud31

View File

@@ -0,0 +1,61 @@
{
lib,
config,
namespace,
...
}:
with lib;
let
inherit (lib.${namespace}) mkOpt mkReverseProxyOpt;
cfg = config.${namespace}.services.unmanic;
in
{
options.${namespace}.services.unmanic = {
enable = mkEnableOption "unmanic service";
name = mkOpt types.str "unmanic" "container name";
image = mkOpt types.str "josh5/unmanic" "container image";
port = mkOpt types.int 8265 "Port for unmanic to be hosted on";
configPath = mkOpt types.str "" "Path to the data dir";
moviesPath = mkOpt types.str "" "Path to the data dir";
tvPath = mkOpt types.str "" "Path to the data dir";
transcodePath = mkOpt types.str "" "Path to the data dir";
puid = mkOpt types.str "911" "uid";
pgid = mkOpt types.str "1000" "gid";
timeZone = mkOpt types.str "America/Chicago" "Timezone";
reverseProxy = mkReverseProxyOpt;
};
config = mkIf cfg.enable {
virtualisation.oci-containers.containers.${cfg.name} = {
autoStart = true;
image = cfg.image;
extraOptions = [ "--device=/dev/dri" ];
volumes = [
"${cfg.configPath}:/config"
"${cfg.moviesPath}:/library/movies"
"${cfg.tvPath}:/library/tv"
"${cfg.transcodePath}:/tmp/unmanic"
];
ports = [
"${toString cfg.port}:8888"
];
environment = {
PUID = cfg.puid;
PGID = cfg.pgid;
TZ = cfg.timeZone;
};
};
};
}

View File

@@ -16,7 +16,7 @@ in
faster-whisper.servers.hass-whisper = { faster-whisper.servers.hass-whisper = {
enable = true; enable = true;
useTransformers = false; useTransformers = false;
device = lib.mkForce "cuda"; device = lib.mkForce "auto";
language = "en"; language = "en";
model = "distil-large-v3"; model = "distil-large-v3";
uri = "tcp://0.0.0.0:10300"; uri = "tcp://0.0.0.0:10300";

View File

@@ -63,6 +63,15 @@
}; };
}; };
calibre = {
enable = true;
port = 8084;
webPort = 8083;
localAddress = "10.0.3.1";
webDir = "/media/nas/main/nix-app-data/calibre-web";
dataDir = "/media/nas/main/books";
};
crowdsec = { crowdsec = {
enable = true; enable = true;
port = 9898; port = 9898;
@@ -87,6 +96,14 @@
}; };
}; };
unmanic = {
enable = true;
configPath = "/media/nas/main/nix-app-data/unmanic/config";
moviesPath = "/media/nas/main/movies";
tvPath = "/media/nas/main/tv";
transcodePath = "/media/nas/main/nix-app-data/unmanic/transcode";
};
glance = { glance = {
enable = true; enable = true;
port = 5555; port = 5555;
@@ -102,7 +119,7 @@
httpsPort = "3101"; httpsPort = "3101";
}; };
tdarr.enable = true; tdarr.enable = false;
authentik = { authentik = {
enable = true; enable = true;

View File

@@ -62,12 +62,8 @@ in
enableLuks = false; enableLuks = false;
}; };
nvidia = { amd = {
enable = true; enable = true;
enableBeta = true;
enableOpen = true;
nvidiaSettings = true;
enableNvidiaDocker = true;
}; };
}; };
@@ -78,12 +74,12 @@ in
impermanence = { impermanence = {
enable = true; enable = true;
extraDirectories = [ extraDirectories = [
{ # {
directory = "/var/lib/private/authentik/media"; # directory = "/var/lib/private/authentik/media";
user = "authentik"; # user = "authentik";
group = "authentik"; # group = "authentik";
mode = "u=rwx,g=,o="; # mode = "u=rwx,g=,o=";
} # }
{ {
directory = "/var/lib/crowdsec"; directory = "/var/lib/crowdsec";
user = "crowdsec"; user = "crowdsec";
@@ -138,6 +134,7 @@ in
10200 10200
10300 10300
8127 8127
6060
9943 # onlyoffice 9943 # onlyoffice
4000 # netbootxyz 4000 # netbootxyz
4080 # netbootxyz 4080 # netbootxyz