forked from DGNum/infrastructure
30 lines
568 B
Nix
30 lines
568 B
Nix
|
{ config, lib, ... }:
|
||
|
|
||
|
let
|
||
|
inherit (lib)
|
||
|
mkEnableOption
|
||
|
mkIf
|
||
|
mkMerge;
|
||
|
|
||
|
cfg = config.dgn-ssh;
|
||
|
in
|
||
|
|
||
|
{
|
||
|
options.dgn-hardware = {
|
||
|
enable = mkEnableOption "default hardware configuration." // { default = true; };
|
||
|
|
||
|
useSystemd = mkEnableOption "sytemd boot and configuration." // { default = true; };
|
||
|
};
|
||
|
|
||
|
config = mkIf cfg.enable (mkMerge [
|
||
|
{ hardware.enableRedistributableFirmware = true; }
|
||
|
|
||
|
(mkIf cfg.useSystemd {
|
||
|
boot.loader = {
|
||
|
systemd-boot.enable = true;
|
||
|
efi.canTouchEfiVariables = true;
|
||
|
};
|
||
|
})
|
||
|
]);
|
||
|
}
|