Skip to content

Commit

Permalink
refactor: layputs.default -> exports
Browse files Browse the repository at this point in the history
  • Loading branch information
GTrunSec committed Nov 2, 2023
1 parent c0e48d8 commit 3a9d5ce
Show file tree
Hide file tree
Showing 29 changed files with 173 additions and 186 deletions.
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
} // lib.flakeOutputs;

library = import ./lib/__init.nix { inherit inputs omnibus; };
lib = library.layouts.default;
lib = library.exports.default;
in
lib.flakeOutputs
// {
Expand Down
2 changes: 1 addition & 1 deletion lib/mapPopsLayouts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ in
# map (attr: f attr set.${attr}) (lib.attrNames set)
# );
lib.mapAttrsRecursiveCond ((as: !(as ? "layouts" && as.layouts ? "default")))
(_: v: v.layouts.default or v)
(_: v: v.exports.default or v)
pops
8 changes: 2 additions & 6 deletions local/cells/repo/configs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,8 @@
with inputs.std.inputs.dmerge;
let
inherit (inputs) nixpkgs;
configs =
let
inputs' = (inputs.omnibus.pops.flake.setSystem nixpkgs.system).inputs;
in
inputs.omnibus.pops.configs.addLoadExtender { load.inputs.inputs = inputs'; };
inherit (configs.layouts.default) treefmt lefthook conform;

inherit (cell.pops.configs.exports.default) treefmt lefthook conform;
in
{
inherit treefmt lefthook;
Expand Down
9 changes: 1 addition & 8 deletions local/cells/repo/devshellProfiles.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
let
inptus' = (inputs.omnibus.pops.flake.setSystem inputs.nixpkgs.system).inputs;
in
(inputs.omnibus.pops.devshellProfiles.addLoadExtender {
load.inputs = {
inputs = inptus';
};
}).layouts.default
cell.pops.devshellProfiles.exports.self.exports.default
23 changes: 23 additions & 0 deletions local/cells/repo/pops.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
let
inherit (inputs) nixpkgs;
inputs' = (inputs.omnibus.pops.flake.setSystem nixpkgs.system).inputs;
in
{
devshellProfiles =
(inputs.omnibus.pops.devshellProfiles.addLoadExtender {
load.inputs.inputs = inputs';
}).addExporter
{
exports = {
self =
(inputs.omnibus.pops.devshellProfiles.addLoadExtender {
load.inputs = {
inputs = inputs';
};
});
};
};
configs = inputs.omnibus.pops.configs.addLoadExtender {
load.inputs.inputs = inputs';
};
}
6 changes: 4 additions & 2 deletions local/cells/repo/shells.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ in
default = lib.dev.mkShell {
name = "omnibus devshell";

# imports = [ devshellProfiles.rust ];
imports = [ cell.pops.devshellProfiles.exports.default.nickel ];

# Tool Homepage: https://nix-community.github.io/nixago/
# This is Standard's devshell integration.
Expand All @@ -22,7 +22,9 @@ in
cell.configs.conform.custom
)
(std.lib.dev.mkNixago std.lib.cfg.lefthook cell.configs.lefthook.default)
(std.lib.dev.mkNixago std.lib.cfg.treefmt cell.configs.treefmt.default)
(std.lib.dev.mkNixago std.lib.cfg.treefmt cell.configs.treefmt.default
cell.configs.treefmt.topiary
)
];

packages = [ nixpkgs.d2 ];
Expand Down
14 changes: 13 additions & 1 deletion local/flake.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
{
description = "omnibus";
nixConfig = {
extra-substituters = [
"https://tweag-topiary.cachix.org"
"https://tweag-nickel.cachix.org"
];
extra-trusted-public-keys = [
"tweag-topiary.cachix.org-1:8TKqya43LAfj4qNHnljLpuBnxAY/YwEBfzo3kzXxNY0="
"tweag-nickel.cachix.org-1:GIthuiK4LRgnW64ALYEoioVUQBWs0jexyoYVeLDBwRA="
];
};

description = "omnibus & std";

inputs.std.follows = "std-ext/std";
inputs.nixpkgs.follows = "std-ext/nixpkgs";
Expand All @@ -26,6 +37,7 @@
(nixago "configs")
(devshells "shells")
(functions "devshellProfiles")
(functions "pops")
];
}
{
Expand Down
Loading

0 comments on commit 3a9d5ce

Please sign in to comment.