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