mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 21:01:34 +01:00
Rename web-service dir
This commit is contained in:
parent
b2680db359
commit
14fa3f89c1
18 changed files with 0 additions and 0 deletions
58
modules/system/web-services/actualbudget.nix
Normal file
58
modules/system/web-services/actualbudget.nix
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.custom.services.actualbudget;
|
||||
|
||||
inherit (config.services.actual.settings) dataDir;
|
||||
in
|
||||
{
|
||||
options.custom.services.actualbudget = {
|
||||
enable = lib.mkEnableOption "";
|
||||
domain = lib.mkOption {
|
||||
type = lib.types.nonEmptyStr;
|
||||
default = "";
|
||||
};
|
||||
port = lib.mkOption {
|
||||
type = lib.types.port;
|
||||
default = 5006;
|
||||
};
|
||||
doBackups = lib.mkEnableOption "";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
meta = {
|
||||
domains.list = [ cfg.domain ];
|
||||
ports.tcp.list = [ cfg.port ];
|
||||
};
|
||||
|
||||
users = {
|
||||
users.actual = {
|
||||
isSystemUser = true;
|
||||
group = config.users.groups.actual.name;
|
||||
};
|
||||
groups.actual = { };
|
||||
};
|
||||
|
||||
systemd.services.actual.serviceConfig = {
|
||||
DynamicUser = lib.mkForce false;
|
||||
PrivateTmp = true;
|
||||
RemoveIPC = true;
|
||||
};
|
||||
|
||||
services.actual = {
|
||||
enable = true;
|
||||
settings = {
|
||||
hostname = "localhost";
|
||||
inherit (cfg) port;
|
||||
};
|
||||
};
|
||||
|
||||
custom = {
|
||||
services.resticBackups.actual = lib.mkIf cfg.doBackups {
|
||||
conflictingService = "actual.service";
|
||||
paths = [ dataDir ];
|
||||
};
|
||||
|
||||
persist.directories = [ dataDir ];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue