summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorseth <[email protected]>2023-09-01 15:35:00 -0400
committerseth <[email protected]>2023-09-06 10:48:13 -0400
commit27bee5c6bc5ab8df93f2be20fc9e20ed6e71bd27 (patch)
tree2b1e8872f28aa51ca7c5a12ade51a3dca2de2bdf /flake.nix
initial commit
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix45
1 files changed, 45 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..561d71a
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,45 @@
+{
+ description = "getchoo's neovim config";
+
+ inputs.nixpkgs.url = "nixpkgs/nixos-unstable";
+
+ outputs = {
+ self,
+ nixpkgs,
+ ...
+ }: let
+ inherit (nixpkgs) lib;
+ version = builtins.substring 0 8 self.lastModifiedDate or "dirty";
+
+ systems = [
+ "x86_64-linux"
+ "aarch64-linux"
+ "x86_64-darwin"
+ "aarch64-darwin"
+ ];
+
+ forAllSystems = fn: lib.genAttrs systems (sys: fn nixpkgs.legacyPackages.${sys});
+ in {
+ devShells = forAllSystems (pkgs: {
+ default = import ./shell.nix {inherit pkgs;};
+ });
+
+ formatter = forAllSystems (pkgs: pkgs.alejandra);
+
+ packages = forAllSystems (pkgs: let
+ p = self.overlays.default pkgs pkgs;
+ in {
+ inherit (p.vimPlugins) getchvim;
+ default = p.vimPlugins.getchvim;
+ });
+
+ overlays.default = final: prev: {
+ vimPlugins = prev.vimPlugins.extend (_: _: {
+ getchvim = prev.callPackage ./default.nix {
+ inherit (final.vimUtils) buildVimPluginFrom2Nix;
+ inherit self version;
+ };
+ });
+ };
+ };
+}