Commit Graph

183 Commits

Author SHA1 Message Date
github-actions[bot]
8477a65c0a flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/25865a40d14b3f9cf19f19b924e2ab4069b09588' (2024-05-05)
  → 'github:NixOS/nixpkgs/062ca2a9370a27a35c524dc82d540e6e9824b652' (2024-05-11)
2024-05-13 12:32:53 +00:00
github-actions[bot]
f132fc1409 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/58a1abdbae3217ca6b702f03d3b35125d88a2994' (2024-04-27)
  → 'github:NixOS/nixpkgs/25865a40d14b3f9cf19f19b924e2ab4069b09588' (2024-05-05)
2024-05-06 12:32:20 +00:00
github-actions[bot]
7a838aff6f flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/6143fc5eeb9c4f00163267708e26191d1e918932' (2024-04-21)
  → 'github:NixOS/nixpkgs/58a1abdbae3217ca6b702f03d3b35125d88a2994' (2024-04-27)
2024-04-29 12:32:07 +00:00
github-actions[bot]
796777410b flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/cfd6b5fc90b15709b780a5a1619695a88505a176' (2024-04-12)
  → 'github:NixOS/nixpkgs/6143fc5eeb9c4f00163267708e26191d1e918932' (2024-04-21)
2024-04-22 12:32:08 +00:00
github-actions[bot]
6abd6a5af0 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/ff0dbd94265ac470dda06a657d5fe49de93b4599' (2024-04-06)
  → 'github:NixOS/nixpkgs/cfd6b5fc90b15709b780a5a1619695a88505a176' (2024-04-12)
2024-04-15 12:29:32 +00:00
github-actions[bot]
4f4d40c050 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/d8fe5e6c92d0d190646fb9f1056741a229980089' (2024-03-29)
  → 'github:NixOS/nixpkgs/ff0dbd94265ac470dda06a657d5fe49de93b4599' (2024-04-06)
2024-04-08 12:30:17 +00:00
Archit Gupta
fb530e878f Propagate nixpkgs.config to NixOS and HM 2024-04-06 18:05:28 -07:00
Archit Gupta
c70ffe0ddd Check HM useGlobalPkgs before propagating
The NixOS home-manager module only uses nixpkgs settings if
useGlobalPkgs is false. If it is true, there is no need to propagate
config (and propagating nixpkgs.config would cause an assertion).
2024-04-06 17:54:52 -07:00
github-actions[bot]
a55ef90976 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/44d0940ea560dee511026a53f0e2e2cde489b4d4' (2024-03-23)
  → 'github:NixOS/nixpkgs/d8fe5e6c92d0d190646fb9f1056741a229980089' (2024-03-29)
2024-04-01 12:32:05 +00:00
github-actions[bot]
3150ee1337 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/c75037bbf9093a2acb617804ee46320d6d1fea5a' (2024-03-16)
  → 'github:NixOS/nixpkgs/44d0940ea560dee511026a53f0e2e2cde489b4d4' (2024-03-23)
2024-03-25 12:29:23 +00:00
Archit Gupta
3a364f9cdd Remove checking of meta.platforms
Previously, meta.platforms would be checked for each package when
generating package attributes for a system, so that unsupported packages
would not have an output attribute. This commit removes that behavior.

Now `nix flake show` will succeed even if packages fail to evaluate on
other platforms. `nix flake show --all-systems` will still fail though.
2024-03-24 14:23:41 -07:00
Archit Gupta
fe5916eb40 Use submoduleWith instead of submodule
This results in not enabling shorthandOnlyDefinesConfig, allowing
imports to be set in submodules. This can, for example, allow a devShell
to import another devShell's config to extend it.
2024-03-21 04:12:42 -07:00
github-actions[bot]
5fe9313894 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/3030f185ba6a4bf4f18b87f345f104e6a6961f34' (2024-03-09)
  → 'github:NixOS/nixpkgs/c75037bbf9093a2acb617804ee46320d6d1fea5a' (2024-03-16)
2024-03-18 12:29:06 +00:00
Ratson
3c8387832b Fix typos in API docs 2024-03-13 08:46:00 -07:00
github-actions[bot]
91d20208d3 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/1536926ef5621b09bba54035ae2bb6d806d72ac8' (2024-02-29)
  → 'github:NixOS/nixpkgs/3030f185ba6a4bf4f18b87f345f104e6a6961f34' (2024-03-09)
