aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.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 @@
'';
};
};
+ };
}