change from mono-home-manager to full flake multi-system configuration
This commit is contained in:
51
home/logseq.nix
Normal file
51
home/logseq.nix
Normal file
@@ -0,0 +1,51 @@
|
||||
{ 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" "NoteTaking" "Utility" ];
|
||||
};
|
||||
|
||||
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"
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user