aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCody Hiar <cody@hiar.ca>2022-06-05 14:23:59 -0600
committerCody Hiar <cody@hiar.ca>2022-06-05 14:23:59 -0600
commitf206162e212e52f6f12e8ea51f87edda4dd77a5f (patch)
treef1290a7a1249f7765d1c2b2b87228ad22da5c9c8
parent67b9901b6dc0a372c22909dded49967bb26b1f82 (diff)
Try to fix for legacy and new nix
-rw-r--r--flake.nix23
1 files changed, 18 insertions, 5 deletions
diff --git a/flake.nix b/flake.nix
index 0d45aa0..af59dc8 100644
--- a/flake.nix
+++ b/flake.nix
@@ -19,12 +19,24 @@
];
};
in rec {
- # From nix >= 2.7 the default app syntax changes
- defaultApp.${system} = {
- type = "app";
- program = "${packages.${system}.neovimCH}/bin/nvim";
+ # For nix < 2.7
+ # For nix >= 2.7 they should grab from:
+ # apps.${system}.default
+ # packages.${system}.default
+ # automatically
+ defaultApp.${system} = apps.${system}.default;
+ defaultPackage.${system} = packages.${system}.default;
+
+ apps.${system} = rec {
+ nvim = {
+ type = "app";
+ program = "${packages.${system}.default}/bin/nvim";
+ };
+ default = nvim;
};
- packages.${system}.neovimCH = with pkgs; symlinkJoin {
+ packages.${system} = with pkgs; rec {
+ default = neovimCH;
+ neovimCH = symlinkJoin {
name = "neovim";
paths = [ pkgs.neovim ];
buildInputs = [ pkgs.makeWrapper ];
@@ -44,4 +56,5 @@
'';
};
};
+ };
}