Home Gen494 @ 2025-04-09-12:54
This commit is contained in:
parent
5b22736b9f
commit
22c02c6184
@ -33,6 +33,10 @@
|
|||||||
age.keyFile = "${home.homeDirectory}/.config/sops/age/keys.txt";
|
age.keyFile = "${home.homeDirectory}/.config/sops/age/keys.txt";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
doom.enable = true;
|
||||||
|
doom.withNixPkgs = true;
|
||||||
|
doom.withShellPkgs = true;
|
||||||
|
|
||||||
# Make session variables available in systemd units
|
# Make session variables available in systemd units
|
||||||
# SEE: https://github.com/nix-community/home-manager/pull/5543
|
# SEE: https://github.com/nix-community/home-manager/pull/5543
|
||||||
# systemd.user.settings.Manager.DefaultEnvironment =
|
# systemd.user.settings.Manager.DefaultEnvironment =
|
||||||
|
|||||||
@ -4,48 +4,53 @@
|
|||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
|
cfg = config.doom;
|
||||||
doom-pkgs = with pkgs; [
|
doom-pkgs = with pkgs; [
|
||||||
fira
|
fira
|
||||||
fira-code-nerdfont
|
fira-code-nerdfont
|
||||||
emacs-all-the-icons-fonts
|
emacs-all-the-icons-fonts
|
||||||
];
|
];
|
||||||
doom-path-pkgs = with pkgs; [
|
default-core-pkgs = with pkgs; [
|
||||||
(ripgrep.override {withPCRE2 = true;})
|
(ripgrep.override {withPCRE2 = true;})
|
||||||
alejandra
|
|
||||||
(aspellWithDicts (d: [d.en d.de d.en-computers d.en-science]))
|
(aspellWithDicts (d: [d.en d.de d.en-computers d.en-science]))
|
||||||
binutils
|
binutils
|
||||||
ccls
|
|
||||||
clang-tools
|
|
||||||
cmake
|
|
||||||
editorconfig-core-c
|
editorconfig-core-c
|
||||||
emmet-ls
|
|
||||||
fd
|
fd
|
||||||
gcc
|
|
||||||
gdb
|
|
||||||
git
|
git
|
||||||
gnumake
|
gnumake
|
||||||
gnutls
|
gnutls
|
||||||
graphviz
|
|
||||||
imagemagick
|
|
||||||
ispell
|
ispell
|
||||||
libtool
|
libtool
|
||||||
lldb
|
];
|
||||||
mermaid-filter
|
default-shell-pkgs = with pkgs; [
|
||||||
mlocate
|
emmet-ls
|
||||||
|
];
|
||||||
|
default-nix-pkgs = with pkgs; [
|
||||||
|
alejandra
|
||||||
nixd
|
nixd
|
||||||
nodejs_22
|
];
|
||||||
|
default-latex-pkgs = with pkgs; [
|
||||||
pandoc
|
pandoc
|
||||||
pandoc-katex
|
|
||||||
poppler
|
poppler
|
||||||
python311
|
|
||||||
python311Packages.debugpy
|
|
||||||
python311Packages.grip
|
|
||||||
texlab
|
texlab
|
||||||
texlive.combined.scheme-medium
|
texlive.combined.scheme-medium
|
||||||
unzip
|
|
||||||
zlib
|
|
||||||
zstd
|
|
||||||
];
|
];
|
||||||
|
default-cxx-pkgs = with pkgs; [
|
||||||
|
clang
|
||||||
|
clang-format
|
||||||
|
clang-tools
|
||||||
|
cmake
|
||||||
|
cppcheck
|
||||||
|
doxygen
|
||||||
|
gdb
|
||||||
|
ninja
|
||||||
|
];
|
||||||
|
doom-path-pkgs =
|
||||||
|
lib.optionals cfg.withLatexPkgs (cfg.overrideLatexPkgs default-latex-pkgs)
|
||||||
|
++ lib.optionals cfg.withShellPkgs (cfg.overrideShellPkgs default-shell-pkgs)
|
||||||
|
++ lib.optionals cfg.withNixPkgs (cfg.overrideNixPkgs default-nix-pkgs)
|
||||||
|
++ lib.optionals cfg.withCXXPkgs (cfg.overrideCXXPkgs default-cxx-pkgs)
|
||||||
|
++ default-core-pkgs;
|
||||||
doom-socket-name = "main";
|
doom-socket-name = "main";
|
||||||
wrapped-emacs = pkgs.symlinkJoin {
|
wrapped-emacs = pkgs.symlinkJoin {
|
||||||
name = "wrapped-emacs";
|
name = "wrapped-emacs";
|
||||||
@ -76,6 +81,55 @@
|
|||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
|
options.doom = {
|
||||||
|
enable = lib.mkEnableOption "Enable Doom Emacs";
|
||||||
|
withLatexPkgs = lib.mkEnableOption "Enable LaTeX packages in doom path";
|
||||||
|
withShellPkgs = lib.mkEnableOption "Enable shell packages in doom path";
|
||||||
|
withNixPkgs = lib.mkEnableOption "Enable LaTeX packages in doom path";
|
||||||
|
withCXXPkgs = lib.mkEnableOption "Enable CXX packages in doom path";
|
||||||
|
overrideLatexPkgs = lib.mkOption {
|
||||||
|
type = lib.types.functionTo (lib.types.listOf lib.types.package);
|
||||||
|
default = pkgs: pkgs;
|
||||||
|
example = ''
|
||||||
|
prev: with pkgs; [
|
||||||
|
texlive.combined.scheme-full
|
||||||
|
]
|
||||||
|
'';
|
||||||
|
description = "Override the default LaTeX packages in the doom path.";
|
||||||
|
};
|
||||||
|
overrideShellPkgs = lib.mkOption {
|
||||||
|
type = lib.types.functionTo (lib.types.listOf lib.types.package);
|
||||||
|
default = pkgs: pkgs;
|
||||||
|
example = ''
|
||||||
|
prev: with pkgs; [
|
||||||
|
shellcheck
|
||||||
|
]
|
||||||
|
'';
|
||||||
|
description = "Override the default shell packages in the doom path.";
|
||||||
|
};
|
||||||
|
overrideNixPkgs = lib.mkOption {
|
||||||
|
type = lib.types.functionTo (lib.types.listOf lib.types.package);
|
||||||
|
default = pkgs: pkgs;
|
||||||
|
example = ''
|
||||||
|
prev: with pkgs; [
|
||||||
|
nixpkgs-fmt
|
||||||
|
]
|
||||||
|
'';
|
||||||
|
description = "Override the default Nix packages in the doom path.";
|
||||||
|
};
|
||||||
|
overrideCXXPkgs = lib.mkOption {
|
||||||
|
type = lib.types.functionTo (lib.types.listOf lib.types.package);
|
||||||
|
default = pkgs: pkgs;
|
||||||
|
example = ''
|
||||||
|
prev: with pkgs; [
|
||||||
|
openmp
|
||||||
|
]
|
||||||
|
'';
|
||||||
|
description = "Override the default C++ packages in the doom path.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
programs.emacs = {
|
programs.emacs = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = wrapped-emacs;
|
package = wrapped-emacs;
|
||||||
@ -169,4 +223,5 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
home.packages = doom-pkgs;
|
home.packages = doom-pkgs;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user