2024-03-11 12:30:07 +00:00
Archit Gupta
cecfafe9a4 Set defaults for inputs from flake.lock
If the `src` passed to flakelight contains a flake.lock, it will now be
read and used to set defaults for `inputs`. Explicitly passed inputs
will override this.
2024-03-10 19:26:37 -07:00
github-actions[bot]
24b3fcfce7 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/73de017ef2d18a04ac4bfd0c02650007ccb31c2a' (2024-02-24)
  → 'github:NixOS/nixpkgs/1536926ef5621b09bba54035ae2bb6d806d72ac8' (2024-02-29)
2024-03-04 19:03:44 +00:00
Calum MacRae
b16bb5487e Add flakelight-darwin ref in README 2024-03-03 19:55:01 +00:00
Archit Gupta
315cf52d7f Add description to README for additional modules 2024-02-29 09:07:48 -08:00
Archit Gupta
73c2248a8e Add contact section to readme 2024-02-29 09:07:48 -08:00
github-actions[bot]
36c6d009df flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/5863c27340ba4de8f83e7e3c023b9599c3cb3c80' (2024-02-16)
  → 'github:NixOS/nixpkgs/73de017ef2d18a04ac4bfd0c02650007ccb31c2a' (2024-02-24)
2024-02-26 12:29:13 +00:00
Archit Gupta
360fd2099d Allow devShells to be directly set to derivations 2024-02-25 18:44:31 -08:00
Archit Gupta
610cc3b0c4 Refactor checks to use types 2024-02-24 21:31:24 -08:00
Archit Gupta
e72626b0a9 Allow apps to be scripts
This enables setting the app to arbitrary bash scripts which will be
written to a store path and used for the app's program attr.
2024-02-24 21:31:24 -08:00
Archit Gupta
41ec64361f Allow using optFunctionTo on types with submodules 2024-02-24 21:31:24 -08:00
Archit Gupta
3304eb3746 Nix now requires app programs to be paths in store 2024-02-24 21:31:24 -08:00
Archit Gupta
bac4759bcb Refactor apps to use types 2024-02-24 21:31:24 -08:00
github-actions[bot]
afa2a89bae flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/d934204a0f8d9198e1e4515dd6fec76a139c87f0' (2024-02-10)
  → 'github:NixOS/nixpkgs/5863c27340ba4de8f83e7e3c023b9599c3cb3c80' (2024-02-16)
2024-02-19 12:29:44 +00:00
Archit Gupta
efcf01325b Enable faster building of formatter
Since the formatter always depended on devShell packages, building the
formatter involved building all the devShell packages, which can be
slow.

In the case where formatters are set to plain strings, such as
"nixpkgs-fmt", depending on the devShell packages is necessary in order
to put the formatting utility on the path. But when a formatters option
is set to an package, such as "${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt",
then that formatter option does not depend on the devShell packages.

Flakelight now detects if any of the configured formatters are using the
first form, and only if so does it add the devShell packages dependency.
This allows the first form to still work, without incurring a cost for
flakes that only use the second form.

Users can use the second form for all formatters options if they wish to
not build the devShell packages when using the formatter.
2024-02-19 02:35:16 -08:00
Archit Gupta
981e22f851 Fix usage of devShell packages in formatters
Formatters should have the packages from devShell.packages, though a
regression caused PATH to not be set in the formatter. This fixes that
issue.
2024-02-19 02:03:21 -08:00
Archit Gupta
db9da2b1f7 Use mkDefault for default formatters
This enables easier overriding of formatting defaults.
2024-02-19 00:12:26 -08:00
github-actions[bot]
40af04adb6 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/e92b6015881907e698782c77641aa49298330223' (2024-02-02)
  → 'github:NixOS/nixpkgs/d934204a0f8d9198e1e4515dd6fec76a139c87f0' (2024-02-10)
