nixos/modules/home/default.nix

27 lines
636 B
Nix
Raw Normal View History

{
lib,
config,
...
}: let
cfg = config.myConfig;
in {
imports = [./git ./music ./programs ./shell ./sway];
options.myConfig = {
enable = lib.mkEnableOption "custom home-manager config";
desktop = lib.mkEnableOption "custom home-manager config for desktop use";
laptop = lib.mkEnableOption "extra settings for laptop use";
};
config.myConfig = lib.mkIf cfg.enable {
shell.enable = true;
git.enable = true;
sway.enable = lib.mkIf cfg.desktop true;
music.enable = lib.mkIf cfg.desktop true;
programs.enable = lib.mkIf cfg.desktop true;
sway.laptop = lib.mkIf cfg.laptop true;
};
}