forked from
oeiuwq.com/den
Modular, context-aware and aspect-oriented dendritic Nix configurations.
Discussions: https://oeiuwq.zulipchat.com/join/nqp26cd4kngon6mo3ncgnuap/
1{ self, ... }:
2{
3 perSystem =
4 { pkgs, ... }:
5 let
6 checkFile =
7 name: file:
8 pkgs.runCommandLocal name { } ''
9 ls -la ${file} | tee $out
10 '';
11
12 checkCond =
13 name: cond:
14 let
15 code = if cond then "touch $out" else ''echo "Cond-Failed: ${name}"'';
16 in
17 pkgs.runCommandLocal name { } code;
18
19 rockhopper = self.nixosConfigurations.rockhopper;
20 honeycrisp = self.darwinConfigurations.honeycrisp;
21 adelie = self.wslConfigurations.adelie;
22 cam = self.homeConfigurations.cam;
23 bob = self.homeConfigurations.bob;
24 luke = self.homeConfigurations.luke;
25
26 alice-at-rockhopper = rockhopper.config.home-manager.users.alice;
27 alice-at-honeycrisp = honeycrisp.config.home-manager.users.alice;
28 in
29 {
30 _module.args = {
31 inherit checkCond checkFile;
32 inherit rockhopper honeycrisp adelie;
33 inherit cam bob luke;
34 inherit alice-at-rockhopper alice-at-honeycrisp;
35 };
36 };
37}