summaryrefslogtreecommitdiff
path: root/flake
diff options
context:
space:
mode:
authorSeth Flynn <[email protected]>2025-02-26 01:14:36 -0500
committerSeth Flynn <[email protected]>2025-02-26 01:14:36 -0500
commit245609fcb7d1fa049781af1cd025f326fec0af69 (patch)
tree5f2ef477fe082725e083e2d01841633143778f5e /flake
parent76f2297282cabc6f56ac7b93a0c4b6a34b4d72bc (diff)
mv flake/dev-shell{,s}.nix
Diffstat (limited to 'flake')
-rw-r--r--flake/default.nix2
-rw-r--r--flake/dev-shell.nix42
-rw-r--r--flake/dev-shells.nix48
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
+ ];
+ };
+ };
+ };
+}