mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 22:11:33 +01:00
37 lines
639 B
Nix
37 lines
639 B
Nix
{
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
let
|
|
cfg = config.custom.services.actualbudget;
|
|
in
|
|
{
|
|
options.custom.services.actualbudget = {
|
|
enable = lib.mkEnableOption "";
|
|
domain = lib.mkOption {
|
|
type = lib.types.nonEmptyStr;
|
|
default = "";
|
|
};
|
|
port = lib.mkOption {
|
|
type = lib.types.port;
|
|
default = 8888;
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
users.groups.actual = { };
|
|
users.users.actual = {
|
|
isSystemUser = true;
|
|
group = "actual";
|
|
};
|
|
|
|
services.actual = {
|
|
enable = true;
|
|
settings = {
|
|
hostname = "localhost";
|
|
inherit (cfg) port;
|
|
};
|
|
};
|
|
};
|
|
}
|