From cb2916802c32af7189bcaca56ae48ffe63785f40 Mon Sep 17 00:00:00 2001 From: sajenim Date: Tue, 25 Jul 2023 11:12:02 +0800 Subject: [PATCH] setup shell.nix + direnv --- home-manager/common/programs/zsh/default.nix | 1 + pkgs/xmobar-config/.envrc | 1 + pkgs/xmobar-config/shell.nix | 4 ++++ pkgs/xmonad-config/.envrc | 1 + pkgs/xmonad-config/shell.nix | 4 ++++ 5 files changed, 11 insertions(+) create mode 100644 pkgs/xmobar-config/.envrc create mode 100644 pkgs/xmobar-config/shell.nix create mode 100644 pkgs/xmonad-config/.envrc create mode 100644 pkgs/xmonad-config/shell.nix diff --git a/home-manager/common/programs/zsh/default.nix b/home-manager/common/programs/zsh/default.nix index 95cc490..37d46c1 100644 --- a/home-manager/common/programs/zsh/default.nix +++ b/home-manager/common/programs/zsh/default.nix @@ -51,6 +51,7 @@ # Extra commands that should be added to '.zshrc' initExtra = '' + eval "$(direnv hook zsh)" source ${pkgs.zsh-vi-mode}/share/zsh-vi-mode/zsh-vi-mode.plugin.zsh PROMPT='%F{blue}%n %F{cyan}%~ %F{red}♥ %f'; ''; diff --git a/pkgs/xmobar-config/.envrc b/pkgs/xmobar-config/.envrc new file mode 100644 index 0000000..4a4726a --- /dev/null +++ b/pkgs/xmobar-config/.envrc @@ -0,0 +1 @@ +use_nix diff --git a/pkgs/xmobar-config/shell.nix b/pkgs/xmobar-config/shell.nix new file mode 100644 index 0000000..e62ec28 --- /dev/null +++ b/pkgs/xmobar-config/shell.nix @@ -0,0 +1,4 @@ +{ pkgs ? import {} }: + pkgs.mkShell { + nativeBuildInputs = with pkgs.buildPackages; [ cabal-install ghc ]; +} diff --git a/pkgs/xmonad-config/.envrc b/pkgs/xmonad-config/.envrc new file mode 100644 index 0000000..4a4726a --- /dev/null +++ b/pkgs/xmonad-config/.envrc @@ -0,0 +1 @@ +use_nix diff --git a/pkgs/xmonad-config/shell.nix b/pkgs/xmonad-config/shell.nix new file mode 100644 index 0000000..e62ec28 --- /dev/null +++ b/pkgs/xmonad-config/shell.nix @@ -0,0 +1,4 @@ +{ pkgs ? import {} }: + pkgs.mkShell { + nativeBuildInputs = with pkgs.buildPackages; [ cabal-install ghc ]; +}