os/modules/core/default.nix
Hendrik Sokolowski b0765db925
Improve core module
* Drop unsued iwdConfig option
* Add flag to enable caddy (default !lite)
* Add flag to enable vhost in caddy for help (default !lite)
* Add flag to enable vhost in caddy for cups (default printing.enable)
* Set defaults instead of a hard value to have individual options
  overridable
2022-09-29 21:42:30 +02:00

42 lines
833 B
Nix

{ config, lib, ... }:
with lib;
let
psCfg = config.pub-solar;
cfg = config.pub-solar.core;
in
{
imports = [
./boot.nix
./hibernation.nix
./fonts.nix
./i18n.nix
./networking.nix
./nix.nix
./packages.nix
./services.nix
];
options.pub-solar.core = {
lite = mkOption {
description = ''
Enable a lite edition of core with less default modules and a reduced package set.
'';
default = false;
type = types.bool;
};
};
config = {
pub-solar = {
audio.enable = lib.mkIf (!cfg.lite) (lib.mkDefault true);
crypto.enable = lib.mkIf (!cfg.lite) (lib.mkDefault true);
devops.enable = lib.mkIf (!cfg.lite) (lib.mkDefault true);
terminal-life = {
enable = lib.mkDefault true;
lite = cfg.lite;
};
};
};
}