52 lines
1.3 KiB
Nix
52 lines
1.3 KiB
Nix
{ config, pkgs, lib, ... }:
|
|
|
|
let
|
|
notesDir = "${config.home.homeDirectory}/logseq";
|
|
cfg = config.homeModules.logseq;
|
|
in
|
|
|
|
lib.mkIf cfg.enable {
|
|
home.packages = [
|
|
pkgs.logseq
|
|
];
|
|
|
|
# Ensure notes directory exists
|
|
home.file."Logseq/.keep".text = "";
|
|
|
|
# Shell alias
|
|
programs.zsh.shellAliases = {
|
|
logseq = "logseq ${notesDir}";
|
|
};
|
|
|
|
# Create desktop entry for convenience
|
|
xdg.desktopEntries.logseq = {
|
|
name = "Logseq";
|
|
genericName = "Markdown Knowledge Base";
|
|
comment = "Open source outliner with local Markdown storage.";
|
|
exec = "logseq";
|
|
icon = "logseq";
|
|
type = "Application";
|
|
categories = [ "Office" ];
|
|
};
|
|
|
|
home.file.".config/logseq/config.edn".text = ''{
|
|
:preferred-theme :light
|
|
:page-width 0.7
|
|
:custom-css-path ""
|
|
}'';
|
|
|
|
# Create default notes directory
|
|
home.activation.createLogseqDir = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
|
mkdir -p "${notesDir}"
|
|
'';
|
|
|
|
# Theme & plugins setup (manual step for user)
|
|
home.activation.logseqThemeNote = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
|
echo "🎨 You can customize Logseq by placing themes and plugins in:"
|
|
echo " ${notesDir}/logseq"
|
|
echo ""
|
|
echo "💡 Example community themes and plugins:"
|
|
echo " https://github.com/logseq/awesome-logseq"
|
|
'';
|
|
}
|