overlays: add underpinnings for a pr tracking mechanism
This commit is contained in:
parent
328583e199
commit
80a174e3c0
@ -1,5 +1,12 @@
|
||||
{ lib, ... }:
|
||||
let
|
||||
prStatus = builtins.fromJSON (builtins.readFile ../pr_status.json);
|
||||
prIsOpen = pr: overlay:
|
||||
if prStatus."${builtins.toString pr}".status == "open" then
|
||||
overlay
|
||||
else
|
||||
null;
|
||||
|
||||
mkCronScript = name: src: ''
|
||||
. /etc/profile;
|
||||
set -x
|
||||
@ -31,6 +38,7 @@ let
|
||||
deadnix
|
||||
git
|
||||
git-bug
|
||||
jo
|
||||
jq
|
||||
nil
|
||||
nix-diff
|
||||
@ -54,7 +62,7 @@ let
|
||||
};
|
||||
|
||||
xinlib = {
|
||||
inherit buildVer mkCronScript jobToUserService jobToService buildShell;
|
||||
inherit buildVer mkCronScript jobToUserService jobToService buildShell prStatus prIsOpen;
|
||||
};
|
||||
|
||||
in xinlib
|
||||
|
@ -1,8 +1,9 @@
|
||||
{ isUnstable, lib, ... }:
|
||||
{ isUnstable, lib, xinlib, ... }:
|
||||
let
|
||||
openssh = import ./openssh.nix;
|
||||
tailscale = import ./tailscale.nix;
|
||||
|
||||
tailscale = xinlib.prIsOpen 231281 (import ./tailscale.nix);
|
||||
jetbrains = xinlib.prIsOpen 232308 (import ./jetbrains.nix);
|
||||
tidal-hifi = xinlib.prIsOpen 228552 (import ./tidal-hifi.nix { inherit lib; });
|
||||
in {
|
||||
nixpkgs.overlays = if isUnstable then [
|
||||
(_: super: {
|
||||
@ -12,8 +13,8 @@ in {
|
||||
});
|
||||
};
|
||||
})
|
||||
(import ./jetbrains.nix)
|
||||
(import ./tidal-hifi.nix { inherit lib; })
|
||||
jetbrains
|
||||
tidal-hifi
|
||||
openssh
|
||||
tailscale
|
||||
] else [
|
||||
|
@ -1 +1,17 @@
|
||||
{"232308":{"status":"open","link":"https://github.com/NixOS/nixpkgs/pull/232308"}}
|
||||
{
|
||||
"232308": {
|
||||
"status": "open",
|
||||
"target": "unstable",
|
||||
"link": "https://github.com/NixOS/nixpkgs/pull/232308"
|
||||
},
|
||||
"228552": {
|
||||
"status": "open",
|
||||
"target": "unstable",
|
||||
"link": "https://github.com/NixOS/nixpkgs/pull/228552"
|
||||
},
|
||||
"231281": {
|
||||
"status": "open",
|
||||
"target": "stable",
|
||||
"link": "https://github.com/NixOS/nixpkgs/pull/231281"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user