Skip to content

Commit

Permalink
fix: requiredInputs:{home-manager}
Browse files Browse the repository at this point in the history
  • Loading branch information
GTrunSec committed Oct 14, 2023
1 parent e120bc5 commit 4110d83
Show file tree
Hide file tree
Showing 16 changed files with 49 additions and 31 deletions.
1 change: 0 additions & 1 deletion lib/__init.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ flops.lib.haumea.pops.default.setInit {
inherit omnibus;
inputs = inputs // {
dmerge = flops.inputs.dmerge;
home-manager = omnibus.pops.loadInputs.outputs.home-manager;
};
};
}
5 changes: 5 additions & 0 deletions lib/mapPopsLayouts'.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{ lib }:
pops:
lib.mapAttrsRecursiveCond ((as: !(as ? "layouts" || as ? "outputs")))
(_: v: v.layouts or v.outputs)
pops
6 changes: 3 additions & 3 deletions templates/nixos/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 templates/nixos/nix/lib/exporter/pops/omnibus/lib.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
omnibus.pops.lib.addLoadExtender {
load.inputs = {
inputs = root.exporter.inputs.outputs;
inputs = inputs // root.exporter.inputs.outputs;
};
}
2 changes: 1 addition & 1 deletion templates/nixos/nixos/hosts/nixos/layouts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ in
# outputs.nixosModules.customModules.boot

# outputs.srvos.default.common.nix
(omnibus.lib.mkHome
(outputs.omnibus.lib.mkHome
{
admin = {
uid = 1000;
Expand Down
21 changes: 11 additions & 10 deletions tests/nixos/__fixture/layouts.nix
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
let
inherit (inputs) nixpkgs darwin;
exporter = lib.mapAttrs (_: v: v.layouts) (
lib.removeAttrs super.pops [ "inputs" ]
);
# layouts.default to be default
outputs = omnibus.lib.mapPopsLayouts' super.pops;
# with multi-layout
outputs' = omnibus.lib.mapPopsLayouts super.pops;
in
{
system = "x86_64-linux";

inherit data exporter;
inherit data outputs outputs';

nixosSuites = lib.flatten [
exporter.selfNixOSProfiles.default.bootstrap
outputs.selfNixOSProfiles.default.bootstrap

# self.nixosProfiles.default.presets.boot
exporter.nixosModules.default.programs.git
outputs.nixosModules.default.programs.git
# load a suite profile from audio
# (outputs.nixosProfiles.default.audio {}).default

# # --custom profiles
exporter.nixosProfiles.customProfiles.presets.nix
# exporter.nixosProfiles.customProfiles.presets.boot
exporter.srvos.default.common.nix
outputs.nixosProfiles.customProfiles.presets.nix
# # exporter.nixosProfiles.customProfiles.presets.boot
# outputs.srvos.default.common.nix

(omnibus.lib.mkHome
(outputs'.omnibus.lib.mkHome
{
admin = {
uid = 1000;
Expand Down
13 changes: 13 additions & 0 deletions tests/nixos/__fixture/pops/omnibus.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
lib =
(omnibus.pops.lib.addLoadExtender {
load.inputs = {
inputs = inputs;
};
}).addExporters
[
(POP.extendPop flops.haumea.pops.exporter (
self: super: { exports.customProfiles = { }; }
))
];
}
2 changes: 1 addition & 1 deletion tests/nixos/_pops.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
inputs = {
data = root.data;
inputs = {
inherit (omnibus.__inputs__) darwin nixpkgs;
inherit (omnibus.__inputs__) darwin nixpkgs home-manager;
};
};
};
Expand Down
22 changes: 11 additions & 11 deletions tests/nixos/expr.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ in
{
bootProfile =
(out.nixosConfiguration [
out.exporter.nixosProfiles.customProfiles.presets.boot
out.outputs.nixosProfiles.customProfiles.presets.boot
]).config.boot.__profiles__;

customModuleBootTimeOut =
(out.nixosConfiguration [
out.exporter.nixosModules.customModules.boot
out.outputs.nixosModules.customModules.boot
{
config.boot.__profiles__.speedup = true;
config.boot.__profiles__.systemd-boot.enable = true;
Expand All @@ -28,25 +28,25 @@ in

hyprland =
(out.nixosConfiguration [
out.exporter.nixosModules.customModules.boot
out.outputs.nixosModules.customModules.boot
(extraHomeModule [
out.exporter.homeProfiles.customProfiles.presets.hyprland.default
out.exporter.homeProfiles.default.presets.firefox
out.outputs.homeProfiles.customProfiles.presets.hyprland.default
out.outputs.homeProfiles.default.presets.firefox
])
])
.config.home-manager.users.admin.wayland.windowManager.hyprland.__profiles__;
}
// lib.optionalAttrs trace {
nixosConfiguration = out.nixosConfiguration [
out.exporter.nixosProfiles.default.presets.boot
out.outputs.nixosProfiles.default.presets.boot
];

homeConfiguration =
(out.nixosConfiguration [
out.exporter.nixosProfiles.default.presets.boot
(extraHomeModule [
out.exporter.homeProfiles.customProfiles.presets.hyprland.default
out.exporter.homeProfiles.default.presets.firefox
])
out.outputs.nixosProfiles.default.presets.boot
# (extraHomeModule [
# out.outputs.homeProfiles.customProfiles.presets.hyprland.default
# out.outputs.homeProfiles.default.presets.firefox
# ])
]).config.home-manager.users.admin;
}
6 changes: 3 additions & 3 deletions tests/srvos/expr.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ in
{
srvosCommonOpenssh =
(exporter.layouts.nixosConfiguration [
exporter.layouts.exporter.nixosProfiles.default.presets.boot
exporter.layouts.exporter.nixosProfiles.default.presets.openssh
exporter.layouts.outputs.nixosProfiles.default.presets.boot
exporter.layouts.outputs.nixosProfiles.default.presets.openssh
# -- suites profile --
(exporter.layouts.exporter.nixosProfiles.default.cloud { }).default
(exporter.layouts.outputs.nixosProfiles.default.cloud { }).default
]).config.services.openssh.settings.KexAlgorithms;
}
// lib.optionalAttrs trace { }

0 comments on commit 4110d83

Please sign in to comment.