Compare commits
2 Commits
8988a34c69
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 625d12d497 | |||
| f08d7ac1d2 |
@@ -18,7 +18,7 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
prs = readJSONFile pulls;
|
prs = readJSONFile pulls;
|
||||||
refs = readJSONFile branches;
|
#refs = readJSONFile branches;
|
||||||
|
|
||||||
# template for creating a job
|
# template for creating a job
|
||||||
makeJob =
|
makeJob =
|
||||||
@@ -47,19 +47,19 @@ let
|
|||||||
giteaHost = "ssh://gitea@nayeonie.com:2222";
|
giteaHost = "ssh://gitea@nayeonie.com:2222";
|
||||||
repo = "ahuston-0/nix-dotfiles";
|
repo = "ahuston-0/nix-dotfiles";
|
||||||
# # Create a hydra job for a branch
|
# # Create a hydra job for a branch
|
||||||
jobOfRef =
|
#jobOfRef =
|
||||||
name:
|
# name:
|
||||||
{ ref, ... }:
|
# { ref, ... }:
|
||||||
if ((builtins.match "^refs/heads/(.*)$" ref) == null) then
|
# if ((builtins.match "^refs/heads/(.*)$" ref) == null) then
|
||||||
null
|
# null
|
||||||
else
|
# else
|
||||||
{
|
# {
|
||||||
name = builtins.replaceStrings [ "/" ] [ "-" ] "branch-${name}";
|
# name = builtins.replaceStrings [ "/" ] [ "-" ] "branch-${name}";
|
||||||
value = makeJob {
|
# value = makeJob {
|
||||||
description = "Branch ${name}";
|
# description = "Branch ${name}";
|
||||||
flake = "git+${giteaHost}/${repo}?ref=${ref}";
|
# flake = "git+${giteaHost}/${repo}?ref=${ref}";
|
||||||
};
|
# };
|
||||||
};
|
# };
|
||||||
|
|
||||||
# Create a hydra job for a PR
|
# Create a hydra job for a PR
|
||||||
jobOfPR = id: info: {
|
jobOfPR = id: info: {
|
||||||
@@ -77,12 +77,12 @@ let
|
|||||||
# wrapper function for reading json from file
|
# wrapper function for reading json from file
|
||||||
readJSONFile = f: builtins.fromJSON (builtins.readFile f);
|
readJSONFile = f: builtins.fromJSON (builtins.readFile f);
|
||||||
# remove null values from a set, in-case of branches that don't exist
|
# remove null values from a set, in-case of branches that don't exist
|
||||||
mapFilter = f: l: builtins.filter (x: (x != null)) (map f l);
|
#mapFilter = f: l: builtins.filter (x: (x != null)) (map f l);
|
||||||
|
|
||||||
# Create job set from PRs and branches
|
# Create job set from PRs and branches
|
||||||
jobs = makeSpec (
|
jobs = makeSpec (
|
||||||
builtins.listToAttrs (map ({ name, value }: jobOfPR name value) (attrsToList prs))
|
builtins.listToAttrs (map ({ name, value }: jobOfPR name value) (attrsToList prs))
|
||||||
// builtins.listToAttrs (mapFilter ({ name, value }: jobOfRef name value) (attrsToList refs))
|
#// builtins.listToAttrs (mapFilter ({ name, value }: jobOfRef name value) (attrsToList refs))
|
||||||
);
|
);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ in
|
|||||||
bazarr = {
|
bazarr = {
|
||||||
image = "ghcr.io/linuxserver/bazarr:latest";
|
image = "ghcr.io/linuxserver/bazarr:latest";
|
||||||
ports = [ "6767:6767" ];
|
ports = [ "6767:6767" ];
|
||||||
|
hostname = "bazarr";
|
||||||
environment = {
|
environment = {
|
||||||
PUID = "600";
|
PUID = "600";
|
||||||
PGID = "100";
|
PGID = "100";
|
||||||
@@ -72,6 +73,7 @@ in
|
|||||||
prowlarr = {
|
prowlarr = {
|
||||||
image = "ghcr.io/linuxserver/prowlarr:latest";
|
image = "ghcr.io/linuxserver/prowlarr:latest";
|
||||||
ports = [ "9696:9696" ];
|
ports = [ "9696:9696" ];
|
||||||
|
hostname = "prowlarr";
|
||||||
environment = {
|
environment = {
|
||||||
PUID = "600";
|
PUID = "600";
|
||||||
PGID = "100";
|
PGID = "100";
|
||||||
@@ -85,6 +87,7 @@ in
|
|||||||
radarr = {
|
radarr = {
|
||||||
image = "ghcr.io/linuxserver/radarr:latest";
|
image = "ghcr.io/linuxserver/radarr:latest";
|
||||||
ports = [ "7878:7878" ];
|
ports = [ "7878:7878" ];
|
||||||
|
hostname = "radarr";
|
||||||
environment = {
|
environment = {
|
||||||
PUID = "600";
|
PUID = "600";
|
||||||
PGID = "100";
|
PGID = "100";
|
||||||
@@ -101,6 +104,7 @@ in
|
|||||||
sonarr = {
|
sonarr = {
|
||||||
image = "ghcr.io/linuxserver/sonarr:latest";
|
image = "ghcr.io/linuxserver/sonarr:latest";
|
||||||
ports = [ "8989:8989" ];
|
ports = [ "8989:8989" ];
|
||||||
|
hostname = "sonarr";
|
||||||
environment = {
|
environment = {
|
||||||
PUID = "600";
|
PUID = "600";
|
||||||
PGID = "100";
|
PGID = "100";
|
||||||
@@ -117,6 +121,7 @@ in
|
|||||||
lidarr = {
|
lidarr = {
|
||||||
image = "ghcr.io/linuxserver/lidarr:latest";
|
image = "ghcr.io/linuxserver/lidarr:latest";
|
||||||
ports = [ "8686:8686" ];
|
ports = [ "8686:8686" ];
|
||||||
|
hostname = "lidarr";
|
||||||
environment = {
|
environment = {
|
||||||
PUID = "600";
|
PUID = "600";
|
||||||
PGID = "100";
|
PGID = "100";
|
||||||
@@ -133,6 +138,7 @@ in
|
|||||||
unpackerr = {
|
unpackerr = {
|
||||||
image = "golift/unpackerr:latest";
|
image = "golift/unpackerr:latest";
|
||||||
user = "600:100";
|
user = "600:100";
|
||||||
|
hostname = "unpackerr";
|
||||||
environment = {
|
environment = {
|
||||||
TZ = "America/New_York";
|
TZ = "America/New_York";
|
||||||
};
|
};
|
||||||
@@ -147,6 +153,7 @@ in
|
|||||||
image = "golift/notifiarr:latest";
|
image = "golift/notifiarr:latest";
|
||||||
ports = [ "5454:5454" ];
|
ports = [ "5454:5454" ];
|
||||||
user = "600:100";
|
user = "600:100";
|
||||||
|
hostname = "notifiarr";
|
||||||
environment = {
|
environment = {
|
||||||
TZ = "America/New_York";
|
TZ = "America/New_York";
|
||||||
}
|
}
|
||||||
@@ -161,6 +168,7 @@ in
|
|||||||
};
|
};
|
||||||
jellyseerr = {
|
jellyseerr = {
|
||||||
image = "fallenbagel/jellyseerr:latest";
|
image = "fallenbagel/jellyseerr:latest";
|
||||||
|
hostname = "jellyseerr";
|
||||||
environment = {
|
environment = {
|
||||||
PUID = "600";
|
PUID = "600";
|
||||||
PGID = "100";
|
PGID = "100";
|
||||||
|
|||||||
Reference in New Issue
Block a user