diff options
author | Cody Hiar <cody@hiar.ca> | 2022-06-05 14:23:59 -0600 |
---|---|---|
committer | Cody Hiar <cody@hiar.ca> | 2022-06-05 14:23:59 -0600 |
commit | f206162e212e52f6f12e8ea51f87edda4dd77a5f (patch) | |
tree | f1290a7a1249f7765d1c2b2b87228ad22da5c9c8 | |
parent | 67b9901b6dc0a372c22909dded49967bb26b1f82 (diff) |
Try to fix for legacy and new nix
-rw-r--r-- | flake.nix | 23 |
1 files changed, 18 insertions, 5 deletions
@@ -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 @@ ''; }; }; + }; } |