2024-02-12 12:29:18 +00:00
Archit Gupta
6920686f25 Include default package in devShell.inputsFrom
A user whose flake only has a package would expect it to be used when
running `nix develop`. But since theres probably an automatically
created devShell, the package's deps will not be available in the shell.
If a default package exists, it makes sense for its deps to be available
by default in the default devShell.
2024-02-11 18:09:55 -08:00
Archit Gupta
a50fbcba1a Allow all of devShells config types in devShells
`devShell` accepted either a package def, a submodule value, or a
function to a submodule value. `devShells` only accepted package defs.
This brings all the options of `devShells` to any devShell configured
with `devShells`.
2024-02-07 01:49:29 -08:00
Archit Gupta
543e3aaa4d Replace nixpkgs nullOr type with custom type
`nullOr`'s merge function requires definitions to all be null or all be
non-null. It was being used where the intent was that null be used as a
value representing unset, and as such the merge should return null if
all definitions are null and ignore nulls otherwise. This adds a type
with that merge semantics.
2024-02-07 01:49:29 -08:00
Archit Gupta
9fe4cb1994 Enable devShell as a function to take packages
Before, devShell could be set to a submodule config, a package def, or a
function taking module args and returning a submodule config. This
changes the last form to take the package set instead.

This enables cleaner configuration by not needing each option to
individually be a function of pkgs. Passing pkgs also gives more
flexibility as all the module args are available under the `moduleArgs`
attr.

Code that relied on module args not directly in the package set will now
have to access them from the `moduleArgs` attr.
2024-02-07 01:49:29 -08:00
Archit Gupta
1fa95e0d84 Add support for configuring legacyPackages 2024-02-07 01:49:29 -08:00
github-actions[bot]
086393b47b flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/ae5c332cbb5827f6b1f02572496b141021de335f' (2024-01-25)
  → 'github:NixOS/nixpkgs/e92b6015881907e698782c77641aa49298330223' (2024-02-02)
2024-02-05 12:29:24 +00:00
github-actions[bot]
29c3d7809a flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/612f97239e2cc474c13c9dafa0df378058c5ad8d' (2024-01-21)
  → 'github:NixOS/nixpkgs/ae5c332cbb5827f6b1f02572496b141021de335f' (2024-01-25)
2024-01-29 12:29:23 +00:00
github-actions[bot]
80c1182773 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/9b19f5e77dd906cb52dade0b7bd280339d2a1f3d' (2024-01-13)
  → 'github:NixOS/nixpkgs/612f97239e2cc474c13c9dafa0df378058c5ad8d' (2024-01-21)
2024-01-22 12:33:40 +00:00
Archit Gupta
a6f3658ae9 Make mocked pkgs not depend on overlay prev stdenvs
Accessing some of the stdenvs would cause an infinite recursion. We can
continue to rely on base stdenv and also bail if any field other than
mkDerivation is used. All the stdenvs supported have a subset of the
attrs of base stdenv, so this is safe.
2024-01-21 22:22:31 -08:00
Archit Gupta
787ce03070 Support package functions without named args 2024-01-16 11:01:32 -08:00
Archit Gupta
a90223da37 Remove use of different pkgs for calculating name
If a package uses `pkgs` and tries to get a non-existing package, there
will be an uncachable error. As we cannot control this, this method
needs to be removed. Instead of using this method, the mocked pkgs
should be extended to support more cases.
2024-01-16 10:55:57 -08:00
Archit Gupta
e143290511 Fix packages depending on pkg with same name
If a package depends on a package with same name, this causes an
infinite recursion as it tries to depend on itself. This is not likely
what was intended, and breaks ability to re-export packages, so instead
if a package depends on the same name, that now refers to the previous
version.
2024-01-16 10:48:48 -08:00
Archit Gupta
26a8a4454a Fix readme shell example 2024-01-15 19:06:07 -08:00
github-actions[bot]
193b6a8840 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/46ae0210ce163b3cba6c7da08840c1d63de9c701' (2024-01-06)
  → 'github:NixOS/nixpkgs/9b19f5e77dd906cb52dade0b7bd280339d2a1f3d' (2024-01-13)
2024-01-15 12:32:35 +00:00
Archit Gupta
733cebf6b1 Add option type descriptions to docs 2024-01-15 02:55:01 -08:00
Archit Gupta
606ac6c1bb Allow templates to take moduleArgs 2024-01-15 02:53:17 -08:00
Archit Gupta
1fc128d2aa Add more stdenvs to mocked pkg set 2024-01-15 02:02:48 -08:00
Archit Gupta
a4440382bb Allow nixDir auto-loads to set a value to null
Previously null was used when a value could not be loaded. This
prevented setting a value to null using a nixDir auto-load.

This change removes the use of null as a special value when loading from
nixDir, allowing it to be used as a normal value.
2024-01-15 01:07:55 -08:00