diff --git a/home-manager/home.nix b/home-manager/home.nix index 29ea276..9e9c7f8 100644 --- a/home-manager/home.nix +++ b/home-manager/home.nix @@ -42,10 +42,6 @@ offlineimap #emailing liberation_ttf #fonts graphviz #graphing - (python3.withPackages (python-pkgs: [ - python-pkgs.graphviz - python-pkgs.pygments - ])) ]; programs.home-manager.enable = true; diff --git a/home-manager/suites/base/default.nix b/home-manager/suites/base/default.nix index 4fb2eef..7ee0e06 100644 --- a/home-manager/suites/base/default.nix +++ b/home-manager/suites/base/default.nix @@ -11,23 +11,14 @@ imports = [ ./emacs + ./python ./gpg-agent ./name.nix ]; - options.azos.python.pkgs = lib.mkOption{ - default = []; - type = lib.types.list; - description = "List of packages for python."; - }; - options.azos.name = lib.mkOption{ default = "YOUR NAME HERE"; type = lib.types.str; description = "Your full name."; }; - - # config = lib.mkIf cfg.enable { - # # Global suite options - # }; } diff --git a/home-manager/suites/base/emacs/el/azos-emacs-base.org b/home-manager/suites/base/emacs/el/azos-emacs-base.org index 01ba91d..fbbd6d1 100644 --- a/home-manager/suites/base/emacs/el/azos-emacs-base.org +++ b/home-manager/suites/base/emacs/el/azos-emacs-base.org @@ -1,7 +1,8 @@ #+title: Aner's Emacs Base Configuration #+property: header-args :results silent -* Bootstrapping +* Base setup +** Bootstrapping Taken from [[https://stackoverflow.com/questions/151945/how-do-i-control-how-emacs-makes-backup-files][this post on StackOverflow]] @@ -34,7 +35,7 @@ This just makes sure the code is loaded early on for later use. (require 'cl-lib) #+end_src -* Keymap setup +** Keymap setup In this section global keybindings are defined using a global minor mode. @@ -115,7 +116,7 @@ This keymap will be referenced many times during this document at relevant point Keymaps are included with relevant sections. -* EVIL mode +** EVIL mode Using evil mode. @@ -165,7 +166,7 @@ Setting theme colors (defvar azos/evil-color-operate "sandy brown") #+end_src -* Undo tree +** Undo tree Loading =undo-tree= for undo/redo functionality with evil. @@ -182,7 +183,7 @@ Redo taken from https://github.com/syl20bnr/spacemacs/issues/14036 ) #+end_src -* IVY +** IVY Enabling IVY. Taken from [[https://github.com/abo-abo/swiper][their website]]. @@ -235,7 +236,7 @@ Setting up keymaps (evil-collection-ivy-setup) #+end_src -* Projectile +** Projectile Startup up projectile. @@ -287,7 +288,7 @@ Ensuring tramp is loaded, and loading counsel-tramp for easy tramping. (use-package counsel-tramp) #+end_src -* Assorted utility functions +** Assorted utility functions Defining a function to copy filename. @@ -317,7 +318,7 @@ Need to define this here so that other parts of code have access to it matches))) #+end_src -* Tie it up +** Tie it up #+begin_src emacs-lisp (provide 'azos-emacs-base) diff --git a/home-manager/suites/base/python/default.nix b/home-manager/suites/base/python/default.nix new file mode 100644 index 0000000..c47c908 --- /dev/null +++ b/home-manager/suites/base/python/default.nix @@ -0,0 +1,33 @@ +{ lib, config, pkgs, azos-utils, ... }: +let + isEnabled = + config.azos.python.enable && config.azos.suites.base.enable; + pythonpkgs = config.azos.python.pythonpkg.pkgs; +in +{ + options.azos.python.enable = (azos-utils.mkFeatureEnableOption {}); + + options.azos.python.pythonpkg = lib.mkOption{ + type = lib.types.package; + default = pkgs.python3; + }; + + options.azos.python.pkgs = lib.mkOption{ + default = []; + description = "List of packages for python."; + }; + + config = lib.mkIf isEnabled { + azos.python.pkgs = with pythonpkgs; [ + graphviz + pygments + ]; + + home.packages = with pkgs; + [(config.azos.python.pythonpkg.withPackages (python-pkgs: config.azos.python.pkgs)) + ]; + }; + + imports = [ + ]; +}