Compare commits
2 commits
2a9e8e6c03
...
c36a3f09de
| Author | SHA1 | Date | |
|---|---|---|---|
| c36a3f09de | |||
| 402c847f3c |
5 changed files with 44 additions and 1 deletions
|
|
@ -6,6 +6,7 @@
|
|||
let
|
||||
name = "fluorite";
|
||||
fqdn = "fluorite.lava.moe";
|
||||
altfqdn = hostname: "fluorite.${hostname}.lava.moe";
|
||||
subnetId = "6";
|
||||
|
||||
subnet = x: "fd0d:1::${subnetId}:${toString x}";
|
||||
|
|
@ -42,6 +43,13 @@
|
|||
listenAddresses = [ "10.0.0.1" "[fd0d::1]" "100.67.1.1" ];
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."${altfqdn config.networking.hostname}" = {
|
||||
useACMEHost = "lava.moe";
|
||||
forceSSL = true;
|
||||
locations."/".proxyPass = "http://[${client}]:5030";
|
||||
listenAddresses = [ "10.0.0.1" "[fd0d::1]" "100.67.1.1" ];
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /persist/containers/${name} 755 root users"
|
||||
"d /persist/media/music 075 nobody users"
|
||||
|
|
|
|||
|
|
@ -24,8 +24,10 @@
|
|||
tailscale
|
||||
|
||||
modules.services.nginx
|
||||
modules.services.soulbeet
|
||||
modules.services.syncthing
|
||||
|
||||
inputs.c-fluorite.nixosModule
|
||||
inputs.c-garnet.nixosModule
|
||||
|
||||
./filesystem.nix
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ in {
|
|||
"/" = {
|
||||
device = "rootfs";
|
||||
fsType = "tmpfs";
|
||||
options = [ "defaults" "size=12G" "mode=755" ];
|
||||
options = [ "defaults" "size=6G" "mode=755" ];
|
||||
};
|
||||
"/boot" = mkLabelMount "UEFI" "vfat";
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ in {
|
|||
./services/nginx.nix
|
||||
./services/postgres.nix
|
||||
./services/sonarr.nix
|
||||
./services/soulbeet.nix
|
||||
./services/synapse.nix
|
||||
./services/syncthing.nix
|
||||
./services/tmptsync.nix
|
||||
|
|
|
|||
32
modules/services/soulbeet.nix
Normal file
32
modules/services/soulbeet.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ ... }:
|
||||
let
|
||||
dir_data = "/persist/services/soulbeet/data";
|
||||
dir_downloads = "/persist/containers/fluorite/slskd/downloads";
|
||||
dir_music = "/persist/media/music";
|
||||
in {
|
||||
systemd.tmpfiles.rules = [
|
||||
"d ${dir_data} 700 root root"
|
||||
"d ${dir_downloads} 755 root users"
|
||||
"d ${dir_music} 075 nobody users"
|
||||
];
|
||||
virtualisation.oci-containers.backend = "docker";
|
||||
virtualisation.oci-containers.containers = {
|
||||
container-name = {
|
||||
image = "docker.io/docccccc/soulbeet:latest";
|
||||
autoStart = true;
|
||||
ports = [ "9765:9765" ];
|
||||
environment = {
|
||||
DATABASE_URL = "sqlite:/data/soulbeet.db";
|
||||
DOWNLOAD_PATH = "/downloads";
|
||||
SECRET_KEY = "change-me-in-production";
|
||||
NAVIDROME_URL = "http://navidrome:4533";
|
||||
BEETS_CONFIG = "/config/config.yaml";
|
||||
};
|
||||
volumes = [
|
||||
"${dir_data}:/data"
|
||||
"${dir_downloads}:/downloads"
|
||||
"${dir_music}:/music"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue