aboutsummaryrefslogtreecommitdiff
path: root/profiles
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2023-05-12 14:13:36 -0700
committerFranck Cuny <franck@fcuny.net>2023-05-12 14:13:36 -0700
commitf85e19964d0ba6bf2c55f269076b4dc4d450b3a8 (patch)
tree351d459fc517346792ede498c18f352c6187d521 /profiles
parenthosts/tahoe: move network configuration to default.nix (diff)
downloadinfra-f85e19964d0ba6bf2c55f269076b4dc4d450b3a8.tar.gz
profiles/default: list installed packages in /etc/installed-packages
Diffstat (limited to 'profiles')
-rw-r--r--profiles/default.nix11
1 files changed, 10 insertions, 1 deletions
diff --git a/profiles/default.nix b/profiles/default.nix
index 86fe4d8..bcda0a2 100644
--- a/profiles/default.nix
+++ b/profiles/default.nix
@@ -87,7 +87,7 @@
gc = {
automatic = true;
- options = "--delete-older-than 14d";
+ options = "weekly";
};
};
@@ -135,4 +135,13 @@
];
programs.bcc.enable = true;
+
+ # Show installed packages (https://www.reddit.com/r/NixOS/comments/fsummx/comment/fm45htj/?utm_source=share&utm_medium=web2x&context=3)
+ environment.etc."installed-packages".text =
+ let
+ packages = builtins.map (p: "${p.name}") config.environment.systemPackages;
+ sortedUnique = builtins.sort builtins.lessThan (lib.unique packages);
+ formatted = builtins.concatStringsSep "\n" sortedUnique;
+ in
+ formatted;
}