From 7785744d73b8a60ae8376ddb1e9bcce7fe0daf6b Mon Sep 17 00:00:00 2001 From: Hendrik Sokolowski Date: Sun, 14 Aug 2022 15:11:01 +0200 Subject: [PATCH] Move some packages from full to default set, move options for modules to default.nix --- modules/core/default.nix | 10 +++++++--- modules/core/modules.nix | 11 ----------- modules/core/packages.nix | 21 ++++++++++----------- 3 files changed, 17 insertions(+), 25 deletions(-) delete mode 100644 modules/core/modules.nix diff --git a/modules/core/default.nix b/modules/core/default.nix index dae70e7..8aec784 100644 --- a/modules/core/default.nix +++ b/modules/core/default.nix @@ -17,11 +17,15 @@ in ./services.nix ]; + pub-solar.terminal-life.enable = true; + pub-solar.audio.enable = lib.mkIf (!cfg.lite) true; + pub-solar.crypto.enable = lib.mkIf (!cfg.lite) true; + pub-solar.devops.enable = lib.mkIf (!cfg.lite) true; + options.pub-solar.core = { - lite-core-active = mkOption { + lite = mkOption { description = '' - Whether the node should run as a server or agent. - Note that the server, by default, also runs as an agent. + Enable a lite edition of core with less default modules and a reduced package set. ''; default = false; type = types.bool; diff --git a/modules/core/modules.nix b/modules/core/modules.nix deleted file mode 100644 index b55281e..0000000 --- a/modules/core/modules.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ config, pkgs, lib, ... }: -with lib; -let - cfg = config.pub-solar.core; -in -{ - pub-solar.terminal-life.enable = lib.mkIf (!cfg.lite-core-active) true; - pub-solar.audio.enable = lib.mkIf (!cfg.lite-core-active) true; - pub-solar.crypto.enable = lib.mkIf (!cfg.lite-core-active) true; - pub-solar.devops.enable = lib.mkIf (!cfg.lite-core-active) true; -} diff --git a/modules/core/packages.nix b/modules/core/packages.nix index 0726324..f686781 100644 --- a/modules/core/packages.nix +++ b/modules/core/packages.nix @@ -24,9 +24,18 @@ in lsof psmisc file + + # zippit + zip + unzip + + # Modern modern utilities + p7zip + croc + jq ] - ++ lib.optionals (!cfg.lite-core-active) [ + ++ lib.optionals (!cfg.lite) [ mtr gitFull @@ -48,16 +57,6 @@ in findutils exfat - - # zippit - zip - unzip - - # Modern modern utilities - p7zip - croc - jq - # Nix specific utilities niv manix