File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
nixos/modules/services/hardware Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 1414
1515 enable = lib . mkEnableOption "RAS logging daemon" ;
1616
17+ package = lib . mkPackageOption pkgs "rasdaemon" { } ;
18+
1719 record = lib . mkOption {
1820 type = lib . types . bool ;
1921 default = true ;
99101 } ;
100102 } ;
101103 environment . systemPackages =
102- [ pkgs . rasdaemon ]
104+ [ cfg . package ]
103105 ++ lib . optionals ( cfg . testing ) (
104106 with pkgs . error-inject ;
105107 [
151153 StateDirectory = lib . optionalString ( cfg . record ) "rasdaemon" ;
152154
153155 ExecStart =
154- "${ pkgs . rasdaemon } /bin/rasdaemon --foreground" + lib . optionalString ( cfg . record ) " --record" ;
155- ExecStop = "${ pkgs . rasdaemon } /bin/rasdaemon --disable" ;
156+ "${ cfg . package } /bin/rasdaemon --foreground" + lib . optionalString ( cfg . record ) " --record" ;
157+ ExecStop = "${ cfg . package } /bin/rasdaemon --disable" ;
156158 Restart = "on-abort" ;
157159
158160 # src/misc/rasdaemon.service.in shows this:
159- # ExecStartPost = ${pkgs.rasdaemon }/bin/rasdaemon --enable
161+ # ExecStartPost = ${cfg.package }/bin/rasdaemon --enable
160162 # but that results in unpredictable existence of the database
161163 # and everything seems to be enabled without this...
162164 } ;
167169 wantedBy = [ "multi-user.target" ] ;
168170 serviceConfig = {
169171 Type = "oneshot" ;
170- ExecStart = "${ pkgs . rasdaemon } /bin/ras-mc-ctl --register-labels" ;
172+ ExecStart = "${ cfg . package } /bin/ras-mc-ctl --register-labels" ;
171173 RemainAfterExit = true ;
172174 } ;
173175 } ;
You can’t perform that action at this time.
0 commit comments