feat: syncthing djuasdhjnasbhjbdahjbdahjsb
This commit is contained in:
@@ -37,41 +37,57 @@
|
|||||||
keyFile = "/persist/vault/root/deertopia-key";
|
keyFile = "/persist/vault/root/deertopia-key";
|
||||||
};
|
};
|
||||||
|
|
||||||
git-annex = {
|
# git-annex = {
|
||||||
|
# enable = true;
|
||||||
|
# user.name = "annex";
|
||||||
|
# user.email = "annex@deertopia.net";
|
||||||
|
# keyFiles = [
|
||||||
|
# ../../public-keys/crumb-at-guix-rebound.pub
|
||||||
|
# ../../public-keys/crumble-at-fruitbook.pub
|
||||||
|
# ../../public-keys/lain-at-deertopia.pub
|
||||||
|
# ];
|
||||||
|
# repos = {
|
||||||
|
# "/persist/vault/jellyfin/Documents" = {
|
||||||
|
# managed = true;
|
||||||
|
# symlinkToAnnexHome = "documents";
|
||||||
|
# remotes = {
|
||||||
|
# "guix-rebound" = "crumb@guix-rebound:Documents";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# "/persist/vault/jellyfin/Music" = {
|
||||||
|
# managed = true;
|
||||||
|
# symlinkToAnnexHome = "music";
|
||||||
|
# remotes = {
|
||||||
|
# "guix-rebound" = "crumb@guix-rebound:Music";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# "/persist/deertopia.net/dav/org" = {
|
||||||
|
# managed = true;
|
||||||
|
# symlinkToAnnexHome = "org";
|
||||||
|
# remotes = {
|
||||||
|
# "guix-rebound" = "crumb@guix-rebound:org";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
|
||||||
|
syncthing = {
|
||||||
enable = true;
|
enable = true;
|
||||||
user.name = "annex";
|
devices = {
|
||||||
user.email = "annex@deertopia.net";
|
"guix-rebound".id =
|
||||||
keyFiles = [
|
"Q5B6LIV-5HQMWWV-XFQL5IT-PHP7PVE-XFWUVHK-F6WJ42C-OPMR4M7-GFNK3AG";
|
||||||
../../public-keys/crumb-at-guix-rebound.pub
|
|
||||||
../../public-keys/crumble-at-fruitbook.pub
|
|
||||||
../../public-keys/lain-at-deertopia.pub
|
|
||||||
];
|
|
||||||
repos = {
|
|
||||||
"/persist/vault/jellyfin/Documents" = {
|
|
||||||
managed = true;
|
|
||||||
symlinkToAnnexHome = "documents";
|
|
||||||
remotes = {
|
|
||||||
"guix-rebound" = "crumb@guix-rebound:Documents";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
"/persist/vault/jellyfin/Music" = {
|
|
||||||
managed = true;
|
|
||||||
symlinkToAnnexHome = "music";
|
|
||||||
remotes = {
|
|
||||||
"guix-rebound" = "crumb@guix-rebound:Music";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
"/persist/deertopia.net/dav/org" = {
|
|
||||||
managed = true;
|
|
||||||
symlinkToAnnexHome = "org";
|
|
||||||
remotes = {
|
|
||||||
"guix-rebound" = "crumb@guix-rebound:org";
|
|
||||||
};
|
};
|
||||||
|
folders = {
|
||||||
|
"Music" = {
|
||||||
|
path = "/persist/vault/jellyfin/Music";
|
||||||
|
devices = [ "guix-rebound" ];
|
||||||
|
ignorePerms = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
deertopia = {
|
deertopia = {
|
||||||
|
# slskd.enable = true;
|
||||||
jellyfin.enable = true;
|
jellyfin.enable = true;
|
||||||
nginx.enable = true;
|
nginx.enable = true;
|
||||||
webdav.enable = true;
|
webdav.enable = true;
|
||||||
|
|||||||
45
modules/nixos/deertopia/slskd.nix
Normal file
45
modules/nixos/deertopia/slskd.nix
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let cfg = config.sydnix.deertopia.slskd;
|
||||||
|
in {
|
||||||
|
options = {
|
||||||
|
sydnix.deertopia.slskd = {
|
||||||
|
enable = mkEnableOption "Soulseek";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
sydnix.sops.secrets.slskd-credentials = {};
|
||||||
|
|
||||||
|
services.slskd = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
openFirewall = true;
|
||||||
|
domain = null;
|
||||||
|
environmentFile = "/run/secrets/slskd-credentials";
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
shares.directories = [ "/persist/vault/jellyfin/Music" ];
|
||||||
|
# directories.downloads = "/persist/vault/jellyfin/Music";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [
|
||||||
|
config.services.slskd.settings.web.port
|
||||||
|
];
|
||||||
|
|
||||||
|
users.users.${config.services.slskd.user}.extraGroups = [ "jellyfin" ];
|
||||||
|
|
||||||
|
sydnix.deertopia.nginx.vhosts."slsk".vhost = {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass =
|
||||||
|
"http://localhost:${builtins.toString
|
||||||
|
config.services.slskd.settings.web.port}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
35
modules/nixos/syncthing.nix
Normal file
35
modules/nixos/syncthing.nix
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let cfg = config.sydnix.syncthing;
|
||||||
|
in {
|
||||||
|
options = {
|
||||||
|
sydnix.syncthing = {
|
||||||
|
enable = lib.mkEnableOption "Syncthing";
|
||||||
|
devices = lib.mkOption {
|
||||||
|
type = lib.types.anything;
|
||||||
|
default = {};
|
||||||
|
};
|
||||||
|
folders = lib.mkOption {
|
||||||
|
type = lib.types.anything;
|
||||||
|
default = {};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
users.users.${config.services.syncthing.user}.extraGroups = [
|
||||||
|
"jellyfin"
|
||||||
|
];
|
||||||
|
|
||||||
|
services.syncthing = {
|
||||||
|
enable = true;
|
||||||
|
openDefaultPorts = true;
|
||||||
|
settings = {
|
||||||
|
overrideDevices = true;
|
||||||
|
overrideFolders = true;
|
||||||
|
devices = cfg.devices;
|
||||||
|
folders = cfg.folders;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user