Skip to content

Commit

Permalink
refactor(nixosModules): add dmerge with mkMerge example
Browse files Browse the repository at this point in the history
  • Loading branch information
GTrunSec committed Sep 21, 2023
1 parent 902f479 commit de70f91
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
7 changes: 2 additions & 5 deletions examples/nixos/pops/nixosModules.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@
(POP.extendPop flops.haumea.pops.exporter (
self: super: {
exports.customModules.boot =
with dmerge;
self.outputsForTarget.dmerge
{
config.loader = {
timeout = 10;
};
}
{ config.contents = update [ 0 ] [ { content.loader.timeout.content = 10; } ]; }
[ "boot" ];
}
))
Expand Down
14 changes: 12 additions & 2 deletions nixos/nixosModules/boot/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,19 @@ with lib; {
})
];

# config.loader.timeout = 1;

options = {
__profiles__.test = mkOption {
type = types.unspecified;
default = mkMerge [
(mkIf true {
loader = {
timeout = mkIf cfg.__profiles__.speedup 0;
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
})
];
};
__profiles__.speedup = mkOption {
type = types.bool;
default = false;
Expand Down

0 comments on commit de70f91

Please sign in to comment.