From 8f15daf2ea25304e9cbc8d449fb92078b2fb6f03 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 25 Oct 2015 14:15:21 +0100 Subject: init krebs.current --- default.nix | 6 +++++- krebs/3modules/current.nix | 26 ++++++++++++++++++++++++++ krebs/3modules/default.nix | 1 + 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 krebs/3modules/current.nix diff --git a/default.nix b/default.nix index c78464198..472d7597d 100644 --- a/default.nix +++ b/default.nix @@ -31,9 +31,13 @@ let stockholm = { kpath = lib.nspath "krebs"; upath = lib.nspath current-user-name; - base-module = { + base-module = { config, ... }: { imports = map (f: f "3modules") [ kpath upath ]; + krebs.current.enable = true; + krebs.current.host = config.krebs.hosts.${current-host-name}; + krebs.current.user = config.krebs.users.${current-user-name}; + nixpkgs.config.packageOverrides = pkgs: let kpkgs = import (kpath "5pkgs") { inherit lib pkgs; }; diff --git a/krebs/3modules/current.nix b/krebs/3modules/current.nix new file mode 100644 index 000000000..41941e289 --- /dev/null +++ b/krebs/3modules/current.nix @@ -0,0 +1,26 @@ +{ config, pkgs, lib, ... }: + +with lib; + +let + cfg = config.krebs.current; + + out = { + options.krebs.current = api; + config = mkIf cfg.enable imp; + }; + + api = { + enable = mkEnableOption "krebs.current"; + host = mkOption { + type = types.host; + }; + user = mkOption { + type = types.user; + }; + }; + + imp = { + }; + +in out diff --git a/krebs/3modules/default.nix b/krebs/3modules/default.nix index dd2f9e762..2b5fc478c 100644 --- a/krebs/3modules/default.nix +++ b/krebs/3modules/default.nix @@ -8,6 +8,7 @@ let imports = [ ./bepasty-server.nix ./build.nix + ./current.nix ./exim-retiolum.nix ./exim-smarthost.nix ./github-hosts-sync.nix -- cgit v1.2.3