Compare commits

..

No commits in common. "d2e4038b867115632e671f7a4cd1cdce20bcb8ad" and "2e65642ea835da0351ef38e05118e14e420858cd" have entirely different histories.

3 changed files with 10 additions and 46 deletions

View File

@ -1,4 +1,4 @@
{lib, ...}: {
{...}: {
# Home Manager needs a bit of information about you and the paths it should
# manage.
home.username = "admin-jroeger";
@ -12,12 +12,10 @@
hive.nix-scripts.enable = true;
hive.zsh.enable = true;
hive.doom.enable = true;
hive.doom.asDefaultEditor = true;
hive.doom.enableCopilot = true;
hive.doom.withNixPkgs = true;
hive.doom.withShellPkgs = true;
hive.doom.withCXXPkgs = true;
hive.doom.withPythonPkgs = true;
# This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release
@ -29,7 +27,7 @@
home.stateVersion = "24.11"; # Please read the comment before changing.
home.sessionVariables = {
EDITOR = lib.mkDefault "vim";
EDITOR = "vim";
};
# Let Home Manager install and manage itself.

View File

@ -25,7 +25,6 @@
gnutls
ispell
libtool
vscode-langservers-extracted
];
default-shell-pkgs = with pkgs; [
emmet-ls
@ -49,11 +48,6 @@
gdb
ninja
];
default-python-pkgs = with pkgs; [
python
pythonPackages.black
pyright
];
doom-path-pkgs =
lib.optionals cfg.withLatexPkgs (cfg.overrideLatexPkgs default-latex-pkgs)
++ lib.optionals cfg.withShellPkgs (cfg.overrideShellPkgs default-shell-pkgs)
@ -90,25 +84,15 @@
${config.xdg.configHome}/doom-emacs/bin/doom "$@"
fi
'';
doom-open = pkgs.writeShellScriptBin "doom-open" ''
export EMACS_SOCKET_NAME="$XDG_RUNTIME_DIR/emacs/${doom-socket-name}"
if [ -t 0 ]; then
exec ${wrapped-emacs}/bin/emacsclient -t "$@"
else
exec ${wrapped-emacs}/bin/emacsclient -c "$@"
fi
'';
in {
options.hive.doom = {
enable = lib.mkEnableOption "Enable Doom Emacs";
asDefaultEditor = lib.mkEnableOption "set the EDITOR variable to use the current emacs server (graphical/non-graphical)";
enableCopilot = lib.mkEnableOption "Enable Copilot in Doom Emacs";
enableTidal = lib.mkEnableOption "Enable TidalCycles";
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";
withPythonPkgs = lib.mkEnableOption "Enable python packages in doom path";
overrideLatexPkgs = lib.mkOption {
type = lib.types.functionTo (lib.types.listOf lib.types.package);
default = pkgs: pkgs;
@ -149,16 +133,6 @@ in {
'';
description = "Override the default C++ packages in the doom path.";
};
overridePythonPkgs = lib.mkOption {
type = lib.types.functionTo (lib.types.listOf lib.types.package);
default = pkgs: pkgs;
example = ''
prev: with pkgs; [
pythonPackages.black
]
'';
description = "Override the default Python packages in the doom path.";
};
};
config = lib.mkIf cfg.enable {
@ -171,15 +145,10 @@ in {
home = {
sessionPath = ["${config.xdg.configHome}/doom-emacs/bin"];
sessionVariables =
{
DOOMDIR = "${config.xdg.configHome}/doom-config";
DOOMLOCALDIR = "${config.xdg.configHome}/doom-local";
}
// lib.optionalAttrs cfg.asDefaultEditor {
EDITOR = "${doom-open.name}";
};
packages = doom-pkgs ++ lib.optional cfg.asDefaultEditor doom-open;
sessionVariables = {
DOOMDIR = "${config.xdg.configHome}/doom-config";
DOOMLOCALDIR = "${config.xdg.configHome}/doom-local";
};
};
systemd.user.services.doom-emacs-server = {
@ -275,5 +244,6 @@ in {
};
};
};
home.packages = doom-pkgs;
};
}

View File

@ -13,11 +13,7 @@ in {
default = "qt";
description = "The pinentry flavour to use";
};
withCCID = mkOption {
type = types.bool;
default = true;
description = "Use stand-alone CCID (instead of a running pcscd service)";
};
withCCID = mkEnableOption "Use stand-aline CCID (instead of a running pcscd service)";
};
config = lib.mkIf cfg.enable {
@ -31,8 +27,8 @@ in {
trust = "ultimate";
}
];
scdaemonSettings = lib.mkIf (!cfg.withCCID) {
disable-ccid = true;
scdaemonSettings = {
disable-ccid = !cfg.withCCID;
};
};
services.gpg-agent = {