Add zettelkasten.nix
This commit is contained in:
parent
aadf9426a9
commit
e03eede2d3
|
@ -58,6 +58,7 @@ in {
|
|||
];
|
||||
apolloConfig = imports:
|
||||
makeConfig "apollo" (imports ++ [
|
||||
./roles/zettelkasten.nix
|
||||
./battery.nix
|
||||
./mpd.nix
|
||||
./mpclient.nix
|
||||
|
|
|
@ -72,9 +72,9 @@ let
|
|||
filetypes = [ "nix" ];
|
||||
};
|
||||
haskell = {
|
||||
command = "ghcide";
|
||||
command = "haskell-language-server";
|
||||
args = [ "--lsp" ];
|
||||
rootPatterns = [ ".hie-bios" ];
|
||||
rootPatterns = [ ".hie-bios" "cabal.project" ];
|
||||
filetypes = [ "hs" "lhs" "haskell" ];
|
||||
};
|
||||
};
|
||||
|
|
|
@ -2,14 +2,13 @@
|
|||
let
|
||||
pythia-path = "${config.home.homeDirectory}/documents/pythia";
|
||||
pythia = pkgs.writeShellScriptBin "pythia" ''
|
||||
datei=${pythia-path}/$(date +%Y-%m-%d)
|
||||
touch $datei
|
||||
datei=${config.home.homeDirectory}/git/zettelkasten/pythia-$(date +%Y-%m-%d).md
|
||||
if [[ ! -a $datei ]]; then
|
||||
neuron new --id pythia-$(date +%Y-%m-%d) Tagebucheintrag
|
||||
sed -i 's/date:/tags:\n - Pythia\ndate:/' $datei
|
||||
fi
|
||||
vim $datei
|
||||
grep TODO: $datei | sed 's/TODO: //' | while read -r line; do task add "$line"; done && sed -i 's/TODO: /Notiert: /' $datei
|
||||
grep WEAK: $datei | sed 's/WEAK: //' >> ${pythia-path}/schwächen && sed -i 's/WEAK: /Schwäche: /' $datei
|
||||
grep STRONG: $datei | sed 's/STRONG: //' >> ${pythia-path}/stärken && sed -i 's/STRONG: /Stärke: /' $datei
|
||||
grep RULE: $datei | sed 's/RULE: //' >> ${pythia-path}/richtlinien && sed -i 's/RULE: /Richtlinie: /' $datei
|
||||
grep INDICATOR: $datei | sed 's/INDICATOR: //' >> ${pythia-path}/warnzeichen && sed -i 's/INDICATOR: /Warnzeichen: /' $datei
|
||||
'';
|
||||
printslow = pkgs.writeScriptBin "printslow" ''
|
||||
#!${pkgs.python3}/bin/python
|
||||
|
|
11
home-manager/roles/zettelkasten.nix
Normal file
11
home-manager/roles/zettelkasten.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ pkgs, config, ... }:
|
||||
let
|
||||
notesDir = "${config.home.homeDirectory}/git/zettelkasten";
|
||||
cmd = "${pkgs.myHaskellPackages.neuron}/bin/neuron -d ${notesDir} rib -wS";
|
||||
in {
|
||||
systemd.user.services.neuron = {
|
||||
Unit.Description = "Neuron zettelkasten service";
|
||||
Install.WantedBy = [ "graphical-session.target" ];
|
||||
Service.ExecStart = cmd;
|
||||
};
|
||||
}
|
|
@ -4,7 +4,7 @@
|
|||
Unit = { Description = "Update taskwarrior tasks"; };
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
Environment = "PATH=${pkgs.taskwarrior}/bin";
|
||||
Environment = "PATH=${pkgs.taskwarrior}/bin:${pkgs.git}/bin";
|
||||
ExecStart = "${config.home.homeDirectory}/.cargo/bin/update_tasks";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -12,7 +12,7 @@ let
|
|||
inherit (p)
|
||||
brittany ormolu releaser cabal-fmt stack ghcid ghcide cabal-install dhall
|
||||
aeson unordered-containers these neuron taskwarrior pandoc hlint
|
||||
cabal2nix weeder reflex-dom password optics-th;
|
||||
cabal2nix weeder reflex-dom password optics-th shh-extras;
|
||||
} // makeHaskellScriptPackages p;
|
||||
in {
|
||||
myHaskellPackages = makeHaskellPackages master.haskellPackages;
|
||||
|
|
Loading…
Reference in a new issue