diff options
Diffstat (limited to 'flake')
| -rw-r--r-- | flake/default.nix | 2 | ||||
| -rw-r--r-- | flake/dev-shell.nix | 42 | ||||
| -rw-r--r-- | flake/dev-shells.nix | 48 |
3 files changed, 49 insertions, 43 deletions
diff --git a/flake/default.nix b/flake/default.nix index ba160ff..d586d75 100644 --- a/flake/default.nix +++ b/flake/default.nix @@ -1,7 +1,7 @@ { imports = [ ./ci.nix - ./dev-shell.nix + ./dev-shells.nix ]; perSystem = diff --git a/flake/dev-shell.nix b/flake/dev-shell.nix deleted file mode 100644 index fcf5672..0000000 --- a/flake/dev-shell.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ - perSystem = - { - lib, - pkgs, - inputs', - self', - ... - }: - - { - devShells.default = pkgs.mkShellNoCC { - packages = - [ - # We want to make sure we have the same - # Nix behavior across machines - pkgs.nix - - # For CI - pkgs.actionlint - - # Nix tools - pkgs.nil - pkgs.statix - self'.formatter - - pkgs.just - pkgs.opentofu - ] - ++ lib.optionals pkgs.stdenv.hostPlatform.isDarwin [ - # See above comment about Nix - inputs'.nix-darwin.packages.darwin-rebuild - ] - ++ lib.optionals pkgs.stdenv.hostPlatform.isLinux [ - # Ditto - pkgs.nixos-rebuild - - inputs'.agenix.packages.agenix - ]; - }; - }; -} diff --git a/flake/dev-shells.nix b/flake/dev-shells.nix new file mode 100644 index 0000000..8d333a6 --- /dev/null +++ b/flake/dev-shells.nix @@ -0,0 +1,48 @@ +{ + perSystem = + { + lib, + pkgs, + inputs', + self', + ... + }: + + let + inherit (pkgs.stdenv.hostPlatform) isDarwin isLinux; + in + + { + devShells = { + default = pkgs.mkShellNoCC { + packages = + [ + # We want to make sure we have the same + # Nix behavior across machines + pkgs.nix + + # For CI + pkgs.actionlint + + # Nix tools + pkgs.nil + pkgs.statix + self'.formatter + + pkgs.just + pkgs.opentofu + ] + ++ lib.optionals isDarwin [ + # See above comment about Nix + inputs'.nix-darwin.packages.darwin-rebuild + ] + ++ lib.optionals isLinux [ + # Ditto + pkgs.nixos-rebuild + + inputs'.agenix.packages.agenix + ]; + }; + }; + }; +} |
