summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/home-manager/zsh.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2020-03-13 10:42:08 +0100
committermakefu <github@syntax-fehler.de>2020-03-13 10:42:08 +0100
commitf88e30e5ad906d946852891b6d668d8910c943b2 (patch)
treea7184eae2364d9c89d038f2739f11c9e910c99e7 /makefu/2configs/home-manager/zsh.nix
parentc325d7d6cfd6a11b6d3e4e83d06801de3c97b48a (diff)
ma home-manager: update mail with mbsync
Diffstat (limited to 'makefu/2configs/home-manager/zsh.nix')
-rw-r--r--makefu/2configs/home-manager/zsh.nix61
1 files changed, 2 insertions, 59 deletions
diff --git a/makefu/2configs/home-manager/zsh.nix b/makefu/2configs/home-manager/zsh.nix
index d24969ef0..4cd9becc7 100644
--- a/makefu/2configs/home-manager/zsh.nix
+++ b/makefu/2configs/home-manager/zsh.nix
@@ -2,65 +2,8 @@
{
imports = [
{ #direnv
- home-manager.users.makefu.home.packages = [ pkgs.direnv ];
- home-manager.users.makefu.home.file.".direnvrc".text = ''
- use_nix() {
- local path="$(nix-instantiate --find-file nixpkgs)"
-
- if [ -f "$${path}/.version-suffix" ]; then
- local version="$(< $path/.version-suffix)"
- elif [ -f "$path/.version" ]; then
- local version="$(< $path/.version)"
- else
- local version="$(< $(< $path/.git/HEAD))"
- fi
-
- local cache=".direnv/cache-''${version:-unknown}"
-
- if [[ ! -e "$cache" ]] || \
- [[ "$HOME/.direnvrc" -nt "$cache" ]] || \
- [[ .envrc -nt "$cache" ]] || \
- [[ default.nix -nt "$cache" ]] || \
- [[ shell.nix -nt "$cache" ]];
- then
- [ -d .direnv ] || mkdir .direnv
- local tmp=$(nix-shell --show-trace "$@" \
- --run "\"$direnv\" dump zsh")
- echo "$tmp" > "$cache"
- fi
-
- local path_backup=$PATH term_backup=$TERM
- . "$cache"
-
- export PATH=$PATH:$path_backup TERM=$term_backup
-
- if [[ $# = 0 ]]; then
- watch_file default.nix
- watch_file shell.nix
- fi
- }
- '';
- home-manager.users.makefu.programs.zsh.initExtra = ''
- nixify() {
- if [ ! -e ./.envrc ]; then
- echo "use nix" > .envrc
- direnv allow
- fi
- if [ ! -e default.nix ]; then
- cat > default.nix <<'EOF'
- with import <nixpkgs> {};
- stdenv.mkDerivation {
- name = "env";
- buildInputs = [
- bashInteractive
- ];
- }
- EOF
- ''${EDITOR:-vim} default.nix
- fi
- }
- eval "$(direnv hook zsh)"
- '';
+ home-manager.users.makefu.home.packages = [ pkgs.direnv pkgs.nur.repos.kalbasit.nixify ];
+ # home-manager.users.makefu.home.file.".direnvrc".text = '''';
}
{ # bat
home-manager.users.makefu.home.packages = [ pkgs.bat ];