summaryrefslogtreecommitdiffstats
path: root/krebs/3modules/per-user.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2017-11-12 09:43:25 +0100
committertv <tv@krebsco.de>2017-11-12 09:57:44 +0100
commitae4cb860ea2bd99d80e66e48480e0d2a9731c2bd (patch)
treefd9e66ca2bf801c6372a9d9e111bba4f312532a5 /krebs/3modules/per-user.nix
parent2409647272b5c1c332b48ba8263bd237296f2c69 (diff)
per-user module: factor away api and imp
Diffstat (limited to 'krebs/3modules/per-user.nix')
-rw-r--r--krebs/3modules/per-user.nix24
1 files changed, 7 insertions, 17 deletions
diff --git a/krebs/3modules/per-user.nix b/krebs/3modules/per-user.nix
index 1b8d092b..9cbd9e1e 100644
--- a/krebs/3modules/per-user.nix
+++ b/krebs/3modules/per-user.nix
@@ -1,28 +1,19 @@
-{ 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}";
@@ -34,5 +25,4 @@ let
profiles = ["/etc/per-user/$LOGNAME"];
};
};
-
-in out
+}