mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-29 19:46:17 +01:00
dac0229ede
Signed-off-by: Magic_RB <magic_rb@redalder.org>
31 lines
605 B
Nix
31 lines
605 B
Nix
{ config, pkgs, lib, ... }:
|
|
with lib;
|
|
let
|
|
cfg = config.magic_rb.hardware;
|
|
in
|
|
{
|
|
options = {};
|
|
|
|
imports =
|
|
[ ./heater.nix
|
|
./mark.nix
|
|
./omen.nix
|
|
./recovery-usb.nix
|
|
(import ./oci-nixos.nix "tweedledum")
|
|
(import ./oci-nixos.nix "tweedledee")
|
|
];
|
|
|
|
config = {
|
|
assertions = [
|
|
{
|
|
assertion =
|
|
let
|
|
selection = mapAttrsToList (system: enabled: { inherit system enabled; }) cfg;
|
|
in
|
|
count (x: x.enabled) selection == 1;
|
|
message = "You must select exactly one hardware configuration";
|
|
}
|
|
];
|
|
};
|
|
}
|