mirror of
https://github.com/NiklasGollenstede/nixos-installer.git
synced 2024-11-22 07:53:28 +01:00
a4ae2ab551
- disable wip.fs.disks.devices.*.gptOffset (patch broken with 22.11), - add wip.bootloader.extlinux, - add wip.hardware.hetzner-vps profile, - fix wip.services.dropbear.socketActivation,
937 B
937 B
/*
nixpkgs
Profiles as Options
The "modules" in <nixpkgs>/nixos/modules/profile/
define sets of option defaults to be used in certain contexts.
Unfortunately, they apply their options unconditionally once included, and NixOS' module system does not allow conditional imports.
This wrapper makes it possible to apply a profile based on some option's values.
Implementation
#*/# end of MarkDown, beginning of NixOS module patch:
dirname: inputs: specialArgs@{ config, pkgs, lib, ... }: let inherit (inputs.self) lib; in let
in {
imports = [
(lib.wip.overrideNixpkgsModule ({ inherit inputs; } // specialArgs) "profiles/qemu-guest.nix" (module: {
options.profiles.qemu-guest.enable = (lib.mkEnableOption "qemu-guest profile");
config = lib.mkIf config.profiles.qemu-guest.enable module;
}))
# Could do this automatically for all files in the directory ...
];
}