nixbld: move services.redis into notifico/nixos-module

This commit is contained in:
Astro 2019-05-13 16:23:48 +02:00
parent 93bdfc2a5b
commit 5f5aa32341
2 changed files with 10 additions and 5 deletions

View File

@ -255,11 +255,6 @@ ACTION=="add", SUBSYSTEM=="tty", \
enable = true;
config = "/etc/nixos/secret/notifico.py";
};
# Required by notifico
services.redis = {
enable = true;
bind = "127.0.0.1";
};
# This value determines the NixOS release with which your system is to be
# compatible, in order to avoid breaking some software such as database

View File

@ -22,6 +22,11 @@ in
default = false;
description = "Enable the commit notification service";
};
enableLocalRedis = mkOption {
type = types.bool;
default = true;
description = "Enable a local Redis server";
};
dbDir = mkOption {
type = types.str;
default = "/var/db/notifico";
@ -41,6 +46,11 @@ in
};
users.groups.notifico = {};
services.redis = mkIf cfg.enableLocalRedis {
enable = true;
bind = "127.0.0.1";
};
systemd.services =
let
User = "notifico";