Compare commits

..

2 commits

Author SHA1 Message Date
641e226f9b
Fava, setup service; enable for Juri 2025-09-15 10:38:44 -07:00
0ce82962bb
OSAuto, add extraPkgs option to OS 2025-09-15 10:38:44 -07:00
3 changed files with 57 additions and 6 deletions

View file

@ -65,6 +65,11 @@ in {
server.domain = "ginko.woach.me";
};
fava = {
enable = true;
port = "5128";
};
syncthing = {
enable = true;
devices = {

View file

@ -1,12 +1,13 @@
{ config, pkgs, lib, hostname, usernameList, ... }:
{
options = {
system.timezone = lib.mkOption { default = "America/Los_Angeles"; };
system.extraFonts = lib.mkOption { default = []; };
system.isNonEFI = lib.mkEnableOption
options.system = {
timezone = lib.mkOption { default = "America/Los_Angeles"; };
extraFonts = lib.mkOption { default = []; };
extraPkgs = lib.mkOption { default = []; };
isNonEFI = lib.mkEnableOption
"Enable if you are running a non-EFI system";
system.users.bigWheels = lib.mkOption { default = []; };
users.bigWheels = lib.mkOption { default = []; };
};
config = lib.mkMerge [
@ -33,7 +34,7 @@
git
neovim
xdg-user-dirs
];
] ++ config.system.extraPkgs;
# XDG Compliance
nix.settings.use-xdg-base-directories = true;

View file

@ -0,0 +1,45 @@
{ config, pkgs, lib, ... }:
{
options.fava = {
enable = lib.mkEnableOption "Enables fava double entry accounting";
ledgerFile = lib.mkOption { default = "/var/lib/fava/ledger.beancount"; };
port = lib.mkOption { default = "5000"; };
host = lib.mkOption { default = "localhost"; };
};
config = lib.mkIf config.fava.enable {
systemd.services.fava = {
description = "Fava";
after = [ "network-online.target" ];
wants = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${pkgs.fava}/bin/fava --port ${config.fava.port} --host ${config.fava.host} ${config.fava.ledgerFile}";
Type = "simple";
User = "fava";
Group = "fava";
Restart = "on-failure";
RestartSec = "5s";
NoNewPrivileges = true;
PrivateTmp = true;
PrivateDevices = true;
ProtectHome = true;
ProtectSystem = "full";
ReadWriteDirectories = "/var/lib/fava";
};
};
users.users.fava = {
home = "/var/lib/fava";
createHome = true;
isSystemUser = true;
group = "fava";
};
users.groups.fava = {};
system.extraPkgs = [
pkgs.beancount
];
};
}