From 964fbe8bafff3a192526b53f24dea64a871e14f1 Mon Sep 17 00:00:00 2001 From: Alexander Bantyev Date: Sun, 28 Feb 2021 19:06:01 +0300 Subject: [PATCH] Install direnv --- .dir-locals.el | 1 - modules/applications/emacs/default.nix | 1 + modules/applications/emacs/init.el | 6 ++-- modules/workspace/misc.nix | 4 +++ modules/workspace/simple-osd-daemons.nix | 40 ++++++++++++------------ 5 files changed, 29 insertions(+), 23 deletions(-) delete mode 100644 .dir-locals.el diff --git a/.dir-locals.el b/.dir-locals.el deleted file mode 100644 index 965518d..0000000 --- a/.dir-locals.el +++ /dev/null @@ -1 +0,0 @@ -((nil . ((projectile-project-compilation-cmd . "./install")))) diff --git a/modules/applications/emacs/default.nix b/modules/applications/emacs/default.nix index 3b9428c..693a7ad 100644 --- a/modules/applications/emacs/default.nix +++ b/modules/applications/emacs/default.nix @@ -56,6 +56,7 @@ idris-mode lsp-mode org-caldav + envrc ]; }; diff --git a/modules/applications/emacs/init.el b/modules/applications/emacs/init.el index d5085dc..deaa28e 100755 --- a/modules/applications/emacs/init.el +++ b/modules/applications/emacs/init.el @@ -86,8 +86,6 @@ (use-package hasklig-mode :hook (haskell-mode)) - - (use-package company-ghci :config (push 'company-ghci company-backends)) @@ -238,3 +236,7 @@ If point was already at that position, move point to beginning of line." (setq org-icalendar-timezone "Europe/Moscow") ) ;;; init.el ends here + +(use-package envrc + :config + (envrc-global-mode)) diff --git a/modules/workspace/misc.nix b/modules/workspace/misc.nix index 9cf2eed..1030133 100644 --- a/modules/workspace/misc.nix +++ b/modules/workspace/misc.nix @@ -20,6 +20,10 @@ dbPath = ../../misc/programs.sqlite; }; systemd.user.startServices = true; + + + programs.direnv.enable = true; + programs.direnv.enableNixDirenvIntegration = true; }; diff --git a/modules/workspace/simple-osd-daemons.nix b/modules/workspace/simple-osd-daemons.nix index 37c97dd..8d55132 100644 --- a/modules/workspace/simple-osd-daemons.nix +++ b/modules/workspace/simple-osd-daemons.nix @@ -9,29 +9,29 @@ let }; inherit (import ../../support.nix { inherit lib config; }) genIni; daemons = names: - builtins.listToAttrs (builtins.map (name: - { - name = "simple-osd-${name}"; - value = simple-osd-daemon name; - }) names); + builtins.listToAttrs (builtins.map (name: { + name = "simple-osd-${name}"; + value = simple-osd-daemon name; + }) names); in { home-manager.users.balsoft = { - systemd.user.services = - daemons [ "pulseaudio" "mpris" ] + systemd.user.services = daemons [ "pulseaudio" "mpris" ] // pkgs.lib.optionalAttrs (config.deviceSpecific.isLaptop) (daemons [ "battery" "brightness" ]); - xdg.configFile."simple-osd/common".text = genIni { - progressbar.length = 25; - }; - xdg.configFile."simple-osd/battery".text = lib.mkIf (config.deviceSpecific.isLaptop) (genIni { - default = { - "refresh interval" = 1; - "show battery charge" = true; - }; - threshold = { - low = "20%"; - critical = "10%"; - }; - }); + xdg.configFile."simple-osd/common".text = + genIni { progressbar.length = 25; }; + xdg.configFile."simple-osd/battery" = + lib.mkIf (config.deviceSpecific.isLaptop) ({ + text = genIni { + default = { + "refresh interval" = 1; + "show battery charge" = true; + }; + threshold = { + low = "20%"; + critical = "10%"; + }; + }; + }); }; }