|
1 | 1 | {
|
2 | 2 | inputs.flakes.url = "github:deemp/flakes";
|
3 | 3 |
|
4 |
| - outputs = |
5 |
| - inputs: |
6 |
| - let |
7 |
| - inputs_ = |
8 |
| - let flakes = inputs.flakes.flakes; in |
9 |
| - { |
10 |
| - inherit (flakes.source-flake) flake-utils nixpkgs; |
11 |
| - inherit (flakes) drv-tools flakes-tools workflows devshell codium; |
12 |
| - inherit flakes; |
13 |
| - }; |
14 |
| - |
15 |
| - outputs = outputs_ { } // { inputs = inputs_; outputs = outputs_; }; |
16 |
| - |
17 |
| - outputs_ = |
18 |
| - inputs__: |
19 |
| - let inputs = inputs_ // inputs__; in |
20 |
| - inputs.flake-utils.lib.eachDefaultSystem (system: |
21 |
| - let |
22 |
| - pkgs = inputs.nixpkgs.legacyPackages.${system}; |
23 |
| - inherit (inputs.codium.lib.${system}) writeSettingsJSON mkCodium; |
24 |
| - inherit (inputs.drv-tools.lib.${system}) mkShellApps getExe; |
25 |
| - inherit (inputs.flakes-tools.lib.${system}) mkFlakesTools; |
26 |
| - inherit (inputs.codium.lib.${system}) extensions settingsNixCommon extensionsCommon; |
27 |
| - inherit (inputs.devshell.lib.${system}) mkShell mkRunCommands; |
| 4 | + outputs = inputs: inputs.flakes.makeFlake { |
| 5 | + inputs = { |
| 6 | + inherit (inputs.flakes.all) flake-utils nixpkgs drv-tools flakes-tools workflows devshell codium; |
| 7 | + inherit (inputs) flakes; |
| 8 | + }; |
| 9 | + perSystem = { inputs, system }: |
| 10 | + let |
| 11 | + pkgs = inputs.nixpkgs.legacyPackages.${system}; |
| 12 | + inherit (inputs.codium.lib.${system}) writeSettingsJSON mkCodium; |
| 13 | + inherit (inputs.drv-tools.lib.${system}) mkShellApps getExe; |
| 14 | + inherit (inputs.flakes-tools.lib.${system}) mkFlakesTools; |
| 15 | + inherit (inputs.codium.lib.${system}) extensions settingsNixCommon extensionsCommon; |
| 16 | + inherit (inputs.devshell.lib.${system}) mkShell mkRunCommands; |
28 | 17 |
|
29 |
| - backDir = "back"; |
30 |
| - frontDir = "front"; |
31 |
| - scripts = mkShellApps { |
32 |
| - back = { |
33 |
| - text = "cd ${backDir} && nix run"; |
34 |
| - description = "Run backend"; |
35 |
| - }; |
36 |
| - front = { |
37 |
| - text = "cd ${frontDir} && nix run"; |
38 |
| - description = "Run frontend"; |
39 |
| - }; |
| 18 | + backDir = "back"; |
| 19 | + frontDir = "front"; |
| 20 | + scripts = mkShellApps { |
| 21 | + back = { |
| 22 | + text = "cd ${backDir} && nix run"; |
| 23 | + description = "Run backend"; |
40 | 24 | };
|
| 25 | + front = { |
| 26 | + text = "cd ${frontDir} && nix run"; |
| 27 | + description = "Run frontend"; |
| 28 | + }; |
| 29 | + }; |
41 | 30 |
|
42 |
| - packages = { |
43 |
| - inherit (mkFlakesTools { dirs = [ "front" "back" "." ]; root = ./.; }) pushToCachix updateLocks; |
44 |
| - |
45 |
| - writeSettings = writeSettingsJSON settingsNixCommon; |
46 |
| - codium = mkCodium { extensions = extensionsCommon; }; |
| 31 | + packages = { |
| 32 | + inherit (mkFlakesTools { dirs = [ "front" "back" "." ]; root = ./.; }) pushToCachix updateLocks; |
47 | 33 |
|
48 |
| - writeWorkflows = import ./nix-files/workflow.nix { |
49 |
| - name = "ci"; |
50 |
| - inherit backDir frontDir system; |
51 |
| - inherit (inputs) workflows; |
52 |
| - }; |
53 |
| - } // scripts; |
| 34 | + writeSettings = writeSettingsJSON settingsNixCommon; |
| 35 | + codium = mkCodium { extensions = extensionsCommon; }; |
54 | 36 |
|
55 |
| - devShells.default = mkShell { |
56 |
| - commands = |
57 |
| - mkRunCommands "ide" { "codium ." = packages.codium; inherit (packages) writeSettings; } |
58 |
| - ++ mkRunCommands "infra" { inherit (packages) writeWorkflows pushToCachix updateLocks; } |
59 |
| - ++ mkRunCommands "project" { inherit (packages) back front; } |
60 |
| - ; |
| 37 | + writeWorkflows = import ./nix-files/workflow.nix { |
| 38 | + name = "ci"; |
| 39 | + inherit backDir frontDir system; |
| 40 | + inherit (inputs) workflows; |
61 | 41 | };
|
62 |
| - in |
63 |
| - { |
64 |
| - inherit packages devShells; |
65 |
| - }); |
66 |
| - in |
67 |
| - outputs; |
| 42 | + } // scripts; |
| 43 | + |
| 44 | + devShells.default = mkShell { |
| 45 | + commands = |
| 46 | + mkRunCommands "ide" { "codium ." = packages.codium; inherit (packages) writeSettings; } |
| 47 | + ++ mkRunCommands "infra" { inherit (packages) writeWorkflows pushToCachix updateLocks; } |
| 48 | + ++ mkRunCommands "project" { inherit (packages) back front; } |
| 49 | + ; |
| 50 | + }; |
| 51 | + in |
| 52 | + { |
| 53 | + inherit packages devShells; |
| 54 | + }; |
| 55 | + }; |
68 | 56 |
|
69 | 57 | nixConfig = {
|
70 | 58 | extra-substituters = [
|
|
0 commit comments