Initial commit
This commit is contained in:
commit
cfcc57a8bd
353 changed files with 18756 additions and 0 deletions
37
flake/den/templates/examples/modules/_example/ci/helpers.nix
Normal file
37
flake/den/templates/examples/modules/_example/ci/helpers.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{ self, ... }:
|
||||
{
|
||||
perSystem =
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
checkFile =
|
||||
name: file:
|
||||
pkgs.runCommandLocal name { } ''
|
||||
ls -la ${file} | tee $out
|
||||
'';
|
||||
|
||||
checkCond =
|
||||
name: cond:
|
||||
let
|
||||
code = if cond then "touch $out" else ''echo "Cond-Failed: ${name}"'';
|
||||
in
|
||||
pkgs.runCommandLocal name { } code;
|
||||
|
||||
rockhopper = self.nixosConfigurations.rockhopper;
|
||||
honeycrisp = self.darwinConfigurations.honeycrisp;
|
||||
adelie = self.wslConfigurations.adelie;
|
||||
cam = self.homeConfigurations.cam;
|
||||
bob = self.homeConfigurations.bob;
|
||||
luke = self.homeConfigurations.luke;
|
||||
|
||||
alice-at-rockhopper = rockhopper.config.home-manager.users.alice;
|
||||
alice-at-honeycrisp = honeycrisp.config.home-manager.users.alice;
|
||||
in
|
||||
{
|
||||
_module.args = {
|
||||
inherit checkCond checkFile;
|
||||
inherit rockhopper honeycrisp adelie;
|
||||
inherit cam bob luke;
|
||||
inherit alice-at-rockhopper alice-at-honeycrisp;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue