diff options
| author | Shubham Saini <ssaini@fispan.com> | 2023-09-30 04:02:23 +0000 |
|---|---|---|
| committer | Shubham Saini <ssaini@fispan.com> | 2023-09-30 04:02:23 +0000 |
| commit | fdf1c788488534825abdbfe8f8c0e8e95a876d57 (patch) | |
| tree | 1186b8b594f8a540bf019006cb3f2544219c8cd4 /darwin | |
| parent | fdb9ba23a2cff4b50a699eb89435aa9a9de77891 (diff) | |
nix: reorg programs into modules
Diffstat (limited to 'darwin')
| -rw-r--r-- | darwin/home.nix | 61 |
1 files changed, 1 insertions, 60 deletions
diff --git a/darwin/home.nix b/darwin/home.nix index 5e24a76..1188c65 100644 --- a/darwin/home.nix +++ b/darwin/home.nix | |||
| @@ -45,65 +45,6 @@ | |||
| 45 | }; | 45 | }; |
| 46 | 46 | ||
| 47 | imports = [ | 47 | imports = [ |
| 48 | ../modules/zsh.nix | 48 | ../modules/common.nix |
| 49 | ]; | 49 | ]; |
| 50 | |||
| 51 | home.sessionVariables = { | ||
| 52 | PATH = "$PATH:$HOME/.bin"; | ||
| 53 | EDITOR = "nvim"; | ||
| 54 | MANPAGER = "nvim +Man!"; | ||
| 55 | }; | ||
| 56 | |||
| 57 | programs.home-manager.enable = true; | ||
| 58 | programs.fzf = { | ||
| 59 | enable = true; | ||
| 60 | enableZshIntegration = false; | ||
| 61 | defaultOptions = [ "--height 40%" "--layout=reverse" "--border" ]; | ||
| 62 | }; | ||
| 63 | programs.git = { | ||
| 64 | enable = true; | ||
| 65 | userEmail = "ssaini@fispan.com"; | ||
| 66 | userName = "Shubham Saini"; | ||
| 67 | signing = { | ||
| 68 | key = "E0404DDE4BCF9DB5"; | ||
| 69 | signByDefault = true; | ||
| 70 | }; | ||
| 71 | }; | ||
| 72 | programs.lf = { | ||
| 73 | enable = true; | ||
| 74 | settings = { | ||
| 75 | shell = "sh"; | ||
| 76 | icons = true; | ||
| 77 | drawbox = true; | ||
| 78 | scrolloff = 10; | ||
| 79 | shellopts = "-eu"; | ||
| 80 | }; | ||
| 81 | commands = { | ||
| 82 | extract = '' | ||
| 83 | %{{ | ||
| 84 | set -f | ||
| 85 | case $f in | ||
| 86 | *.tar.bz|*.tar.bz2|*.tbz|*.tbz2) tar xjvf $f;; | ||
| 87 | *.tar.gz|*.tgz) tar xzvf $f;; | ||
| 88 | *.tar.xz|*.txz) tar xJvf $f;; | ||
| 89 | *.zip) unzip $f;; | ||
| 90 | *.rar) unrar x $f;; | ||
| 91 | *.7z) 7z x $f;; | ||
| 92 | esac | ||
| 93 | }} | ||
| 94 | ''; | ||
| 95 | open = '' | ||
| 96 | %{{ | ||
| 97 | case $(file --mime-type -Lb $f) in | ||
| 98 | text/*) lf -remote "send $id \$$EDITOR \$fx";; | ||
| 99 | *) for f in $fx; do $OPENER $f > /dev/null 2> /dev/null & done;; | ||
| 100 | esac | ||
| 101 | }} | ||
| 102 | ''; | ||
| 103 | }; | ||
| 104 | keybindings = { | ||
| 105 | "<enter>" = "shell"; | ||
| 106 | "." = "set hidden!"; | ||
| 107 | }; | ||
| 108 | }; | ||
| 109 | } | 50 | } |
