File tree Expand file tree Collapse file tree 3 files changed +27
-10
lines changed
modules/services/networking Expand file tree Collapse file tree 3 files changed +27
-10
lines changed Original file line number Diff line number Diff line change 1616
1717 package = lib . mkPackageOption pkgs "blocky" { } ;
1818
19+ enableConfigCheck = lib . mkEnableOption "checking the config during build time" // {
20+ default = true ;
21+ } ;
22+
1923 settings = lib . mkOption {
2024 type = format . type ;
2125 default = { } ;
8084 ] ;
8185 } ;
8286 } ;
87+ system . checks = lib . mkIf cfg . enableConfigCheck [
88+ ( pkgs . runCommand "check-blocky-config" { } ''
89+ ${ lib . getExe cfg . package } --config ${ configFile } validate && touch $out
90+ '' )
91+ ] ;
8392 } ;
84- meta . maintainers = with lib . maintainers ; [ paepcke ] ;
93+ meta . maintainers = with lib . maintainers ; [
94+ paepcke
95+ kuflierl
96+ ] ;
8597}
Original file line number Diff line number Diff line change 1515 "printer.lan" = "192.168.178.3,2001:0db8:85a3:08d3:1319:8a2e:0370:7344" ;
1616 } ;
1717 } ;
18- upstream = {
18+ upstreams . groups = {
1919 default = [
2020 "8.8.8.8"
2121 "1.1.1.1"
2222 ] ;
2323 } ;
24- port = 53 ;
25- httpPort = 5000 ;
26- logLevel = "info" ;
24+ ports = {
25+ dns = 53 ;
26+ http = 5000 ;
27+ } ;
28+ log . level = "info" ;
2729 } ;
2830 } ;
2931 } ;
Original file line number Diff line number Diff line change 55 nixosTests ,
66} :
77
8- buildGoModule rec {
8+ buildGoModule ( finalAttrs : {
99 pname = "blocky" ;
1010 version = "0.28.2" ;
1111
1212 src = fetchFromGitHub {
1313 owner = "0xERR0R" ;
1414 repo = "blocky" ;
15- rev = "v${ version } " ;
15+ rev = "v${ finalAttrs . version } " ;
1616 hash = "sha256-GLVyPb2Qyn1jnRz+e74dFzL/AMloKqSe1BUUAGTquWA=" ;
1717 } ;
1818
@@ -25,7 +25,7 @@ buildGoModule rec {
2525 ldflags = [
2626 "-s"
2727 "-w"
28- "-X github.com/0xERR0R/blocky/util.Version=${ version } "
28+ "-X github.com/0xERR0R/blocky/util.Version=${ finalAttrs . version } "
2929 ] ;
3030
3131 passthru . tests = { inherit ( nixosTests ) blocky ; } ;
@@ -35,7 +35,10 @@ buildGoModule rec {
3535 homepage = "https://0xerr0r.github.io/blocky" ;
3636 changelog = "https://github.com/0xERR0R/blocky/releases" ;
3737 license = lib . licenses . asl20 ;
38- maintainers = with lib . maintainers ; [ ratsclub ] ;
38+ maintainers = with lib . maintainers ; [
39+ ratsclub
40+ kuflierl
41+ ] ;
3942 mainProgram = "blocky" ;
4043 } ;
41- }
44+ } )
You can’t perform that action at this time.
0 commit comments