mirror of
https://github.com/youwen5/liminalOS.git
synced 2025-06-20 05:59:51 -07:00
refactor: massively overhaul home manager module system
This commit is contained in:
parent
b2270408fc
commit
a506d2aed4
64 changed files with 5201 additions and 64 deletions
35
hm/modules/linux/platform-tweaks/default.nix
Normal file
35
hm/modules/linux/platform-tweaks/default.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
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!";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue