2015-06-22 17:19:32 +00:00
|
|
|
arg@{ config, pkgs, lib, ... }:
|
2015-06-14 17:15:56 +00:00
|
|
|
|
|
|
|
let
|
2015-06-22 17:19:32 +00:00
|
|
|
inherit (lib) mkIf mkMerge;
|
2015-06-14 17:15:56 +00:00
|
|
|
|
2015-06-22 17:19:32 +00:00
|
|
|
cfg = config.tv.git;
|
|
|
|
arg' = arg // { inherit cfg; };
|
2015-06-14 17:15:56 +00:00
|
|
|
in
|
|
|
|
|
|
|
|
# TODO unify logging of shell scripts to user and journal
|
|
|
|
# TODO move all scripts to ${etcDir}, so ControlMaster connections
|
|
|
|
# immediately pick up new authenticators
|
|
|
|
# TODO when authorized_keys changes, then restart ssh
|
|
|
|
# (or kill already connected users somehow)
|
|
|
|
|
|
|
|
{
|
2015-06-18 18:12:05 +00:00
|
|
|
imports = [
|
2015-06-22 17:19:32 +00:00
|
|
|
../../tv/nginx
|
2015-06-18 18:12:05 +00:00
|
|
|
];
|
|
|
|
|
2015-06-22 17:19:32 +00:00
|
|
|
options.tv.git = import ./options.nix arg';
|
2015-06-14 17:15:56 +00:00
|
|
|
|
2015-06-22 17:19:32 +00:00
|
|
|
config = mkIf cfg.enable (mkMerge [
|
|
|
|
(import ./config.nix arg')
|
|
|
|
(mkIf cfg.cgit (import ./cgit.nix arg'))
|
|
|
|
]);
|
2015-06-14 17:15:56 +00:00
|
|
|
}
|