Skip to content

Commit

Permalink
chore: update flops
Browse files Browse the repository at this point in the history
  • Loading branch information
GTrunSec committed Oct 17, 2023
1 parent 294c2a9 commit 90b76ff
Show file tree
Hide file tree
Showing 16 changed files with 41 additions and 35 deletions.
6 changes: 3 additions & 3 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 lib/exporter/flakeOutputs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ in
dotfiles = inputs.self.outPath + "/dotfiles";

# aliases
__inputs__ = outputs.loadInputs;
__inputs__ = outputs.flake;
flakeModules = outputs.flake-parts.profiles;
flakeProfiles = outputs.flake-parts.modules;
}
4 changes: 2 additions & 2 deletions lib/exporter/pops.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ let
};
in
{
loadInputs = flops.flake.pops.default.setInitInputs (
flake = flops.flake.pops.default.setInitInputs (
inputs.self.outPath + "/local/lock"
);

Expand Down Expand Up @@ -73,7 +73,7 @@ in
};

srvos = flops.haumea.pops.default.setInit {
src = self.loadInputs.outputs.srvos + "/nixos";
src = self.flake.inputs.srvos + "/nixos";
type = "nixosProfiles";
# reset the transformer to the default
transformer = [ (_: _: _) ];
Expand Down
4 changes: 2 additions & 2 deletions lib/mapPopsLayouts'.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ lib }:
pops:
lib.mapAttrsRecursiveCond ((as: !(as ? "layouts" || as ? "outputs")))
(_: v: v.layouts or v.outputs)
lib.mapAttrsRecursiveCond ((as: !(as ? "layouts" || as ? "initInputs")))
(_: v: v.layouts or v.inputs)
pops
4 changes: 2 additions & 2 deletions lib/mapPopsLayouts.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ lib }:
pops:
lib.mapAttrsRecursiveCond
((as: !(as ? "layouts" && as.layouts ? "default" || as ? "outputs")))
(_: v: v.layouts.default or v.outputs)
((as: !(as ? "layouts" && as.layouts ? "default" || as ? "initInputs")))
(_: v: v.layouts.default or v.inputs)
pops
2 changes: 1 addition & 1 deletion local/cells/repo/shells.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ let
inherit (inputs) nixpkgs;
devshellProfiles =
let
__inptus__ = (inputs.omnibus.pops.loadInputs.setSystem nixpkgs.system).outputs;
__inptus__ = (inputs.omnibus.pops.flake.setSystem nixpkgs.system).inputs;
in
(inputs.omnibus.devshell.loadProfiles.addLoadExtender {
inputs = {
Expand Down
12 changes: 9 additions & 3 deletions templates/nixos/nix/lib/exporter/flakeOutputs.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
{
lib,
super,
omnibus,
eachSystem,
}:
let
filterConfigs =
config:
Expand All @@ -17,13 +23,13 @@ in
system:
let
inputs' = (super.inputs.setSystem system).outputs;
loadDataAll =
dataAll =
(super.pops.omnibus.lib.addLoadExtender { load.inputs.inputs = inputs'; })
.layouts.default.loadDataAll;
.layouts.default.exporter.pops.loadDataAll;
in
{
data =
(loadDataAll.addLoadExtender { load.src = projectDir + "/local/data"; })
(dataAll.addLoadExtender { load.src = projectDir + "/local/data"; })
.layouts.default;
}
);
Expand Down
6 changes: 3 additions & 3 deletions templates/nixos/nix/lib/exporter/inputs.nix
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
(omnibus.pops.loadInputs.addInputsExtender (
(omnibus.pops.flake.addInputsExtender (
POP.extendPop flops.flake.pops.inputsExtender (
self: super:
let
selfInputs = omnibus.pops.loadInputs.setInitInputs ../__lock;
selfInputs = omnibus.pops.flake.setInitInputs ../__lock;
in
{
inputs = {
nixpkgs = inputs.nixpkgs.legacyPackages;
} // selfInputs.outputs;
} // selfInputs.inputs;
}
)
))
8 changes: 4 additions & 4 deletions tests/devshell/expr.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@
let
inputs =
let
baseInputs = omnibus.pops.loadInputs.setInitInputs ./__lock;
baseInputs = omnibus.pops.flake.setInitInputs ./__lock;
in
((baseInputs.addInputsExtender (
POP.lib.extendPop flops.lib.flake.pops.inputsExtender (
self: super: {
inputs = {
devshell = baseInputs.outputs.devshell.legacyPackages;
nixpkgs = baseInputs.outputs.nixpkgs.legacyPackages;
devshell = baseInputs.inputs.devshell.legacyPackages;
nixpkgs = baseInputs.inputs.nixpkgs.legacyPackages;
};
}
)
)).setSystem
"x86_64-linux"
).outputs;
).inputs;

devshellProfiles =
(omnibus.pops.devshellProfiles.addLoadExtender {
Expand Down
8 changes: 4 additions & 4 deletions tests/flake-parts/expr.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ let
system = "x86_64-linux";
__inputs__ =
let
loadInputs = omnibus.pops.loadInputs.setInitInputs ./__lock;
flake = omnibus.pops.flake.setInitInputs ./__lock;
in
((loadInputs.addInputsExtender (
((flake.addInputsExtender (
POP.lib.extendPop flops.lib.flake.pops.inputsExtender (
self: super: {
inputs = {
nixpkgs = loadInputs.outputs.nixpkgs.legacyPackages;
nixpkgs = flake.inputs.nixpkgs.legacyPackages;
};
}
)
)).setSystem
system
).outputs;
).inputs;

flakeProfiles =
(omnibus.pops.flake-parts.profiles.addLoadExtender {
Expand Down
2 changes: 1 addition & 1 deletion tests/nixos/__fixture/pops/homeModules.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ in
(omnibus.pops.homeModules.addLoadExtender {
load.inputs = {
__misc__ = {
inherit (super.inputs.outputs) catppuccin-bat;
inherit (super.inputs.inputs) catppuccin-bat;
};
};
}).addExporters
Expand Down
2 changes: 1 addition & 1 deletion tests/nixos/__fixture/pops/homeProfiles.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ let
inherit (inputs) dmerge;
in
(omnibus.pops.homeProfiles.addLoadExtender {
load.inputs = super.inputs.outputs // {
load.inputs = super.inputs.inputs // {
omnibus = {
homeModules = super.homeModules.layouts.nixosModules;
};
Expand Down
10 changes: 5 additions & 5 deletions tests/nixos/__fixture/pops/inputs.nix
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
(omnibus.pops.loadInputs.addInputsExtender (
(omnibus.pops.flake.addInputsExtender (
POP.extendPop flops.flake.pops.inputsExtender (
self: super:
let
selfInputs = omnibus.pops.loadInputs.setInitInputs ../__lock;
local = omnibus.pops.loadInputs.setInitInputs (inputs.self.outPath + "/local");
selfInputs = omnibus.pops.flake.setInitInputs ../__lock;
local = omnibus.pops.flake.setInitInputs (inputs.self.outPath + "/local");
in
{
inputs = {
std = local.outputs.std;
nixpkgs = omnibus.pops.loadInputs.outputs.nixpkgs.legacyPackages;
} // selfInputs.outputs;
nixpkgs = omnibus.pops.flake.outputs.nixpkgs.legacyPackages;
} // selfInputs.inputs;
}
)
)).setSystem
Expand Down
2 changes: 1 addition & 1 deletion tests/nixos/__fixture/pops/nixosModules.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ let
inherit (inputs) dmerge;
in
(omnibus.pops.nixosModules.addLoadExtender {
load.inputs = super.inputs.outputs // { };
load.inputs = super.inputs.inputs // { };
}).addExporters
[
(POP.extendPop flops.haumea.pops.exporter (
Expand Down
2 changes: 1 addition & 1 deletion tests/nixos/__fixture/pops/nixosProfiles.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ let
in
(omnibus.pops.nixosProfiles.addLoadExtender {
load = {
inputs = super.inputs.outputs // {
inputs = super.inputs.inputs // {
omnibus = {
nixosModules = super.nixosModules.layouts.nixosModules;
};
Expand Down
2 changes: 1 addition & 1 deletion tests/nixos/__fixture/pops/srvos.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(omnibus.pops.srvos.addLoadExtender {
load.inputs = super.inputs.outputs // { };
load.inputs = super.inputs.inputs // { };
}).addExporters
[
(POP.extendPop flops.haumea.pops.exporter (
Expand Down

0 comments on commit 90b76ff

Please sign in to comment.