Remove unneeded flake inputs #196

Closed
abonerib wants to merge 1 commits from abonerib/jungle:remove-inputs into master
Collaborator

We don't use home-manager or nix-darwin, so it should be safe to remove them from the flake inputs.

before

$ nix flake metadata
Path:          /nix/store/8p3zqn4jpvvv7jb4b1bjaw7ab08w593r-source
Revision:      e9754aa8d7e85905723c2db28e3ee2322c5f4b9c-dirty
Last modified: 2025-10-10 12:47:05
Fingerprint:   d509e5ce6522314eb011b9935ab53ea4d4fb4dbcb419b6b1db44b05396b26c61
Inputs:
├───agenix: github:ryantm/agenix/531beac616433bac6f9e2a19feb8e99a22a66baf?narHash=sha256-9P1FziAwl5%2B3edkfFcr5HeGtQUtrSdk/MksX39GieoA%3D (2025-06-17 15:14:20)
│   ├───darwin: github:lnl7/nix-darwin/43975d782b418ebf4969e9ccba82466728c2851b?narHash=sha256-dyN%2BteG9G82G%2Bm%2BPX/aSAagkC%2BvUv0SgUw3XkPhQodQ%3D (2025-04-12 17:29:39)
│   │   └───nixpkgs follows input 'agenix/nixpkgs'
│   ├───home-manager: github:nix-community/home-manager/abfad3d2958c9e6300a883bd443512c55dfeb1be?narHash=sha256-YZCh2o9Ua1n9uCvrvi5pRxtuVNml8X2a03qIFfRKpFs%3D (2025-04-24 11:40:11)
│   │   └───nixpkgs follows input 'agenix/nixpkgs'
│   ├───nixpkgs follows input 'nixpkgs'
│   └───systems: github:nix-systems/default/da67096a3b9bf56a91d16901293e51ba5b49a27e?narHash=sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768%3D (2023-04-09 08:27:08)
└───nixpkgs: github:NixOS/nixpkgs/dfcd5b901dbab46c9c6e80b265648481aafb01f8?narHash=sha256-Kt1UIPi7kZqkSc5HVj6UY5YLHHEzPBkgpNUByuyxtlw%3D (2025-07-13 19:49:22)

after

