ma omo.r: deploy airsonic,photoprism,metube
This commit is contained in:
parent
27e182f7f8
commit
ba614307cd
@ -28,9 +28,11 @@ in {
|
|||||||
<stockholm/makefu/2configs/home-manager>
|
<stockholm/makefu/2configs/home-manager>
|
||||||
<stockholm/makefu/2configs/home-manager/cli.nix>
|
<stockholm/makefu/2configs/home-manager/cli.nix>
|
||||||
<stockholm/makefu/2configs/editor/neovim>
|
<stockholm/makefu/2configs/editor/neovim>
|
||||||
|
<stockholm/makefu/2configs/storj/client.nix>
|
||||||
|
|
||||||
|
|
||||||
<stockholm/makefu/2configs/backup/state.nix>
|
<stockholm/makefu/2configs/backup/state.nix>
|
||||||
|
<stockholm/makefu/2configs/backup/server.nix>
|
||||||
<stockholm/makefu/2configs/exim-retiolum.nix>
|
<stockholm/makefu/2configs/exim-retiolum.nix>
|
||||||
# <stockholm/makefu/2configs/smart-monitor.nix>
|
# <stockholm/makefu/2configs/smart-monitor.nix>
|
||||||
<stockholm/makefu/2configs/mail-client.nix>
|
<stockholm/makefu/2configs/mail-client.nix>
|
||||||
@ -68,7 +70,7 @@ in {
|
|||||||
<stockholm/makefu/2configs/tinc/retiolum.nix>
|
<stockholm/makefu/2configs/tinc/retiolum.nix>
|
||||||
|
|
||||||
# statistics
|
# statistics
|
||||||
<stockholm/makefu/2configs/stats/client.nix>
|
# <stockholm/makefu/2configs/stats/client.nix>
|
||||||
# Logging
|
# Logging
|
||||||
#influx + grafana
|
#influx + grafana
|
||||||
<stockholm/makefu/2configs/stats/server.nix>
|
<stockholm/makefu/2configs/stats/server.nix>
|
||||||
@ -91,13 +93,18 @@ in {
|
|||||||
<stockholm/makefu/2configs/virtualisation/docker.nix>
|
<stockholm/makefu/2configs/virtualisation/docker.nix>
|
||||||
<stockholm/makefu/2configs/bluetooth-mpd.nix>
|
<stockholm/makefu/2configs/bluetooth-mpd.nix>
|
||||||
|
|
||||||
<stockholm/makefu/2configs/ham>
|
<stockholm/makefu/2configs/home/ham>
|
||||||
|
<stockholm/makefu/2configs/home/airsonic.nix>
|
||||||
|
<stockholm/makefu/2configs/home/photoprism.nix>
|
||||||
|
<stockholm/makefu/2configs/home/metube.nix>
|
||||||
{
|
{
|
||||||
makefu.ps3netsrv = {
|
makefu.ps3netsrv = {
|
||||||
enable = true;
|
enable = true;
|
||||||
servedir = "/media/cryptX/emu/ps3";
|
servedir = "/media/cryptX/emu/ps3";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
hardware.pulseaudio.systemWide = true;
|
hardware.pulseaudio.systemWide = true;
|
||||||
makefu.mpd.musicDirectory = "/media/cryptX/music";
|
makefu.mpd.musicDirectory = "/media/cryptX/music";
|
||||||
@ -107,7 +114,15 @@ in {
|
|||||||
<stockholm/makefu/2configs/sshd-totp.nix>
|
<stockholm/makefu/2configs/sshd-totp.nix>
|
||||||
# <stockholm/makefu/2configs/logging/central-logging-client.nix>
|
# <stockholm/makefu/2configs/logging/central-logging-client.nix>
|
||||||
|
|
||||||
<stockholm/makefu/2configs/torrent.nix>
|
# <stockholm/makefu/2configs/torrent.nix>
|
||||||
|
{
|
||||||
|
#krebs.rtorrent = {
|
||||||
|
# downloadDir = lib.mkForce "/media/cryptX/torrent";
|
||||||
|
# extraConfig = ''
|
||||||
|
# upload_rate = 500
|
||||||
|
# '';
|
||||||
|
#};
|
||||||
|
}
|
||||||
|
|
||||||
# <stockholm/makefu/2configs/elchos/search.nix>
|
# <stockholm/makefu/2configs/elchos/search.nix>
|
||||||
# <stockholm/makefu/2configs/elchos/log.nix>
|
# <stockholm/makefu/2configs/elchos/log.nix>
|
||||||
@ -118,16 +133,11 @@ in {
|
|||||||
|
|
||||||
# Temporary:
|
# Temporary:
|
||||||
# <stockholm/makefu/2configs/temp/rst-issue.nix>
|
# <stockholm/makefu/2configs/temp/rst-issue.nix>
|
||||||
|
<stockholm/makefu/2configs/bgt/social-to-irc.nix>
|
||||||
|
|
||||||
];
|
];
|
||||||
makefu.full-populate = true;
|
makefu.full-populate = true;
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
krebs.rtorrent = {
|
|
||||||
downloadDir = lib.mkForce "/media/cryptX/torrent";
|
|
||||||
extraConfig = ''
|
|
||||||
upload_rate = 500
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
users.groups.share = {
|
users.groups.share = {
|
||||||
gid = (import <stockholm/lib>).genid "share";
|
gid = (import <stockholm/lib>).genid "share";
|
||||||
members = [ "makefu" "misa" ];
|
members = [ "makefu" "misa" ];
|
||||||
|
@ -51,6 +51,10 @@ in {
|
|||||||
enable = true;
|
enable = true;
|
||||||
disks = map toMapper [ 0 1 3 ];
|
disks = map toMapper [ 0 1 3 ];
|
||||||
parity = toMapper 2; # find -name PARITY_PARTITION
|
parity = toMapper 2; # find -name PARITY_PARTITION
|
||||||
|
extraConfig = ''
|
||||||
|
exclude /lib/storj/
|
||||||
|
exclude /.bitcoin/blocks/
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
fileSystems = let
|
fileSystems = let
|
||||||
cryptMount = name:
|
cryptMount = name:
|
||||||
|
29
makefu/2configs/home/airsonic.nix
Normal file
29
makefu/2configs/home/airsonic.nix
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{ config, ... }:
|
||||||
|
let
|
||||||
|
internal-ip = "192.168.1.11";
|
||||||
|
port = 4040;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
# networking.firewall.allowedTCPPorts = [ 4040 ];
|
||||||
|
services.airsonic = {
|
||||||
|
enable = true;
|
||||||
|
listenAddress = "0.0.0.0";
|
||||||
|
inherit port;
|
||||||
|
};
|
||||||
|
state = [ config.services.airsonic.home ];
|
||||||
|
services.nginx.virtualHosts."airsonic" = {
|
||||||
|
serverAliases = [
|
||||||
|
"airsonic.lan"
|
||||||
|
"music" "music.lan"
|
||||||
|
"musik" "musik.lan"
|
||||||
|
];
|
||||||
|
|
||||||
|
locations."/".proxyPass = "http://localhost:${toString port}";
|
||||||
|
locations."/".proxyWebsockets = true;
|
||||||
|
extraConfig = ''
|
||||||
|
if ( $server_addr != "${internal-ip}" ) {
|
||||||
|
return 403;
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
35
makefu/2configs/home/metube.nix
Normal file
35
makefu/2configs/home/metube.nix
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
{ pkgs, lib, ...}:
|
||||||
|
# docker run -d -p 8081:8081 -v /path/to/downloads:/downloads --user 1001:1001 alexta69/metube
|
||||||
|
with import <stockholm/lib>;
|
||||||
|
let
|
||||||
|
port = "2348";
|
||||||
|
dl-dir = "/media/cryptX/youtube/music";
|
||||||
|
uid = 20421;
|
||||||
|
internal-ip = "192.168.1.11";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"d ${dl-dir} metube nogroup - -"
|
||||||
|
];
|
||||||
|
virtualisation.oci-containers.backend = "docker";
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."tube" = {
|
||||||
|
serverAliases = [ "tube.lan" ];
|
||||||
|
locations."/".proxyPass = "http://localhost:${port}";
|
||||||
|
};
|
||||||
|
|
||||||
|
virtualisation.oci-containers.containers.metube = {
|
||||||
|
image = "alexta69/metube:latest";
|
||||||
|
ports = [ "${port}:8081" ];
|
||||||
|
volumes = [
|
||||||
|
"${dl-dir}:/downloads"
|
||||||
|
];
|
||||||
|
user = "metube";
|
||||||
|
};
|
||||||
|
users.users.metube.uid = uid;
|
||||||
|
|
||||||
|
systemd.services.docker-metube.serviceConfig = {
|
||||||
|
StandardOutput = lib.mkForce "journal";
|
||||||
|
StandardError = lib.mkForce "journal";
|
||||||
|
};
|
||||||
|
}
|
@ -16,8 +16,8 @@
|
|||||||
let
|
let
|
||||||
port = "2347";
|
port = "2347";
|
||||||
photodir = "/media/cryptX/photos";
|
photodir = "/media/cryptX/photos";
|
||||||
statedir = "/var/lib/photoprism/appsrv";
|
statedir = "/media/cryptX/lib/photoprism/appsrv";
|
||||||
db-dir = "/var/lib/photoprism/mysql";
|
db-dir = "/media/cryptX/lib/photoprism/mysql";
|
||||||
internal-ip = "192.168.1.11";
|
internal-ip = "192.168.1.11";
|
||||||
sec = import <secrets/photoprism.nix>;
|
sec = import <secrets/photoprism.nix>;
|
||||||
in
|
in
|
||||||
@ -97,6 +97,7 @@ in
|
|||||||
PHOTOPRISM_SITE_CAPTION = "FeMi Fotos";
|
PHOTOPRISM_SITE_CAPTION = "FeMi Fotos";
|
||||||
PHOTOPRISM_SITE_DESCRIPTION = "Unsere Fotos";
|
PHOTOPRISM_SITE_DESCRIPTION = "Unsere Fotos";
|
||||||
PHOTOPRISM_SITE_AUTHOR = "FeMi";
|
PHOTOPRISM_SITE_AUTHOR = "FeMi";
|
||||||
|
PHOTOPRISM_SPONSOR = "true";
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -135,11 +136,11 @@ in
|
|||||||
# };
|
# };
|
||||||
#};
|
#};
|
||||||
|
|
||||||
systemd.services.photoprism.serviceConfig = {
|
systemd.services.docker-photoprism.serviceConfig = {
|
||||||
StandardOutput = lib.mkForce "journal";
|
StandardOutput = lib.mkForce "journal";
|
||||||
StandardError = lib.mkForce "journal";
|
StandardError = lib.mkForce "journal";
|
||||||
};
|
};
|
||||||
systemd.services.mysql-photoprism.serviceConfig = {
|
systemd.services.docker-mysql-photoprism.serviceConfig = {
|
||||||
StandardOutput = lib.mkForce "journal";
|
StandardOutput = lib.mkForce "journal";
|
||||||
StandardError = lib.mkForce "journal";
|
StandardError = lib.mkForce "journal";
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user