diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/apps/sproxy2.nix | 4 | ||||
-rw-r--r-- | modules/pkgs/writeYAML.nix | 16 |
2 files changed, 19 insertions, 1 deletions
diff --git a/modules/apps/sproxy2.nix b/modules/apps/sproxy2.nix index 8616a48..0385e79 100644 --- a/modules/apps/sproxy2.nix +++ b/modules/apps/sproxy2.nix @@ -38,7 +38,9 @@ let ] ) (explicit cfg)); - configFile = with cfg; pkgs.writeText "sproxy.yml" '' + configFile = with cfg; pkgs.writeYAML "sproxy.yml" '' + # yamllint disable rule:empty-lines + # yamllint disable rule:line-length --- ${top} diff --git a/modules/pkgs/writeYAML.nix b/modules/pkgs/writeYAML.nix new file mode 100644 index 0000000..064ff39 --- /dev/null +++ b/modules/pkgs/writeYAML.nix @@ -0,0 +1,16 @@ +{ writeTextFile, pythonPackages }: + +let + + yamllint = pythonPackages.yamllint; + +in + +name: text: + writeTextFile + { + inherit name text; + checkPhase = '' + ${yamllint}/bin/yamllint "$out" + ''; + } |