{ 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 = lib.mkIf cfg.enable { myConfig = { 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; }; xdg.enable = true; # Let Home Manager install and manage itself. programs.home-manager.enable = true; }; }