$ nix flake metadata
Path:          /nix/store/1hkldqj3gipsnsgfyq01ms1i26i1blqw-source
Revision:      08c6af06ef2a7808b65969b85933dbdd594326d6
Revisions:     1484
Last modified: 2025-10-10 15:14:06
Fingerprint:   52d5e8cfb34ede4609f6e092677657c349323c5b962a86658f020ff93e512674
Inputs:
├───agenix: github:ryantm/agenix/531beac616433bac6f9e2a19feb8e99a22a66baf?narHash=sha256-9P1FziAwl5%2B3edkfFcr5HeGtQUtrSdk/MksX39GieoA%3D (2025-06-17 15:14:20)
│   ├───darwin follows input ''
│   ├───home-manager follows input ''
│   ├───nixpkgs follows input 'nixpkgs'
│   └───systems follows input 'systems'
├───nixpkgs: github:NixOS/nixpkgs/dfcd5b901dbab46c9c6e80b265648481aafb01f8?narHash=sha256-Kt1UIPi7kZqkSc5HVj6UY5YLHHEzPBkgpNUByuyxtlw%3D (2025-07-13 19:49:22)
└───systems: path:./pkgs/systems.nix
We don't use home-manager or `nix-darwin`, so it should be safe to remove them from the flake inputs. ### before ``` $ nix flake metadata Path: /nix/store/8p3zqn4jpvvv7jb4b1bjaw7ab08w593r-source Revision: e9754aa8d7e85905723c2db28e3ee2322c5f4b9c-dirty Last modified: 2025-10-10 12:47:05 Fingerprint: d509e5ce6522314eb011b9935ab53ea4d4fb4dbcb419b6b1db44b05396b26c61 Inputs: ├───agenix: github:ryantm/agenix/531beac616433bac6f9e2a19feb8e99a22a66baf?narHash=sha256-9P1FziAwl5%2B3edkfFcr5HeGtQUtrSdk/MksX39GieoA%3D (2025-06-17 15:14:20) │ ├───darwin: github:lnl7/nix-darwin/43975d782b418ebf4969e9ccba82466728c2851b?narHash=sha256-dyN%2BteG9G82G%2Bm%2BPX/aSAagkC%2BvUv0SgUw3XkPhQodQ%3D (2025-04-12 17:29:39) │ │ └───nixpkgs follows input 'agenix/nixpkgs' │ ├───home-manager: github:nix-community/home-manager/abfad3d2958c9e6300a883bd443512c55dfeb1be?narHash=sha256-YZCh2o9Ua1n9uCvrvi5pRxtuVNml8X2a03qIFfRKpFs%3D (2025-04-24 11:40:11) │ │ └───nixpkgs follows input 'agenix/nixpkgs' │ ├───nixpkgs follows input 'nixpkgs' │ └───systems: github:nix-systems/default/da67096a3b9bf56a91d16901293e51ba5b49a27e?narHash=sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768%3D (2023-04-09 08:27:08) └───nixpkgs: github:NixOS/nixpkgs/dfcd5b901dbab46c9c6e80b265648481aafb01f8?narHash=sha256-Kt1UIPi7kZqkSc5HVj6UY5YLHHEzPBkgpNUByuyxtlw%3D (2025-07-13 19:49:22) ``` ### after ``` $ nix flake metadata Path: /nix/store/1hkldqj3gipsnsgfyq01ms1i26i1blqw-source Revision: 08c6af06ef2a7808b65969b85933dbdd594326d6 Revisions: 1484 Last modified: 2025-10-10 15:14:06 Fingerprint: 52d5e8cfb34ede4609f6e092677657c349323c5b962a86658f020ff93e512674 Inputs: ├───agenix: github:ryantm/agenix/531beac616433bac6f9e2a19feb8e99a22a66baf?narHash=sha256-9P1FziAwl5%2B3edkfFcr5HeGtQUtrSdk/MksX39GieoA%3D (2025-06-17 15:14:20) │ ├───darwin follows input '' │ ├───home-manager follows input '' │ ├───nixpkgs follows input 'nixpkgs' │ └───systems follows input 'systems' ├───nixpkgs: github:NixOS/nixpkgs/dfcd5b901dbab46c9c6e80b265648481aafb01f8?narHash=sha256-Kt1UIPi7kZqkSc5HVj6UY5YLHHEzPBkgpNUByuyxtlw%3D (2025-07-13 19:49:22) └───systems: path:./pkgs/systems.nix ```
abonerib added 1 commit 2025-10-10 15:20:16 +02:00
Remove unneeded flake inputs
All checks were successful
CI / build:cross (pull_request) Successful in 6s
CI / build:all (pull_request) Successful in 15s
08c6af06ef
abonerib requested review from rarias 2025-10-10 15:30:21 +02:00
Owner

Can't we just remove the agenix input completely and copy the agenix package and module in jungle? Is just a simple shell script and it doesn't seem to change that often:

https://github.com/ryantm/agenix/commits/main/pkgs
https://github.com/ryantm/agenix/commits/main/modules/age.nix

Can't we just remove the agenix input completely and copy the agenix package and module in jungle? Is just a simple shell script and it doesn't seem to change that often: https://github.com/ryantm/agenix/commits/main/pkgs https://github.com/ryantm/agenix/commits/main/modules/age.nix
Author
Collaborator

Can't we just remove the agenix input completely and copy the agenix package and module in jungle? Is just a simple shell script and it doesn't seem to change that often:

https://github.com/ryantm/agenix/commits/main/pkgs
https://github.com/ryantm/agenix/commits/main/modules/age.nix

It seems that flake inputs are lazy as long as you don't update the lock, so maybe we can keep it as is, since it will only affect the size of flake.lock:

Values in an attribute set are computed lazily, so as long as you don’t use the value of an input, the input does not need to be fetched during evaluation.

> Can't we just remove the agenix input completely and copy the agenix package and module in jungle? Is just a simple shell script and it doesn't seem to change that often: > > https://github.com/ryantm/agenix/commits/main/pkgs > https://github.com/ryantm/agenix/commits/main/modules/age.nix It seems that [flake inputs are lazy as long as you don't update the lock](https://discourse.nixos.org/t/nix-flake-inputs-not-lazy/25463/2), so maybe we can keep it as is, since it will only affect the size of `flake.lock`: > Values in an attribute set are computed lazily, so as long as you don’t use the value of an input, the input does not need to be fetched during evaluation.
Owner

