finance additions (paperless, fava, beancount)

This commit is contained in:
Anish Lakhwara 2022-09-26 23:27:31 +10:00
parent 6116a72de0
commit aa30562d5b
5 changed files with 41 additions and 16 deletions

View file

@ -31,6 +31,7 @@
"/var/lib/radicale" # radicale "/var/lib/radicale" # radicale
"/home/anish/usr/drawing" # syncthing "/home/anish/usr/drawing" # syncthing
"/home/anish/usr/nonfiction" # syncthing "/home/anish/usr/nonfiction" # syncthing
"/home/anish/usr/finance" # beancount
"/mnt/two/postgres" # sealight postgres backups TODO remove once moved to capsul "/mnt/two/postgres" # sealight postgres backups TODO remove once moved to capsul
]; ];
# seafile # seafile

View file

@ -10,7 +10,21 @@
addn-hosts=/etc/adblock.hosts addn-hosts=/etc/adblock.hosts
''; # find a way to make adblock hosts reproducible and updateable ''; # find a way to make adblock hosts reproducible and updateable
services.dnsmasq.servers = [ "45.90.30.49" "45.90.28.49" "1.1.1.1" "8.8.8.8" ]; services.dnsmasq.servers = [ "45.90.30.49" "45.90.28.49" "1.1.1.1" "8.8.8.8" ];
networking.hosts = { "192.168.1.240" = [ "mossnet.lan" "links.mossnet.lan" "read.mossnet.lan" "stats.mossnet.lan" "music.mossnet.lan" "rss.mossnet.lan" "tasks.mossnet.lan" "file.mossnet.lan" "books.mossnet.lan" ]; }; networking.hosts = {
"192.168.1.240" = [
"mossnet.lan"
"links.mossnet.lan"
"read.mossnet.lan"
"stats.mossnet.lan"
"music.mossnet.lan"
"rss.mossnet.lan"
"tasks.mossnet.lan"
"file.mossnet.lan"
"books.mossnet.lan"
"fin.mossnet.lan"
"paper.mossnet.lan"
];
};
networking.firewall.allowedTCPPorts = [ 53 ]; networking.firewall.allowedTCPPorts = [ 53 ];
networking.firewall.allowedUDPPorts = [ 53 ]; networking.firewall.allowedUDPPorts = [ 53 ];
} }

View file

@ -3,29 +3,37 @@
{ {
services.paperless = { services.paperless = {
enable = true; enable = true;
consumptionDirIsPublic = true;
extraConfig.PAPERLESS_AUTO_LOGIN_USERNAME = "admin";
}; };
environment.systemPackages = [ environment.systemPackages = [
beancount pkgs.beancount
]; ];
# systemd.services.fava = { # TODO
# path = [ # This one doesn't have a start condition, so I'm manually triggering it
# pkgs.fava # I'm not sure what the proper start condition is for it
# ]; systemd.services.fava = {
# before = [ "nginx.service" ]; path = [
# serviceConfig = { pkgs.fava
# User = "anish"; ];
# ExecStart = '' before = [ "nginx.service" ];
# fava /home/anish/usr/finance/ledger.beancount serviceConfig = {
# ''; User = "anish";
# Restart = "on-failure"; ExecStart = ''
# }; ${pkgs.fava}/bin/fava -p 29492 /home/anish/usr/finance/ledger.beancount
# }; '';
Restart = "on-failure";
};
};
services.nginx = { services.nginx = {
enable = true; enable = true;
virtualHosts."fin.mossnet.lan".locations."/" = { virtualHosts."fin.mossnet.lan".locations."/" = {
proxyPass = "http://localhost:29492";
};
virtualHosts."paper.mossnet.lan".locations."/" = {
proxyPass = "http://localhost:28981"; proxyPass = "http://localhost:28981";
}; };
}; };

View file

@ -8,6 +8,7 @@
192.168.1.240 file.mossnet.lan 192.168.1.240 file.mossnet.lan
192.168.1.240 task.mossnet.lan 192.168.1.240 task.mossnet.lan
192.168.1.240 fin.mossnet.lan 192.168.1.240 fin.mossnet.lan
192.168.1.240 paper.mossnet.lan
''; '';
# 10.0.69.4 mossnet.lan # 10.0.69.4 mossnet.lan
# 10.0.69.4 links.mossnet.lan # 10.0.69.4 links.mossnet.lan

View file

@ -576,7 +576,7 @@ in
-- treesitter -- treesitter
require('nvim-treesitter.configs').setup { require('nvim-treesitter.configs').setup {
ensure_installed={'nix', 'clojure', 'python', 'fennel', 'lua', 'html', 'css', 'regex', 'supercollider'}, ensure_installed={'nix', 'clojure', 'python', 'fennel', 'lua', 'html', 'css', 'regex', 'supercollider', 'beancount'},
highlight = { enabled = true, additional_vim_regex_highting = true, }, highlight = { enabled = true, additional_vim_regex_highting = true, },
textobjects = { enabled = true }, textobjects = { enabled = true },
} }
@ -785,6 +785,7 @@ in
nvim-navic nvim-navic
scnvim scnvim
leap leap
vim-beancount
# TODO break with nvim 0.8.0 # TODO break with nvim 0.8.0
# these are here until i upgrade my nixos channnel in the flake # these are here until i upgrade my nixos channnel in the flake
my-which-key-nvim my-which-key-nvim