summaryrefslogtreecommitdiffstats
path: root/krebs/3modules/urlwatch.nix
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2017-07-03 00:02:34 +0200
committerlassulus <lassulus@lassul.us>2017-07-03 00:02:34 +0200
commitc30e1fbc74c050386a82d1050ecc77b44401df6b (patch)
treec7d29147fe0387e9618c16838ab4bd3a0fcbfbd3 /krebs/3modules/urlwatch.nix
parentd5aca8696caeac6d88923e1f668af213abc987fa (diff)
parent5f3bece0d647f65c2354ae0944a50d775a3b488e (diff)
Merge remote-tracking branch 'gum/master'
Diffstat (limited to 'krebs/3modules/urlwatch.nix')
-rw-r--r--krebs/3modules/urlwatch.nix17
1 files changed, 5 insertions, 12 deletions
diff --git a/krebs/3modules/urlwatch.nix b/krebs/3modules/urlwatch.nix
index c06e5ddb1..463fa26ba 100644
--- a/krebs/3modules/urlwatch.nix
+++ b/krebs/3modules/urlwatch.nix
@@ -60,6 +60,7 @@ let
description = "URL to watch.";
example = [
https://nixos.org/channels/nixos-unstable/git-revision
+ { url = http://localhost ; filter = "grep:important.*stuff"; }
];
apply = map (x: getAttr (typeOf x) {
set = x;
@@ -79,7 +80,8 @@ let
};
urlsFile = pkgs.writeText "urls"
- (concatMapStringsSep "\n---\n" toJSON cfg.urls);
+ (concatMapStringsSep "\n---\n"
+ (x: toJSON (filterAttrs (n: v: n != "_module") x)) cfg.urls);
hooksFile = cfg.hooksFile;
@@ -142,17 +144,6 @@ let
PrivateTmp = "true";
SyslogIdentifier = "urlwatch";
Type = "oneshot";
- ExecStartPre =
- pkgs.writeDash "urlwatch-prestart" ''
- set -euf
-
- dataDir=$HOME
-
- if ! test -e "$dataDir"; then
- mkdir -m 0700 -p "$dataDir"
- chown ${user.name}: "$dataDir"
- fi
- '';
ExecStart = pkgs.writeDash "urlwatch" ''
set -euf
@@ -185,6 +176,8 @@ let
};
users.extraUsers = singleton {
inherit (user) name uid;
+ home = cfg.dataDir;
+ createHome = true;
};
};