Skip to content

Commit

Permalink
refactor: remove exporter dir
Browse files Browse the repository at this point in the history
  • Loading branch information
GTrunSec committed Nov 1, 2023
1 parent c93b86a commit 927edff
Show file tree
Hide file tree
Showing 68 changed files with 121 additions and 83 deletions.
6 changes: 3 additions & 3 deletions docs/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ flake: Flake {

library.flakeOutputs -> outputs
library.exporter.library -> outputs.lib: without pops interface
library.exporter.pops -> outputs.pops
library.pops -> outputs.pops
}

units: units {
Expand Down Expand Up @@ -86,8 +86,8 @@ user: User {shape: person}
extensions <-> user
flops -> extensions
flake.outputs.pops -> extensions
units -> flake.lib.exporter.pops: loading
flake.library.exporter.pops <- flops.haumea: loader
units -> flake.lib.pops: loading
flake.library.pops <- flops.haumea: loader
flops.haumea -> extensions.APIs.addLoadExtender
flops.haumea -> extensions.APIs.addLoadExtenders

Expand Down
6 changes: 3 additions & 3 deletions docs/omnibus.d2
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ flake: Flake {

library.flakeOutputs -> outputs
library.exporter.library -> outputs.lib: without pops interface
library.exporter.pops -> outputs.pops
library.pops -> outputs.pops
}

units: units {
Expand Down Expand Up @@ -73,8 +73,8 @@ user: User {shape: person}
extensions <-> user
flops -> extensions
flake.outputs.pops -> extensions
units -> flake.library.exporter.pops: loading
flake.library.exporter.pops <- flops.haumea: loader
units -> flake.library.pops: loading
flake.library.pops <- flops.haumea: loader
flops.haumea -> extensions.APIs.addLoadExtender
flops.haumea -> extensions.APIs.addLoadExtenders

Expand Down
6 changes: 3 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
omnibus = {
inherit (self) pops;
inherit lib;
} // lib.exporter.flakeOutputs;
} // lib.flakeOutputs;

library = import ./lib/__init.nix { inherit inputs omnibus; };
lib = library.layouts.default;
in
lib.exporter.flakeOutputs
lib.flakeOutputs
// {
pops = lib.exporter.pops // {
pops = lib.pops // {
lib = library;
};

Expand Down
File renamed without changes.
File renamed without changes.
28 changes: 14 additions & 14 deletions templates/hivebus/flake.lock

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

4 changes: 2 additions & 2 deletions templates/hivebus/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
library = import ./nix/lib/__init.nix { inherit inputs eachSystem; };
lib = library.layouts.default;
in
lib.exporter.flakeOutputs
lib.flakeOutputs
// {
inherit lib;
pops = lib.exporter.pops;
pops = lib.pops;
};
}

This file was deleted.

This file was deleted.

This file was deleted.

