From 24b400c2f83e89e154baba3f22f5dc7dea4ad41a Mon Sep 17 00:00:00 2001 From: Guanran Wang Date: Tue, 12 Dec 2023 20:40:46 +0800 Subject: [PATCH] home: neovim: add my neovim configuration --- flake.lock | 17 +++++++++++++++++ flake.nix | 5 +++++ nixos/profiles/opt-in/impermanence.nix | 1 - .../applications/neovim/default.nix | 3 ++- 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/flake.lock b/flake.lock index 80be4fb..ff5a98a 100755 --- a/flake.lock +++ b/flake.lock @@ -456,6 +456,22 @@ "type": "github" } }, + "nvim": { + "flake": false, + "locked": { + "lastModified": 1702383418, + "narHash": "sha256-EYArlahHMWj4yVXTKldVZsbHjg0gxvXqgTxO5BvEfQ8=", + "owner": "Guanran928", + "repo": "nvim", + "rev": "655e863d2548cf9883e94e837f803ed2ae0d6aec", + "type": "github" + }, + "original": { + "owner": "Guanran928", + "repo": "nvim", + "type": "github" + } + }, "pre-commit-hooks-nix": { "inputs": { "flake-compat": [ @@ -511,6 +527,7 @@ "nixpkgs": "nixpkgs", "nixpkgs-stable": "nixpkgs-stable", "nvfetcher": "nvfetcher", + "nvim": "nvim", "pre-commit-hooks-nix": "pre-commit-hooks-nix", "rust-overlay": "rust-overlay", "sops-nix": "sops-nix", diff --git a/flake.nix b/flake.nix index 0b8470f..3edfa94 100755 --- a/flake.nix +++ b/flake.nix @@ -150,6 +150,11 @@ url = "github:MetaCubeX/metacubexd/gh-pages"; flake = false; }; + ### My NeoVim configuration + nvim = { + url = "github:Guanran928/nvim"; + flake = false; + }; }; outputs = inputs: let diff --git a/nixos/profiles/opt-in/impermanence.nix b/nixos/profiles/opt-in/impermanence.nix index e305f3d..6b43398 100644 --- a/nixos/profiles/opt-in/impermanence.nix +++ b/nixos/profiles/opt-in/impermanence.nix @@ -38,7 +38,6 @@ ".config/chromium" ".config/fcitx5" ".config/Mumble" - ".config/nvim" # not managed with git because my configuration is trash and i do not want other people to see it ]; files = [ ".config/sops/age/keys.txt" diff --git a/users/guanranwang/home-manager/applications/neovim/default.nix b/users/guanranwang/home-manager/applications/neovim/default.nix index 7561cca..5f482f5 100644 --- a/users/guanranwang/home-manager/applications/neovim/default.nix +++ b/users/guanranwang/home-manager/applications/neovim/default.nix @@ -1,8 +1,9 @@ -_: { +{inputs, ...}: { programs.neovim = { enable = true; #defaultEditor = true; viAlias = true; vimAlias = true; }; + xdg.configFile."nvim".source = inputs.nvim; }