diff options
| author | seth <[email protected]> | 2023-12-27 03:22:50 -0500 |
|---|---|---|
| committer | seth <[email protected]> | 2023-12-27 03:22:50 -0500 |
| commit | 6f2a3fc6e3e20e719a4d570d883d64023db00653 (patch) | |
| tree | 821b13d563f79dae96e3d7217c26a2d63c0d56dc | |
| parent | 764cd39c144cdeb54afc352931267e0b059a7124 (diff) | |
flake: move dev components
| -rw-r--r-- | .envrc | 2 | ||||
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | dev/checks.nix | 13 | ||||
| -rw-r--r-- | dev/ci.nix (renamed from ci.nix) | 0 | ||||
| -rw-r--r-- | dev/default.nix | 11 | ||||
| -rw-r--r-- | dev/shell.nix (renamed from dev.nix) | 16 | ||||
| -rw-r--r-- | flake.nix | 3 |
7 files changed, 26 insertions, 20 deletions
@@ -1,3 +1,3 @@ use flake -watch_file dev.nix +watch_file dev/shell.nix dotenv_if_exists @@ -1,7 +1,6 @@ # nix build artifacts result* repl-result-out* -gc-roots/ # dev shell .pre-commit-config.yaml diff --git a/dev/checks.nix b/dev/checks.nix new file mode 100644 index 0000000..386e122 --- /dev/null +++ b/dev/checks.nix @@ -0,0 +1,13 @@ +{ + perSystem = {config, ...}: { + pre-commit = { + settings.hooks = { + actionlint.enable = true; + ${config.formatter.pname}.enable = true; + deadnix.enable = true; + nil.enable = true; + statix.enable = true; + }; + }; + }; +} diff --git a/dev/default.nix b/dev/default.nix new file mode 100644 index 0000000..d8da3fe --- /dev/null +++ b/dev/default.nix @@ -0,0 +1,11 @@ +{ + imports = [ + ./checks.nix + ./ci.nix + ./shell.nix + ]; + + perSystem = {pkgs, ...}: { + formatter = pkgs.alejandra; + }; +} @@ -1,21 +1,10 @@ { perSystem = { - lib, pkgs, config, inputs', ... }: { - pre-commit = { - settings.hooks = { - actionlint.enable = true; - ${config.formatter.pname}.enable = true; - deadnix.enable = true; - nil.enable = true; - statix.enable = true; - }; - }; - devShells = { default = pkgs.mkShell { shellHook = config.pre-commit.installationScript; @@ -35,14 +24,9 @@ just jq opentofu - - # ci - nix-eval-jobs ] ++ lib.optional stdenv.isLinux inputs'.agenix.packages.agenix; }; }; - - formatter = pkgs.alejandra; }; } @@ -142,13 +142,12 @@ inputs.pre-commit.flakeModule inputs.nix2workflow.flakeModule + ./dev ./modules ./overlay ./systems ./tf ./users - ./ci.nix - ./dev.nix ]; systems = [ |
