diff options
Diffstat (limited to 'flakes/flake.nix')
-rw-r--r-- | flakes/flake.nix | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/flakes/flake.nix b/flakes/flake.nix new file mode 100644 index 0000000..aecff57 --- /dev/null +++ b/flakes/flake.nix | |||
@@ -0,0 +1,67 @@ | |||
1 | { | ||
2 | description = "immae-eu infrastructure"; | ||
3 | inputs = { | ||
4 | s-backports.url = "path:./backports"; | ||
5 | s-copanier.url = "path:./copanier"; | ||
6 | s-diaspora.url = "path:./diaspora"; | ||
7 | s-etherpad-lite.url = "path:./etherpad-lite"; | ||
8 | s-fiche.url = "path:./fiche"; | ||
9 | s-files-watcher.url = "path:./files-watcher"; | ||
10 | s-grocy.url = "path:./grocy"; | ||
11 | s-lib.url = "path:./lib"; | ||
12 | s-loginctl-linger.url = "path:./loginctl-linger"; | ||
13 | s-mastodon.url = "path:./mastodon"; | ||
14 | s-mediagoblin.url = "path:./mediagoblin"; | ||
15 | s-multi-apache-container.url = "path:./multi-apache-container"; | ||
16 | s-mypackages.url = "path:./mypackages"; | ||
17 | s-myuids.url = "path:./myuids"; | ||
18 | s-naemon.url = "path:./naemon"; | ||
19 | s-openarc.url = "path:./openarc"; | ||
20 | s-opendmarc.url = "path:./opendmarc"; | ||
21 | s-paste.url = "path:./paste"; | ||
22 | s-peertube.url = "path:./peertube"; | ||
23 | s-rsync_backup.url = "path:./rsync_backup"; | ||
24 | s-secrets.url = "path:./secrets"; | ||
25 | s-surfer.url = "path:./surfer"; | ||
26 | s-taskwarrior-web.url = "path:./taskwarrior-web"; | ||
27 | |||
28 | s-private-buildbot.url = "path:./private/buildbot"; | ||
29 | s-private-chatons.url = "path:./private/chatons"; | ||
30 | s-private-environment.url = "path:./private/environment"; | ||
31 | s-private-mail-relay.url = "path:./private/mail-relay"; | ||
32 | s-private-milters.url = "path:./private/milters"; | ||
33 | s-private-monitoring.url = "path:./private/monitoring"; | ||
34 | s-private-openarc.url = "path:./private/openarc"; | ||
35 | s-private-opendmarc.url = "path:./private/opendmarc"; | ||
36 | s-private-openldap.url = "path:./private/openldap"; | ||
37 | s-private-paste.url = "path:./private/paste"; | ||
38 | s-private-peertube.url = "path:./private/peertube"; | ||
39 | s-private-php.url = "path:./private/php"; | ||
40 | s-private-ssh.url = "path:./private/ssh"; | ||
41 | s-private-system.url = "path:./private/system"; | ||
42 | |||
43 | n-backup-2.url = "path:../systems/backup-2"; | ||
44 | n-dilion.url = "path:../systems/dilion"; | ||
45 | n-eldiron.url = "path:../systems/eldiron"; | ||
46 | n-monitoring-1.url = "path:../systems/monitoring-1"; | ||
47 | n-quatresaisons.url = "path:../systems/quatresaisons"; | ||
48 | n-zoldene.url = "path:../systems/zoldene"; | ||
49 | |||
50 | secrets.url = "path:./private/environment-dummy"; | ||
51 | }; | ||
52 | outputs = inputs@{ self, secrets, ... }: { | ||
53 | subflakes = let | ||
54 | flakeNames = builtins.map (a: builtins.substring 2 (builtins.stringLength a) a) (builtins.filter (a: builtins.substring 0 2 a == "s-") (builtins.attrNames inputs)); | ||
55 | partitionned = builtins.partition (a: builtins.substring 0 8 a == "private-") flakeNames; | ||
56 | privateFlakes = builtins.map (a: builtins.substring 8 (builtins.stringLength a) a) partitionned.right; | ||
57 | publicFlakes = partitionned.wrong; | ||
58 | |||
59 | nodeFlakes = builtins.map (a: builtins.substring 2 (builtins.stringLength a) a) (builtins.filter (a: builtins.substring 0 2 a == "n-") (builtins.attrNames inputs)); | ||
60 | in { | ||
61 | public = builtins.foldl' (a: b: a // { "${b}" = inputs."s-${b}"; }) {} publicFlakes; | ||
62 | private = builtins.foldl' (a: b: a // { "${b}" = inputs."s-private-${b}"; }) {} privateFlakes; | ||
63 | nodes = builtins.foldl' (a: b: a // { "${b}" = inputs."n-${b}"; }) {} nodeFlakes; | ||
64 | inherit secrets; | ||
65 | }; | ||
66 | }; | ||
67 | } | ||