File tree Expand file tree Collapse file tree 2 files changed +18
-18
lines changed Expand file tree Collapse file tree 2 files changed +18
-18
lines changed Original file line number Diff line number Diff line change 77let
88 cfg = config . services . hound ;
99 settingsFormat = pkgs . formats . json { } ;
10+ houndConfigFile = pkgs . writeTextFile {
11+ name = "hound-config.json" ;
12+ text = builtins . toJSON cfg . settings ;
13+ checkPhase = ''
14+ ${ cfg . package } /bin/houndd -check-conf -conf $out
15+ '' ;
16+ } ;
1017in
1118{
1219 imports = [
96103 } ;
97104 } ;
98105
99- environment . etc . "hound/config.json" . source = pkgs . writeTextFile {
100- name = "hound-config" ;
101- text = builtins . toJSON cfg . settings ;
102- checkPhase = ''
103- ${ cfg . package } /bin/houndd -check-conf -conf $out
104- '' ;
105- } ;
106+ environment . etc . "hound/config.json" . source = houndConfigFile ;
106107
107108 services . hound . settings = {
108109 dbpath = "${ config . services . hound . home } /data" ;
112113 description = "Hound Code Search" ;
113114 wantedBy = [ "multi-user.target" ] ;
114115 after = [ "network.target" ] ;
116+ restartTriggers = [ houndConfigFile ] ;
115117 serviceConfig = {
116118 User = cfg . user ;
117119 Group = cfg . group ;
Original file line number Diff line number Diff line change @@ -11,17 +11,15 @@ import ./make-test-python.nix (
1111 {
1212 services . hound = {
1313 enable = true ;
14- config = ''
15- {
16- "max-concurrent-indexers": 1,
17- "dbpath": "/var/lib/hound/data",
18- "repos": {
19- "nix": {
20- "url": "file:///var/lib/hound/my-git"
21- }
22- }
23- }
24- '' ;
14+ settings = {
15+ "max-concurrent-indexers" = 1 ;
16+ "dbpath" = "/var/lib/hound/data" ;
17+ "repos" = {
18+ "nix" = {
19+ "url" = "file:///var/lib/hound/my-git" ;
20+ } ;
21+ } ;
22+ } ;
2523 } ;
2624
2725 systemd . services . houndseed = {
You can’t perform that action at this time.
0 commit comments