diff --git a/flake.lock b/flake.lock index 37c7c55..32975ed 100644 --- a/flake.lock +++ b/flake.lock @@ -78,6 +78,83 @@ "type": "github" } }, + "flake-compat_3": { + "flake": false, + "locked": { + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "neovim-nightly-overlay", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1688466019, + "narHash": "sha256-VeM2akYrBYMsb4W/MmBo1zmaMfgbL4cH3Pu8PGyIwJ0=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "8e8d955c22df93dbe24f19ea04f47a74adbdc5ec", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1685662779, + "narHash": "sha256-cKDDciXGpMEjP1n6HlzKinN0H+oLmNpgeCTzYnsA2po=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "71fb97f0d875fd4de4994dfb849f2c75e17eb6c3", + "type": "github" + }, + "original": { + "id": "flake-parts", + "type": "indirect" + } + }, + "flake-parts_3": { + "inputs": { + "nixpkgs-lib": [ + "neovim-nightly-overlay", + "hercules-ci-effects", + "hercules-ci-agent", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1685662779, + "narHash": "sha256-cKDDciXGpMEjP1n6HlzKinN0H+oLmNpgeCTzYnsA2po=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "71fb97f0d875fd4de4994dfb849f2c75e17eb6c3", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems" @@ -129,6 +206,24 @@ "type": "github" } }, + "flake-utils_4": { + "inputs": { + "systems": "systems_3" + }, + "locked": { + "lastModified": 1685518550, + "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "git-view": { "inputs": { "crane": "crane", @@ -151,6 +246,64 @@ "type": "github" } }, + "haskell-flake": { + "locked": { + "lastModified": 1684780604, + "narHash": "sha256-2uMZsewmRn7rRtAnnQNw1lj0uZBMh4m6Cs/7dV5YF08=", + "owner": "srid", + "repo": "haskell-flake", + "rev": "74210fa80a49f1b6f67223debdbf1494596ff9f2", + "type": "github" + }, + "original": { + "owner": "srid", + "ref": "0.3.0", + "repo": "haskell-flake", + "type": "github" + } + }, + "hercules-ci-agent": { + "inputs": { + "flake-parts": "flake-parts_3", + "haskell-flake": "haskell-flake", + "nixpkgs": "nixpkgs_4" + }, + "locked": { + "lastModified": 1686721748, + "narHash": "sha256-ilD6ANYID+b0/+GTFbuZXfmu92bqVqY5ITKXSxqIp5A=", + "owner": "hercules-ci", + "repo": "hercules-ci-agent", + "rev": "7192b83935ab292a8e894db590dfd44f976e183b", + "type": "github" + }, + "original": { + "id": "hercules-ci-agent", + "type": "indirect" + } + }, + "hercules-ci-effects": { + "inputs": { + "flake-parts": "flake-parts_2", + "hercules-ci-agent": "hercules-ci-agent", + "nixpkgs": [ + "neovim-nightly-overlay", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1688571979, + "narHash": "sha256-asN8qFAjxZvq9HyXo0+FzVKTX+SDH2pAr71sQ06I0GE=", + "owner": "hercules-ci", + "repo": "hercules-ci-effects", + "rev": "c6191e59824febda94b431146bf65628fc534e3b", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "hercules-ci-effects", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -191,6 +344,52 @@ "type": "github" } }, + "neovim-flake": { + "inputs": { + "flake-utils": "flake-utils_4", + "nixpkgs": [ + "neovim-nightly-overlay", + "nixpkgs" + ] + }, + "locked": { + "dir": "contrib", + "lastModified": 1688589382, + "narHash": "sha256-fCksttab+hJyUFmvNTaaJqY0SG1TolZbGFq9nmowJvM=", + "owner": "neovim", + "repo": "neovim", + "rev": "a0c9c04f006dbc6cb38d620ec036e32ccb8e76cc", + "type": "github" + }, + "original": { + "dir": "contrib", + "owner": "neovim", + "repo": "neovim", + "type": "github" + } + }, + "neovim-nightly-overlay": { + "inputs": { + "flake-compat": "flake-compat_3", + "flake-parts": "flake-parts", + "hercules-ci-effects": "hercules-ci-effects", + "neovim-flake": "neovim-flake", + "nixpkgs": "nixpkgs_5" + }, + "locked": { + "lastModified": 1688601949, + "narHash": "sha256-huKT8evwgfiVM7xHxLQgGcEeqsajgmygQxtjCWQgEI8=", + "owner": "nix-community", + "repo": "neovim-nightly-overlay", + "rev": "7fd54ca5186894d0454c9a4ddb128e64ca796f2f", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "neovim-nightly-overlay", + "type": "github" + } + }, "nix-index-database": { "inputs": { "nixpkgs": [ @@ -227,6 +426,24 @@ "type": "github" } }, + "nixpkgs-lib": { + "locked": { + "dir": "lib", + "lastModified": 1685564631, + "narHash": "sha256-8ywr3AkblY4++3lIVxmrWZFzac7+f32ZEhH/A8pNscI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "4f53efe34b3a8877ac923b9350c874e3dcd5dc0a", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs_2": { "locked": { "lastModified": 1676426280, @@ -260,6 +477,38 @@ } }, "nixpkgs_4": { + "locked": { + "lastModified": 1686501370, + "narHash": "sha256-G0WuM9fqTPRc2URKP9Lgi5nhZMqsfHGrdEbrLvAPJcg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "75a5ebf473cd60148ba9aec0d219f72e5cf52519", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { + "locked": { + "lastModified": 1688556768, + "narHash": "sha256-mhd6g0iJGjEfOr3+6mZZOclUveeNr64OwxdbNtLc8mY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "27bd67e55fe09f9d68c77ff151c3e44c4f81f7de", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_6": { "locked": { "lastModified": 1687288566, "narHash": "sha256-VckkiJ88Gzdc2cstm0z5eFcrHbvkm4VjxavHBGssvZI=", @@ -295,8 +544,9 @@ "git-view": "git-view", "home-manager": "home-manager", "nekowinston-nur": "nekowinston-nur", + "neovim-nightly-overlay": "neovim-nightly-overlay", "nix-index-database": "nix-index-database", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_6", "nur": "nur" } }, @@ -409,6 +659,21 @@ "type": "github" } }, + "systems_3": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "wezterm-src": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index 61f360a..97a9442 100644 --- a/flake.nix +++ b/flake.nix @@ -5,15 +5,17 @@ # At the time of writing, nixos-unstable doesn't work for home manager # FIXME: https://github.com/NixOS/nixpkgs/issues/236940#issuecomment-1585223723 nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05"; - nur.url = "github:nix-community/nur"; - nekowinston-nur.url = "github:nekowinston/nur"; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; nix-index-database.url = "github:Mic92/nix-index-database"; nix-index-database.inputs.nixpkgs.follows = "nixpkgs"; + nur.url = "github:nix-community/nur"; + nekowinston-nur.url = "github:nekowinston/nur"; + git-view.url = "github:sgoudham/git-view/v1.0.0"; + neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay"; }; nixConfig = { @@ -36,6 +38,7 @@ nekowinston-nur, home-manager, nix-index-database, + neovim-nightly-overlay, git-view, ... }: let @@ -63,6 +66,7 @@ ({config, ...}: { config = { nixpkgs.overlays = [ + neovim-nightly-overlay.overlay overlays ]; }; diff --git a/home/apps/nvim.nix b/home/apps/nvim.nix new file mode 100644 index 0000000..8f337a7 --- /dev/null +++ b/home/apps/nvim.nix @@ -0,0 +1,28 @@ +{pkgs, ...}: { + programs.neovim = { + enable = true; + vimAlias = true; + viAlias = true; + defaultEditor = true; + withNodeJs = true; + + package = pkgs.symlinkJoin { + name = "neovim"; + paths = [pkgs.neovim-nightly]; + buildInputs = [pkgs.makeWrapper pkgs.gcc]; + postBuild = "wrapProgram $out/bin/nvim --prefix CC : ${pkgs.lib.getExe pkgs.gcc}"; + }; + + extraPackages = with pkgs; [ + tree-sitter + ]; + }; + + home.sessionVariables = { + SUDO_EDITOR = "nvim"; + }; + + programs.fish.shellAbbrs = { + "lvim" = "NVIM_APPNAME=lazyvim nvim"; + }; +} diff --git a/home/default.nix b/home/default.nix index 0d9097b..d75ca28 100644 --- a/home/default.nix +++ b/home/default.nix @@ -10,6 +10,7 @@ ./apps/fonts.nix ./apps/git.nix ./apps/fish.nix + ./apps/nvim.nix ./apps/k8s.nix ./apps/nap.nix ./apps/go.nix @@ -35,8 +36,6 @@ git-view ]; home.sessionVariables = { - EDITOR = "nvim"; - SUDO_EDITOR = "nvim"; TERMINAL = "wezterm-gui"; LIBVA_DRIVER_NAME = "iHD"; LS_COLORS = "$(vivid generate catppuccin-mocha)";