summaryrefslogtreecommitdiffstats
path: root/krebs
diff options
context:
space:
mode:
Diffstat (limited to 'krebs')
-rw-r--r--krebs/3modules/per-user.nix44
-rw-r--r--krebs/5pkgs/simple/urlwatch/default.nix23
2 files changed, 33 insertions, 34 deletions
diff --git a/krebs/3modules/per-user.nix b/krebs/3modules/per-user.nix
index 1b8d092bb..a7a07a8e6 100644
--- a/krebs/3modules/per-user.nix
+++ b/krebs/3modules/per-user.nix
@@ -1,38 +1,34 @@
-{ config, lib, pkgs, ... }:
-
with import <stockholm/lib>;
-
-let
+{ config, pkgs, ... }: let
cfg = config.krebs.per-user;
-
- out = {
- options.krebs.per-user = api;
- config = imp;
- };
-
- api = mkOption {
- type = with types; attrsOf (submodule {
+in {
+ options.krebs.per-user = mkOption {
+ type = types.attrsOf (types.submodule {
options = {
packages = mkOption {
- type = listOf path;
+ type = types.listOf types.path;
default = [];
};
};
});
default = {};
};
-
- imp = {
+ config = {
environment = {
- etc = flip mapAttrs' cfg (name: { packages, ... }: {
- name = "per-user/${name}";
- value.source = pkgs.symlinkJoin {
- name = "per-user.${name}";
- paths = packages;
- };
- });
+ etc =
+ mapAttrs'
+ (name: per-user: {
+ name = "per-user/${name}";
+ value.source = pkgs.buildEnv {
+ name = "per-user.${name}";
+ paths = per-user.packages;
+ pathsToLink = [
+ "/bin"
+ ];
+ };
+ })
+ (filterAttrs (_: per-user: per-user.packages != []) cfg);
profiles = ["/etc/per-user/$LOGNAME"];
};
};
-
-in out
+}
diff --git a/krebs/5pkgs/simple/urlwatch/default.nix b/krebs/5pkgs/simple/urlwatch/default.nix
index adaefbc4d..ebf872568 100644
--- a/krebs/5pkgs/simple/urlwatch/default.nix
+++ b/krebs/5pkgs/simple/urlwatch/default.nix
@@ -1,14 +1,18 @@
-{ stdenv, fetchurl, python3Packages }:
+{ stdenv, fetchFromGitHub, python3Packages }:
-python3Packages.buildPythonPackage rec {
- name = "urlwatch-${meta.version}";
+python3Packages.buildPythonApplication rec {
+ name = "urlwatch-${version}";
+ version = "2.7";
- src = fetchurl {
- url = "https://github.com/thp/urlwatch/archive/${meta.version}.tar.gz";
- sha256 = "09bn31gn03swi7yr3s1ql8x07hx96gap1ka77kk44kk0lvfxn55b";
+ src = fetchFromGitHub {
+ owner = "thp";
+ repo = "urlwatch";
+ rev = version;
+ sha256 = "0fx964z73yv08b1lpymmjsigf6929zx9ax5bp34rcf2c5gk11l5m";
};
propagatedBuildInputs = with python3Packages; [
+ appdirs
keyring
minidb
pycodestyle
@@ -16,11 +20,10 @@ python3Packages.buildPythonPackage rec {
requests
];
- meta = {
+ meta = with stdenv.lib; {
description = "A tool for monitoring webpages for updates";
homepage = https://thp.io/2008/urlwatch/;
- license = stdenv.lib.licenses.bsd3;
- maintainers = [ stdenv.lib.maintainers.tv ];
- version = "2.6";
+ license = licenses.bsd3;
+ maintainers = with maintainers; [ tv ];
};
}