stash wip
This commit is contained in:
parent
3934d899b8
commit
2ad566ec27
@ -1,7 +1,4 @@
|
|||||||
{
|
{ config, ... }:
|
||||||
config,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
proxy = locations: {
|
proxy = locations: {
|
||||||
inherit locations;
|
inherit locations;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
{ ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
@ -51,6 +51,7 @@
|
|||||||
6767 # bazarr
|
6767 # bazarr
|
||||||
5000 # kavita
|
5000 # kavita
|
||||||
3399 # sabnzbd
|
3399 # sabnzbd
|
||||||
|
9999 # stash
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
@ -88,12 +89,15 @@
|
|||||||
};
|
};
|
||||||
users = {
|
users = {
|
||||||
groups.nixremote.gid = 555;
|
groups.nixremote.gid = 555;
|
||||||
users.nixremote = {
|
users = {
|
||||||
isNormalUser = true;
|
jawz.packages = with pkgs; [ stash ];
|
||||||
createHome = true;
|
nixremote = {
|
||||||
group = "nixremote";
|
isNormalUser = true;
|
||||||
home = "/var/nixremote/";
|
createHome = true;
|
||||||
openssh.authorizedKeys.keys = [ (builtins.readFile ../../secrets/ssh/ed25519_nixworkstation.pub) ];
|
group = "nixremote";
|
||||||
|
home = "/var/nixremote/";
|
||||||
|
openssh.authorizedKeys.keys = [ (builtins.readFile ../../secrets/ssh/ed25519_nixworkstation.pub) ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
services = {
|
services = {
|
||||||
|
|||||||
@ -39,6 +39,7 @@ _self: super: {
|
|||||||
inherit (pkgsU) ns-usbloader;
|
inherit (pkgsU) ns-usbloader;
|
||||||
inherit (pkgsU) collector;
|
inherit (pkgsU) collector;
|
||||||
inherit (pkgsU) homepage-dashboard;
|
inherit (pkgsU) homepage-dashboard;
|
||||||
|
inherit (pkgsU) stash;
|
||||||
inherit (pkgsM) gallery-dl;
|
inherit (pkgsM) gallery-dl;
|
||||||
inherit (pkgsM) yt-dlp;
|
inherit (pkgsM) yt-dlp;
|
||||||
handbrake = super.handbrake.override { useGtk = true; };
|
handbrake = super.handbrake.override { useGtk = true; };
|
||||||
|
|||||||
47
pkgs/stash.nix
Normal file
47
pkgs/stash.nix
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.services.stash;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
services.stash = {
|
||||||
|
enable = lib.mkEnableOption "Stash";
|
||||||
|
|
||||||
|
package = lib.mkPackageOption pkgs "stash" { };
|
||||||
|
|
||||||
|
# port = lib.mkOption {
|
||||||
|
# type = lib.types.port;
|
||||||
|
# default = 8080;
|
||||||
|
# description = "The port of the Stash web application";
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
systemd.services.stash = {
|
||||||
|
description = "Stash";
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
# environment = {
|
||||||
|
# STASH_DIR = "/var/lib/stash";
|
||||||
|
# } // lib.optionalAttrs (cfg.databaseUrl != null) {
|
||||||
|
# STASH_DATABASE_URL = cfg.databaseUrl;
|
||||||
|
# };
|
||||||
|
|
||||||
|
serviceConfig = {
|
||||||
|
ExecStart = "${cfg.package}/bin/stash server --address '${cfg.address}' --port '${toString cfg.port}' --webroot '${cfg.webRoot}'";
|
||||||
|
|
||||||
|
EnvironmentFile = lib.optional (cfg.environmentFile != null) cfg.environmentFile;
|
||||||
|
|
||||||
|
RootDirectory = "/var/lib/stash";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
meta.maintainers = with lib.maintainers; [ CaptainJawZ ];
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user