Skyler Grey | 252927a | 2022-10-18 22:18:15 +0100 | [diff] [blame] | 1 | args @ { pkgs |
| 2 | , lib |
| 3 | , home |
| 4 | , username |
| 5 | , ... |
| 6 | }: |
| 7 | let |
Skyler Grey | a7feb6e | 2022-08-26 06:51:55 +0100 | [diff] [blame] | 8 | utils = import ../utils lib; |
Skyler Grey | 252927a | 2022-10-18 22:18:15 +0100 | [diff] [blame] | 9 | in |
| 10 | { |
Skyler Grey | 6aa7c26 | 2022-08-20 22:22:03 +0100 | [diff] [blame] | 11 | config = { |
Skyler Grey | 55f8455 | 2022-09-05 11:04:39 +0100 | [diff] [blame] | 12 | environment = { |
| 13 | variables = { |
Skyler Grey | f68931b | 2022-10-31 00:13:46 +0000 | [diff] [blame] | 14 | EDITOR = "${pkgs.neovim}/bin/nvim"; |
Skyler Grey | 55f8455 | 2022-09-05 11:04:39 +0100 | [diff] [blame] | 15 | }; |
| 16 | defaultPackages = [ |
| 17 | pkgs.perl |
| 18 | pkgs.rsync |
| 19 | pkgs.strace |
| 20 | pkgs.neovim |
| 21 | ]; # The basic default packages, although with nvim replacing nano |
Skyler Grey | 289997a | 2023-01-25 21:31:50 +0000 | [diff] [blame] | 22 | persistence."/nix/persist".users.${username}.directories = [ |
| 23 | ".local/share/cspell" |
| 24 | ".codeium" |
| 25 | ".config/nvim/undo" |
| 26 | ]; |
Skyler Grey | 6aa7c26 | 2022-08-20 22:22:03 +0100 | [diff] [blame] | 27 | }; |
Skyler Grey | a7feb6e | 2022-08-26 06:51:55 +0100 | [diff] [blame] | 28 | }; |
| 29 | |
| 30 | home = { |
| 31 | imports = lib.pipe ./neovim [ |
| 32 | utils.dirsIn |
| 33 | utils.importAll |
| 34 | (map (f: |
| 35 | if builtins.typeOf f == "lambda" |
| 36 | then f args |
| 37 | else f)) |
| 38 | ]; |
| 39 | programs.neovim = { |
| 40 | enable = true; |
| 41 | viAlias = true; |
| 42 | vimAlias = true; |
| 43 | vimdiffAlias = true; |
| 44 | }; |
Skyler Grey | f68931b | 2022-10-31 00:13:46 +0000 | [diff] [blame] | 45 | home = { |
Skyler Grey | e331d69 | 2022-11-02 21:33:09 +0000 | [diff] [blame] | 46 | packages = with pkgs; [ neovide xclip ]; |
Skyler Grey | f68931b | 2022-10-31 00:13:46 +0000 | [diff] [blame] | 47 | sessionVariables = { |
| 48 | EDITOR = "${home.programs.neovim.finalPackage}/bin/nvim"; |
| 49 | }; |
| 50 | }; |
Skyler Grey | 6aa7c26 | 2022-08-20 22:22:03 +0100 | [diff] [blame] | 51 | }; |
| 52 | } |