summary refs log tree commit diff
path: root/nixos/modules/config
diff options
context:
space:
mode:
authorWORLDofPEACE <worldofpeace@protonmail.ch>2020-09-08 19:40:45 -0400
committerGitHub <noreply@github.com>2020-09-08 19:40:45 -0400
commit2ab42dcc9e228861cec54ab346e01c9ab6e34771 (patch)
tree25811aea794ac713475a8810a3873b2ba1dfbf83 /nixos/modules/config
parentd85c02ba20442e77fe6a1f685e08b0fd05f2c9bb (diff)
parent74b3d66baf2f3effb4702832fc45828291a358d8 (diff)
downloadnixpkgs-2ab42dcc9e228861cec54ab346e01c9ab6e34771.tar
nixpkgs-2ab42dcc9e228861cec54ab346e01c9ab6e34771.tar.gz
nixpkgs-2ab42dcc9e228861cec54ab346e01c9ab6e34771.tar.bz2
nixpkgs-2ab42dcc9e228861cec54ab346e01c9ab6e34771.tar.lz
nixpkgs-2ab42dcc9e228861cec54ab346e01c9ab6e34771.tar.xz
nixpkgs-2ab42dcc9e228861cec54ab346e01c9ab6e34771.tar.zst
nixpkgs-2ab42dcc9e228861cec54ab346e01c9ab6e34771.zip
Merge pull request #97171 from davidak/defaultPackages
nixos/config: add defaultPackages option 
Diffstat (limited to 'nixos/modules/config')
-rw-r--r--nixos/modules/config/system-path.nix23
1 files changed, 22 insertions, 1 deletions
diff --git a/nixos/modules/config/system-path.nix b/nixos/modules/config/system-path.nix
index b3c5c6f93f3..67305e8499c 100644
--- a/nixos/modules/config/system-path.nix
+++ b/nixos/modules/config/system-path.nix
@@ -41,6 +41,12 @@ let
       pkgs.zstd
     ];
 
+    defaultPackages = map (pkg: setPrio ((pkg.meta.priority or 5) + 3) pkg)
+      [ pkgs.perl
+        pkgs.rsync
+        pkgs.strace
+      ];
+
 in
 
 {
@@ -63,6 +69,21 @@ in
         '';
       };
 
+      defaultPackages = mkOption {
+        type = types.listOf types.package;
+        default = defaultPackages;
+        example = literalExample "[]";
+        description = ''
+          Set of packages users expect from a minimal linux istall.
+          Like systemPackages, they appear in
+          /run/current-system/sw.  These packages are
+          automatically available to all users, and are
+          automatically updated every time you rebuild the system
+          configuration.
+          If you want a more minimal system, set it to an empty list.
+        '';
+      };
+
       pathsToLink = mkOption {
         type = types.listOf types.str;
         # Note: We need `/lib' to be among `pathsToLink' for NSS modules
@@ -102,7 +123,7 @@ in
 
   config = {
 
-    environment.systemPackages = requiredPackages;
+    environment.systemPackages = requiredPackages ++ config.environment.defaultPackages;
 
     environment.pathsToLink =
       [ "/bin"