aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2025-04-24 20:11:15 -0700
committerFranck Cuny <franck@fcuny.net>2025-04-24 20:11:15 -0700
commitb21a57caf83a3deacb99e8d47a508082013304da (patch)
tree2df35f7d3e0c5310489101ffbab38c1e1ccfc07d
parentdrop just (diff)
downloadinfra-b21a57caf83a3deacb99e8d47a508082013304da.tar.gz
automatically add packages to the overlays
Store custom packages under `customPackages` to make it easier to distinct them from the rest of the packages.
Diffstat (limited to '')
-rw-r--r--flake.nix15
-rw-r--r--nix/users/fcuny/dev.nix2
-rw-r--r--nix/users/fcuny/work.nix10
3 files changed, 14 insertions, 13 deletions
diff --git a/flake.nix b/flake.nix
index ac1179c..b84749e 100644
--- a/flake.nix
+++ b/flake.nix
@@ -45,17 +45,18 @@
# Define overlays here
overlays = [
(final: _prev: {
- sapi = final.callPackage ./pkgs/sapi { };
- hashi = final.callPackage ./pkgs/hashi { };
- llmPython = final.callPackage ./pkgs/llmPython {
- inherit pkgsUnstable;
- };
+ # Load all packages from the pkgs directory
+ customPackages = builtins.mapAttrs (
+ name: _:
+ final.callPackage (./pkgs + "/${name}") {
+ inherit pkgsUnstable;
+ }
+ ) (builtins.readDir ./pkgs);
})
];
mkSystem = import ./nix/lib/mkSystem.nix {
- inherit nixpkgs nixpkgsUnstable inputs;
- inherit overlays;
+ inherit nixpkgs inputs overlays;
};
treefmtEval = treefmt-nix.lib.evalModule pkgs {
diff --git a/nix/users/fcuny/dev.nix b/nix/users/fcuny/dev.nix
index 14dda79..0202747 100644
--- a/nix/users/fcuny/dev.nix
+++ b/nix/users/fcuny/dev.nix
@@ -18,7 +18,7 @@
# python
uv
python3
- llmPython.llm
+ customPackages.llmPython.llm
# nix
nil # nix lsp
diff --git a/nix/users/fcuny/work.nix b/nix/users/fcuny/work.nix
index b1f5e75..b3b6325 100644
--- a/nix/users/fcuny/work.nix
+++ b/nix/users/fcuny/work.nix
@@ -10,10 +10,10 @@
vault
# for ssh
- sapi
+ customPackages.sapi
# for tokens
- hashi
+ customPackages.hashi
];
programs.fish = {
@@ -39,11 +39,11 @@
builtins.concatMap (env: [
{
name = "ssh-sign-${env.alias}";
- value = "${pkgs.hashi}/bin/hashi -e ${env.name} sign --output-path=/Users/fcuny/.ssh/cert-${env.alias} --key=(op read 'op://employee/default rbx ssh key/public key'|psub) key";
+ value = "${pkgs.customPackages.hashi}/bin/hashi -e ${env.name} sign --output-path=/Users/fcuny/.ssh/cert-${env.alias} --key=(op read 'op://employee/default rbx ssh key/public key'|psub) key";
}
{
name = "hashi-${env.alias}";
- value = "${pkgs.hashi}/bin/hashi -e ${env.name} show v";
+ value = "${pkgs.customPackages.hashi}/bin/hashi -e ${env.name} show v";
}
{
name = "ssh-${env.alias}";
@@ -54,7 +54,7 @@
# Add any additional non-environment specific aliases
additionalAliases = {
- "sjump" = "${pkgs.sapi}/bin/sapi jump";
+ "sjump" = "${pkgs.customPackages.sapi}/bin/sapi jump";
};
in
envAliases // additionalAliases;