package(technitium-dns-server): switch module to own package override
This commit is contained in:
parent
751d47feea
commit
3fb1c730ce
2 changed files with 30 additions and 10 deletions
|
@ -1,26 +1,24 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
with lib.${namespace};
|
||||
let
|
||||
cfg = config.${namespace}.services.technitium-dns-server;
|
||||
inherit (lib)
|
||||
mkEnableOption
|
||||
mkPackageOption
|
||||
mkOption
|
||||
mkIf
|
||||
types
|
||||
;
|
||||
in
|
||||
{
|
||||
options.${namespace}.services.technitium-dns-server = {
|
||||
enable = mkEnableOption "Technitium DNS Server";
|
||||
|
||||
package = mkPackageOption pkgs "technitium-dns-server" { };
|
||||
package = mkOption {
|
||||
description = "The package of Technitium to use.";
|
||||
type = types.package;
|
||||
default = pkgs.awesome-flake.technitium-dns-server;
|
||||
};
|
||||
|
||||
openFirewall = mkOption {
|
||||
type = types.bool;
|
||||
|
|
22
overlays/technitium-dns-server/default.nix
Normal file
22
overlays/technitium-dns-server/default.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
channels,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
|
||||
final: prev: {
|
||||
awesome-flake = (prev.awesome-flake or { }) // {
|
||||
technitium-dns-server = prev.technitium-dns-server.overrideAttrs (_old: rec {
|
||||
pname = "technitium-dns-server";
|
||||
version = "13.6.0";
|
||||
|
||||
src = final.fetchFromGitHub {
|
||||
owner = "TechnitiumSoftware";
|
||||
repo = "DnsServer";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-2OSuLGWdaiiPxyW0Uvq736wHKa7S3CHv79cmZZ86GRE=";
|
||||
name = "${pname}-${version}";
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue