From 57788ab135d9a0aa0a7320b9cf03de5505f812d8 Mon Sep 17 00:00:00 2001 From: Mike Vink Date: Tue, 29 Nov 2022 11:29:34 +0000 Subject: add shell scripts --- home.nix | 78 ++++++++++++++++++++++++------------------------- overlays/treesitter.nix | 4 --- shell-scripts.nix | 12 ++++++++ shell-scripts/nix-proxy | 14 +++++++++ 4 files changed, 64 insertions(+), 44 deletions(-) create mode 100644 shell-scripts.nix create mode 100644 shell-scripts/nix-proxy diff --git a/home.nix b/home.nix index ea3619a..9a40288 100644 --- a/home.nix +++ b/home.nix @@ -5,35 +5,44 @@ home-manager, ... }: { - # Found this here: nix-community.github.io configuration example - home.username = "mike"; home.homeDirectory = "/home/mike"; home.stateVersion = "22.05"; programs.home-manager.enable = true; - home.packages = with pkgs; [ - docker - kubectl - k9s - - htop - fortune - vim - stow - (nerdfonts.override {fonts = ["FiraCode"];}) - ripgrep - inotify-tools - - firefox-wayland - - swaylock - swayidle - wl-clipboard - mako - wofi - waybar - ]; + home.packages = with pkgs; + [ + docker + kubectl + k9s + + htop + fortune + vim + stow + (nerdfonts.override {fonts = ["FiraCode"];}) + ripgrep + inotify-tools + + firefox-wayland + + swaylock + swayidle + wl-clipboard + mako + wofi + waybar + ] + ++ (import ./shell-scripts.nix {inherit pkgs;}); + + programs.direnv.enable = true; + programs.direnv.nix-direnv.enable = true; + programs.bash = { + enable = true; + shellAliases = { + new-flake = "nix flake new -t github:nix-community/nix-direnv "; + }; + }; programs.git = { enable = true; @@ -80,6 +89,11 @@ # fixes hotpot cannot be found error after updates home.activation = { + neovim-symlink = home-manager.lib.hm.dag.entryAfter ["writeBoundary"] '' + NEOVIM_CONFIG="${config.home.homeDirectory}/neovim" + XDG_CONFIG_HOME_NVIM="${config.xdg.configHome}/nvim" + $DRY_RUN_CMD ln -sf $NEOVIM_CONFIG $XDG_CONFIG_HOME_NVIM + ''; clearHotpotCache = home-manager.lib.hm.dag.entryAfter ["writeBoundary"] '' HOTPOT_CACHE="${config.xdg.cacheHome}/nvim/hotpot" if [[ -d "$HOTPOT_CACHE" ]]; then @@ -88,11 +102,6 @@ ''; }; - xdg.configFile.nvim = { - source = config.lib.file.mkOutOfStoreSymlink ./neovim; - recursive = true; - }; - programs.neovim = { enable = true; package = pkgs.neovim-unwrapped; @@ -109,17 +118,6 @@ statix fnlfmt ]; -# extraConfig = " -# lua </run/systemd/system/nix-daemon.service.d/override.conf +[Service] +Environment="http_proxy=$http_proxy" +Environment="https_proxy=$http_proxy" +Environment="all_proxy=$http_proxy" +EOF +systemctl daemon-reload +systemctl restart nix-daemon -- cgit v1.2.3