add hydra, enable zsh autocomplete #59
116
flake.lock
generated
116
flake.lock
generated
@ -67,21 +67,6 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"crane": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1727316705,
|
|
||||||
"narHash": "sha256-/mumx8AQ5xFuCJqxCIOFCHTVlxHkMT21idpbgbm/TIE=",
|
|
||||||
"owner": "ipetkov",
|
|
||||||
"repo": "crane",
|
|
||||||
"rev": "5b03654ce046b5167e7b0bccbd8244cb56c16f0e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "ipetkov",
|
|
||||||
"repo": "crane",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"firefox-addons": {
|
"firefox-addons": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": [
|
"flake-utils": [
|
||||||
@ -340,6 +325,28 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"hydra": {
|
||||||
|
"inputs": {
|
||||||
|
"nix": "nix",
|
||||||
|
"nix-eval-jobs": "nix-eval-jobs",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1739907437,
|
||||||
|
"narHash": "sha256-yBLVNhbGM/WmHUEa0mCw7mFfa5blxWZGlqP6F6PgQnY=",
|
||||||
|
"owner": "fx-chun",
|
||||||
|
"repo": "hydra",
|
||||||
|
"rev": "18c0d762109549351ecf622cde34514351a72492",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "fx-chun",
|
||||||
|
"repo": "hydra",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"hyprland-contrib": {
|
"hyprland-contrib": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@ -360,6 +367,59 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nix": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-compat": [
|
||||||
|
"hydra"
|
||||||
|
],
|
||||||
|
"flake-parts": [
|
||||||
|
"hydra"
|
||||||
|
],
|
||||||
|
"git-hooks-nix": [
|
||||||
|
"hydra"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"hydra",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"nixpkgs-23-11": [
|
||||||
|
"hydra"
|
||||||
|
],
|
||||||
|
"nixpkgs-regression": [
|
||||||
|
"hydra"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1739899400,
|
||||||
|
"narHash": "sha256-q/RgA4bB7zWai4oPySq9mch7qH14IEeom2P64SXdqHs=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nix",
|
||||||
|
"rev": "e310c19a1aeb1ce1ed4d41d5ab2d02db596e0918",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "2.26-maintenance",
|
||||||
|
"repo": "nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nix-eval-jobs": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1739500569,
|
||||||
|
"narHash": "sha256-3wIReAqdTALv39gkWXLMZQvHyBOc3yPkWT2ZsItxedY=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nix-eval-jobs",
|
||||||
|
"rev": "4b392b284877d203ae262e16af269f702df036bc",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nix-eval-jobs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nix-index-database": {
|
"nix-index-database": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@ -555,6 +615,7 @@
|
|||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts",
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
|
"hydra": "hydra",
|
||||||
"hyprland-contrib": "hyprland-contrib",
|
"hyprland-contrib": "hyprland-contrib",
|
||||||
"nix-index-database": "nix-index-database",
|
"nix-index-database": "nix-index-database",
|
||||||
"nixos-generators": "nixos-generators",
|
"nixos-generators": "nixos-generators",
|
||||||
@ -567,7 +628,6 @@
|
|||||||
"sops-nix": "sops-nix",
|
"sops-nix": "sops-nix",
|
||||||
"stylix": "stylix",
|
"stylix": "stylix",
|
||||||
"systems": "systems_2",
|
"systems": "systems_2",
|
||||||
"typhon": "typhon",
|
|
||||||
"wired-notify": "wired-notify"
|
"wired-notify": "wired-notify"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -786,30 +846,6 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"typhon": {
|
|
||||||
"inputs": {
|
|
||||||
"crane": "crane",
|
|
||||||
"flake-compat": [
|
|
||||||
"flake-compat"
|
|
||||||
],
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1730373693,
|
|
||||||
"narHash": "sha256-pDoaV+a3CBmvhYKD/m8k5soQ4kxwzvv2Kh/y7QHCGyU=",
|
|
||||||
"owner": "typhon-ci",
|
|
||||||
"repo": "typhon",
|
|
||||||
"rev": "e4f11b3d7c47c3a584fe565637bcc6e50f3735da",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "typhon-ci",
|
|
||||||
"repo": "typhon",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"wired-notify": {
|
"wired-notify": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": [
|
"flake-parts": [
|
||||||
|
15
flake.nix
15
flake.nix
@ -58,6 +58,13 @@
|
|||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
hydra = {
|
||||||
|
url = "github:fx-chun/hydra";
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
hyprland-contrib = {
|
hyprland-contrib = {
|
||||||
url = "github:hyprwm/contrib";
|
url = "github:hyprwm/contrib";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
@ -112,14 +119,6 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
typhon = {
|
|
||||||
url = "github:typhon-ci/typhon";
|
|
||||||
inputs = {
|
|
||||||
flake-compat.follows = "flake-compat";
|
|
||||||
nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
wired-notify = {
|
wired-notify = {
|
||||||
url = "github:Toqozz/wired-notify";
|
url = "github:Toqozz/wired-notify";
|
||||||
inputs = {
|
inputs = {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ pulls, branches, ... }:
|
{ pulls, ... }:
|
||||||
let
|
let
|
||||||
# create the json spec for the jobset
|
# create the json spec for the jobset
|
||||||
makeSpec =
|
makeSpec =
|
||||||
@ -18,8 +18,7 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
prs = readJSONFile pulls;
|
prs = readJSONFile pulls;
|
||||||
refs = readJSONFile branches;
|
# refs = readJSONFile branches;
|
||||||
repo = "RAD-Development/nix-dotfiles";
|
|
||||||
|
|
||||||
# template for creating a job
|
# template for creating a job
|
||||||
makeJob =
|
makeJob =
|
||||||
@ -44,27 +43,27 @@ let
|
|||||||
emailoverride = "";
|
emailoverride = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
# 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+ssh://git@github.com/${repo}?ref=${ref}";
|
# flake = "git+ssh://git@github.com/${repo}?ref=${ref}";
|
||||||
};
|
# };
|
||||||
};
|
# };
|
||||||
|
|
||||||
# Create a hydra job for a PR
|
# Create a hydra job for a PR
|
||||||
jobOfPR = id: info: {
|
jobOfPR = id: info: {
|
||||||
name = if info.draft then "draft-${id}" else "pr-${id}";
|
name = if info.draft then "draft-${id}" else "pr-${id}";
|
||||||
value = makeJob {
|
value = makeJob {
|
||||||
description = "PR ${id}: ${info.title}";
|
description = "PR ${id}: ${info.title}";
|
||||||
flake = "git+ssh://git@github.com/${info.head.repo.full_name}?ref=${info.head.ref}";
|
flake = "git+ssh://gitea@nayeonie.com:2222/${info.head.repo.full_name}?ref=${info.head.ref}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -74,12 +73,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
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"enabled": 1,
|
"enabled": 1,
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
"description": "RAD Development infrastructure",
|
"description": "ahuston-0's personal server infra",
|
||||||
"nixexprinput": "nixexpr",
|
"nixexprinput": "nixexpr",
|
||||||
"nixexprpath": "hydra/jobsets.nix",
|
"nixexprpath": "hydra/jobsets.nix",
|
||||||
"checkinterval": 60,
|
"checkinterval": 60,
|
||||||
@ -12,7 +12,7 @@
|
|||||||
"type": 0,
|
"type": 0,
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixexpr": {
|
"nixexpr": {
|
||||||
"value": "https://github.com/RAD-Development/nix-dotfiles main",
|
"value": "ssh://gitea@nayeonie.com:2222/ahuston-0/nix-dotfiles.git main",
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"emailresponsible": false
|
"emailresponsible": false
|
||||||
},
|
},
|
||||||
@ -22,13 +22,8 @@
|
|||||||
"emailresponsible": false
|
"emailresponsible": false
|
||||||
},
|
},
|
||||||
"pulls": {
|
"pulls": {
|
||||||
"type": "githubpulls",
|
"type": "giteapulls",
|
||||||
"value": "RAD-Development nix-dotfiles",
|
"value": "nayeonie.com alice nix-dotfiles https",
|
||||||
"emailresponsible": false
|
|
||||||
},
|
|
||||||
"branches": {
|
|
||||||
"type": "github_refs",
|
|
||||||
"value": "RAD-Development nix-dotfiles heads -",
|
|
||||||
"emailresponsible": false
|
"emailresponsible": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,13 +13,12 @@
|
|||||||
./firewall.nix
|
./firewall.nix
|
||||||
./haproxy
|
./haproxy
|
||||||
./hardware-changes.nix
|
./hardware-changes.nix
|
||||||
# ./hydra.nix
|
./hydra.nix
|
||||||
./minio.nix
|
./minio.nix
|
||||||
./networking.nix
|
./networking.nix
|
||||||
./nextcloud.nix
|
./nextcloud.nix
|
||||||
./postgresql.nix
|
./postgresql.nix
|
||||||
./samba.nix
|
./samba.nix
|
||||||
./typhon.nix
|
|
||||||
./zfs.nix
|
./zfs.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -3,6 +3,5 @@
|
|||||||
users = [ "alice" ];
|
users = [ "alice" ];
|
||||||
modules = [
|
modules = [
|
||||||
# inputs.attic.nixosModules.atticd
|
# inputs.attic.nixosModules.atticd
|
||||||
inputs.typhon.nixosModules.default
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
inputs,
|
||||||
pkgs,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
@ -43,6 +42,7 @@ in
|
|||||||
services = {
|
services = {
|
||||||
hydra = {
|
hydra = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
package = inputs.hydra.packages.hydra;
|
||||||
hydraURL = "https://hydra.alicehuston.xyz";
|
hydraURL = "https://hydra.alicehuston.xyz";
|
||||||
smtpHost = "alicehuston.xyz";
|
smtpHost = "alicehuston.xyz";
|
||||||
notificationSender = "hydra@alicehuston.xyz";
|
notificationSender = "hydra@alicehuston.xyz";
|
||||||
|
@ -17,5 +17,4 @@ rec {
|
|||||||
primary_nextcloud = "${zfs_primary}/nextcloud";
|
primary_nextcloud = "${zfs_primary}/nextcloud";
|
||||||
primary_redis = "${zfs_primary}/redis";
|
primary_redis = "${zfs_primary}/redis";
|
||||||
primary_torr = "${zfs_primary}/torr";
|
primary_torr = "${zfs_primary}/torr";
|
||||||
primary_typhon = "${zfs_primary}/typhon";
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user