nixos: create 'modules/nixos' folder

Let's consolidate all modules under one path, so that NixOS,
home-manager, and nix-darwin (if I ever end up using it down the line)
would go under the same folder.
This commit is contained in:
Bruno BELANYI 2023-11-09 13:37:46 +00:00
parent b52e56ed08
commit c856933803
74 changed files with 1 additions and 1 deletions

View file

@ -0,0 +1,43 @@
{ config, lib, pkgs, ... }:
let
cfg = config.my.system.documentation;
in
{
options.my.system.documentation = with lib; {
enable = my.mkDisableOption "Documentation integration";
dev.enable = my.mkDisableOption "Documentation aimed at developers";
info.enable = my.mkDisableOption "Documentation aimed at developers";
man = {
enable = my.mkDisableOption "Documentation aimed at developers";
linux = my.mkDisableOption "Linux man pages (section 2 & 3)";
};
nixos.enable = my.mkDisableOption "NixOS documentation";
};
config = lib.mkIf cfg.enable {
documentation = {
enable = true;
dev.enable = cfg.dev.enable;
info.enable = cfg.info.enable;
man = {
enable = cfg.man.enable;
generateCaches = true;
};
nixos.enable = cfg.nixos.enable;
};
environment.systemPackages = with pkgs; lib.optionals cfg.man.linux [
man-pages
man-pages-posix
];
};
}