test
This commit is contained in:
parent
3792d15fd0
commit
28b5df5280
8 changed files with 89 additions and 61 deletions
36
module.nix
Normal file
36
module.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
# ~/.config/nixpkgs/modules/jiriks74/zsh/default.nix
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.jiriks74.zsh;
|
||||
# Helper to get the path relative to this file
|
||||
mkPath = path: ./modules + "/${path}";
|
||||
in {
|
||||
options.jiriks74.zsh = {
|
||||
# Option to enable the core Zsh configuration (like programs.zsh.enable)
|
||||
enable = lib.mkEnableOption "Enable jiriks74's core zsh configuration";
|
||||
|
||||
# Option to include extra packages
|
||||
qolPackages = lib.mkEnableOption "Enable QualityOfLife packages";
|
||||
};
|
||||
|
||||
# Conditionally import other Nix files based on the options
|
||||
imports =
|
||||
# Import core zsh settings if 'enable' is true
|
||||
(lib.lists.optionals cfg.enable [ (mkPath "zsh.nix") ])
|
||||
|
||||
# Import packages if 'extraPackages' is true
|
||||
++ (lib.lists.optionals cfg.extraPackages [ (mkPath "packages.nix") ])
|
||||
|
||||
# Add more conditional imports here based on other options
|
||||
# ++ (lib.lists.optionals cfg.keybindings [ (mkPath "keybindings.nix") ])
|
||||
# ++ (lib.lists.optionals cfg.plugins [ (mkPath "plugins.nix") ])
|
||||
;
|
||||
|
||||
# Base configuration that might always apply or depend on 'enable'
|
||||
config = lib.mkMerge [
|
||||
# (lib.mkIf cfg.enable {
|
||||
# programs.zsh.enable = true;
|
||||
# })
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue