Add zettelkasten.nix
This commit is contained in:
parent
aadf9426a9
commit
e03eede2d3
|
@ -58,6 +58,7 @@ in {
|
||||||
];
|
];
|
||||||
apolloConfig = imports:
|
apolloConfig = imports:
|
||||||
makeConfig "apollo" (imports ++ [
|
makeConfig "apollo" (imports ++ [
|
||||||
|
./roles/zettelkasten.nix
|
||||||
./battery.nix
|
./battery.nix
|
||||||
./mpd.nix
|
./mpd.nix
|
||||||
./mpclient.nix
|
./mpclient.nix
|
||||||
|
|
|
@ -72,9 +72,9 @@ let
|
||||||
filetypes = [ "nix" ];
|
filetypes = [ "nix" ];
|
||||||
};
|
};
|
||||||
haskell = {
|
haskell = {
|
||||||
command = "ghcide";
|
command = "haskell-language-server";
|
||||||
args = [ "--lsp" ];
|
args = [ "--lsp" ];
|
||||||
rootPatterns = [ ".hie-bios" ];
|
rootPatterns = [ ".hie-bios" "cabal.project" ];
|
||||||
filetypes = [ "hs" "lhs" "haskell" ];
|
filetypes = [ "hs" "lhs" "haskell" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,14 +2,13 @@
|
||||||
let
|
let
|
||||||
pythia-path = "${config.home.homeDirectory}/documents/pythia";
|
pythia-path = "${config.home.homeDirectory}/documents/pythia";
|
||||||
pythia = pkgs.writeShellScriptBin "pythia" ''
|
pythia = pkgs.writeShellScriptBin "pythia" ''
|
||||||
datei=${pythia-path}/$(date +%Y-%m-%d)
|
datei=${config.home.homeDirectory}/git/zettelkasten/pythia-$(date +%Y-%m-%d).md
|
||||||
touch $datei
|
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
|
vim $datei
|
||||||
grep TODO: $datei | sed 's/TODO: //' | while read -r line; do task add "$line"; done && sed -i 's/TODO: /Notiert: /' $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" ''
|
printslow = pkgs.writeScriptBin "printslow" ''
|
||||||
#!${pkgs.python3}/bin/python
|
#!${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"; };
|
Unit = { Description = "Update taskwarrior tasks"; };
|
||||||
Service = {
|
Service = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
Environment = "PATH=${pkgs.taskwarrior}/bin";
|
Environment = "PATH=${pkgs.taskwarrior}/bin:${pkgs.git}/bin";
|
||||||
ExecStart = "${config.home.homeDirectory}/.cargo/bin/update_tasks";
|
ExecStart = "${config.home.homeDirectory}/.cargo/bin/update_tasks";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -12,7 +12,7 @@ let
|
||||||
inherit (p)
|
inherit (p)
|
||||||
brittany ormolu releaser cabal-fmt stack ghcid ghcide cabal-install dhall
|
brittany ormolu releaser cabal-fmt stack ghcid ghcide cabal-install dhall
|
||||||
aeson unordered-containers these neuron taskwarrior pandoc hlint
|
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;
|
} // makeHaskellScriptPackages p;
|
||||||
in {
|
in {
|
||||||
myHaskellPackages = makeHaskellPackages master.haskellPackages;
|
myHaskellPackages = makeHaskellPackages master.haskellPackages;
|
||||||
|
|
Loading…
Reference in a new issue