stash wip
This commit is contained in:
parent
3934d899b8
commit
2ad566ec27
@ -1,7 +1,4 @@
|
||||
{
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{ config, ... }:
|
||||
let
|
||||
proxy = locations: {
|
||||
inherit locations;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
{ ... }:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
@ -51,6 +51,7 @@
|
||||
6767 # bazarr
|
||||
5000 # kavita
|
||||
3399 # sabnzbd
|
||||
9999 # stash
|
||||
];
|
||||
in
|
||||
{
|
||||
@ -88,12 +89,15 @@
|
||||
};
|
||||
users = {
|
||||
groups.nixremote.gid = 555;
|
||||
users.nixremote = {
|
||||
isNormalUser = true;
|
||||
createHome = true;
|
||||
group = "nixremote";
|
||||
home = "/var/nixremote/";
|
||||
openssh.authorizedKeys.keys = [ (builtins.readFile ../../secrets/ssh/ed25519_nixworkstation.pub) ];
|
||||
users = {
|
||||
jawz.packages = with pkgs; [ stash ];
|
||||
nixremote = {
|
||||
isNormalUser = true;
|
||||
createHome = true;
|
||||
group = "nixremote";
|
||||
home = "/var/nixremote/";
|
||||
openssh.authorizedKeys.keys = [ (builtins.readFile ../../secrets/ssh/ed25519_nixworkstation.pub) ];
|
||||
};
|
||||
};
|
||||
};
|
||||
services = {
|
||||
|
||||
@ -39,6 +39,7 @@ _self: super: {
|
||||
inherit (pkgsU) ns-usbloader;
|
||||
inherit (pkgsU) collector;
|
||||
inherit (pkgsU) homepage-dashboard;
|
||||
inherit (pkgsU) stash;
|
||||
inherit (pkgsM) gallery-dl;
|
||||
inherit (pkgsM) yt-dlp;
|
||||
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