mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 17:31:34 +01:00
Rename option "backups.enable" to "doBackups"
This commit is contained in:
parent
6bd3313e55
commit
4f5db50ca1
11 changed files with 71 additions and 92 deletions
35
modules/system/services/actualbudget.nix
Normal file
35
modules/system/services/actualbudget.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.custom.services.actualbudget;
|
||||
in
|
||||
{
|
||||
options.custom.services.actualbudget = {
|
||||
enable = lib.mkEnableOption "";
|
||||
doBackups = lib.mkEnableOption "";
|
||||
domain = lib.mkOption {
|
||||
type = lib.types.nonEmptyStr;
|
||||
default = "";
|
||||
};
|
||||
port = lib.mkOption {
|
||||
type = lib.types.port;
|
||||
default = 8888;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
meta.ports.list = [ cfg.port ];
|
||||
|
||||
services.actual = {
|
||||
enable = true;
|
||||
settings = {
|
||||
hostname = "localhost";
|
||||
inherit (cfg) port;
|
||||
};
|
||||
};
|
||||
|
||||
custom.services.resticBackups.actual = lib.mkIf cfg.doBackups {
|
||||
conflictingService = "actual.service";
|
||||
extraConfig.paths = [ config.services.actual.settings.dataDir ];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue