diff options
Diffstat (limited to 'flakes/private/paste/flake.nix')
-rw-r--r-- | flakes/private/paste/flake.nix | 36 |
1 files changed, 13 insertions, 23 deletions
diff --git a/flakes/private/paste/flake.nix b/flakes/private/paste/flake.nix index 23f8cd3..97853ea 100644 --- a/flakes/private/paste/flake.nix +++ b/flakes/private/paste/flake.nix | |||
@@ -1,30 +1,20 @@ | |||
1 | { | 1 | { |
2 | inputs.paste = { | 2 | inputs.paste.url = "path:../../paste"; |
3 | path = "../../paste"; | ||
4 | type = "path"; | ||
5 | }; | ||
6 | inputs.my-lib = { | ||
7 | path = "../../lib"; | ||
8 | type = "path"; | ||
9 | }; | ||
10 | inputs.nix-lib.url = "github:NixOS/nixpkgs"; | ||
11 | 3 | ||
12 | description = "Private configuration for paste"; | 4 | description = "Private configuration for paste"; |
13 | outputs = { self, my-lib, nix-lib, paste }: | 5 | outputs = { self, paste }: { |
14 | let | 6 | nixosModule = self.nixosModules.paste; |
15 | cfg = name': { config, lib, pkgs, name, ... }: { | 7 | nixosModules.paste = { ... }: { |
16 | imports = [ | 8 | imports = [ |
17 | (my-lib.lib.withNarKey paste "nixosModule") | 9 | paste.nixosModule |
18 | ]; | 10 | ]; |
19 | config = lib.mkIf (name == name') { | 11 | config = { |
20 | services.paste = { | 12 | services.paste = { |
21 | enable = true; | 13 | enable = true; |
22 | webDirectory = "/paste"; | 14 | webDirectory = "/paste"; |
23 | }; | ||
24 | }; | 15 | }; |
25 | }; | 16 | }; |
26 | in | 17 | }; |
27 | paste.outputs // | 18 | }; |
28 | { nixosModules = paste.nixosModules or {} // nix-lib.lib.genAttrs ["eldiron"] cfg; }; | ||
29 | } | 19 | } |
30 | 20 | ||