It seems that flake inputs are lazy as long as you don't update the lock, so maybe we can keep it as is, since it will only affect the size of flake.lock:

Values in an attribute set are computed lazily, so as long as you don’t use the value of an input, the input does not need to be fetched during evaluation.

Yes, but it requires a extra input (and extra patches to remove cruft) which I think we can safely avoid, so we only depend on nixpkgs.

Do you think it would require too much work to maintain?

> It seems that [flake inputs are lazy as long as you don't update the lock](https://discourse.nixos.org/t/nix-flake-inputs-not-lazy/25463/2), so maybe we can keep it as is, since it will only affect the size of `flake.lock`: > > > Values in an attribute set are computed lazily, so as long as you don’t use the value of an input, the input does not need to be fetched during evaluation. Yes, but it requires a extra input (and extra patches to remove cruft) which I think we can safely avoid, so we only depend on nixpkgs. Do you think it would require too much work to maintain?
Author
Collaborator

It seems that flake inputs are lazy as long as you don't update the lock, so maybe we can keep it as is, since it will only affect the size of flake.lock:

Values in an attribute set are computed lazily, so as long as you don’t use the value of an input, the input does not need to be fetched during evaluation.

Yes, but it requires a extra input (and extra patches to remove cruft) which I think we can safely avoid, so we only depend on nixpkgs.

Do you think it would require too much work to maintain?

It shouldn't be, we don't really need most of the features in age anyways

> > It seems that [flake inputs are lazy as long as you don't update the lock](https://discourse.nixos.org/t/nix-flake-inputs-not-lazy/25463/2), so maybe we can keep it as is, since it will only affect the size of `flake.lock`: > > > > > Values in an attribute set are computed lazily, so as long as you don’t use the value of an input, the input does not need to be fetched during evaluation. > > Yes, but it requires a extra input (and extra patches to remove cruft) which I think we can safely avoid, so we only depend on nixpkgs. > > Do you think it would require too much work to maintain? It shouldn't be, we don't really need most of the features in age anyways
Owner

It shouldn't be, we don't really need most of the features in age anyways

See #198

> It shouldn't be, we don't really need most of the features in age anyways See #198
Owner

Closing, now we only have nixpkgs:

hut% nix flake metadata
Resolved URL:  git+file:///home/Computational/rarias/jungle
Locked URL:    git+file:///home/Computational/rarias/jungle?ref=refs/heads/master&rev=4261d327c678e52abdd568a27168ea7cdd0484a0
Path:          /nix/store/fwbvmj9zvhysck5zvxymxny4ap3sh5rk-source
Revision:      4261d327c678e52abdd568a27168ea7cdd0484a0
Revisions:     1487
Last modified: 2025-10-14 09:37:47
Fingerprint:   e5ef10952205c701eed7b996560a3aa02c68ffe9ec69431b611c8f4444b84c1a
Inputs:
└───nixpkgs: github:NixOS/nixpkgs/dfcd5b901dbab46c9c6e80b265648481aafb01f8?narHash=sha256-Kt1UIPi7kZqkSc5HVj6UY5YLHHEzPBkgpNUByuyxtlw%3D (2025-07-13 19:49:22)
Closing, now we only have nixpkgs: ``` hut% nix flake metadata Resolved URL: git+file:///home/Computational/rarias/jungle Locked URL: git+file:///home/Computational/rarias/jungle?ref=refs/heads/master&rev=4261d327c678e52abdd568a27168ea7cdd0484a0 Path: /nix/store/fwbvmj9zvhysck5zvxymxny4ap3sh5rk-source Revision: 4261d327c678e52abdd568a27168ea7cdd0484a0 Revisions: 1487 Last modified: 2025-10-14 09:37:47 Fingerprint: e5ef10952205c701eed7b996560a3aa02c68ffe9ec69431b611c8f4444b84c1a Inputs: └───nixpkgs: github:NixOS/nixpkgs/dfcd5b901dbab46c9c6e80b265648481aafb01f8?narHash=sha256-Kt1UIPi7kZqkSc5HVj6UY5YLHHEzPBkgpNUByuyxtlw%3D (2025-07-13 19:49:22) ```
rarias closed this pull request 2025-10-14 09:43:37 +02:00
All checks were successful
CI / build:cross (pull_request) Successful in 6s
CI / build:all (pull_request) Successful in 15s

Pull request closed

Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rarias/jungle#196