dotfiles/modules/dev/c.nix

24 lines
408 B
Nix
Raw Normal View History

2022-01-11 18:44:40 +01:00
{ config, lib, pkgs, options, ... }:
with lib;
let
withLLVM = config.modules.dev.llvm.enable;
cfg = config.modules.dev.c;
in {
options.modules.dev.c = {
enable = mkOption {
type = types.bool;
default = false;
};
};
config = mkIf cfg.enable {
2022-04-20 10:53:28 +02:00
user.packages = if !withLLVM then with pkgs; [
2022-01-11 18:44:40 +01:00
gcc
] else with pkgs; [
2022-01-13 17:13:25 +01:00
clang_12
2022-01-11 18:44:40 +01:00
# clang-utils
];
};
}