mirror of
https://github.com/youwen5/nixos.git
synced 2025-01-18 05:02:10 -08:00
35 lines
766 B
Nix
35 lines
766 B
Nix
{
|
|
inputs,
|
|
lib,
|
|
config,
|
|
osConfig,
|
|
...
|
|
}:
|
|
let
|
|
cfg = config.liminalOS;
|
|
in
|
|
{
|
|
options.liminalOS = {
|
|
formFactor = lib.mkOption {
|
|
type = lib.types.nullOr (
|
|
lib.types.enum [
|
|
"laptop"
|
|
"desktop"
|
|
]
|
|
);
|
|
default = osConfig.liminalOS.formFactor;
|
|
description = ''
|
|
Form factor of the machine. Adjusts some UI features. Inherited from system configuration liminalOS.formFactor if set, otherwise you must set it here.
|
|
'';
|
|
};
|
|
};
|
|
|
|
config = {
|
|
assertions = [
|
|
{
|
|
assertion = cfg.formFactor != null;
|
|
message = "You must set liminalOS.formFactor either in the home-manager configuration for the user or in the OS configuration for the system!";
|
|
}
|
|
];
|
|
};
|
|
}
|