diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 1bafcc3..5f14e12 100755 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -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;