summaryrefslogtreecommitdiffstats
path: root/old/modules/tv/git/default.nix
blob: 17bc3738bf769211e8ba844f1f0c3f06d1ffcfac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
arg@{ config, pkgs, lib, ... }:

let
  inherit (lib) mkIf mkMerge;

  cfg = config.tv.git;
  arg' = arg // { inherit cfg; };
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)

{
  imports = [
    ../../tv/nginx
  ];

  options.tv.git = import ./options.nix arg';

  config = mkIf cfg.enable (mkMerge [
    (import ./config.nix arg')
    (mkIf cfg.cgit (import ./cgit.nix arg'))
  ]);
}