add a list of all currently installed packages to /etc/current-system-packages
This commit is contained in:
parent
78827dac7d
commit
e0657d4346
1 changed files with 9 additions and 0 deletions
|
@ -71,6 +71,15 @@
|
|||
variant = "";
|
||||
};
|
||||
|
||||
# Add /etc/current-system-packages
|
||||
environment.etc."current-system-packages".text =
|
||||
let
|
||||
packages = builtins.map (p: "${p.name}") config.environment.systemPackages;
|
||||
sortedUnique = builtins.sort builtins.lessThan (pkgs.lib.lists.unique packages);
|
||||
formatted = builtins.concatStringsSep "\n" sortedUnique;
|
||||
in
|
||||
formatted;
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
|
|
Loading…
Reference in a new issue