NixOS system configurations + dotfiles via home-manager
at main 26 lines 756 B view raw
1{ 2 flake.modules.hjem.grancel = 3 { lib, pkgs, ... }: 4 { 5 fish.interactiveShellInit = "abbr --add --set-cursor -- notes 'hx ~/notes/%'"; 6 systemd = { 7 services.commit-notes.serviceConfig = { 8 Type = "oneshot"; 9 ExecStart = pkgs.writers.writeFish "commit-notes" '' 10 test -d notes; or exit 0 11 cd notes 12 set diff (${pkgs.jujutsu}/bin/jj diff) 13 test -n "$diff"; or exit 0 14 ${pkgs.jujutsu}/bin/jj commit --message "daily autocommit" 15 ''; 16 }; 17 timers.commit-notes = { 18 timerConfig = { 19 OnCalendar = "daily"; 20 Persistent = true; 21 }; 22 wantedBy = [ "timers.target" ]; 23 }; 24 }; 25 }; 26}