Merge master into staging-next
This commit is contained in:
@@ -29443,6 +29443,12 @@
|
||||
githubId = 8006928;
|
||||
name = "Yuannan (Brandon) Lin";
|
||||
};
|
||||
yujonpradhananga = {
|
||||
email = "yujonpradhan123@gmail.com";
|
||||
github = "Yujonpradhananga";
|
||||
githubId = 139200034;
|
||||
name = "Yujon Pradhananga";
|
||||
};
|
||||
yuka = {
|
||||
email = "yuka@yuka.dev";
|
||||
matrix = "@yuka:yuka.dev";
|
||||
|
||||
@@ -68,8 +68,6 @@
|
||||
|
||||
- The packages `iw` and `wirelesstools` (`iwconfig`, `iwlist`, etc.) are no longer installed implicitly if wireless networking has been enabled.
|
||||
|
||||
- The Traefik module now features new ways to deploy the dynamic and static configuration files. Move your existing declarative static and dynamic configurations to `services.traefik.static.settings` and `services.traefik.dynamic.files."my-application".settings` respectively. The `services.traefik.dynamic.settings` option is available for a simpler migration without needing to define a filename like `my-application`, but this option will be removed in NixOS 26.11.
|
||||
|
||||
- `services.kubernetes.addons.dns.coredns` has been renamed to `services.kubernetes.addons.dns.corednsImage` and now expects a
|
||||
package instead of attrs. Now, by default, nixpkgs.coredns in conjunction with dockerTools.buildImage is used, instead
|
||||
of pulling the upstream container image from Docker Hub. If you want the old behavior, you can set:
|
||||
|
||||
@@ -118,7 +118,7 @@ in
|
||||
if [[ ! -f "$HOME/.config/starship.toml" ]]; then
|
||||
export STARSHIP_CONFIG=${settingsFile}
|
||||
fi
|
||||
eval "$(${cfg.package}/bin/starship init bash)"
|
||||
eval "$(${cfg.package}/bin/starship init bash --print-full-init)"
|
||||
fi
|
||||
'';
|
||||
|
||||
|
||||
@@ -92,6 +92,18 @@ in
|
||||
"127.0.0.1:''${config.services.omnom.port}"
|
||||
'';
|
||||
};
|
||||
# NOTE: this can't be empty, because it will be overwritten by
|
||||
# Omnom's internal default config.
|
||||
base_url = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
internal = true;
|
||||
default = "http://127.0.0.1:${toString cfg.port}/";
|
||||
description = "Full server URL.";
|
||||
example = "https://local.omnom/xy/";
|
||||
defaultText = lib.literalExpression ''
|
||||
"http://''${config.services.omnom.settings.server.address}/"
|
||||
'';
|
||||
};
|
||||
secure_cookie = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
|
||||
@@ -201,10 +201,13 @@ in
|
||||
isSystemUser = true;
|
||||
};
|
||||
};
|
||||
groups.fossorial.members = [
|
||||
"pangolin"
|
||||
"gerbil"
|
||||
];
|
||||
groups.fossorial = {
|
||||
members = [
|
||||
"pangolin"
|
||||
"gerbil"
|
||||
"traefik"
|
||||
];
|
||||
};
|
||||
};
|
||||
# order is as follows
|
||||
# "pangolin.service"
|
||||
@@ -428,9 +431,9 @@ in
|
||||
|
||||
services.traefik = {
|
||||
enable = true;
|
||||
supplementaryGroups = [ "fossorial" ];
|
||||
group = "fossorial";
|
||||
dataDir = "${cfg.dataDir}/config/traefik";
|
||||
static.settings = {
|
||||
staticConfigOptions = {
|
||||
providers.http = {
|
||||
endpoint = "http://localhost:${toString finalSettings.server.internal_port}/api/v1/traefik-config";
|
||||
pollInterval = "5s";
|
||||
@@ -468,7 +471,7 @@ in
|
||||
};
|
||||
};
|
||||
};
|
||||
dynamic.files."pangolin".settings = {
|
||||
dynamicConfigOptions = {
|
||||
http = {
|
||||
middlewares.redirect-to-https.redirectScheme.scheme = "https";
|
||||
routers = {
|
||||
|
||||
@@ -1,528 +1,168 @@
|
||||
{
|
||||
options,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
inherit (lib.types)
|
||||
attrsOf
|
||||
bool
|
||||
listOf
|
||||
nullOr
|
||||
path
|
||||
str
|
||||
submodule
|
||||
;
|
||||
inherit (lib)
|
||||
concatMapStringsSep
|
||||
concatStringsSep
|
||||
filter
|
||||
getExe
|
||||
literalExpression
|
||||
maintainers
|
||||
mapAttrs'
|
||||
mkDefault
|
||||
mkEnableOption
|
||||
mkIf
|
||||
mkMerge
|
||||
mkOption
|
||||
mkPackageOption
|
||||
mkRenamedOptionModule
|
||||
nameValuePair
|
||||
optional
|
||||
optionalAttrs
|
||||
remove
|
||||
;
|
||||
|
||||
cfg = config.services.traefik;
|
||||
opt = options.services.traefik;
|
||||
|
||||
# JSON is considered valid YAML by Traefik.
|
||||
format = pkgs.formats.json { };
|
||||
format = pkgs.formats.toml { };
|
||||
|
||||
staticFile =
|
||||
if cfg.static.file == null then
|
||||
format.generate "static_config.json" cfg.static.settings
|
||||
dynamicConfigFile =
|
||||
if cfg.dynamicConfigFile == null then
|
||||
format.generate "config.toml" cfg.dynamicConfigOptions
|
||||
else
|
||||
cfg.static.file;
|
||||
cfg.dynamicConfigFile;
|
||||
|
||||
finalStaticFile = if cfg.useEnvSubst then "/run/traefik/config.json" else staticFile;
|
||||
staticConfigFile =
|
||||
if cfg.staticConfigFile == null then
|
||||
format.generate "config.toml" (
|
||||
recursiveUpdate cfg.staticConfigOptions {
|
||||
providers.file.filename = "${dynamicConfigFile}";
|
||||
}
|
||||
)
|
||||
else
|
||||
cfg.staticConfigFile;
|
||||
|
||||
finalStaticConfigFile =
|
||||
if cfg.environmentFiles == [ ] then staticConfigFile else "/run/traefik/config.toml";
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
(mkRenamedOptionModule
|
||||
[
|
||||
"services"
|
||||
"traefik"
|
||||
"staticConfigFile"
|
||||
]
|
||||
[
|
||||
"services"
|
||||
"traefik"
|
||||
"static"
|
||||
"file"
|
||||
]
|
||||
)
|
||||
(mkRenamedOptionModule
|
||||
[
|
||||
"services"
|
||||
"traefik"
|
||||
"staticConfigOptions"
|
||||
]
|
||||
[
|
||||
"services"
|
||||
"traefik"
|
||||
"static"
|
||||
"settings"
|
||||
]
|
||||
)
|
||||
(mkRenamedOptionModule
|
||||
[
|
||||
"services"
|
||||
"traefik"
|
||||
"dynamicConfigFile"
|
||||
]
|
||||
[
|
||||
"services"
|
||||
"traefik"
|
||||
"dynamic"
|
||||
"file"
|
||||
]
|
||||
)
|
||||
(mkRenamedOptionModule
|
||||
[
|
||||
"services"
|
||||
"traefik"
|
||||
"dynamicConfigOptions"
|
||||
]
|
||||
[
|
||||
"services"
|
||||
"traefik"
|
||||
"dynamic"
|
||||
"settings"
|
||||
]
|
||||
)
|
||||
];
|
||||
options.services.traefik = {
|
||||
enable = mkEnableOption "Traefik web server";
|
||||
package = mkPackageOption pkgs "traefik" { };
|
||||
|
||||
static = {
|
||||
file = mkOption {
|
||||
default = null;
|
||||
example = literalExpression "/path/to/static_config.toml";
|
||||
type = nullOr path;
|
||||
description = ''
|
||||
Path to Traefik's static configuration file.
|
||||
staticConfigFile = mkOption {
|
||||
default = null;
|
||||
example = literalExpression "/path/to/static_config.toml";
|
||||
type = types.nullOr types.path;
|
||||
description = ''
|
||||
Path to traefik's static configuration to use.
|
||||
(Using that option has precedence over `staticConfigOptions` and `dynamicConfigOptions`)
|
||||
'';
|
||||
};
|
||||
|
||||
::: {.note}
|
||||
Using this option has precedence over {option}`services.traefik.static.settings`.
|
||||
:::
|
||||
'';
|
||||
staticConfigOptions = mkOption {
|
||||
description = ''
|
||||
Static configuration for Traefik.
|
||||
'';
|
||||
type = format.type;
|
||||
default = {
|
||||
entryPoints.http.address = ":80";
|
||||
};
|
||||
settings = mkOption {
|
||||
description = ''
|
||||
Static configuration for Traefik, written in Nix.
|
||||
example = {
|
||||
entryPoints.web.address = ":8080";
|
||||
entryPoints.http.address = ":80";
|
||||
|
||||
::: {.note}
|
||||
This will be serialized to JSON (which is considered valid YAML) at build, and passed to Traefik as `--configfile`.
|
||||
:::
|
||||
'';
|
||||
type = format.type;
|
||||
default = {
|
||||
entryPoints.http.address = ":80";
|
||||
};
|
||||
example = {
|
||||
entryPoints = {
|
||||
"web" = {
|
||||
address = ":80";
|
||||
http.redirections.entryPoint = {
|
||||
permanent = true;
|
||||
scheme = "https";
|
||||
to = "websecure";
|
||||
};
|
||||
};
|
||||
"websecure" = {
|
||||
address = ":443";
|
||||
asDefault = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
api = { };
|
||||
};
|
||||
};
|
||||
|
||||
dynamic = {
|
||||
file = mkOption {
|
||||
default = null;
|
||||
example = literalExpression "/path/to/dynamic_config.toml";
|
||||
type = nullOr path;
|
||||
description = ''
|
||||
Path to Traefik's dynamic configuration file.
|
||||
dynamicConfigFile = mkOption {
|
||||
default = null;
|
||||
example = literalExpression "/path/to/dynamic_config.toml";
|
||||
type = types.nullOr types.path;
|
||||
description = ''
|
||||
Path to traefik's dynamic configuration to use.
|
||||
(Using that option has precedence over `dynamicConfigOptions`)
|
||||
'';
|
||||
};
|
||||
|
||||
::: {.note}
|
||||
You cannot use this option alongside the declarative configuration options.
|
||||
:::
|
||||
'';
|
||||
};
|
||||
dir = mkOption {
|
||||
default = null;
|
||||
example = literalExpression "/var/lib/traefik/dynamic";
|
||||
type = nullOr path;
|
||||
description = ''
|
||||
Path to the directory Traefik should watch for configuration files.
|
||||
|
||||
::: {.warning}
|
||||
Files in this directory matching the glob `_nixos-*` (reserved for Nix-managed dynamic configurations) will be deleted as part of
|
||||
`systemd-tmpfiles-resetup.service`, _**regardless of their origin.**_.
|
||||
:::
|
||||
'';
|
||||
};
|
||||
files = mkOption {
|
||||
type = attrsOf (submodule {
|
||||
options.settings = mkOption {
|
||||
type = format.type;
|
||||
description = ''
|
||||
Dynamic configuration for Traefik, written in Nix.
|
||||
|
||||
::: {.note}
|
||||
This will be serialized to JSON (which is considered valid YAML) at build, and passed as part of the static file.
|
||||
:::
|
||||
'';
|
||||
example = {
|
||||
http.routers."api" = {
|
||||
service = "api@internal";
|
||||
rule = "Host(`localhost`)";
|
||||
};
|
||||
};
|
||||
};
|
||||
});
|
||||
default = { };
|
||||
example = {
|
||||
"dashboard".settings = {
|
||||
http.routers."api" = {
|
||||
service = "api@internal";
|
||||
rule = "Host(`198.51.100.1`)";
|
||||
};
|
||||
};
|
||||
dynamicConfigOptions = mkOption {
|
||||
description = ''
|
||||
Dynamic configuration for Traefik.
|
||||
'';
|
||||
type = format.type;
|
||||
default = { };
|
||||
example = {
|
||||
http.routers.router1 = {
|
||||
rule = "Host(`localhost`)";
|
||||
service = "service1";
|
||||
};
|
||||
description = ''
|
||||
Dynamic configuration files to write. These are symlinked in `services.traefik.dynamic.dir` upon activation,
|
||||
allowing configuration to be upated without restarting the primary daemon.
|
||||
|
||||
::: {.note}
|
||||
Due to [a limitation in Traefik](https://github.com/traefik/traefik/issues/10890); any syntax error in a dynamic configuration will cause the _**entire file provider**_ to be ignored.
|
||||
This may cause interuption in service, which may include access to the Traefik dashboard, if [enabled and configured](https://doc.traefik.io/traefik/operations/dashboard).
|
||||
:::
|
||||
'';
|
||||
};
|
||||
# TODO: Drop in 26.11.
|
||||
settings = mkOption {
|
||||
type = format.type;
|
||||
description = ''
|
||||
Dynamic configuration for Traefik, written in Nix.
|
||||
This option is intended for easily migrating pre-26.05 Traefik configurations, and will be removed in NixOS 26.11.
|
||||
|
||||
::: {.note}
|
||||
Configurations added here will be translated into a file for {option}`services.traefik.dynamic.files`, named `custom-migrated`.
|
||||
:::
|
||||
'';
|
||||
default = { };
|
||||
example = {
|
||||
http.routers."api" = {
|
||||
service = "api@internal";
|
||||
rule = "Host(`localhost`)";
|
||||
};
|
||||
};
|
||||
http.services.service1.loadBalancer.servers = [ { url = "http://localhost:8080"; } ];
|
||||
};
|
||||
};
|
||||
|
||||
dataDir = mkOption {
|
||||
default = "/var/lib/traefik";
|
||||
type = path;
|
||||
type = types.path;
|
||||
description = ''
|
||||
Location for any persistent data Traefik creates, such as the ACME certificate store.
|
||||
|
||||
::: {.note}
|
||||
If left as the default value, this directory will automatically be created
|
||||
before the Traefik server starts, otherwise you are responsible for ensuring
|
||||
the directory exists with appropriate ownership and permissions.
|
||||
:::
|
||||
'';
|
||||
};
|
||||
|
||||
user = mkOption {
|
||||
default = "traefik";
|
||||
example = "docker";
|
||||
type = str;
|
||||
description = ''
|
||||
User under which Traefik runs.
|
||||
|
||||
::: {.note}
|
||||
If left as the default value this user will automatically be created
|
||||
on system activation, otherwise you are responsible for
|
||||
ensuring the user exists before the Traefik service starts.
|
||||
:::
|
||||
Location for any persistent data traefik creates, ie. acme
|
||||
'';
|
||||
};
|
||||
|
||||
group = mkOption {
|
||||
default = "traefik";
|
||||
type = str;
|
||||
type = types.str;
|
||||
example = "docker";
|
||||
description = ''
|
||||
Primary group under which Traefik runs.
|
||||
For the Docker backend, use {option}`services.traefik.supplementaryGroups` instead of overriding this option.
|
||||
|
||||
::: {.note}
|
||||
If left as the default value this group will automatically be created
|
||||
on system activation, otherwise you are responsible for
|
||||
ensuring the group exists before the Traefik service starts.
|
||||
:::
|
||||
Set the group that traefik runs under.
|
||||
For the docker backend this needs to be set to `docker` instead.
|
||||
'';
|
||||
};
|
||||
|
||||
supplementaryGroups = mkOption {
|
||||
default = [ ];
|
||||
type = listOf str;
|
||||
example = [ "docker" ];
|
||||
description = ''
|
||||
Additional groups under which Traefik runs.
|
||||
This can be used to give additional permissions, such as the group required by the `docker` provider.
|
||||
|
||||
::: {.note}
|
||||
With the `docker` provider, Traefik manages connection to containers via the Docker socket,
|
||||
which requires membership of the `docker` group for write access.
|
||||
:::
|
||||
'';
|
||||
};
|
||||
package = mkPackageOption pkgs "traefik" { };
|
||||
|
||||
environmentFiles = mkOption {
|
||||
default = [ ];
|
||||
type = listOf path;
|
||||
type = types.listOf types.path;
|
||||
example = [ "/run/secrets/traefik.env" ];
|
||||
description = ''
|
||||
Files to load as an environment file just before Traefik starts.
|
||||
This can be used to pass secrets such as [DNS challenge API tokens](https://doc.traefik.io/traefik/https/acme/#providers) or [EAB credentials](https://doc.traefik.io/traefik/reference/static-configuration/env/).
|
||||
```
|
||||
DESEC_TOKEN=
|
||||
TRAEFIK_CERTIFICATESRESOLVERS_<NAME>_ACME_EAB_HMACENCODED=
|
||||
TRAEFIK_CERTIFICATESRESOLVERS_<NAME>_ACME_EAB_KID=
|
||||
```
|
||||
::: {.warn}
|
||||
The traefik static configuration methods (env, CLI, and file) are mutually exclusive.
|
||||
:::
|
||||
|
||||
Rather than setting secret values with the traefik environment variable syntax,
|
||||
it is recommended to set arbitrary environment variables, then reference them with `$VARNAME` in e.g.
|
||||
{option}`services.traefik.static.settings`, like so:
|
||||
```nix
|
||||
{
|
||||
services.traefik = {
|
||||
static.settings.somesecretvalue = "$SECRETNAME";
|
||||
useEnvSubst = true; # Necessary in order to use environment variables in the Traefik config.
|
||||
environmentFiles = [ /path/to/file/that/defines/SECRETNAME ];
|
||||
};
|
||||
}
|
||||
```
|
||||
'';
|
||||
};
|
||||
|
||||
useEnvSubst = mkOption {
|
||||
default = cfg.environmentFiles != [ ];
|
||||
defaultText = "config.services.traefik.environmentFiles != [ ]";
|
||||
type = bool;
|
||||
example = true;
|
||||
description = ''
|
||||
Whether to use `envSubst` in the `ExecStartPre` phase to augment the generated static config. See {option}`services.traefik.environmentFiles`.
|
||||
|
||||
::: {.note}
|
||||
If you use environment files with Traefik but *do not* utilise environment variables in the static config, this can safely be disabled to reduce startup time.
|
||||
:::
|
||||
Files to load as environment file. Environment variables from this file
|
||||
will be substituted into the static configuration file using envsubst.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion =
|
||||
cfg.static.file != opt.static.file.default -> cfg.static.settings == opt.static.settings.default;
|
||||
message = ''
|
||||
The 'services.traefik.static.file' and 'services.traefik.static.settings'
|
||||
options are mutually exclusive for the Traefik static config.
|
||||
It is recommended to use 'settings'.
|
||||
'';
|
||||
}
|
||||
{
|
||||
assertion =
|
||||
cfg.static.file != opt.static.file.default
|
||||
-> (
|
||||
cfg.dynamic.files == opt.dynamic.files.default
|
||||
&& cfg.dynamic.dir == opt.dynamic.dir.default
|
||||
&& cfg.dynamic.file == opt.dynamic.file.default
|
||||
);
|
||||
message = ''
|
||||
None of the dynamic configuration options may be used if Traefik is being managed imperatively.
|
||||
The following options have non-default values:
|
||||
- ${
|
||||
concatMapStringsSep "\n - " (str: "'services.traefik.dynamic.${str}'") (
|
||||
filter (attr: cfg.dynamic.${attr} != opt.dynamic.${attr}.default) [
|
||||
"files"
|
||||
"dir"
|
||||
"file"
|
||||
"settings" # TODO: Drop in 26.11.
|
||||
]
|
||||
)
|
||||
}
|
||||
'';
|
||||
}
|
||||
{
|
||||
assertion =
|
||||
cfg.dynamic.file != opt.dynamic.file.default -> cfg.dynamic.dir == opt.dynamic.dir.default;
|
||||
message = ''
|
||||
The 'services.traefik.dynamic.file' and 'services.traefik.dynamic.dir' options
|
||||
are mutually exclusive for the Traefik dynamic config. It is recommended to use
|
||||
'services.traefik.dynamic.dir' with 'services.traefik.dynamic.files'.
|
||||
'';
|
||||
}
|
||||
{
|
||||
assertion =
|
||||
cfg.dynamic.files != opt.dynamic.files.default -> cfg.dynamic.dir != opt.dynamic.dir.default;
|
||||
message = ''
|
||||
'services.traefik.dynamic.files' requires the dynamic file provider to be set
|
||||
to a directory. Please set a path for 'services.traefik.dynamic.dir'.
|
||||
'';
|
||||
}
|
||||
{
|
||||
assertion = cfg.group != "docker";
|
||||
message = ''
|
||||
Setting the primary group to 'docker' will cause files, such as those generated
|
||||
by 'services.traefik.dynamic.files', to be owned by the group 'docker', which
|
||||
may be a security risk. Use 'services.traefik.supplementaryGroups' instead.
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
warnings =
|
||||
optional (!(builtins.elem "docker" cfg.supplementaryGroups -> config.virtualisation.docker.enable))
|
||||
"'services.traefik.supplementaryGroups' contains the 'docker' group, but 'services.docker' is not enabled."
|
||||
++ optional (cfg.dynamic.settings != opt.dynamic.settings.default) ''
|
||||
'services.traefik.dynamic.settings' is in use, but that option is deprecated.
|
||||
Please migrate your configuration to an explicit file instead.
|
||||
|
||||
You may do so by moving the value of 'services.traefik.dynamic.settings' to
|
||||
'services.traefik.dynamic.files.<name>.settings', where <name> is an arbitrary
|
||||
string that ideally identifies the configuration's purpose.
|
||||
|
||||
The following files define 'services.traefik.dynamic.settings' and should be migrated:
|
||||
- ${
|
||||
concatStringsSep "\n - " (
|
||||
remove ./traefik.nix (map (attr: attr.file) opt.dynamic.settings.definitionsWithLocations)
|
||||
)
|
||||
}
|
||||
'';
|
||||
|
||||
# https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes
|
||||
boot.kernel.sysctl = {
|
||||
"net.core.rmem_max" = 2500000;
|
||||
"net.core.wmem_max" = 2500000;
|
||||
};
|
||||
|
||||
# If a dynamic file or directory has been set, add it as a provider in the static configuration
|
||||
services.traefik = mkIf (cfg.static.file == opt.static.file.default) {
|
||||
dynamic.files = mkIf (cfg.dynamic.settings != opt.dynamic.settings.default) {
|
||||
"custom-migrated".settings = cfg.dynamic.settings;
|
||||
};
|
||||
static.settings =
|
||||
mkIf (cfg.dynamic.dir != opt.dynamic.dir.default || cfg.dynamic.file != opt.dynamic.file.default)
|
||||
{
|
||||
providers.file = {
|
||||
directory = mkIf (cfg.dynamic.dir != opt.dynamic.dir.default) cfg.dynamic.dir;
|
||||
filename = mkIf (cfg.dynamic.file != opt.dynamic.file.default) cfg.dynamic.file;
|
||||
watch = mkDefault true;
|
||||
};
|
||||
};
|
||||
};
|
||||
systemd.tmpfiles.rules = [ "d '${cfg.dataDir}' 0700 traefik traefik - -" ];
|
||||
|
||||
systemd.services.traefik = {
|
||||
description = "Traefik reverse proxy";
|
||||
description = "Traefik web server";
|
||||
wants = [ "network-online.target" ];
|
||||
after = [ "network-online.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
startLimitIntervalSec = 86400;
|
||||
startLimitBurst = 5;
|
||||
serviceConfig = {
|
||||
Documentation = "https://doc.traefik.io/traefik/";
|
||||
EnvironmentFile = cfg.environmentFiles;
|
||||
ExecStartPre = optional cfg.useEnvSubst "${getExe pkgs.envsubst} -i '${staticFile}' > '${finalStaticFile}'";
|
||||
ExecStart = "${getExe cfg.package} --configfile=${finalStaticFile}";
|
||||
Type = "notify";
|
||||
User = cfg.user;
|
||||
ExecStartPre = lib.optional (cfg.environmentFiles != [ ]) (
|
||||
pkgs.writeShellScript "pre-start" ''
|
||||
umask 077
|
||||
${pkgs.envsubst}/bin/envsubst -i "${staticConfigFile}" > "${finalStaticConfigFile}"
|
||||
''
|
||||
);
|
||||
ExecStart = "${cfg.package}/bin/traefik --configfile=${finalStaticConfigFile}";
|
||||
Type = "simple";
|
||||
User = "traefik";
|
||||
Group = cfg.group;
|
||||
SupplementaryGroups = mkIf (cfg.supplementaryGroups != [ ]) cfg.supplementaryGroups;
|
||||
Restart = "always";
|
||||
Restart = "on-failure";
|
||||
AmbientCapabilities = "cap_net_bind_service";
|
||||
CapabilityBoundingSet = "cap_net_bind_service";
|
||||
NoNewPrivileges = true;
|
||||
TasksMax = 64;
|
||||
LimitNPROC = 64;
|
||||
LimitNOFILE = 1048576;
|
||||
PrivateTmp = true;
|
||||
PrivateDevices = true;
|
||||
ProtectHome = true;
|
||||
ProtectSystem = "strict";
|
||||
ProtectKernelTunables = true;
|
||||
ProtectControlGroups = true;
|
||||
ProtectSystem = "full";
|
||||
ReadWritePaths = [ cfg.dataDir ];
|
||||
ReadOnlyPaths = optional (cfg.dynamic.dir != null) cfg.dynamic.dir;
|
||||
RuntimeDirectoryMode = "0700";
|
||||
RuntimeDirectory = "traefik";
|
||||
WorkingDirectory = cfg.dataDir;
|
||||
WatchdogSec = "1s";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.tmpfiles.settings."10-traefik" = mkMerge [
|
||||
(mkIf (cfg.user == "traefik") {
|
||||
${cfg.dataDir}.d = {
|
||||
inherit (cfg) user group;
|
||||
mode = "0700";
|
||||
};
|
||||
})
|
||||
(mkIf (cfg.dynamic.dir != null) (
|
||||
{
|
||||
${cfg.dynamic.dir}.d = {
|
||||
inherit (cfg) user group;
|
||||
mode = "0700";
|
||||
};
|
||||
"${cfg.dynamic.dir}/_nixos-*".r = { };
|
||||
}
|
||||
// (mapAttrs' (
|
||||
name: value:
|
||||
nameValuePair "${cfg.dynamic.dir}/_nixos-${name}.yml" {
|
||||
"L+" = {
|
||||
mode = "0444";
|
||||
argument = toString (format.generate name value.settings);
|
||||
};
|
||||
}
|
||||
) cfg.dynamic.files)
|
||||
))
|
||||
];
|
||||
|
||||
users = {
|
||||
users = optionalAttrs (cfg.user == "traefik") {
|
||||
traefik = {
|
||||
inherit (cfg) group;
|
||||
isSystemUser = true;
|
||||
};
|
||||
};
|
||||
groups = optionalAttrs (cfg.group == "traefik") { traefik = { }; };
|
||||
users.users.traefik = {
|
||||
group = "traefik";
|
||||
home = cfg.dataDir;
|
||||
createHome = true;
|
||||
isSystemUser = true;
|
||||
};
|
||||
|
||||
users.groups.traefik = { };
|
||||
};
|
||||
|
||||
meta.maintainers = with maintainers; [
|
||||
jackr
|
||||
therealgramdalf
|
||||
];
|
||||
}
|
||||
|
||||
@@ -28,18 +28,18 @@
|
||||
|
||||
def open_omnom():
|
||||
# Add-ons Manager
|
||||
server.succeed("xdotool mousemove --sync 960 90 click 1")
|
||||
server.succeed("xdotool mousemove --sync 1221 83 click 1")
|
||||
server.sleep(10)
|
||||
# omnom
|
||||
server.succeed("xdotool mousemove --sync 700 190 click 1")
|
||||
server.succeed("xdotool mousemove --sync 877 184 click 1")
|
||||
server.sleep(10)
|
||||
|
||||
|
||||
service_url = "http://127.0.0.1:${toString port}"
|
||||
service_url = "http://127.0.0.1:${port}/"
|
||||
|
||||
server.start()
|
||||
server.wait_for_unit("omnom.service")
|
||||
server.wait_for_open_port(${toString port})
|
||||
server.wait_for_open_port(${port})
|
||||
server.succeed(f"curl -sf '{service_url}'")
|
||||
|
||||
output = server.succeed("omnom create-user user user@example.com")
|
||||
@@ -59,23 +59,23 @@
|
||||
open_omnom()
|
||||
|
||||
# token
|
||||
server.succeed("xdotool mousemove --sync 700 350 click 1")
|
||||
server.succeed("xdotool mousemove --sync 943 345 click 1")
|
||||
server.succeed(f"xdotool type {token}")
|
||||
server.sleep(10)
|
||||
|
||||
# url
|
||||
server.succeed("xdotool mousemove --sync 700 470 click 1")
|
||||
server.succeed("xdotool mousemove --sync 943 452 click 1")
|
||||
server.succeed(f"xdotool type '{service_url}'")
|
||||
server.sleep(10)
|
||||
|
||||
# submit
|
||||
server.succeed("xdotool mousemove --sync 900 520 click 1")
|
||||
server.succeed("xdotool mousemove --sync 1156 485 click 1")
|
||||
server.sleep(10)
|
||||
|
||||
open_omnom()
|
||||
|
||||
# save
|
||||
server.succeed("xdotool mousemove --sync 900 520 click 1")
|
||||
server.succeed("xdotool mousemove --sync 1151 459 click 1")
|
||||
server.sleep(10)
|
||||
|
||||
# refresh
|
||||
@@ -85,19 +85,19 @@
|
||||
server.screenshot("home.png")
|
||||
|
||||
# view bookmarks
|
||||
server.succeed("xdotool mousemove --sync 300 130 click 1")
|
||||
server.succeed("xdotool mousemove --sync 377 133 click 1")
|
||||
server.sleep(10)
|
||||
|
||||
# view snapshot
|
||||
server.succeed("xdotool mousemove --sync 970 230 click 1")
|
||||
server.succeed("xdotool mousemove --sync 414 307 click 1")
|
||||
server.sleep(10)
|
||||
server.succeed("xdotool mousemove --sync 160 340 click 1")
|
||||
server.succeed("xdotool mousemove --sync 993 510 click 1")
|
||||
server.sleep(10)
|
||||
|
||||
server.screenshot("screenshot.png")
|
||||
|
||||
# view details
|
||||
server.succeed("xdotool mousemove --sync 290 200 click 1")
|
||||
server.succeed("xdotool mousemove --sync 400 230 click 1")
|
||||
server.sleep(10)
|
||||
|
||||
server.screenshot("snapshot_details.png")
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -85,8 +85,9 @@
|
||||
${CMAKE_CACHE_ARGS_EXTRA}
|
||||
BUILD_ALWAYS
|
||||
1
|
||||
- TEST_BEFORE_INSTALL
|
||||
+ TEST_EXCLUDE_FROM_MAIN
|
||||
1
|
||||
+ STEP_TARGETS test
|
||||
TEST_COMMAND
|
||||
ctest # or `ctest -T memcheck`
|
||||
)
|
||||
@@ -102,7 +103,8 @@
|
||||
-DCMAKE_INSTALL_LIBDIR:PATH=${CMAKE_INSTALL_LIBDIR}
|
||||
-DCMAKE_INSTALL_BINDIR:PATH=${CMAKE_INSTALL_BINDIR}
|
||||
-DSTAGED_INSTALL_PREFIX:PATH=${STAGED_INSTALL_PREFIX}
|
||||
- TEST_BEFORE_INSTALL
|
||||
+ TEST_EXCLUDE_FROM_MAIN
|
||||
+ STEP_TARGETS test
|
||||
1
|
||||
INSTALL_COMMAND
|
||||
""
|
||||
@@ -1,110 +1,43 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
ninja,
|
||||
pkg-config,
|
||||
grpc,
|
||||
protobuf,
|
||||
openssl,
|
||||
nlohmann_json,
|
||||
gtest,
|
||||
spdlog,
|
||||
c-ares,
|
||||
zlib,
|
||||
sqlite,
|
||||
re2,
|
||||
lit,
|
||||
python3,
|
||||
coreutils,
|
||||
rustPlatform,
|
||||
installShellFiles,
|
||||
lld,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "bear";
|
||||
version = "3.1.6";
|
||||
version = "4.0.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rizsotto";
|
||||
repo = "bear";
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-fWNMjqF5PCjGfFGReKIUiJ5lv8z6j7HeBn5hvbnV2V4=";
|
||||
hash = "sha256-VZNrWfeeOJ5+qLg6hby4vR5rKKO7+mVOKp2p+lvwGOc=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
cargoHash = "sha256-61hKYDPPQ79QF3BNCLn2LxiCsoll+MGAMZ8obOVuNZI=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
ninja
|
||||
pkg-config
|
||||
grpc
|
||||
protobuf
|
||||
installShellFiles
|
||||
lld
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
grpc
|
||||
protobuf
|
||||
openssl
|
||||
nlohmann_json
|
||||
spdlog
|
||||
c-ares
|
||||
zlib
|
||||
sqlite
|
||||
re2
|
||||
];
|
||||
|
||||
patches = [
|
||||
# This patch is necessary to run tests in a separate phase. By default
|
||||
# test targets are run with ALL, which is not what we want. This patch creates
|
||||
# separate 'test' step targets for each cmake ExternalProject:
|
||||
# - BearTest-test (functional lit tests)
|
||||
# - BearSource-test (unit tests via gtest)
|
||||
./0001-exclude-tests-from-all.patch
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
lit
|
||||
python3
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
gtest
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
# Build system and generated files concatenate install prefix and
|
||||
# CMAKE_INSTALL_{BIN,LIB}DIR, which breaks if these are absolute paths.
|
||||
(lib.cmakeFeature "CMAKE_INSTALL_BINDIR" "bin")
|
||||
(lib.cmakeFeature "CMAKE_INSTALL_LIBDIR" "lib")
|
||||
(lib.cmakeBool "ENABLE_UNIT_TESTS" finalAttrs.finalPackage.doCheck)
|
||||
(lib.cmakeBool "ENABLE_FUNC_TESTS" finalAttrs.finalPackage.doCheck)
|
||||
];
|
||||
|
||||
checkTarget = lib.concatStringsSep " " [
|
||||
"BearTest-test"
|
||||
"BearSource-test"
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
env = {
|
||||
# Disable failing tests. The cause is not immediately clear.
|
||||
LIT_FILTER_OUT = lib.concatStringsSep "|" [
|
||||
"cases/compilation/output/config/filter_compilers.sh"
|
||||
"cases/intercept/preload/posix/execvpe/success_to_resolve.c"
|
||||
"cases/intercept/preload/posix/popen/success.c"
|
||||
"cases/intercept/preload/posix/posix_spawnp/success_to_resolve.c"
|
||||
"cases/intercept/preload/posix/system/success.c"
|
||||
"cases/intercept/preload/shell_commands_intercepted_without_shebang.sh"
|
||||
];
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs test/bin
|
||||
substituteInPlace bear/build.rs \
|
||||
--replace-fail 'const DEFAULT_WRAPPER_PATH: &str = "/usr/local/libexec/bear";' \
|
||||
"const DEFAULT_WRAPPER_PATH: &str = \"$out/libexec/bear\";" \
|
||||
--replace-fail 'const DEFAULT_PRELOAD_PATH: &str = "/usr/local/libexec/bear/$LIB";' \
|
||||
"const DEFAULT_PRELOAD_PATH: &str = \"$out/lib\";"
|
||||
'';
|
||||
|
||||
# /usr/bin/env is used in test commands and embedded scripts.
|
||||
find test -name '*.sh' \
|
||||
-exec sed -i -e 's|/usr/bin/env|${coreutils}/bin/env|g' {} +
|
||||
postInstall = ''
|
||||
# wrapper should not end up on path
|
||||
install -d $out/libexec/bear
|
||||
mv $out/bin/wrapper $out/libexec/bear/wrapper
|
||||
|
||||
installManPage man/bear.1
|
||||
'';
|
||||
|
||||
# Functional tests use loopback networking.
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
From 9acd1ec8e6890c7f5d86a0dd6941ae3b8692ac9c Mon Sep 17 00:00:00 2001
|
||||
From: Lukas Krenz <lkrenz@nvidia.com>
|
||||
Date: Tue, 20 Jan 2026 05:59:00 -0800
|
||||
Subject: [PATCH] Fix memset/memcpy linkage on aarch64
|
||||
|
||||
Otherwise memcpy and memset benchmarks won't compile
|
||||
---
|
||||
folly/CMakeLists.txt | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git a/folly/CMakeLists.txt b/folly/CMakeLists.txt
|
||||
index a1bcbdd6e92..51280821a24 100644
|
||||
--- a/folly/CMakeLists.txt
|
||||
+++ b/folly/CMakeLists.txt
|
||||
@@ -879,6 +879,9 @@ folly_add_library(
|
||||
NAME memset-impl
|
||||
SRCS
|
||||
FollyMemset.cpp
|
||||
+ $<$<BOOL:${IS_AARCH64_ARCH}>:memset_select_aarch64.cpp>
|
||||
+ DEPS
|
||||
+ $<$<BOOL:${IS_AARCH64_ARCH}>:folly_external_aor_memset_aarch64>
|
||||
)
|
||||
|
||||
folly_add_library(
|
||||
@@ -894,12 +897,20 @@ folly_add_library(
|
||||
EXCLUDE_FROM_MONOLITH
|
||||
SRCS
|
||||
FollyMemset.cpp
|
||||
+ $<$<BOOL:${IS_AARCH64_ARCH}>:memset_select_aarch64.cpp>
|
||||
+ DEPS
|
||||
+ $<$<BOOL:${IS_AARCH64_ARCH}>:folly_external_aor_memset_aarch64-use>
|
||||
+ COMPILE_OPTIONS
|
||||
+ $<$<BOOL:${IS_AARCH64_ARCH}>:-DFOLLY_MEMSET_IS_MEMSET>
|
||||
)
|
||||
|
||||
folly_add_library(
|
||||
NAME memcpy-impl
|
||||
SRCS
|
||||
FollyMemcpy.cpp
|
||||
+ $<$<BOOL:${IS_AARCH64_ARCH}>:memcpy_select_aarch64.cpp>
|
||||
+ DEPS
|
||||
+ $<$<BOOL:${IS_AARCH64_ARCH}>:folly_external_aor_memcpy_aarch64>
|
||||
)
|
||||
|
||||
folly_add_library(
|
||||
@@ -915,6 +926,11 @@ folly_add_library(
|
||||
EXCLUDE_FROM_MONOLITH
|
||||
SRCS
|
||||
FollyMemcpy.cpp
|
||||
+ $<$<BOOL:${IS_AARCH64_ARCH}>:memcpy_select_aarch64.cpp>
|
||||
+ DEPS
|
||||
+ $<$<BOOL:${IS_AARCH64_ARCH}>:folly_external_aor_memcpy_aarch64-use>
|
||||
+ COMPILE_OPTIONS
|
||||
+ $<$<BOOL:${IS_AARCH64_ARCH}>:-DFOLLY_MEMCPY_IS_MEMCPY>
|
||||
)
|
||||
|
||||
# x86 assembly memcpy implementation (not supported on MSVC)
|
||||
@@ -139,6 +139,9 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
# <https://github.com/facebook/folly/issues/2171>
|
||||
./folly-fix-glog-0.7.patch
|
||||
|
||||
# https://github.com/facebook/folly/pull/2561
|
||||
./memset-memcpy-aarch64.patch
|
||||
];
|
||||
|
||||
# https://github.com/NixOS/nixpkgs/issues/144170
|
||||
|
||||
@@ -45,13 +45,13 @@
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "hmcl";
|
||||
version = "3.10.2";
|
||||
version = "3.10.3";
|
||||
|
||||
src = fetchurl {
|
||||
# HMCL has built-in keys, such as the Microsoft OAuth secret and the CurseForge API key.
|
||||
# See https://github.com/HMCL-dev/HMCL/blob/refs/tags/release-3.6.12/.github/workflows/gradle.yml#L26-L28
|
||||
url = "https://github.com/HMCL-dev/HMCL/releases/download/v${finalAttrs.version}/HMCL-${finalAttrs.version}.jar";
|
||||
hash = "sha256-tmQN0kSjm8oU36ENHhgA649IohdG4ZDHyEaMPscd3nQ=";
|
||||
hash = "sha256-+xxDACa2ECbWaCUzK0b/rcRS49Hex4GZDcNNK/aEURs=";
|
||||
};
|
||||
|
||||
# - HMCL prompts users to download prebuilt Terracotta binary for
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
lib,
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
mupdf,
|
||||
pkg-config,
|
||||
}:
|
||||
|
||||
buildGoModule (finalAttrs: {
|
||||
pname = "lnreader";
|
||||
version = "1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Yujonpradhananga";
|
||||
repo = "CLI-PDF-EPUB-reader";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-JeVS0wnShlD4+UfnMsuHMYi6R7pse4Gvh0PdREwmG6k=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-66rqTJeV6u4aVciifp41n2onx81w9KE0PGYHlVwsl54=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
mupdf
|
||||
];
|
||||
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Lightweight, fast and responsive terminal PDF/EPUB viewer with image support";
|
||||
homepage = "https://github.com/Yujonpradhananga/CLI-PDF-EPUB-reader";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ yujonpradhananga ];
|
||||
mainProgram = "lnreader";
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
})
|
||||
@@ -13,97 +13,111 @@
|
||||
python3,
|
||||
redis,
|
||||
writeShellScriptBin,
|
||||
nixosTests,
|
||||
nix-update-script,
|
||||
}:
|
||||
|
||||
let
|
||||
dbmate-real = writeShellScriptBin "dbmate.real" ''
|
||||
exec ${dbmate}/bin/dbmate "$@"
|
||||
'';
|
||||
|
||||
dbmate-wrapper = buildGoModule {
|
||||
pname = "ncps-dbmate-wrapper";
|
||||
inherit (finalAttrs) version;
|
||||
|
||||
src = "${finalAttrs.src}/nix/dbmate-wrapper/src";
|
||||
|
||||
vendorHash = null;
|
||||
|
||||
subPackages = [ "." ];
|
||||
};
|
||||
|
||||
finalAttrs = {
|
||||
pname = "ncps";
|
||||
version = "0.8.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "kalbasit";
|
||||
repo = "ncps";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-GJnWVhn8SZY5IJbBSuq1j8qV06/kdHhcVu6QhnTsk0Y=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-AcgC+zTS3eVsbcs0jim4zDBGc3lIjwPbdVT7/KQ9Lkc=";
|
||||
|
||||
ldflags = [
|
||||
"-X github.com/kalbasit/ncps/pkg/ncps.Version=v${finalAttrs.version}"
|
||||
];
|
||||
|
||||
subPackages = [ "." ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
curl # used for checking MinIO health check
|
||||
dbmate # used for testing
|
||||
jq # used for testing by the init-minio
|
||||
mariadb # MySQL/MariaDB for integration tests
|
||||
minio # S3-compatible storage for integration tests
|
||||
minio-client # mc CLI for MinIO setup
|
||||
postgresql # PostgreSQL for integration tests
|
||||
python3 # used for generating the ports
|
||||
redis # Redis for distributed locking integration tests
|
||||
makeWrapper # For wrapping dbmate.
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/share/ncps
|
||||
cp -r db $out/share/ncps/db
|
||||
|
||||
makeWrapper ${dbmate-wrapper}/bin/dbmate-wrapper \
|
||||
$out/bin/dbmate-ncps \
|
||||
--prefix PATH : ${dbmate-real}/bin \
|
||||
--set NCPS_DB_MIGRATIONS_DIR $out/share/ncps/db/migrations
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
checkFlags = [ "-race" ];
|
||||
|
||||
# pre and post checks
|
||||
preCheck = ''
|
||||
# Set up cleanup trap to ensure background processes are killed even if tests fail
|
||||
cleanup() {
|
||||
source $src/nix/packages/ncps/post-check-minio.sh
|
||||
source $src/nix/packages/ncps/post-check-mysql.sh
|
||||
source $src/nix/packages/ncps/post-check-postgres.sh
|
||||
source $src/nix/packages/ncps/post-check-redis.sh
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
source $src/nix/packages/ncps/pre-check-minio.sh
|
||||
source $src/nix/packages/ncps/pre-check-mysql.sh
|
||||
source $src/nix/packages/ncps/pre-check-postgres.sh
|
||||
source $src/nix/packages/ncps/pre-check-redis.sh
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Nix binary cache proxy service";
|
||||
homepage = "https://github.com/kalbasit/ncps";
|
||||
license = lib.licenses.mit;
|
||||
mainProgram = "ncps";
|
||||
maintainers = with lib.maintainers; [
|
||||
kalbasit
|
||||
aciceri
|
||||
];
|
||||
};
|
||||
};
|
||||
in
|
||||
buildGoModule finalAttrs
|
||||
buildGoModule (finalAttrs: {
|
||||
pname = "ncps";
|
||||
version = "0.8.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "kalbasit";
|
||||
repo = "ncps";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-Ep83aGlwf8qq7fmSCCH9zUztlXf4D3vvs9jkBBoN6Yw=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-AcgC+zTS3eVsbcs0jim4zDBGc3lIjwPbdVT7/KQ9Lkc=";
|
||||
|
||||
ldflags = [
|
||||
"-X github.com/kalbasit/ncps/pkg/ncps.Version=v${finalAttrs.version}"
|
||||
];
|
||||
|
||||
subPackages = [ "." ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
curl # used for checking MinIO health check
|
||||
dbmate # used for testing
|
||||
jq # used for testing by the init-minio
|
||||
mariadb # MySQL/MariaDB for integration tests
|
||||
minio # S3-compatible storage for integration tests
|
||||
minio-client # mc CLI for MinIO setup
|
||||
postgresql # PostgreSQL for integration tests
|
||||
python3 # used for generating the ports
|
||||
redis # Redis for distributed locking integration tests
|
||||
makeWrapper # For wrapping dbmate.
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/share/ncps
|
||||
cp -r db $out/share/ncps/db
|
||||
|
||||
makeWrapper ${finalAttrs.passthru.dbmate-wrapper}/bin/dbmate-wrapper \
|
||||
$out/bin/dbmate-ncps \
|
||||
--prefix PATH : ${dbmate-real}/bin \
|
||||
--set NCPS_DB_MIGRATIONS_DIR $out/share/ncps/db/migrations
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
checkFlags = [ "-race" ];
|
||||
|
||||
# pre and post checks
|
||||
preCheck = ''
|
||||
# Set up cleanup trap to ensure background processes are killed even if tests fail
|
||||
cleanup() {
|
||||
source $src/nix/packages/ncps/post-check-minio.sh
|
||||
source $src/nix/packages/ncps/post-check-mysql.sh
|
||||
source $src/nix/packages/ncps/post-check-postgres.sh
|
||||
source $src/nix/packages/ncps/post-check-redis.sh
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
source $src/nix/packages/ncps/pre-check-minio.sh
|
||||
source $src/nix/packages/ncps/pre-check-mysql.sh
|
||||
source $src/nix/packages/ncps/pre-check-postgres.sh
|
||||
source $src/nix/packages/ncps/pre-check-redis.sh
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
dbmate-wrapper = buildGoModule {
|
||||
pname = "ncps-dbmate-wrapper";
|
||||
inherit (finalAttrs) version;
|
||||
|
||||
src = "${finalAttrs.src}/nix/dbmate-wrapper/src";
|
||||
|
||||
vendorHash = null;
|
||||
|
||||
subPackages = [ "." ];
|
||||
};
|
||||
|
||||
tests = {
|
||||
inherit (nixosTests)
|
||||
ncps
|
||||
ncps-custom-sqlite-directory
|
||||
ncps-custom-storage-local
|
||||
ncps-ha-pg
|
||||
ncps-ha-pg-redis
|
||||
;
|
||||
};
|
||||
|
||||
updateScript = nix-update-script { };
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Nix binary cache proxy service";
|
||||
homepage = "https://github.com/kalbasit/ncps";
|
||||
license = lib.licenses.mit;
|
||||
mainProgram = "ncps";
|
||||
maintainers = with lib.maintainers; [
|
||||
kalbasit
|
||||
aciceri
|
||||
];
|
||||
};
|
||||
})
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
ocamlPackages.buildDunePackage (finalAttrs: {
|
||||
pname = "nixtamal";
|
||||
version = "1.0.0";
|
||||
version = "1.1.0";
|
||||
release_year = 2026;
|
||||
|
||||
minimalOCamlVersion = "5.3";
|
||||
@@ -26,7 +26,7 @@ ocamlPackages.buildDunePackage (finalAttrs: {
|
||||
url = "https://darcs.toastal.in.th/nixtamal/stable/";
|
||||
mirrors = [ "https://smeder.ee/~toastal/nixtamal.darcs" ];
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-PJ03psJhRHq0ud/mXuUZSzpQ9RhO3p4s+lrGcHek3Rc=";
|
||||
hash = "sha256-Q8EZ8kOyujMxoRU+G0SpTUhT9xi/5MtWnZmQffZzV7s=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
@@ -13,17 +13,17 @@
|
||||
|
||||
buildGoModule (finalAttrs: {
|
||||
pname = "omnom";
|
||||
version = "0.7.0";
|
||||
version = "0.9.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "asciimoo";
|
||||
repo = "omnom";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-auujlRG3RKJYYTi/iptx0Y3Yzqmt6i9AlfjVcqn5YPc=";
|
||||
hash = "sha256-cG+cAsarbDqi3BLrIiSnH4VQS0fdfyMgkvbQvzKUXNw=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
vendorHash = "sha256-0usbfvGz+9chLGyHHUUStUh7x91ZGfr/+gAXXVA5iNc=";
|
||||
vendorHash = "sha256-meToyr93nmKLZ//h8Gc0rp2hc4vOV9ULU+FbBXmbDv8=";
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
@@ -51,7 +51,7 @@ buildGoModule (finalAttrs: {
|
||||
pname = "omnom-addons";
|
||||
inherit (finalAttrs) version src;
|
||||
|
||||
npmDepsHash = "sha256-sUn5IvcHWJ/yaqeGz9SGvGx9HHAlrcnS0lJxIxUVS6M=";
|
||||
npmDepsHash = "sha256-CIzp6/mBTuSaEFv0lk3d/GZyq1VRDvCSoqrujz4AG/E=";
|
||||
sourceRoot = "${finalAttrs'.src.name}/ext";
|
||||
npmPackFlags = [ "--ignore-scripts" ];
|
||||
|
||||
@@ -85,7 +85,9 @@ buildGoModule (finalAttrs: {
|
||||
|
||||
meta = {
|
||||
description = "Webpage bookmarking and snapshotting service";
|
||||
homepage = "https://github.com/asciimoo/omnom";
|
||||
homepage = "https://omnom.zone/";
|
||||
downloadPage = "https://github.com/asciimoo/omnom";
|
||||
changelog = "https://github.com/asciimoo/omnom/releases/tag/v${finalAttrs.version}";
|
||||
license = lib.licenses.agpl3Only;
|
||||
teams = [ lib.teams.ngi ];
|
||||
mainProgram = "omnom";
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
cmake,
|
||||
makeWrapper,
|
||||
curl,
|
||||
freetype,
|
||||
geos,
|
||||
jsoncpp,
|
||||
libgeotiff,
|
||||
libjpeg,
|
||||
libtiff,
|
||||
proj,
|
||||
sqlite,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "ossim";
|
||||
version = "2.12.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ossimlabs";
|
||||
repo = "ossim";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-nVQN+XnCYpVQSkgKsolqbR3KtPGTkvpym4cDl7IqjUc=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Fixed build error gcc version 15.0.1
|
||||
(fetchpatch {
|
||||
url = "https://github.com/ossimlabs/ossim/commit/13b9fa9ae54f79a7e7728408de6246e00d38f399.patch";
|
||||
hash = "sha256-AKzOT+JurB/54gvzn2a5amw+uIupaNxssnEhc8CSfPM=";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace-fail 'GET_GIT_REVISION()' "" \
|
||||
--replace-fail 'OSSIM_GIT_REVISION_NUMBER "UNKNOWN"' 'OSSIM_GIT_REVISION_NUMBER "${finalAttrs.version}"'
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
curl
|
||||
freetype
|
||||
geos
|
||||
jsoncpp
|
||||
libgeotiff
|
||||
libjpeg
|
||||
libtiff
|
||||
proj
|
||||
sqlite
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeBool "BUILD_OSSIM_TESTS" false)
|
||||
(lib.cmakeFeature "CMAKE_POLICY_VERSION_MINIMUM" "3.10")
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
for binary in $out/bin/ossim-*; do
|
||||
wrapProgram $binary \
|
||||
--prefix LD_LIBRARY_PATH ":" $out/lib
|
||||
done
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Open Source Software Image Map library";
|
||||
homepage = "https://github.com/ossimlabs/ossim";
|
||||
license = lib.licenses.mit;
|
||||
teams = [ lib.teams.geospatial ];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
})
|
||||
@@ -7,16 +7,16 @@
|
||||
|
||||
buildGoModule {
|
||||
pname = "pkgsite";
|
||||
version = "0-unstable-2026-02-06";
|
||||
version = "0-unstable-2026-02-12";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "golang";
|
||||
repo = "pkgsite";
|
||||
rev = "2a8da3345a36148f4dca0cfb2b99cbe84ba9a50b";
|
||||
hash = "sha256-693eUnNtuagCwfXq+FYAVHHHgHDT0CDXu7kaYK2ru9Q=";
|
||||
rev = "ce44214c045bc223217f4e969a2b2d3f249b7c21";
|
||||
hash = "sha256-8GPeedY0CKjJ/HJmRZj91FIVuMPNmEKamWnKV6hFrk8=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-udLOOjBMLZ38jrX/7r+hmiUr/k6gxU0Sypo6S0ezep0=";
|
||||
vendorHash = "sha256-G/XTWobysyzONctabYDIfAQ/zaAA9w2Ky7Hn6cj9l/c=";
|
||||
|
||||
subPackages = [ "cmd/pkgsite" ];
|
||||
|
||||
|
||||
@@ -6,16 +6,16 @@
|
||||
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "smfh";
|
||||
version = "1.3";
|
||||
version = "1.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "feel-co";
|
||||
repo = "smfh";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-Pjq/Q+W0bapu0EDRlDYQxLjKHA0OHdVn7hWfJumjWdM=";
|
||||
hash = "sha256-6zMgOPzBbTSm8jzPqmGcotjvkN3HzxcnMM8pW64JpZQ=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-ULU2fMVTeHvFM374GwZlHO5/a9bcf8AmwbqvXp1YRAk=";
|
||||
cargoHash = "sha256-FVTpH+scBCjgm3sf9sowRCI/X2jCS1wHtLLiOyKAD8U=";
|
||||
|
||||
meta = {
|
||||
description = "Sleek Manifest File Handler";
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
{
|
||||
"aarch64-darwin": {
|
||||
"version": "1.9544.35",
|
||||
"vscodeVersion": "1.106.0",
|
||||
"url": "https://windsurf-stable.codeiumdata.com/darwin-arm64/stable/cb270b70c3a55fd43530de48988912a8d9cccb20/Windsurf-darwin-arm64-1.9544.35.zip",
|
||||
"sha256": "84a0e84b5270e5f258ce968aa6bef1de649d90e35085109adb6aa30173dd74bd"
|
||||
"version": "1.9552.21",
|
||||
"vscodeVersion": "1.107.0",
|
||||
"url": "https://windsurf-stable.codeiumdata.com/darwin-arm64/stable/16cc024632923bc387171d59cf5638057d4c8918/Windsurf-darwin-arm64-1.9552.21.zip",
|
||||
"sha256": "fdc5486c08a2885a5eb1ba7b633c8e95b415af469e1d674cde54b61a377ddee3"
|
||||
},
|
||||
"x86_64-darwin": {
|
||||
"version": "1.9544.35",
|
||||
"vscodeVersion": "1.106.0",
|
||||
"url": "https://windsurf-stable.codeiumdata.com/darwin-x64/stable/cb270b70c3a55fd43530de48988912a8d9cccb20/Windsurf-darwin-x64-1.9544.35.zip",
|
||||
"sha256": "72d94091ea83b0c97ff7d8d372d096e4323c9fdadbd9276b6fc4b3f43d43fc96"
|
||||
"version": "1.9552.21",
|
||||
"vscodeVersion": "1.107.0",
|
||||
"url": "https://windsurf-stable.codeiumdata.com/darwin-x64/stable/16cc024632923bc387171d59cf5638057d4c8918/Windsurf-darwin-x64-1.9552.21.zip",
|
||||
"sha256": "eb59e754d4e8889b03011734485937e188eefe8fc231f1c8c5fc6403dc9a67b9"
|
||||
},
|
||||
"x86_64-linux": {
|
||||
"version": "1.9544.35",
|
||||
"vscodeVersion": "1.106.0",
|
||||
"url": "https://windsurf-stable.codeiumdata.com/linux-x64/stable/cb270b70c3a55fd43530de48988912a8d9cccb20/Windsurf-linux-x64-1.9544.35.tar.gz",
|
||||
"sha256": "8e5a0e41e5caca80072db812b170ad3918923c10c0bdbce1fa851ae403034aa8"
|
||||
"version": "1.9552.21",
|
||||
"vscodeVersion": "1.107.0",
|
||||
"url": "https://windsurf-stable.codeiumdata.com/linux-x64/stable/16cc024632923bc387171d59cf5638057d4c8918/Windsurf-linux-x64-1.9552.21.tar.gz",
|
||||
"sha256": "7aba685f16433b205d3cf11a2b548907c1666d4acbbbedd640dd3a3c77a3520b"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ let
|
||||
;
|
||||
|
||||
# Mark versions older than minSupportedVersion as EOL.
|
||||
minSupportedVersion = "4.18";
|
||||
minSupportedVersion = "4.17";
|
||||
|
||||
scriptDeps =
|
||||
let
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
{
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
ocamlPackages,
|
||||
}:
|
||||
|
||||
ocamlPackages.buildDunePackage {
|
||||
pname = "zipperposition";
|
||||
version = "2.1-unstable-2024-02-08";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sneeuwballen";
|
||||
repo = "zipperposition";
|
||||
rev = "050072e01d8539f9126993482b595e09f921f66a";
|
||||
hash = "sha256-GoZO2hRZgh1qydlR+Uq4TprcPG9s7ge1N0Z2ilQ5x/w=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = with ocamlPackages; [
|
||||
menhir
|
||||
];
|
||||
|
||||
propagatedBuildInputs = with ocamlPackages; [
|
||||
zarith
|
||||
containers
|
||||
containers-data
|
||||
msat
|
||||
iter
|
||||
mtime
|
||||
oseq
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
dune build -p logtk,libzipperposition,zipperposition,zipperposition-tools ''${enableParallelBuilding:+-j $NIX_BUILD_CORES}
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
dune install --prefix $out --libdir $OCAMLFIND_DESTDIR logtk libzipperposition zipperposition zipperposition-tools
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
checkInputs = with ocamlPackages; [
|
||||
alcotest
|
||||
qcheck-core
|
||||
qcheck-alcotest
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
dune runtest -p logtk,libzipperposition,zipperposition,zipperposition-tools ''${enableParallelBuilding:+-j $NIX_BUILD_CORES}
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Superposition prover for full first order logic";
|
||||
homepage = "https://github.com/sneeuwballen/zipperposition";
|
||||
license = lib.licenses.bsd2;
|
||||
maintainers = [ lib.maintainers.DieracDelta ];
|
||||
mainProgram = "zipperposition";
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
||||
@@ -2,7 +2,6 @@
|
||||
lib,
|
||||
buildDunePackage,
|
||||
fetchFromGitHub,
|
||||
ocaml,
|
||||
menhir,
|
||||
ppxlib,
|
||||
ppx_deriving,
|
||||
@@ -12,17 +11,15 @@
|
||||
ounit2,
|
||||
}:
|
||||
|
||||
buildDunePackage rec {
|
||||
buildDunePackage (finalAttrs: {
|
||||
pname = "jingoo";
|
||||
version = "1.4.4";
|
||||
|
||||
minimalOCamlVersion = "4.05";
|
||||
version = "1.5.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tategakibunko";
|
||||
repo = "jingoo";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-qIw69OE7wYyZYKnIc9QrmF8MzY5Fg5pBFyIpexmaYxA=";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-1357XOYZseItCrIm/qNP46aL8tQyX8CFh77CBycL1ew=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ menhir ];
|
||||
@@ -34,7 +31,7 @@ buildDunePackage rec {
|
||||
uucp
|
||||
];
|
||||
checkInputs = [ ounit2 ];
|
||||
doCheck = lib.versionAtLeast ocaml.version "4.08";
|
||||
doCheck = true;
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/tategakibunko/jingoo";
|
||||
@@ -43,4 +40,4 @@ buildDunePackage rec {
|
||||
license = lib.licenses.mit;
|
||||
maintainers = [ lib.maintainers.ericbmerritt ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -28,14 +28,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "aiogram";
|
||||
version = "3.24.0";
|
||||
version = "3.25.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "aiogram";
|
||||
repo = "aiogram";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-8+neei3GXb8vIb7EXUposWFo8oU1PA/zDLmC1drYKAA=";
|
||||
hash = "sha256-HluYC1wkWeh1HI77JV0vtZ5FcL9/mHEz4/D/Cg/eVVw=";
|
||||
};
|
||||
|
||||
build-system = [ hatchling ];
|
||||
|
||||
@@ -35,7 +35,7 @@ let
|
||||
in
|
||||
postgresqlBuildExtension (finalAttrs: {
|
||||
pname = "postgis";
|
||||
version = "3.6.1";
|
||||
version = "3.6.2";
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
@@ -46,7 +46,7 @@ postgresqlBuildExtension (finalAttrs: {
|
||||
owner = "postgis";
|
||||
repo = "postgis";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-WVS2TWKishTnCWJ87Vvdcb0i3VR+g/qSjcTDO1cx1s0=";
|
||||
hash = "sha256-zdwfk2cWUF3l6Rao3kzXdMWFs12F5545Dxkjd/DyPcQ=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
|
||||
Reference in New Issue
Block a user