Skip to content

Commit

Permalink
v1.7.0 (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
cottand authored Feb 14, 2025
1 parent bb4c968 commit 0f407f2
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion config.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
)

// BuildVersion returns the build version of leng, this should be incremented every new release
var BuildVersion = "1.6.0"
var BuildVersion string = "dev"

// ConfigVersion returns the version of leng, this should be incremented every time the config changes so leng presents a warning
var ConfigVersion = "1.6.0"
Expand Down
4 changes: 2 additions & 2 deletions doc/src/Nix.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Please refer to [Configuration](./Configuration.md) for the options you can use
{
inputs = {
# pinned version for safety
leng.url = "github:cottand/leng/v1.6.0";
leng.url = "github:cottand/leng/v1.7.0";
leng.nixpkgs.follows = "nixpkgs";
};
Expand Down Expand Up @@ -52,7 +52,7 @@ Add the following inside your configuration.nix:
{pkgs, lib, ... }: {
imports = [
# import leng module
(builtins.getFlake "github:cottand/leng/v1.6.0").nixosModules.default
(builtins.getFlake "github:cottand/leng/v1.7.0").nixosModules.default
];
# now you can use services.leng!
Expand Down
14 changes: 8 additions & 6 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,21 @@

outputs = { self, nixpkgs, flake-utils, ... }:
(flake-utils.lib.eachDefaultSystem (system:
let pkgs = import nixpkgs { inherit system; }; in {

let
pkgs = nixpkgs.legacyPackages.${system};
version = "1.7.0";
in
{
# Build & packaging
## use with `nix build`
packages = rec {
leng = pkgs.buildGoModule {
inherit system;
inherit system version;
vendorHash = null;
pname = "leng";
version = "1.6.0";
src = nixpkgs.lib.sources.cleanSource ./.;
ldflags = [ "-s -w" ];
CGO_ENABLED = "0";
ldflags = [ "-s -w" "-X main.BuildVersion=${version}" ];
env.CGO_ENABLED = "0";
# upx does not support darwin
postInstall = if pkgs.lib.strings.hasSuffix "darwin" system then "" else ''
cd $out/bin
Expand Down
2 changes: 1 addition & 1 deletion nixos-tests/doh-upstream.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ in
services.leng.enable = true;
services.leng.configuration = {
blocking.sourcesStore = "/tmp";
customdnsrecords = [];
customdnsrecords = [ ];
upstream.DoH = "";
DnsOverHttpServer.enabled = true;
};
Expand Down
6 changes: 3 additions & 3 deletions nixos-tests/metrics-api.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ in
services.leng.configuration = {
metrics.enabled = true;
api = "0.0.0.0:${toString httpPort}";
blocking.sourcesStore="/tmp";
blocking.sourcesStore = "/tmp";
};
};

client = {};
client = { };
};

testScript =
Expand All @@ -39,4 +39,4 @@ in
)
'';

}).config.result
}).config.result

0 comments on commit 0f407f2

Please sign in to comment.