From 13d7c14bd06bf22558ca13e0c213cc231c98abdb Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 13 Aug 2019 09:41:55 +0200 Subject: urlwatch: filter defaults to null --- krebs/3modules/urlwatch.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'krebs') diff --git a/krebs/3modules/urlwatch.nix b/krebs/3modules/urlwatch.nix index 61ee72e7..f82e6837 100644 --- a/krebs/3modules/urlwatch.nix +++ b/krebs/3modules/urlwatch.nix @@ -75,10 +75,7 @@ let ]; apply = map (x: getAttr (typeOf x) { set = x; - string = { - url = x; - filter = null; - }; + string.url = x; }); }; verbose = mkOption { @@ -210,6 +207,7 @@ let type = types.str; }; filter = mkOption { + default = null; type = with types; nullOr str; # TODO nullOr subtypes.filter }; }; -- cgit v1.2.3 From b13d9d3149c349160e43e9ea1dbe654829b58ad9 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 13 Aug 2019 09:42:14 +0200 Subject: urlwatch: add ignore_cached option --- krebs/3modules/urlwatch.nix | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'krebs') diff --git a/krebs/3modules/urlwatch.nix b/krebs/3modules/urlwatch.nix index f82e6837..79b45c62 100644 --- a/krebs/3modules/urlwatch.nix +++ b/krebs/3modules/urlwatch.nix @@ -210,6 +210,10 @@ let default = null; type = with types; nullOr str; # TODO nullOr subtypes.filter }; + ignore_cached = mkOption { + default = null; + type = with types; nullOr bool; + }; }; }; in out -- cgit v1.2.3 From ccb7fb731c9118f86300b2b02c987b28b079c938 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 13 Aug 2019 09:44:26 +0200 Subject: urlwatch: use writeJSON --- krebs/3modules/urlwatch.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'krebs') diff --git a/krebs/3modules/urlwatch.nix b/krebs/3modules/urlwatch.nix index 79b45c62..43535b08 100644 --- a/krebs/3modules/urlwatch.nix +++ b/krebs/3modules/urlwatch.nix @@ -93,7 +93,7 @@ let hooksFile = cfg.hooksFile; - configFile = pkgs.writeText "urlwatch.yaml" (toJSON { + configFile = pkgs.writeJSON "urlwatch.yaml" { display = { error = true; new = true; @@ -129,7 +129,7 @@ let line_length = 75; }; }; - }); + }; imp = { systemd.timers.urlwatch = { -- cgit v1.2.3 From aac6c242e8da2d630da4b712e20622db604da75a Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 14 Aug 2019 13:07:21 +0200 Subject: nix-prefetch-github: init --- krebs/5pkgs/simple/nix-prefetch-github.nix | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 krebs/5pkgs/simple/nix-prefetch-github.nix (limited to 'krebs') diff --git a/krebs/5pkgs/simple/nix-prefetch-github.nix b/krebs/5pkgs/simple/nix-prefetch-github.nix new file mode 100644 index 00000000..14096c33 --- /dev/null +++ b/krebs/5pkgs/simple/nix-prefetch-github.nix @@ -0,0 +1,25 @@ +{ curl, jq, nix, writeDashBin }: + +writeDashBin "nix-prefetch-github" '' + # usage: nix-prefetch-github OWNER REPO [REF] + set -efu + + owner=$1 + repo=$2 + ref=''${3-master} + + info_url=https://api.github.com/repos/$owner/$repo/commits/$ref + info=$(${curl}/bin/curl -fsS "$info_url") + rev=$(printf %s "$info" | ${jq}/bin/jq -r .sha) + + name=$owner-$repo-$ref + url=https://github.com/$owner/$repo/tarball/$rev + sha256=$(${nix}/bin/nix-prefetch-url --name "$name" --unpack "$url") + + export owner repo rev sha256 + ${jq}/bin/jq -n ' + env | { + owner, repo, rev, sha256 + } + ' +'' -- cgit v1.2.3 From e388d02623b98bad5db52b29ea1ef1f494fddae8 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 6 Sep 2019 15:07:05 +0200 Subject: exim: init at 4.92.2 because security --- krebs/5pkgs/override/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 krebs/5pkgs/override/default.nix (limited to 'krebs') diff --git a/krebs/5pkgs/override/default.nix b/krebs/5pkgs/override/default.nix new file mode 100644 index 00000000..70483182 --- /dev/null +++ b/krebs/5pkgs/override/default.nix @@ -0,0 +1,12 @@ +with import ; +self: super: { + + exim = super.exim.overrideAttrs (old: rec { + name = warnOldVersion old.name "exim-4.92.2"; + src = self.fetchurl { + url = "https://ftp.exim.org/pub/exim/exim4/${name}.tar.xz"; + sha256 = "0m56jsh2fzvwj4rdpcc3pkd5vsi40cjrpzalis7l1zq33m4axmq1"; + }; + }); + +} -- cgit v1.2.3