Compare commits

..

No commits in common. "120b97f97051903de33b5e0061f95211260ab16f" and "57c37196000de65b24c7d06043b58593b223de9a" have entirely different histories.

10 changed files with 12 additions and 174 deletions

View File

@ -244,22 +244,6 @@
"type": "github" "type": "github"
} }
}, },
"gh-collaborators": {
"flake": false,
"locked": {
"lastModified": 1717117275,
"narHash": "sha256-x3p2bHL6U8gWanXnTTJGgA9x4Ixy9AOZiBbfcfn5VVw=",
"owner": "katiem0",
"repo": "gh-collaborators",
"rev": "4dfcd0b5c2e31f2d0fbfd4b83fdfae787a5e6ff8",
"type": "github"
},
"original": {
"owner": "katiem0",
"repo": "gh-collaborators",
"type": "github"
}
},
"hmts-nvim-src": { "hmts-nvim-src": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -600,7 +584,6 @@
"disko": "disko", "disko": "disko",
"fidget-nvim-src": "fidget-nvim-src", "fidget-nvim-src": "fidget-nvim-src",
"firefox-darwin": "firefox-darwin", "firefox-darwin": "firefox-darwin",
"gh-collaborators": "gh-collaborators",
"hmts-nvim-src": "hmts-nvim-src", "hmts-nvim-src": "hmts-nvim-src",
"home-manager": "home-manager", "home-manager": "home-manager",
"mac-app-util": "mac-app-util", "mac-app-util": "mac-app-util",

View File

@ -185,11 +185,6 @@
flake = false; flake = false;
}; };
gh-collaborators = {
url = "github:katiem0/gh-collaborators";
flake = false;
};
# Nextcloud Apps # Nextcloud Apps
nextcloud-news = { nextcloud-news = {
# https://github.com/nextcloud/news/releases # https://github.com/nextcloud/news/releases
@ -235,7 +230,6 @@
mail.smtpHost = "smtp.purelymail.com"; mail.smtpHost = "smtp.purelymail.com";
dotfilesRepo = "https://github.com/nmasur/dotfiles"; dotfilesRepo = "https://github.com/nmasur/dotfiles";
hostnames = { hostnames = {
audiobooks = "read.${baseName}";
files = "files.${baseName}"; files = "files.${baseName}";
git = "git.${baseName}"; git = "git.${baseName}";
influxdb = "influxdb.${baseName}"; influxdb = "influxdb.${baseName}";
@ -266,7 +260,7 @@
(import ./overlays/mpv-scripts.nix inputs) (import ./overlays/mpv-scripts.nix inputs)
(import ./overlays/nextcloud-apps.nix inputs) (import ./overlays/nextcloud-apps.nix inputs)
(import ./overlays/betterlockscreen.nix) (import ./overlays/betterlockscreen.nix)
(import ./overlays/gh-collaborators.nix inputs) (import ./overlays/gh-collaborators.nix)
(import ./overlays/ren-rep.nix inputs) (import ./overlays/ren-rep.nix inputs)
]; ];

View File

@ -67,14 +67,6 @@ inputs.nixpkgs.lib.nixosSystem rec {
devices = (import ../../disks/root.nix { disk = "/dev/nvme0n1"; }); devices = (import ../../disks/root.nix { disk = "/dev/nvme0n1"; });
}; };
zramSwap.enable = true;
swapDevices = [
{
device = "/swapfile";
size = 4 * 1024; # 4 GB
}
];
boot.zfs = { boot.zfs = {
# Automatically load the ZFS pool on boot # Automatically load the ZFS pool on boot
extraPools = [ "tank" ]; extraPools = [ "tank" ];
@ -106,7 +98,6 @@ inputs.nixpkgs.lib.nixosSystem rec {
dotfiles.enable = true; dotfiles.enable = true;
arrs.enable = true; arrs.enable = true;
filebrowser.enable = true; filebrowser.enable = true;
services.audiobookshelf.enable = true;
services.bind.enable = true; services.bind.enable = true;
services.caddy.enable = true; services.caddy.enable = true;
services.jellyfin.enable = true; services.jellyfin.enable = true;

View File

@ -1,9 +1,4 @@
{ { config, lib, ... }:
config,
pkgs,
lib,
...
}:
{ {
options = { options = {
@ -13,7 +8,7 @@
config = lib.mkIf (config.server && config.zfs.enable) { config = lib.mkIf (config.server && config.zfs.enable) {
# Only use compatible Linux kernel, since ZFS can be behind # Only use compatible Linux kernel, since ZFS can be behind
boot.kernelPackages = pkgs.linuxPackages; # Defaults to latest LTS boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
boot.kernelParams = [ "nohibernate" ]; boot.kernelParams = [ "nohibernate" ];
boot.supportedFilesystems = [ "zfs" ]; boot.supportedFilesystems = [ "zfs" ];
services.prometheus.exporters.zfs.enable = config.prometheus.exporters.enable; services.prometheus.exporters.zfs.enable = config.prometheus.exporters.enable;

View File

@ -14,11 +14,6 @@ let
url = "localhost:7878"; url = "localhost:7878";
apiKey = config.secrets.radarrApiKey.dest; apiKey = config.secrets.radarrApiKey.dest;
}; };
readarr = {
exportarrPort = "9711";
url = "localhost:8787";
apiKey = config.secrets.readarrApiKey.dest;
};
sonarr = { sonarr = {
exportarrPort = "9708"; exportarrPort = "9708";
url = "localhost:8989"; url = "localhost:8989";
@ -66,10 +61,6 @@ in
enable = true; enable = true;
group = "media"; group = "media";
}; };
readarr = {
enable = true;
group = "media";
};
}; };
# Create a media group to be shared between services # Create a media group to be shared between services
@ -119,21 +110,6 @@ in
} }
]; ];
} }
{
group = "download";
match = [
{
host = [ config.hostnames.download ];
path = [ "/readarr*" ];
}
];
handle = [
{
handler = "reverse_proxy";
upstreams = [ { dial = arrConfig.readarr.url; } ];
}
];
}
{ {
group = "download"; group = "download";
match = [ match = [
@ -247,11 +223,6 @@ in
dest = "/var/private/radarr-api"; dest = "/var/private/radarr-api";
prefix = "API_KEY="; prefix = "API_KEY=";
}; };
secrets.readarrApiKey = {
source = ../../../private/radarr-api-key.age;
dest = "/var/private/readarr-api";
prefix = "API_KEY=";
};
secrets.sonarrApiKey = { secrets.sonarrApiKey = {
source = ../../../private/sonarr-api-key.age; source = ../../../private/sonarr-api-key.age;
dest = "/var/private/sonarr-api"; dest = "/var/private/sonarr-api";

View File

@ -1,44 +0,0 @@
{ config, lib, ... }:
{
options = {
hostnames.audiobooks = lib.mkOption {
type = lib.types.str;
description = "Hostname for audiobook server (Audiobookshelf).";
};
};
config = lib.mkIf config.services.audiobookshelf.enable {
services.audiobookshelf = {
dataDir = "audiobookshelf";
};
# Allow web traffic to Caddy
caddy.routes = [
{
match = [ { host = [ config.hostnames.audiobooks ]; } ];
handle = [
{
handler = "reverse_proxy";
upstreams = [ { dial = "localhost:${builtins.toString config.services.audiobookshelf.port}"; } ];
}
];
}
];
# Configure Cloudflare DNS to point to this machine
services.cloudflare-dyndns.domains = [ config.hostnames.audiobooks ];
# Grant user access to Audiobookshelf directories
users.users.${config.user}.extraGroups = [ config.services.audiobookshelf.group ];
# Grant audiobookshelf access to media and Calibre directories
users.users.${config.services.audiobookshelf.user}.extraGroups = [
"media"
"calibre-web"
];
};
}

View File

@ -5,7 +5,6 @@
{ {
imports = [ imports = [
./audiobookshelf.nix
./arr.nix ./arr.nix
./backups.nix ./backups.nix
./bind.nix ./bind.nix

View File

@ -53,7 +53,6 @@ in
uid = promUid; uid = promUid;
} }
]; ];
# TODO: Add option to pull services from a list like Caddy does
dashboards.settings.providers = [ dashboards.settings.providers = [
{ {
name = "test"; name = "test";
@ -369,18 +368,6 @@ in
range = true; range = true;
refId = "C"; refId = "C";
} }
{
datasource = {
type = "prometheus";
uid = promUid;
};
editorMode = "code";
expr = "readarr_system_status";
hide = false;
legendFormat = "Readarr";
range = true;
refId = "F";
}
{ {
datasource = { datasource = {
type = "prometheus"; type = "prometheus";
@ -832,28 +819,6 @@ in
} }
]; ];
} }
{
matcher = {
id = "byName";
options = "localhost:8787";
};
properties = [
{
id = "displayName";
value = "Readarr";
}
{
id = "links";
value = [
{
targetBlank = true;
title = "";
url = "https://${config.hostnames.download}/readarr";
}
];
}
];
}
{ {
matcher = { matcher = {
id = "byName"; id = "byName";
@ -1140,28 +1105,6 @@ in
} }
]; ];
} }
{
matcher = {
id = "byName";
options = "localhost:${builtins.toString config.services.audiobookshelf.port}";
};
properties = [
{
id = "displayName";
value = "Audiobookshelf";
}
{
id = "links";
value = [
{
targetBlank = true;
title = "";
url = "https://${config.hostnames.audiobooks}";
}
];
}
];
}
]; ];
}; };
gridPos = { gridPos = {

View File

@ -7,7 +7,7 @@
services.samba = lib.mkIf config.services.samba.enable { services.samba = lib.mkIf config.services.samba.enable {
openFirewall = true; openFirewall = true;
settings.data = { shares.data = {
path = "/data"; path = "/data";
browseable = "yes"; browseable = "yes";
"read only" = "no"; "read only" = "no";

View File

@ -1,9 +1,15 @@
inputs: _final: prev: { _final: prev: {
gh-collaborators = prev.buildGoModule rec { gh-collaborators = prev.buildGoModule rec {
pname = "gh-collaborators"; pname = "gh-collaborators";
version = "v2.0.3"; version = "v2.0.3";
src = inputs.gh-collaborators;
src = prev.fetchFromGitHub {
owner = "nmasur";
repo = "gh-collaborators";
rev = version;
sha256 = "sha256-XgAZ/+7QxIRKiAZ4Gp/rLgTABSXkVjFQ8TbXOFj9vpM=";
};
# vendorHash = "sha256-rsRDOgJBa8T6+bC/APcmuRmg6ykbIp9pwRnJ9rrfHEs="; # vendorHash = "sha256-rsRDOgJBa8T6+bC/APcmuRmg6ykbIp9pwRnJ9rrfHEs=";
vendorHash = "sha256-fykxRb2U9DDsXorRTLiVWmhMY89N7RS07sal8ww6gz4="; vendorHash = "sha256-fykxRb2U9DDsXorRTLiVWmhMY89N7RS07sal8ww6gz4=";