diff options
author | Mark Nipper <nipsy@bitgnome.net> | 2024-06-15 14:37:36 -0700 |
---|---|---|
committer | Mark Nipper <nipsy@bitgnome.net> | 2024-06-15 14:37:36 -0700 |
commit | 3eeb046a0f0bd3ad0c3a0117c81423c5cdca2862 (patch) | |
tree | 504be1dba243b57b7528bb1b44f6b4d6ddd5ff03 /hosts/common | |
parent | c8e7cc5d04a0e7e4af3813cb8eb03e85bed1acb2 (diff) | |
download | nix-3eeb046a0f0bd3ad0c3a0117c81423c5cdca2862.tar nix-3eeb046a0f0bd3ad0c3a0117c81423c5cdca2862.tar.gz nix-3eeb046a0f0bd3ad0c3a0117c81423c5cdca2862.tar.bz2 nix-3eeb046a0f0bd3ad0c3a0117c81423c5cdca2862.tar.lz nix-3eeb046a0f0bd3ad0c3a0117c81423c5cdca2862.tar.xz nix-3eeb046a0f0bd3ad0c3a0117c81423c5cdca2862.tar.zst nix-3eeb046a0f0bd3ad0c3a0117c81423c5cdca2862.zip |
Generate current package list in /etc
Diffstat (limited to '')
-rw-r--r-- | hosts/common/core/default.nix | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/hosts/common/core/default.nix b/hosts/common/core/default.nix index b6e76d5..e0a450a 100644 --- a/hosts/common/core/default.nix +++ b/hosts/common/core/default.nix @@ -9,8 +9,15 @@ documentation.dev.enable = true; documentation.man.enable = true; - #environment.systemPackages = builtins.attrValues { - # inherit (pkgs) + # generate a handy list of all currently installed packages with versions at /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; + environment.systemPackages = with pkgs; [ acl age @@ -91,9 +98,8 @@ wireguard-tools xz zip - zstd#; + zstd ]; - #}; hardware.enableRedistributableFirmware = true; |