1
1
mirror of https://github.com/divnix/digga.git synced 2024-12-23 08:02:21 +03:00
Commit Graph

1178 Commits

Author SHA1 Message Date
David Arnold
4a4a6ee1c1 imp: add proper nix patching
It is very likely that some digga functionality requires patches to nix

Create a place for patches that mimicks the way how they could be
applied once `inputs.<name>.patches` of the
UFR (Unofficial Flakes Roadmap) is implemented.

Also showcase how `nixConfig` can add extra feature flags (without
overriding the patched-in ones).
2022-02-23 15:23:14 -08:00
David Arnold
78e198103a bump: devos for testing 2022-02-23 15:23:14 -08:00
David Arnold
a060db0a55 fix: do host-spaced home checks only on that hosts's architecture 2022-02-23 15:23:14 -08:00
David Arnold
b4a7330864 imp: hm user@host idiom should be aligned with host's deployment
When using the `user@host` idiom, we explicitly want to deploy that
users on that host. Therefore, don't alter the deployment
configuration between the method that uses `homeConfigurations` and
the method that changes the home configuration as part of the system
configuration change.

In the future a portable `user/arch` combination can be implemented.
Such `user/arch` is not host specific and can be deployed to any host
where nix is installed (e.g. at work). In this use case, we have to
make sure that the user's $HOME/.nix-profile is used as the profile, 
that is `home-manager.useUserPackages = mkForce false`.
2022-02-23 15:23:14 -08:00
David Arnold
dd1e822f7e ref: cleanup hm config generation
- uses c.config.home-manager.users directly (depends on https://github.com/divnix/devos/pull/338)
- fix: uses c.config.networking.hostName instead of reverseDNS names
- sets `useUserPackages` to `false` and removes mkForce false from https://github.com/divnix/devos/pull/338)
2022-02-23 15:23:14 -08:00
David Arnold
d64f95fb28 test: add hm only config 2022-02-23 15:23:14 -08:00
David Arnold
a3b2207f22 bump: devos for testing 2022-02-23 15:23:14 -08:00
David Arnold
70ba6e210e bump: fup (include dynamic output) 2022-02-23 15:23:14 -08:00
David Arnold
68b6f161ae imp: better hm user checks naming 2022-02-23 15:23:14 -08:00
David Arnold
e07825ca4e fix: checks for portableHomeConfigurations
Without this modification to the initial implementation, we this error:

```console
error: attribute 'activationPackage' missing

       at /nix/store/2ja93yb8276wk794zkgnaf0m5rghp5mw-source/src/mkFlake/default.nix:145:37:

          144|               ) then
          145|                 lib.mapAttrs (n: v: v.activationPackage) self.homeConfigurations
             |                                     ^
          146|               else { }
```
2022-02-23 15:23:14 -08:00
David Arnold
01c9e74a05 imp: add portable per aarch users 2022-02-23 15:23:14 -08:00
David Arnold
8bae91593c ref: aclaratory naming 2022-02-23 15:23:14 -08:00
David Arnold
0ea701705d fix: regression
`submoduleWith` does not have the `_module` options, so the only two
options left are passing via `specialArgs` or create a self option
to pass it as config. For better UX, let's use specialArgs, here.
2022-02-23 15:23:14 -08:00
David Arnold
905b26bcb8 zoink: surface regression
In this changeset, the `self` module argument is not actually passed.

Upstream nixpkgs, for unknown reasons does not fail with the usual
error message, presumably becuase this is sumoduleWith type, but instead
bails with an inifinite recursion.
2022-02-23 15:23:14 -08:00
David Arnold
c7224726ef bump: downstream for tests 2022-02-23 15:23:14 -08:00
David Arnold
ee21767f62 bump: deploy (with overlay) 2022-02-23 15:23:14 -08:00
David Arnold
b1b29239a8 imp: reduce flake inputs footprint and increase conciseness
also produce more cach hits using nixpkgs/release 21.05

fix: #78
2022-02-23 15:23:14 -08:00
David Arnold
667be56cf4 fix: work arround path:../../ & input.parent error
This error is introduced via https://github.com/NixOS/nix/pull/4641

Proper analysis / evlt. fix is pending.
2022-02-23 15:23:14 -08:00
David Arnold
4bb01ba900 fix: add the entirety of nix#4641 patch
Previously, a specific commit was references, while the patch has +-
evolved into its final shape, which we want to capture here.
2022-02-23 15:23:14 -08:00
David Arnold
6954bdde5f bump downstream to working tip for tests 2022-02-23 15:23:14 -08:00
David Arnold
a6fadb1288 ref: split digga shell into divnix/flk & divnix/devos/shell (devshell) 2022-02-23 15:23:14 -08:00
David Arnold
a2411ee0ec fix: make nixos.hostDefaults.channelName required
In several places `mkFlake` assumes an valid value is set, here.

fixes: #76
2022-02-23 15:23:14 -08:00
David Arnold
0a5325d362 Revert "use deploy's overlay to prevent nixpkgs dep"
This reverts commit 8ae19a33c1c34620ce843e286fa69852db791d5c.

fix: #75

see that issue also for an unresolvable situation induced by this
2022-02-23 15:23:14 -08:00
David Arnold
33474e6ffa imp: pass down self to grouped folder layout
pass `self` to top level imports in the style of
`./examples/groupByConfig`
2022-02-23 15:23:14 -08:00
David Arnold
02d8feb01d fix: add back digga lib checks
This would have catched 2a696ebeb8 (r53008224)
2022-02-23 15:23:14 -08:00
Pacman99
4e3b9e6f89 use deploy's overlay to prevent nixpkgs dep 2022-02-23 15:23:14 -08:00
Pacman99
9006a2a89e importers: include flattenTree in internal lib 2022-02-23 15:23:14 -08:00
David Arnold
8e7239875f remove code that is no more in active use 2022-02-23 15:23:14 -08:00
David Arnold
39b39f1a4f imp: conservative digga lib output
in order to avoid people accidentially depending on some internal API
which we don't explicitly want to support well into version 1.0, hide
those from the output.

Users who still want to use those need to copy them over, instead.

This reduces our API exposure and hopefully will help save maintainer
resources once `digga` completely takes over the world.
2022-02-23 15:23:14 -08:00
David Arnold
a58be6f842 fix: have devshell respect it's loaded nix version 2022-02-23 15:23:14 -08:00
David Arnold
03b96d6f25 fix: polyfill flake.lock for pure evaluation mode 2022-02-23 15:23:14 -08:00
David Arnold
91a5764acf ref: tests are becoming a pkgs-less library 2022-02-23 15:23:14 -08:00
David Arnold
a2905735cc fix: make declaration of suites optional but throw a warning 2022-02-23 15:23:14 -08:00
David Arnold
466ea26553 imp: checks pass --show-trace flags 2022-02-23 15:23:14 -08:00
David Arnold
6efb2fbccf ref: make tests more useful 2022-02-23 15:23:14 -08:00
David Arnold
acff396977 examples/downstream: use latest digga/develop 2022-02-23 15:23:14 -08:00
David Arnold
ca822d87c9 fix jobs flake 2022-02-23 15:23:14 -08:00
David Arnold
4fe2f9b6ca fix: check-all 2022-02-23 15:23:14 -08:00
David Arnold
67df251929 ref: add proper downstream testing 2022-02-23 15:23:14 -08:00
David Arnold
7608f9585c ref: we love the unofficial flakes roadmap 2022-02-23 15:23:14 -08:00
David Arnold
a680bc2529 ref: ci to new shift-left testing strategy | please do TDD form now on 2022-02-23 15:23:14 -08:00
David Arnold
f685d7aa82 evalnix 2022-02-23 15:23:14 -08:00
David Arnold
defb97a834 fmt 2022-02-23 15:23:14 -08:00
David Arnold
3d0dfa9797 fix classicalDevos example 2022-02-23 15:23:14 -08:00
David Arnold
25bf8eefe2 ref: auxiliaries (checks, jobs, devshell)
Includes nix patch: https://github.com/NixOS/nix/pull/4641
2022-02-23 15:23:14 -08:00
David Arnold
e5ab98071d add groupByConfig example 2022-02-23 15:23:14 -08:00
David Arnold
e6c3497e79 mv fullFlake -> example 2022-02-23 15:23:14 -08:00
David Arnold
5a16e8f6e8 use config.lib.digga.mkBuild 2022-02-23 15:23:14 -08:00
David Arnold
3ce5283d4e ourlib -> config.lib.our 2022-02-23 15:23:14 -08:00
David Arnold
147f0f2b78 fix: maybe import well defined nix modules (with _file)
This is necesary since `fup` has gained a cleanup of its module exporter
that treats modules as paths or well-defeinde (with _file).

This is a better implementation for the work-around introduced in
b30d9660e2903e08bb10bea9921eee119af0b111
2022-02-23 15:23:14 -08:00