feat(ci/cd): Set up Hydra
This commit is contained in:
parent
72dd5a2eb3
commit
a93625dd18
3 changed files with 99 additions and 0 deletions
13
.hydra/jobsets.nix
Normal file
13
.hydra/jobsets.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ nixpkgs ? <nixpkgs> }:
|
||||
|
||||
let
|
||||
|
||||
pkgs = import nixpkgs { };
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
myapp = pkgs.writeShellScript "hello" "${pkgs.hello}/bin/hello";
|
||||
|
||||
}
|
70
.hydra/spec.json
Normal file
70
.hydra/spec.json
Normal file
|
@ -0,0 +1,70 @@
|
|||
{
|
||||
"hello": {
|
||||
"enabled": 1,
|
||||
"hidden": false,
|
||||
"description": "test",
|
||||
"nixexprinput": "src",
|
||||
"nixexprpath": ".hydra/jobsets.nix",
|
||||
"checkinterval": 300,
|
||||
"schedulingshares": 100,
|
||||
"enableemail": false,
|
||||
"emailoverride": "",
|
||||
"keepnr": 3,
|
||||
"inputs": {
|
||||
"src": {
|
||||
"type": "git",
|
||||
"value": "https://forgejo.stefka.eu/jiriks74/zsh.nix main",
|
||||
"emailresponsible": false
|
||||
},
|
||||
"nixpkgs": { "type": "git",
|
||||
"type": "git",
|
||||
"value": "https://github.com/NixOS/nixpkgs.git nixos-unstable",
|
||||
"emailresponsible": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"zsh.nix": {
|
||||
"enabled": 1,
|
||||
"hidden": false,
|
||||
"description": "ZSH flake",
|
||||
"nixexprinput": "src",
|
||||
"nixexprpath": "flake.nix#hydraJobs",
|
||||
"checkinterval": 300,
|
||||
"schedulingshares": 100,
|
||||
"enableemail": false,
|
||||
"emailoverride": "",
|
||||
"keepnr": 3,
|
||||
"inputs": {
|
||||
"src": {
|
||||
"type": "git",
|
||||
"value": "https://forgejo.stefka.eu/jiriks74/zsh.nix main",
|
||||
"emailresponsible": false
|
||||
},
|
||||
"nixpkgs": { "type": "git",
|
||||
"type": "git",
|
||||
"value": "https://github.com/NixOS/nixpkgs.git nixos-unstable",
|
||||
"emailresponsible": false
|
||||
},
|
||||
"gitea_repo_name": {
|
||||
"type": "string",
|
||||
"value": "zsh.nix",
|
||||
"emailresponsible": false
|
||||
},
|
||||
"gitea_repo_owner": {
|
||||
"type": "string",
|
||||
"value": "jiriks74",
|
||||
"emailresponsible": false
|
||||
},
|
||||
"gitea_status_repo": {
|
||||
"type": "string",
|
||||
"value": "main",
|
||||
"emailresponsible": false
|
||||
},
|
||||
"gitea_http_url": {
|
||||
"type": "string",
|
||||
"value": "https://forgejo.stefka.eu/",
|
||||
"emailresponsible": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
16
flake.nix
16
flake.nix
|
@ -47,5 +47,21 @@
|
|||
];
|
||||
};
|
||||
};
|
||||
hydraJobs = {
|
||||
# Check the flake (flake.lock integrity, formatting, etc.)
|
||||
flakeCheck = forAllSystems (system: nixpkgs.legacyPackages.${system}.nixVersions.stable.checks.self);
|
||||
|
||||
# Test evaluation of Home Manager modules
|
||||
homeManagerModules = forAllSystems (system: {
|
||||
default = nixpkgs.legacyPackages.${system}.nixVersions.stable.evalJobs {
|
||||
flake = self;
|
||||
paths = [ "homeManagerModules.default" ];
|
||||
};
|
||||
withPackages = nixpkgs.legacyPackages.${system}.nixVersions.stable.evalJobs {
|
||||
flake = self;
|
||||
paths = [ "homeManagerModules.withPackages" ];
|
||||
};
|
||||
});
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue