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

View File

@ -25,7 +25,6 @@
gnutls gnutls
ispell ispell
libtool libtool
vscode-langservers-extracted
]; ];
default-shell-pkgs = with pkgs; [ default-shell-pkgs = with pkgs; [
emmet-ls emmet-ls
@ -49,11 +48,6 @@
gdb gdb
ninja ninja
]; ];
default-python-pkgs = with pkgs; [
python
pythonPackages.black
pyright
];
doom-path-pkgs = doom-path-pkgs =
lib.optionals cfg.withLatexPkgs (cfg.overrideLatexPkgs default-latex-pkgs) lib.optionals cfg.withLatexPkgs (cfg.overrideLatexPkgs default-latex-pkgs)
++ lib.optionals cfg.withShellPkgs (cfg.overrideShellPkgs default-shell-pkgs) ++ lib.optionals cfg.withShellPkgs (cfg.overrideShellPkgs default-shell-pkgs)
@ -90,25 +84,15 @@
${config.xdg.configHome}/doom-emacs/bin/doom "$@" ${config.xdg.configHome}/doom-emacs/bin/doom "$@"
fi 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 { in {
options.hive.doom = { options.hive.doom = {
enable = lib.mkEnableOption "Enable Doom Emacs"; 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"; enableCopilot = lib.mkEnableOption "Enable Copilot in Doom Emacs";
enableTidal = lib.mkEnableOption "Enable TidalCycles"; enableTidal = lib.mkEnableOption "Enable TidalCycles";
withLatexPkgs = lib.mkEnableOption "Enable LaTeX packages in doom path"; withLatexPkgs = lib.mkEnableOption "Enable LaTeX packages in doom path";
withShellPkgs = lib.mkEnableOption "Enable shell packages in doom path"; withShellPkgs = lib.mkEnableOption "Enable shell packages in doom path";
withNixPkgs = lib.mkEnableOption "Enable LaTeX packages in doom path"; withNixPkgs = lib.mkEnableOption "Enable LaTeX packages in doom path";
withCXXPkgs = lib.mkEnableOption "Enable CXX 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 { overrideLatexPkgs = lib.mkOption {
type = lib.types.functionTo (lib.types.listOf lib.types.package); type = lib.types.functionTo (lib.types.listOf lib.types.package);
default = pkgs: pkgs; default = pkgs: pkgs;
@ -149,16 +133,6 @@ in {
''; '';
description = "Override the default C++ packages in the doom path."; 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 { config = lib.mkIf cfg.enable {
@ -171,15 +145,10 @@ in {
home = { home = {
sessionPath = ["${config.xdg.configHome}/doom-emacs/bin"]; sessionPath = ["${config.xdg.configHome}/doom-emacs/bin"];
sessionVariables = sessionVariables = {
{ DOOMDIR = "${config.xdg.configHome}/doom-config";
DOOMDIR = "${config.xdg.configHome}/doom-config"; DOOMLOCALDIR = "${config.xdg.configHome}/doom-local";
DOOMLOCALDIR = "${config.xdg.configHome}/doom-local"; };
}
// lib.optionalAttrs cfg.asDefaultEditor {
EDITOR = "${doom-open.name}";
};
packages = doom-pkgs ++ lib.optional cfg.asDefaultEditor doom-open;
}; };
systemd.user.services.doom-emacs-server = { systemd.user.services.doom-emacs-server = {
@ -275,5 +244,6 @@ in {
}; };
}; };
}; };
home.packages = doom-pkgs;
}; };
} }

View File

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