refactor: massively overhaul home manager module system

This commit is contained in:
Youwen Wu 2024-12-25 19:47:59 -08:00
parent b2270408fc
commit a506d2aed4
Signed by: youwen
GPG key ID: 865658ED1FE61EC3
64 changed files with 5201 additions and 64 deletions

View file

@ -55,9 +55,21 @@ in
default = pkgs.neovim;
description = "Default text editor that will be installed and set as $EDITOR. Set to null to disable setting and installing default text editor.";
};
formFactor = lib.mkOption {
type = lib.types.nullOr (
lib.types.enum [
"laptop"
"desktop"
]
);
default = null;
description = ''
Form factor of the machine. Adjusts some UI settings.
'';
};
};
config = {
config = lib.mkIf cfg.enable {
services.printing.enable = mkIf cfg.system.printing.enable true;
services.avahi = mkIf cfg.system.printing.enable {
@ -113,5 +125,14 @@ in
LC_TIME = "en_US.UTF-8";
};
};
assertions = [
{
assertion = cfg.formFactor != null;
message = ''
You must set `liminalOS.formFactor` to either "laptop" or "desktop"!
'';
}
];
};
}