6 changes: 3 additions & 3 deletions templates/hivebus/nix/lib/filterPopsSrc.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{ lib, root }:
src: dir:
let
inherit (root.exporter.pops.subflake.inputs) nix-filter;
inherit (root.pops.subflake.inputs) nix-filter;
popsDirs = lib.attrNames (
lib.removeAttrs root.exporter.pops [
lib.removeAttrs root.pops [
"hosts"
"omnibus"
]
Expand All @@ -13,7 +13,7 @@ in
# let
# srcDirs = lib.attrNames (lib.readDir src);
# popsDirs = lib.attrNames (
# lib.removeAttrs root.exporter.pops [
# lib.removeAttrs root.pops [
# "hosts"
# "omnibus"
# ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ in
inputs' = (super.pops.flake.setSystem system).inputs;
allData =
(super.pops.omnibus.lib.addLoadExtender { load.inputs.inputs = inputs'; })
.layouts.default.exporter.pops.allData;
.layouts.default.pops.allData;
in
{
data =
Expand All @@ -41,7 +41,7 @@ in
in
(
(flops.haumea.pops.default.setInit {
src = ../../packages;
src = ../packages;
loader = _: path: inputs.nixpkgs.callPackage path { };
transformer = [ (_cursor: dir: if dir ? default then dir.default else dir) ];
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
load = {
src = inputs.self.outPath + "/units/nixos/hosts";
inputs = {
inputs = inputs // root.exporter.pops.subflake.inputs;
inputs = inputs // root.pops.subflake.inputs;
omnibus = inputs.omnibus // {
self = root.omnibus.lib.layouts.default;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ root, inputs }:
(root.exporter.pops.nixosModules.addLoadExtender {
(root.pops.nixosModules.addLoadExtender {
load = {
inputs = {
# only for host
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ root, inputs }:
(root.exporter.pops.nixosModules.addLoadExtender {
(root.pops.nixosModules.addLoadExtender {
load = {
inputs = { };
};
Expand Down
1 change: 1 addition & 0 deletions templates/hivebus/nix/lib/pops/__hostsLoad/homeModules.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ root, inputs }: name: (root.pops.homeModules.addLoadExtender { load = { }; })
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ root, inputs }: (root.pops.homeProfiles.addLoadExtender { load = { }; })
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ root, inputs }:
name:
(root.exporter.pops.nixosModules.addLoadExtender {
(root.pops.nixosModules.addLoadExtender {
load = {
inputs = { };
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ root, inputs }: (root.pops.nixosProfiles.addLoadExtender { load = { }; })
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
omnibus.pops.lib.addLoadExtender {
load.inputs = {
inputs = inputs // root.exporter.pops.subflake.inputs;
inputs = inputs // root.pops.subflake.inputs;
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
POP.extendPop flops.flake.pops.inputsExtender (
self: super:
let
subflake = omnibus.pops.flake.setInitInputs ../../../lock;
subflake = omnibus.pops.flake.setInitInputs ../../lock;
in
{
inputs = subflake.inputs;
Expand Down
28 changes: 14 additions & 14 deletions templates/nixos/flake.lock

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

4 changes: 2 additions & 2 deletions templates/nixos/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
library = import ./nix/lib/__init.nix { inherit inputs eachSystem; };
lib = library.layouts.default;
in
lib.exporter.flakeOutputs
lib.flakeOutputs
// {
inherit lib;
pops = lib.exporter.pops;
pops = lib.pops;
};
}

This file was deleted.

This file was deleted.

This file was deleted.

6 changes: 3 additions & 3 deletions templates/nixos/nix/lib/filterPopsSrc.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{ lib, root }:
src: dir:
let
inherit (root.exporter.pops.subflake.inputs) nix-filter;
inherit (root.pops.subflake.inputs) nix-filter;
popsDirs = lib.attrNames (
lib.removeAttrs root.exporter.pops [
lib.removeAttrs root.pops [
"hosts"
"omnibus"
]
Expand All @@ -13,7 +13,7 @@ in
# let
# srcDirs = lib.attrNames (lib.readDir src);
# popsDirs = lib.attrNames (
# lib.removeAttrs root.exporter.pops [
# lib.removeAttrs root.pops [
# "hosts"
# "omnibus"
# ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
super,
omnibus,
eachSystem,
flops,
projectDir,
}:
let
filterConfigs =
Expand All @@ -27,7 +25,7 @@ in
inputs' = (super.pops.flake.setSystem system).inputs;
allData =
(super.pops.omnibus.lib.addLoadExtender { load.inputs.inputs = inputs'; })
.layouts.default.exporter.pops.allData;
.layouts.default.pops.allData;
in
{
data =
Expand All @@ -43,7 +41,7 @@ in
in
(
(flops.haumea.pops.default.setInit {
src = ../../packages;
src = ../packages;
loader = _: path: inputs.nixpkgs.callPackage path { };
transformer = [ (_cursor: dir: if dir ? default then dir.default else dir) ];
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
load = {
src = inputs.self.outPath + "/units/nixos/hosts";
inputs = {
inputs = inputs // root.exporter.pops.subflake.inputs;
inputs = inputs // root.pops.subflake.inputs;
omnibus = inputs.omnibus // {
self = root.omnibus.lib.layouts.default;
};
Expand Down
Loading

0 comments on commit 927edff

Please sign in to comment.