From cb5c75b1cc37e9272422bf45ecd3e6353abb0cd2 Mon Sep 17 00:00:00 2001 From: hensoko Date: Sun, 14 Aug 2022 15:17:35 +0000 Subject: [PATCH] feature/terminal-life-lite-mode (#117) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/117 Reviewed-by: Benjamin Bädorf --- modules/core/default.nix | 6 +++++- modules/terminal-life/default.nix | 8 ++++++++ modules/terminal-life/nvim/default.nix | 3 ++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/modules/core/default.nix b/modules/core/default.nix index c7457c1b..7b168268 100644 --- a/modules/core/default.nix +++ b/modules/core/default.nix @@ -28,10 +28,14 @@ in config = { pub-solar = { - terminal-life.enable = true; audio.enable = lib.mkIf (!cfg.lite) true; crypto.enable = lib.mkIf (!cfg.lite) true; devops.enable = lib.mkIf (!cfg.lite) true; + + terminal-life = { + enable = true; + lite = cfg.lite; + }; }; }; } diff --git a/modules/terminal-life/default.nix b/modules/terminal-life/default.nix index 8ecb9919..6bd0312f 100644 --- a/modules/terminal-life/default.nix +++ b/modules/terminal-life/default.nix @@ -7,6 +7,14 @@ in { options.pub-solar.terminal-life = { enable = mkEnableOption "Life in black and white"; + + lite = mkOption { + description = '' + Enable a lite edition of terminal-life with less modules and a reduced package set. + ''; + default = false; + type = types.bool; + }; }; config = mkIf cfg.enable { diff --git a/modules/terminal-life/nvim/default.nix b/modules/terminal-life/nvim/default.nix index 1d6645ff..bc06943b 100644 --- a/modules/terminal-life/nvim/default.nix +++ b/modules/terminal-life/nvim/default.nix @@ -1,6 +1,7 @@ { config, pkgs, ... }: let psCfg = config.pub-solar; + cfg = config.pub-solar.terminal-life; xdg = config.home-manager.users."${psCfg.user.name}".xdg; preview-file = pkgs.writeShellScriptBin "preview-file" (import ./preview-file.nix pkgs); @@ -76,7 +77,7 @@ in withRuby = true; withPython3 = true; - extraPackages = with pkgs; [ + extraPackages = with pkgs; lib.mkIf (!cfg.lite) [ ccls gopls nodejs