diff --git a/hosts/box/default.nix b/hosts/box/default.nix index 469eea2d..686525cd 100644 --- a/hosts/box/default.nix +++ b/hosts/box/default.nix @@ -31,6 +31,7 @@ "/var/lib/radicale" # radicale "/home/anish/usr/drawing" # syncthing "/home/anish/usr/nonfiction" # syncthing + "/home/anish/usr/finance" # beancount "/mnt/two/postgres" # sealight postgres backups TODO remove once moved to capsul ]; # seafile diff --git a/profiles/dns/default.nix b/profiles/dns/default.nix index 9935540e..98f8bfba 100644 --- a/profiles/dns/default.nix +++ b/profiles/dns/default.nix @@ -10,7 +10,21 @@ addn-hosts=/etc/adblock.hosts ''; # 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" ]; - 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.allowedUDPPorts = [ 53 ]; } diff --git a/profiles/finance/default.nix b/profiles/finance/default.nix index 72472095..c6656860 100644 --- a/profiles/finance/default.nix +++ b/profiles/finance/default.nix @@ -3,29 +3,37 @@ { services.paperless = { enable = true; + consumptionDirIsPublic = true; + extraConfig.PAPERLESS_AUTO_LOGIN_USERNAME = "admin"; }; environment.systemPackages = [ - beancount + pkgs.beancount ]; - # systemd.services.fava = { - # path = [ - # pkgs.fava - # ]; - # before = [ "nginx.service" ]; - # serviceConfig = { - # User = "anish"; - # ExecStart = '' - # fava /home/anish/usr/finance/ledger.beancount - # ''; - # Restart = "on-failure"; - # }; - # }; + # TODO + # This one doesn't have a start condition, so I'm manually triggering it + # I'm not sure what the proper start condition is for it + systemd.services.fava = { + path = [ + pkgs.fava + ]; + before = [ "nginx.service" ]; + serviceConfig = { + User = "anish"; + ExecStart = '' + ${pkgs.fava}/bin/fava -p 29492 /home/anish/usr/finance/ledger.beancount + ''; + Restart = "on-failure"; + }; + }; services.nginx = { enable = true; virtualHosts."fin.mossnet.lan".locations."/" = { + proxyPass = "http://localhost:29492"; + }; + virtualHosts."paper.mossnet.lan".locations."/" = { proxyPass = "http://localhost:28981"; }; }; diff --git a/profiles/mossnet-hosts/default.nix b/profiles/mossnet-hosts/default.nix index 8ffc2417..6984d5f1 100644 --- a/profiles/mossnet-hosts/default.nix +++ b/profiles/mossnet-hosts/default.nix @@ -8,6 +8,7 @@ 192.168.1.240 file.mossnet.lan 192.168.1.240 task.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 links.mossnet.lan diff --git a/users/profiles/nvim/default.nix b/users/profiles/nvim/default.nix index d5de80f7..70eee425 100644 --- a/users/profiles/nvim/default.nix +++ b/users/profiles/nvim/default.nix @@ -576,7 +576,7 @@ in -- treesitter 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, }, textobjects = { enabled = true }, } @@ -785,6 +785,7 @@ in nvim-navic scnvim leap + vim-beancount # TODO break with nvim 0.8.0 # these are here until i upgrade my nixos channnel in the flake my-which-key-nvim