Skip to content

Commit

Permalink
refactor: update flops
Browse files Browse the repository at this point in the history
  • Loading branch information
GTrunSec committed Oct 10, 2023
1 parent 48bb4db commit 3509ca4
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 20 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.

3 changes: 2 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
omnibus = {
inherit (self) pops;
inherit lib;
};
} // lib.layouts.default.exporter.flakeOutputs;

lib = import ./lib/__init.nix { inherit inputs omnibus; };
lib' = lib.layouts.default;
in
Expand Down
1 change: 1 addition & 0 deletions lib/exporter/flakeOutputs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ let
;
in
{
inherit (outputs) srvos;
devshellModules = outputs.devshell.loadModules;
devshellProfiles = outputs.devshell.loadProfiles;

Expand Down
12 changes: 8 additions & 4 deletions lib/exporter/pops.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,20 @@
src = self'.outPath + "/nixos/nixosModules";
type = "nixosModules";
inputs = {
POP = POP.lib;
flops = flops.lib;
omnibus = self;
inherit omnibus POP flops;
inputs = {
inherit (inputs) dmerge;
};
};
};
loadHomeModules = flops.haumea.pops.default.setInit {
src = self'.outPath + "/nixos/homeModules";
type = "nixosModules";
inputs = {
omnibus = self;
inherit omnibus POP flops;
inputs = {
inherit (inputs) dmerge;
};
};
};
loadHomeProfiles = self.loadHomeModules.addLoadExtender {
Expand Down
38 changes: 31 additions & 7 deletions nixos/nixosProfiles/cloud.nix
Original file line number Diff line number Diff line change
@@ -1,15 +1,39 @@
# [[file:../../docs/org/nixosProfiles.org::*cloud][cloud:1]]
{ root }:
{
root,
omnibus,
POP,
flops,
inputs,
}:
let
inherit (inputs) dmerge;
srvosCustom =
(omnibus.pops.srvos.addExporters [
(POP.extendPop flops.haumea.pops.exporter (
self: super: {
exports.srvosCustom = self.outputs [ {
value = { selfModule }: removeAttrs selfModule [ "imports" ];
path = [
"common"
"default"
];
} ];
}
))
]).layouts.srvosCustom;
presets = root.presets;
in
with presets; {
default = [ {
boot.cleanTmpDir = true;
boot.tmp.cleanOnBoot = true;
zramSwap.enable = true;
documentation.enable = false;
} ];
default = [
srvosCustom.common.default
{
boot.cleanTmpDir = true;
boot.tmp.cleanOnBoot = true;
zramSwap.enable = true;
documentation.enable = false;
}
];

contabo = [
self.default
Expand Down
2 changes: 1 addition & 1 deletion nixos/nixosProfiles/presets/openssh.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ omnibus }:
{
imports = [ omnibus.srvos.layouts.default.common.openssh ];
imports = [ omnibus.srvos.common.openssh ];
services.openssh = {
enable = true;
};
Expand Down
2 changes: 1 addition & 1 deletion tests/nixos/expr.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ in
}
// lib.optionalAttrs trace {
nixosConfiguration = exporter.layouts.nixosConfiguration [
exporter.layouts.exporter.nixosProfiles.customProfiles.presets.boot
exporter.layouts.exporter.nixosProfiles.default.presets.boot
];
}
2 changes: 2 additions & 0 deletions tests/srvos/expr.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ in
(exporter.layouts.nixosConfiguration [
exporter.layouts.exporter.nixosProfiles.default.presets.boot
exporter.layouts.exporter.nixosProfiles.default.presets.openssh
# -- suites profile --
(exporter.layouts.exporter.nixosProfiles.default.cloud { }).default
]).config.services.openssh.settings.KexAlgorithms;
}
// lib.optionalAttrs trace { }

0 comments on commit 3509ca4

Please sign in to comment.