2024-12-23 02:14:20 -08:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
2024-12-23 02:09:52 -08:00
|
|
|
let
|
2024-12-23 04:29:01 -08:00
|
|
|
cfg = config.liminalOS.system;
|
2024-12-23 02:14:20 -08:00
|
|
|
inherit (lib) mkIf;
|
2024-12-23 02:09:52 -08:00
|
|
|
in
|
|
|
|
{
|
2024-12-23 02:14:20 -08:00
|
|
|
options.liminalOS.system = {
|
|
|
|
printing.enable = lib.mkOption {
|
2024-12-23 02:09:52 -08:00
|
|
|
type = lib.types.bool;
|
|
|
|
default = config.liminalOS.enable;
|
|
|
|
description = ''
|
|
|
|
Whether to set up default options for printing and printer discover on UNIX.
|
|
|
|
'';
|
|
|
|
};
|
2024-12-23 04:29:01 -08:00
|
|
|
fonts.enable = lib.mkOption {
|
|
|
|
type = lib.types.bool;
|
|
|
|
default = config.liminalOS.enable;
|
|
|
|
description = ''
|
|
|
|
Whether to set up some nice default fonts, including a Nerd Font, Noto Fonts, and CJK.
|
|
|
|
'';
|
|
|
|
};
|
2024-12-23 02:14:20 -08:00
|
|
|
distrobox.enable = lib.mkEnableOption "distrobox and podman";
|
2024-12-23 02:09:52 -08:00
|
|
|
};
|
|
|
|
|
2024-12-23 02:14:20 -08:00
|
|
|
config = {
|
|
|
|
services.printing.enable = mkIf cfg.printing.enable true;
|
2024-12-23 02:09:52 -08:00
|
|
|
|
2024-12-23 02:14:20 -08:00
|
|
|
services.avahi = mkIf cfg.printing.enable {
|
2024-12-23 02:09:52 -08:00
|
|
|
enable = true;
|
|
|
|
nssmdns4 = true;
|
|
|
|
openFirewall = true;
|
|
|
|
};
|
2024-12-23 02:14:20 -08:00
|
|
|
|
|
|
|
fonts = mkIf cfg.fonts.enable {
|
|
|
|
enableDefaultPackages = true;
|
|
|
|
packages =
|
|
|
|
with pkgs;
|
|
|
|
[
|
|
|
|
noto-fonts-cjk-sans
|
|
|
|
(google-fonts.override { fonts = [ "Lora" ]; })
|
|
|
|
]
|
|
|
|
++ (lib.optionals (!config.liminalOS.theming.enable) [
|
|
|
|
noto-fonts
|
|
|
|
noto-fonts-emoji
|
|
|
|
nerd-fonts.caskaydia-cove
|
|
|
|
]);
|
|
|
|
};
|
|
|
|
|
2024-12-23 04:29:01 -08:00
|
|
|
virtualisation.podman = mkIf cfg.distrobox.enable {
|
2024-12-23 02:14:20 -08:00
|
|
|
enable = true;
|
|
|
|
dockerCompat = true;
|
|
|
|
};
|
|
|
|
|
2024-12-23 04:29:01 -08:00
|
|
|
environment.systemPackages = mkIf cfg.distrobox.enable [ pkgs.distrobox ];
|
2024-12-23 02:09:52 -08:00
|
|
|
};
|
|
|
|
}
|