add home-manager develop module

This commit is contained in:
xunuwu 2024-08-27 11:12:20 +00:00
parent 0e39c76c8d
commit 3e0154df22
No known key found for this signature in database
6 changed files with 63 additions and 3 deletions

View file

@ -8,6 +8,7 @@
./home/profiles
./hosts
./modules
./home-modules
];
flake = {
};

5
home-modules/default.nix Normal file
View file

@ -0,0 +1,5 @@
{
flake.homeManagerModules = {
xun = import ./xun;
};
}

View file

@ -0,0 +1,5 @@
{
imports = [
./develop
];
}

View file

@ -0,0 +1,42 @@
{
pkgs,
config,
lib,
...
}: let
cfg = config.xun.develop;
in {
options.xun.develop = {
enable = lib.mkEnableOption "develop";
nix.enable = lib.mkEnableOption "nix";
tools.enable = lib.mkEnableOption "tools";
docs.enable = lib.mkEnableOption "man caches";
lsp.c.enable = lib.mkEnableOption "clangd";
};
config = let
config =
if cfg.enable
then {
nix.enable = true;
tools.enable = true;
docs.enable = true;
lsp.c.enable = true;
}
else cfg;
in
lib.mkMerge [
(lib.mkIf config.nix.enable {
home.packages = with pkgs; [nil alejandra];
})
(lib.mkIf config.tools.enable {
home.packages = with pkgs; [tokei];
})
(lib.mkIf config.lsp.c.enable {
home.packages = with pkgs; [clang-tools];
})
(lib.mkIf config.docs.enable {
programs.man.generateCaches = true;
})
];
}

View file

@ -1,11 +1,16 @@
{inputs, ...}: {
{
inputs,
self,
...
}: {
imports = [
self.homeManagerModules.xun
inputs.small-nvim.homeManagerModules.small-nvim
../../terminal/shell/zsh.nix
../../terminal/programs
../../terminal/programs/lazygit.nix
../../develop
../../develop/small-misc.nix
# ../../develop
# ../../develop/small-misc.nix
];
xun = {
@ -17,5 +22,6 @@
};
wakatime.enable = false;
};
develop.enable = true;
};
}

View file

@ -67,5 +67,6 @@
};
wakatime.enable = true;
};
develop.enable = true;
};
}