-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
43 lines (34 loc) · 1.13 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{
inputs = {
flake-utils.url = "github:numtide/flake-utils";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
obscura.url = "github:42loco42/obscura";
};
outputs = { self, nixpkgs, ... }@inputs:
let
inherit (nixpkgs.lib.fileset) difference toSource unions;
lib = import ./lib inputs;
out = {
inherit lib;
__functor = _: import ./lib/main.nix { inherit self lib nixpkgs; };
templates.default = {
description = "Aquaris example config template";
path = (toSource {
root = ./example;
fileset = difference ./example (unions [
./example/keys/.gitignore
./example/keys/example.key
]);
}).outPath;
};
} // import ./packages lib nixpkgs;
# silly hack :3 i'm amazed that this actually works!
example = (import ./example/flake.nix).outputs {
aquaris = out;
self = self // { cfgDir = ./example; };
};
in
lib.merge [ out example ];
}