Merge remote-tracking branch 'origin/master' into staging-next
This commit is contained in:
+2
-1
@@ -261,7 +261,8 @@
|
||||
- any:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- nixos/modules/services/cluster/k3s/**/*
|
||||
- nixos/modules/services/cluster/rancher/default.nix
|
||||
- nixos/modules/services/cluster/rancher/k3s.nix
|
||||
- nixos/tests/k3s/**/*
|
||||
- pkgs/applications/networking/cluster/k3s/**/*
|
||||
|
||||
|
||||
@@ -213,6 +213,8 @@
|
||||
- `boot.enableContainers` is only turned on when a declarative NixOS container is defined in `containers`.
|
||||
If you use the `nixos-container` tool for imperative container management, set `boot.enableContainers = true;` explicitly.
|
||||
|
||||
- `etcd` package was upgraded to 3.6, see [migration notes](https://etcd.io/docs/v3.6/upgrades/upgrade_3_6/) for incompatibilities and upgrade procedure.
|
||||
|
||||
- `services.parsoid` and the `nodePackages.parsoid` package have been removed, as the JavaScript-based version this module uses is not compatible with modern MediaWiki versions.
|
||||
|
||||
- `virtualisation.lxd` has been removed due to lack of Nixpkgs maintenance. Users can migrate to `virtualisation.incus`, a fork of LXD, as a replacement. See [Incus migration documentation](https://linuxcontainers.org/incus/docs/main/howto/server_migrate_lxd/) for migration information.
|
||||
@@ -330,6 +332,8 @@ and [release notes for v18](https://goteleport.com/docs/changelog/#1800-070325).
|
||||
|
||||
- `firezone` has changed how the `Everyone` group behaves. Service Accounts are no longer considered part of `Everyone`.
|
||||
|
||||
- The `file-roller` module has been removed due to not being required for function, file roller itself has also been removed from the `services.desktopManager.gnome` module as it's not part of GNOME core applications.
|
||||
|
||||
- The `boot.readOnlyNixStore` has been removed. Control over bind mount options on `/nix/store` is now offered by the `boot.nixStoreMountOpts` option.
|
||||
|
||||
- Direct use of `pkgs.formats.systemd` has been deprecated, and should now be instantiated with `pkgs.formats.systemd { }` similarly to other items in `pkgs.formats`.
|
||||
@@ -474,6 +478,9 @@ and [release notes for v18](https://goteleport.com/docs/changelog/#1800-070325).
|
||||
|
||||
- `services.matter-server` now hosts a debug dashboard on the configured port. Open the port on the firewall with `services.matter-server.openFirewall`.
|
||||
|
||||
- `services.k3s` now shares most of its code with `services.rke2`. The merge resulted in both modules providing more options, with `services.rke2` receiving the most improvements.
|
||||
Existing configurations for either module should not be affected.
|
||||
|
||||
- The new option [networking.ipips](#opt-networking.ipips) has been added to create IP within IP kind of tunnels (including 4in6, ip6ip6 and ipip).
|
||||
With the existing [networking.sits](#opt-networking.sits) option (6in4), it is now possible to create all combinations of IPv4 and IPv6 encapsulation.
|
||||
|
||||
|
||||
@@ -209,7 +209,6 @@
|
||||
./programs/extra-container.nix
|
||||
./programs/fcast-receiver.nix
|
||||
./programs/feedbackd.nix
|
||||
./programs/file-roller.nix
|
||||
./programs/firefox.nix
|
||||
./programs/firejail.nix
|
||||
./programs/fish.nix
|
||||
@@ -475,7 +474,6 @@
|
||||
./services/cluster/corosync/default.nix
|
||||
./services/cluster/druid/default.nix
|
||||
./services/cluster/hadoop/default.nix
|
||||
./services/cluster/k3s/default.nix
|
||||
./services/cluster/kubernetes/addon-manager.nix
|
||||
./services/cluster/kubernetes/addons/dns.nix
|
||||
./services/cluster/kubernetes/apiserver.nix
|
||||
@@ -488,7 +486,7 @@
|
||||
./services/cluster/kubernetes/scheduler.nix
|
||||
./services/cluster/pacemaker/default.nix
|
||||
./services/cluster/patroni/default.nix
|
||||
./services/cluster/rke2/default.nix
|
||||
./services/cluster/rancher/default.nix
|
||||
./services/cluster/spark/default.nix
|
||||
./services/cluster/temporal/default.nix
|
||||
./services/computing/boinc/client.nix
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
# File Roller.
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.programs.file-roller;
|
||||
|
||||
in
|
||||
{
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
programs.file-roller = {
|
||||
|
||||
enable = lib.mkEnableOption "File Roller, an archive manager for GNOME";
|
||||
|
||||
package = lib.mkPackageOption pkgs "file-roller" { };
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
###### implementation
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
|
||||
services.dbus.packages = [ cfg.package ];
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
@@ -75,6 +75,10 @@ in
|
||||
"programs"
|
||||
"goldwarden"
|
||||
] "'goldwarden' has been removed from nixpkgs.")
|
||||
(mkRemovedOptionModule [
|
||||
"programs"
|
||||
"file-roller"
|
||||
] "Not required for the package to function anymore, use `pkgs.file-roller` instead.")
|
||||
(mkRemovedOptionModule [ "programs" "pantheon-tweaks" ] ''
|
||||
pantheon-tweaks is no longer a switchboard plugin but an independent app,
|
||||
adding the package to environment.systemPackages is sufficient.
|
||||
|
||||
@@ -1,913 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.services.k3s;
|
||||
removeOption =
|
||||
config: instruction:
|
||||
lib.mkRemovedOptionModule (
|
||||
[
|
||||
"services"
|
||||
"k3s"
|
||||
]
|
||||
++ config
|
||||
) instruction;
|
||||
|
||||
manifestDir = "/var/lib/rancher/k3s/server/manifests";
|
||||
chartDir = "/var/lib/rancher/k3s/server/static/charts";
|
||||
imageDir = "/var/lib/rancher/k3s/agent/images";
|
||||
containerdConfigTemplateFile = "/var/lib/rancher/k3s/agent/etc/containerd/config.toml.tmpl";
|
||||
yamlFormat = pkgs.formats.yaml { };
|
||||
yamlDocSeparator = builtins.toFile "yaml-doc-separator" "\n---\n";
|
||||
# Manifests need a valid YAML suffix to be respected by k3s
|
||||
mkManifestTarget =
|
||||
name: if (lib.hasSuffix ".yaml" name || lib.hasSuffix ".yml" name) then name else name + ".yaml";
|
||||
# Produces a list containing all duplicate manifest names
|
||||
duplicateManifests = lib.intersectLists (builtins.attrNames cfg.autoDeployCharts) (
|
||||
builtins.attrNames cfg.manifests
|
||||
);
|
||||
# Produces a list containing all duplicate chart names
|
||||
duplicateCharts = lib.intersectLists (builtins.attrNames cfg.autoDeployCharts) (
|
||||
builtins.attrNames cfg.charts
|
||||
);
|
||||
|
||||
# Converts YAML -> JSON -> Nix
|
||||
fromYaml =
|
||||
path:
|
||||
builtins.fromJSON (
|
||||
builtins.readFile (
|
||||
pkgs.runCommand "${path}-converted.json" { nativeBuildInputs = [ pkgs.yq-go ]; } ''
|
||||
yq --no-colors --output-format json ${path} > $out
|
||||
''
|
||||
)
|
||||
);
|
||||
|
||||
# Replace prefixes and characters that are problematic in file names
|
||||
cleanHelmChartName =
|
||||
name:
|
||||
let
|
||||
woPrefix = lib.removePrefix "https://" (lib.removePrefix "oci://" name);
|
||||
in
|
||||
lib.replaceStrings
|
||||
[
|
||||
"/"
|
||||
":"
|
||||
]
|
||||
[
|
||||
"-"
|
||||
"-"
|
||||
]
|
||||
woPrefix;
|
||||
|
||||
# Fetch a Helm chart from a public registry. This only supports a basic Helm pull.
|
||||
fetchHelm =
|
||||
{
|
||||
name,
|
||||
repo,
|
||||
version,
|
||||
hash ? lib.fakeHash,
|
||||
}:
|
||||
let
|
||||
isOci = lib.hasPrefix "oci://" repo;
|
||||
pullCmd = if isOci then repo else "--repo ${repo} ${name}";
|
||||
name' = if isOci then "${repo}-${version}" else "${repo}-${name}-${version}";
|
||||
in
|
||||
pkgs.runCommand (cleanHelmChartName "${name'}.tgz")
|
||||
{
|
||||
inherit (lib.fetchers.normalizeHash { } { inherit hash; }) outputHash outputHashAlgo;
|
||||
impureEnvVars = lib.fetchers.proxyImpureEnvVars;
|
||||
nativeBuildInputs = with pkgs; [
|
||||
kubernetes-helm
|
||||
cacert
|
||||
# Helm requires HOME to refer to a writable dir
|
||||
writableTmpDirAsHomeHook
|
||||
];
|
||||
}
|
||||
''
|
||||
helm pull ${pullCmd} --version ${version}
|
||||
mv ./*.tgz $out
|
||||
'';
|
||||
|
||||
# Returns the path to a YAML manifest file
|
||||
mkExtraDeployManifest =
|
||||
x:
|
||||
# x is a derivation that provides a YAML file
|
||||
if lib.isDerivation x then
|
||||
x.outPath
|
||||
# x is an attribute set that needs to be converted to a YAML file
|
||||
else if builtins.isAttrs x then
|
||||
(yamlFormat.generate "extra-deploy-chart-manifest" x)
|
||||
# assume x is a path to a YAML file
|
||||
else
|
||||
x;
|
||||
|
||||
# Generate a HelmChart custom resource.
|
||||
mkHelmChartCR =
|
||||
name: value:
|
||||
let
|
||||
chartValues = if (lib.isPath value.values) then fromYaml value.values else value.values;
|
||||
# use JSON for values as it's a subset of YAML and understood by the k3s Helm controller
|
||||
valuesContent = builtins.toJSON chartValues;
|
||||
in
|
||||
# merge with extraFieldDefinitions to allow setting advanced values and overwrite generated
|
||||
# values
|
||||
lib.recursiveUpdate {
|
||||
apiVersion = "helm.cattle.io/v1";
|
||||
kind = "HelmChart";
|
||||
metadata = {
|
||||
inherit name;
|
||||
namespace = "kube-system";
|
||||
};
|
||||
spec = {
|
||||
inherit valuesContent;
|
||||
inherit (value) targetNamespace createNamespace;
|
||||
chart = "https://%{KUBERNETES_API}%/static/charts/${name}.tgz";
|
||||
};
|
||||
} value.extraFieldDefinitions;
|
||||
|
||||
# Generate a HelmChart custom resource together with extraDeploy manifests. This
|
||||
# generates possibly a multi document YAML file that the auto deploy mechanism of k3s
|
||||
# deploys.
|
||||
mkAutoDeployChartManifest = name: value: {
|
||||
# target is the final name of the link created for the manifest file
|
||||
target = mkManifestTarget name;
|
||||
inherit (value) enable package;
|
||||
# source is a store path containing the complete manifest file
|
||||
source = pkgs.concatText "auto-deploy-chart-${name}.yaml" (
|
||||
[
|
||||
(yamlFormat.generate "helm-chart-manifest-${name}.yaml" (mkHelmChartCR name value))
|
||||
]
|
||||
# alternate the YAML doc separator (---) and extraDeploy manifests to create
|
||||
# multi document YAMLs
|
||||
++ (lib.concatMap (x: [
|
||||
yamlDocSeparator
|
||||
(mkExtraDeployManifest x)
|
||||
]) value.extraDeploy)
|
||||
);
|
||||
};
|
||||
|
||||
autoDeployChartsModule = lib.types.submodule (
|
||||
{ config, ... }:
|
||||
{
|
||||
options = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
example = false;
|
||||
description = ''
|
||||
Whether to enable the installation of this Helm chart. Note that setting
|
||||
this option to `false` will not uninstall the chart from the cluster, if
|
||||
it was previously installed. Please use the the `--disable` flag or `.skip`
|
||||
files to delete/disable Helm charts, as mentioned in the
|
||||
[docs](https://docs.k3s.io/installation/packaged-components#disabling-manifests).
|
||||
'';
|
||||
};
|
||||
|
||||
repo = lib.mkOption {
|
||||
type = lib.types.nonEmptyStr;
|
||||
example = "https://kubernetes.github.io/ingress-nginx";
|
||||
description = ''
|
||||
The repo of the Helm chart. Only has an effect if `package` is not set.
|
||||
The Helm chart is fetched during build time and placed as a `.tgz` archive on the
|
||||
filesystem.
|
||||
'';
|
||||
};
|
||||
|
||||
name = lib.mkOption {
|
||||
type = lib.types.nonEmptyStr;
|
||||
example = "ingress-nginx";
|
||||
description = ''
|
||||
The name of the Helm chart. Only has an effect if `package` is not set.
|
||||
The Helm chart is fetched during build time and placed as a `.tgz` archive on the
|
||||
filesystem.
|
||||
'';
|
||||
};
|
||||
|
||||
version = lib.mkOption {
|
||||
type = lib.types.nonEmptyStr;
|
||||
example = "4.7.0";
|
||||
description = ''
|
||||
The version of the Helm chart. Only has an effect if `package` is not set.
|
||||
The Helm chart is fetched during build time and placed as a `.tgz` archive on the
|
||||
filesystem.
|
||||
'';
|
||||
};
|
||||
|
||||
hash = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
example = "sha256-ej+vpPNdiOoXsaj1jyRpWLisJgWo8EqX+Z5VbpSjsPA=";
|
||||
default = "";
|
||||
description = ''
|
||||
The hash of the packaged Helm chart. Only has an effect if `package` is not set.
|
||||
The Helm chart is fetched during build time and placed as a `.tgz` archive on the
|
||||
filesystem.
|
||||
'';
|
||||
};
|
||||
|
||||
package = lib.mkOption {
|
||||
type = with lib.types; either path package;
|
||||
example = lib.literalExpression "../my-helm-chart.tgz";
|
||||
description = ''
|
||||
The packaged Helm chart. Overwrites the options `repo`, `name`, `version`
|
||||
and `hash` in case of conflicts.
|
||||
'';
|
||||
};
|
||||
|
||||
targetNamespace = lib.mkOption {
|
||||
type = lib.types.nonEmptyStr;
|
||||
default = "default";
|
||||
example = "kube-system";
|
||||
description = "The namespace in which the Helm chart gets installed.";
|
||||
};
|
||||
|
||||
createNamespace = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Whether to create the target namespace if not present.";
|
||||
};
|
||||
|
||||
values = lib.mkOption {
|
||||
type = with lib.types; either path attrs;
|
||||
default = { };
|
||||
example = {
|
||||
replicaCount = 3;
|
||||
hostName = "my-host";
|
||||
server = {
|
||||
name = "nginx";
|
||||
port = 80;
|
||||
};
|
||||
};
|
||||
description = ''
|
||||
Override default chart values via Nix expressions. This is equivalent to setting
|
||||
values in a `values.yaml` file.
|
||||
|
||||
WARNING: The values (including secrets!) specified here are exposed unencrypted
|
||||
in the world-readable nix store.
|
||||
'';
|
||||
};
|
||||
|
||||
extraDeploy = lib.mkOption {
|
||||
type = with lib.types; listOf (either path attrs);
|
||||
default = [ ];
|
||||
example = lib.literalExpression ''
|
||||
[
|
||||
../manifests/my-extra-deployment.yaml
|
||||
{
|
||||
apiVersion = "v1";
|
||||
kind = "Service";
|
||||
metadata = {
|
||||
name = "app-service";
|
||||
};
|
||||
spec = {
|
||||
selector = {
|
||||
"app.kubernetes.io/name" = "MyApp";
|
||||
};
|
||||
ports = [
|
||||
{
|
||||
name = "name-of-service-port";
|
||||
protocol = "TCP";
|
||||
port = 80;
|
||||
targetPort = "http-web-svc";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
'';
|
||||
description = "List of extra Kubernetes manifests to deploy with this Helm chart.";
|
||||
};
|
||||
|
||||
extraFieldDefinitions = lib.mkOption {
|
||||
inherit (yamlFormat) type;
|
||||
default = { };
|
||||
example = {
|
||||
spec = {
|
||||
bootstrap = true;
|
||||
helmVersion = "v2";
|
||||
backOffLimit = 3;
|
||||
jobImage = "custom-helm-controller:v0.0.1";
|
||||
};
|
||||
};
|
||||
description = ''
|
||||
Extra HelmChart field definitions that are merged with the rest of the HelmChart
|
||||
custom resource. This can be used to set advanced fields or to overwrite
|
||||
generated fields. See <https://docs.k3s.io/helm#helmchart-field-definitions>
|
||||
for possible fields.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config.package = lib.mkDefault (fetchHelm {
|
||||
inherit (config)
|
||||
repo
|
||||
name
|
||||
version
|
||||
hash
|
||||
;
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
manifestModule = lib.types.submodule (
|
||||
{
|
||||
name,
|
||||
config,
|
||||
options,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "Whether this manifest file should be generated.";
|
||||
};
|
||||
|
||||
target = lib.mkOption {
|
||||
type = lib.types.nonEmptyStr;
|
||||
example = "manifest.yaml";
|
||||
description = ''
|
||||
Name of the symlink (relative to {file}`${manifestDir}`).
|
||||
Defaults to the attribute name.
|
||||
'';
|
||||
};
|
||||
|
||||
content = lib.mkOption {
|
||||
type = with lib.types; nullOr (either attrs (listOf attrs));
|
||||
default = null;
|
||||
description = ''
|
||||
Content of the manifest file. A single attribute set will
|
||||
generate a single document YAML file. A list of attribute sets
|
||||
will generate multiple documents separated by `---` in a single
|
||||
YAML file.
|
||||
'';
|
||||
};
|
||||
|
||||
source = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
example = lib.literalExpression "./manifests/app.yaml";
|
||||
description = ''
|
||||
Path of the source `.yaml` file.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
target = lib.mkDefault (mkManifestTarget name);
|
||||
source = lib.mkIf (config.content != null) (
|
||||
let
|
||||
name' = "k3s-manifest-" + builtins.baseNameOf name;
|
||||
docName = "k3s-manifest-doc-" + builtins.baseNameOf name;
|
||||
mkSource =
|
||||
value:
|
||||
if builtins.isList value then
|
||||
pkgs.concatText name' (
|
||||
lib.concatMap (x: [
|
||||
yamlDocSeparator
|
||||
(yamlFormat.generate docName x)
|
||||
]) value
|
||||
)
|
||||
else
|
||||
yamlFormat.generate name' value;
|
||||
in
|
||||
lib.mkDerivedConfig options.content mkSource
|
||||
);
|
||||
};
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
imports = [ (removeOption [ "docker" ] "k3s docker option is no longer supported.") ];
|
||||
|
||||
# interface
|
||||
options.services.k3s = {
|
||||
enable = lib.mkEnableOption "k3s";
|
||||
|
||||
package = lib.mkPackageOption pkgs "k3s" { };
|
||||
|
||||
role = lib.mkOption {
|
||||
description = ''
|
||||
Whether k3s should run as a server or agent.
|
||||
|
||||
If it's a server:
|
||||
|
||||
- By default it also runs workloads as an agent.
|
||||
- Starts by default as a standalone server using an embedded sqlite datastore.
|
||||
- Configure `clusterInit = true` to switch over to embedded etcd datastore and enable HA mode.
|
||||
- Configure `serverAddr` to join an already-initialized HA cluster.
|
||||
|
||||
If it's an agent:
|
||||
|
||||
- `serverAddr` is required.
|
||||
'';
|
||||
default = "server";
|
||||
type = lib.types.enum [
|
||||
"server"
|
||||
"agent"
|
||||
];
|
||||
};
|
||||
|
||||
serverAddr = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
The k3s server to connect to.
|
||||
|
||||
Servers and agents need to communicate each other. Read
|
||||
[the networking docs](https://rancher.com/docs/k3s/latest/en/installation/installation-requirements/#networking)
|
||||
to know how to configure the firewall.
|
||||
'';
|
||||
example = "https://10.0.0.10:6443";
|
||||
default = "";
|
||||
};
|
||||
|
||||
clusterInit = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Initialize HA cluster using an embedded etcd datastore.
|
||||
|
||||
If this option is `false` and `role` is `server`
|
||||
|
||||
On a server that was using the default embedded sqlite backend,
|
||||
enabling this option will migrate to an embedded etcd DB.
|
||||
|
||||
If an HA cluster using the embedded etcd datastore was already initialized,
|
||||
this option has no effect.
|
||||
|
||||
This option only makes sense in a server that is not connecting to another server.
|
||||
|
||||
If you are configuring an HA cluster with an embedded etcd,
|
||||
the 1st server must have `clusterInit = true`
|
||||
and other servers must connect to it using `serverAddr`.
|
||||
'';
|
||||
};
|
||||
|
||||
token = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
The k3s token to use when connecting to a server.
|
||||
|
||||
WARNING: This option will expose store your token unencrypted world-readable in the nix store.
|
||||
If this is undesired use the tokenFile option instead.
|
||||
'';
|
||||
default = "";
|
||||
};
|
||||
|
||||
tokenFile = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.path;
|
||||
description = "File path containing k3s token to use when connecting to the server.";
|
||||
default = null;
|
||||
};
|
||||
|
||||
extraFlags = lib.mkOption {
|
||||
description = "Extra flags to pass to the k3s command.";
|
||||
type = with lib.types; either str (listOf str);
|
||||
default = [ ];
|
||||
example = [
|
||||
"--disable traefik"
|
||||
"--cluster-cidr 10.24.0.0/16"
|
||||
];
|
||||
};
|
||||
|
||||
disableAgent = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Only run the server. This option only makes sense for a server.";
|
||||
};
|
||||
|
||||
environmentFile = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.path;
|
||||
description = ''
|
||||
File path containing environment variables for configuring the k3s service in the format of an EnvironmentFile. See {manpage}`systemd.exec(5)`.
|
||||
'';
|
||||
default = null;
|
||||
};
|
||||
|
||||
configPath = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.path;
|
||||
default = null;
|
||||
description = "File path containing the k3s YAML config. This is useful when the config is generated (for example on boot).";
|
||||
};
|
||||
|
||||
manifests = lib.mkOption {
|
||||
type = lib.types.attrsOf manifestModule;
|
||||
default = { };
|
||||
example = lib.literalExpression ''
|
||||
{
|
||||
deployment.source = ../manifests/deployment.yaml;
|
||||
my-service = {
|
||||
enable = false;
|
||||
target = "app-service.yaml";
|
||||
content = {
|
||||
apiVersion = "v1";
|
||||
kind = "Service";
|
||||
metadata = {
|
||||
name = "app-service";
|
||||
};
|
||||
spec = {
|
||||
selector = {
|
||||
"app.kubernetes.io/name" = "MyApp";
|
||||
};
|
||||
ports = [
|
||||
{
|
||||
name = "name-of-service-port";
|
||||
protocol = "TCP";
|
||||
port = 80;
|
||||
targetPort = "http-web-svc";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nginx.content = [
|
||||
{
|
||||
apiVersion = "v1";
|
||||
kind = "Pod";
|
||||
metadata = {
|
||||
name = "nginx";
|
||||
labels = {
|
||||
"app.kubernetes.io/name" = "MyApp";
|
||||
};
|
||||
};
|
||||
spec = {
|
||||
containers = [
|
||||
{
|
||||
name = "nginx";
|
||||
image = "nginx:1.14.2";
|
||||
ports = [
|
||||
{
|
||||
containerPort = 80;
|
||||
name = "http-web-svc";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
{
|
||||
apiVersion = "v1";
|
||||
kind = "Service";
|
||||
metadata = {
|
||||
name = "nginx-service";
|
||||
};
|
||||
spec = {
|
||||
selector = {
|
||||
"app.kubernetes.io/name" = "MyApp";
|
||||
};
|
||||
ports = [
|
||||
{
|
||||
name = "name-of-service-port";
|
||||
protocol = "TCP";
|
||||
port = 80;
|
||||
targetPort = "http-web-svc";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
'';
|
||||
description = ''
|
||||
Auto-deploying manifests that are linked to {file}`${manifestDir}` before k3s starts.
|
||||
Note that deleting manifest files will not remove or otherwise modify the resources
|
||||
it created. Please use the the `--disable` flag or `.skip` files to delete/disable AddOns,
|
||||
as mentioned in the [docs](https://docs.k3s.io/installation/packaged-components#disabling-manifests).
|
||||
This option only makes sense on server nodes (`role = server`).
|
||||
Read the [auto-deploying manifests docs](https://docs.k3s.io/installation/packaged-components#auto-deploying-manifests-addons)
|
||||
for further information.
|
||||
'';
|
||||
};
|
||||
|
||||
charts = lib.mkOption {
|
||||
type = with lib.types; attrsOf (either path package);
|
||||
default = { };
|
||||
example = lib.literalExpression ''
|
||||
nginx = ../charts/my-nginx-chart.tgz;
|
||||
redis = ../charts/my-redis-chart.tgz;
|
||||
'';
|
||||
description = ''
|
||||
Packaged Helm charts that are linked to {file}`${chartDir}` before k3s starts.
|
||||
The attribute name will be used as the link target (relative to {file}`${chartDir}`).
|
||||
The specified charts will only be placed on the file system and made available to the
|
||||
Kubernetes APIServer from within the cluster. See the [](#opt-services.k3s.autoDeployCharts)
|
||||
option and the [k3s Helm controller docs](https://docs.k3s.io/helm#using-the-helm-controller)
|
||||
to deploy Helm charts. This option only makes sense on server nodes (`role = server`).
|
||||
'';
|
||||
};
|
||||
|
||||
containerdConfigTemplate = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
default = null;
|
||||
example = lib.literalExpression ''
|
||||
# Base K3s config
|
||||
{{ template "base" . }}
|
||||
|
||||
# Add a custom runtime
|
||||
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes."custom"]
|
||||
runtime_type = "io.containerd.runc.v2"
|
||||
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes."custom".options]
|
||||
BinaryName = "/path/to/custom-container-runtime"
|
||||
'';
|
||||
description = ''
|
||||
Config template for containerd, to be placed at
|
||||
`/var/lib/rancher/k3s/agent/etc/containerd/config.toml.tmpl`.
|
||||
See the K3s docs on [configuring containerd](https://docs.k3s.io/advanced#configuring-containerd).
|
||||
'';
|
||||
};
|
||||
|
||||
images = lib.mkOption {
|
||||
type = with lib.types; listOf package;
|
||||
default = [ ];
|
||||
example = lib.literalExpression ''
|
||||
[
|
||||
(pkgs.dockerTools.pullImage {
|
||||
imageName = "docker.io/bitnami/keycloak";
|
||||
imageDigest = "sha256:714dfadc66a8e3adea6609bda350345bd3711657b7ef3cf2e8015b526bac2d6b";
|
||||
hash = "sha256-IM2BLZ0EdKIZcRWOtuFY9TogZJXCpKtPZnMnPsGlq0Y=";
|
||||
finalImageTag = "21.1.2-debian-11-r0";
|
||||
})
|
||||
|
||||
config.services.k3s.package.airgap-images
|
||||
]
|
||||
'';
|
||||
description = ''
|
||||
List of derivations that provide container images.
|
||||
All images are linked to {file}`${imageDir}` before k3s starts and consequently imported
|
||||
by the k3s agent. Consider importing the k3s airgap images archive of the k3s package in
|
||||
use, if you want to pre-provision this node with all k3s container images. This option
|
||||
only makes sense on nodes with an enabled agent.
|
||||
'';
|
||||
};
|
||||
|
||||
gracefulNodeShutdown = {
|
||||
enable = lib.mkEnableOption ''
|
||||
graceful node shutdowns where the kubelet attempts to detect
|
||||
node system shutdown and terminates pods running on the node. See the
|
||||
[documentation](https://kubernetes.io/docs/concepts/cluster-administration/node-shutdown/#graceful-node-shutdown)
|
||||
for further information.
|
||||
'';
|
||||
|
||||
shutdownGracePeriod = lib.mkOption {
|
||||
type = lib.types.nonEmptyStr;
|
||||
default = "30s";
|
||||
example = "1m30s";
|
||||
description = ''
|
||||
Specifies the total duration that the node should delay the shutdown by. This is the total
|
||||
grace period for pod termination for both regular and critical pods.
|
||||
'';
|
||||
};
|
||||
|
||||
shutdownGracePeriodCriticalPods = lib.mkOption {
|
||||
type = lib.types.nonEmptyStr;
|
||||
default = "10s";
|
||||
example = "15s";
|
||||
description = ''
|
||||
Specifies the duration used to terminate critical pods during a node shutdown. This should be
|
||||
less than `shutdownGracePeriod`.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
extraKubeletConfig = lib.mkOption {
|
||||
type = with lib.types; attrsOf anything;
|
||||
default = { };
|
||||
example = {
|
||||
podsPerCore = 3;
|
||||
memoryThrottlingFactor = 0.69;
|
||||
containerLogMaxSize = "5Mi";
|
||||
};
|
||||
description = ''
|
||||
Extra configuration to add to the kubelet's configuration file. The subset of the kubelet's
|
||||
configuration that can be configured via a file is defined by the
|
||||
[KubeletConfiguration](https://kubernetes.io/docs/reference/config-api/kubelet-config.v1beta1/)
|
||||
struct. See the
|
||||
[documentation](https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/)
|
||||
for further information.
|
||||
'';
|
||||
};
|
||||
|
||||
extraKubeProxyConfig = lib.mkOption {
|
||||
type = with lib.types; attrsOf anything;
|
||||
default = { };
|
||||
example = {
|
||||
mode = "nftables";
|
||||
clientConnection.kubeconfig = "/var/lib/rancher/k3s/agent/kubeproxy.kubeconfig";
|
||||
};
|
||||
description = ''
|
||||
Extra configuration to add to the kube-proxy's configuration file. The subset of the kube-proxy's
|
||||
configuration that can be configured via a file is defined by the
|
||||
[KubeProxyConfiguration](https://kubernetes.io/docs/reference/config-api/kube-proxy-config.v1alpha1/)
|
||||
struct. Note that the kubeconfig param will be override by `clientConnection.kubeconfig`, so you must
|
||||
set the `clientConnection.kubeconfig` if you want to use `extraKubeProxyConfig`.
|
||||
'';
|
||||
};
|
||||
|
||||
autoDeployCharts = lib.mkOption {
|
||||
type = lib.types.attrsOf autoDeployChartsModule;
|
||||
apply = lib.mapAttrs mkAutoDeployChartManifest;
|
||||
default = { };
|
||||
example = lib.literalExpression ''
|
||||
{
|
||||
harbor = {
|
||||
name = "harbor";
|
||||
repo = "https://helm.goharbor.io";
|
||||
version = "1.14.0";
|
||||
hash = "sha256-fMP7q1MIbvzPGS9My91vbQ1d3OJMjwc+o8YE/BXZaYU=";
|
||||
values = {
|
||||
existingSecretAdminPassword = "harbor-admin";
|
||||
expose = {
|
||||
tls = {
|
||||
enabled = true;
|
||||
certSource = "secret";
|
||||
secret.secretName = "my-tls-secret";
|
||||
};
|
||||
ingress = {
|
||||
hosts.core = "example.com";
|
||||
className = "nginx";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
nginx = {
|
||||
repo = "oci://registry-1.docker.io/bitnamicharts/nginx";
|
||||
version = "20.0.0";
|
||||
hash = "sha256-sy+tzB+i9jIl/tqOMzzuhVhTU4EZVsoSBtPznxF/36c=";
|
||||
};
|
||||
custom-chart = {
|
||||
package = ../charts/my-chart.tgz;
|
||||
values = ../values/my-values.yaml;
|
||||
extraFieldDefinitions = {
|
||||
spec.timeout = "60s";
|
||||
};
|
||||
};
|
||||
}
|
||||
'';
|
||||
description = ''
|
||||
Auto deploying Helm charts that are installed by the k3s Helm controller. Avoid to use
|
||||
attribute names that are also used in the [](#opt-services.k3s.manifests) and
|
||||
[](#opt-services.k3s.charts) options. Manifests with the same name will override
|
||||
auto deploying charts with the same name. Similiarly, charts with the same name will
|
||||
overwrite the Helm chart contained in auto deploying charts. This option only makes
|
||||
sense on server nodes (`role = server`). See the
|
||||
[k3s Helm documentation](https://docs.k3s.io/helm) for further information.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
# implementation
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
warnings =
|
||||
(lib.optional (cfg.role != "server" && cfg.manifests != { })
|
||||
"k3s: Auto deploying manifests are only installed on server nodes (role == server), they will be ignored by this node."
|
||||
)
|
||||
++ (lib.optional (cfg.role != "server" && cfg.charts != { })
|
||||
"k3s: Helm charts are only made available to the cluster on server nodes (role == server), they will be ignored by this node."
|
||||
)
|
||||
++ (lib.optional (cfg.role != "server" && cfg.autoDeployCharts != { })
|
||||
"k3s: Auto deploying Helm charts are only installed on server nodes (role == server), they will be ignored by this node."
|
||||
)
|
||||
++ (lib.optional (duplicateManifests != [ ])
|
||||
"k3s: The following auto deploying charts are overriden by manifests of the same name: ${toString duplicateManifests}."
|
||||
)
|
||||
++ (lib.optional (duplicateCharts != [ ])
|
||||
"k3s: The following auto deploying charts are overriden by charts of the same name: ${toString duplicateCharts}."
|
||||
)
|
||||
++ (lib.optional (
|
||||
cfg.disableAgent && cfg.images != [ ]
|
||||
) "k3s: Images are only imported on nodes with an enabled agent, they will be ignored by this node")
|
||||
++ (lib.optional (
|
||||
cfg.role == "agent" && cfg.configPath == null && cfg.serverAddr == ""
|
||||
) "k3s: serverAddr or configPath (with 'server' key) should be set if role is 'agent'")
|
||||
++ (lib.optional
|
||||
(cfg.role == "agent" && cfg.configPath == null && cfg.tokenFile == null && cfg.token == "")
|
||||
"k3s: Token or tokenFile or configPath (with 'token' or 'token-file' keys) should be set if role is 'agent'"
|
||||
);
|
||||
|
||||
assertions = [
|
||||
{
|
||||
assertion = cfg.role == "agent" -> !cfg.disableAgent;
|
||||
message = "k3s: disableAgent must be false if role is 'agent'";
|
||||
}
|
||||
{
|
||||
assertion = cfg.role == "agent" -> !cfg.clusterInit;
|
||||
message = "k3s: clusterInit must be false if role is 'agent'";
|
||||
}
|
||||
];
|
||||
|
||||
environment.systemPackages = [ config.services.k3s.package ];
|
||||
|
||||
# Use systemd-tmpfiles to activate k3s content
|
||||
systemd.tmpfiles.settings."10-k3s" =
|
||||
let
|
||||
# Merge manifest with manifests generated from auto deploying charts, keep only enabled manifests
|
||||
enabledManifests = lib.filterAttrs (_: v: v.enable) (cfg.autoDeployCharts // cfg.manifests);
|
||||
# Merge charts with charts contained in enabled auto deploying charts
|
||||
helmCharts =
|
||||
(lib.concatMapAttrs (n: v: { ${n} = v.package; }) (
|
||||
lib.filterAttrs (_: v: v.enable) cfg.autoDeployCharts
|
||||
))
|
||||
// cfg.charts;
|
||||
# Make a systemd-tmpfiles rule for a manifest
|
||||
mkManifestRule = manifest: {
|
||||
name = "${manifestDir}/${manifest.target}";
|
||||
value = {
|
||||
"L+".argument = "${manifest.source}";
|
||||
};
|
||||
};
|
||||
# Ensure that all chart targets have a .tgz suffix
|
||||
mkChartTarget = name: if (lib.hasSuffix ".tgz" name) then name else name + ".tgz";
|
||||
# Make a systemd-tmpfiles rule for a chart
|
||||
mkChartRule = target: source: {
|
||||
name = "${chartDir}/${mkChartTarget target}";
|
||||
value = {
|
||||
"L+".argument = "${source}";
|
||||
};
|
||||
};
|
||||
# Make a systemd-tmpfiles rule for a container image
|
||||
mkImageRule = image: {
|
||||
name = "${imageDir}/${image.name}";
|
||||
value = {
|
||||
"L+".argument = "${image}";
|
||||
};
|
||||
};
|
||||
in
|
||||
(lib.mapAttrs' (_: v: mkManifestRule v) enabledManifests)
|
||||
// (lib.mapAttrs' (n: v: mkChartRule n v) helmCharts)
|
||||
// (builtins.listToAttrs (map mkImageRule cfg.images))
|
||||
// (lib.optionalAttrs (cfg.containerdConfigTemplate != null) {
|
||||
${containerdConfigTemplateFile} = {
|
||||
"L+".argument = "${pkgs.writeText "config.toml.tmpl" cfg.containerdConfigTemplate}";
|
||||
};
|
||||
});
|
||||
|
||||
systemd.services.k3s =
|
||||
let
|
||||
kubeletParams =
|
||||
(lib.optionalAttrs (cfg.gracefulNodeShutdown.enable) {
|
||||
inherit (cfg.gracefulNodeShutdown) shutdownGracePeriod shutdownGracePeriodCriticalPods;
|
||||
})
|
||||
// cfg.extraKubeletConfig;
|
||||
kubeletConfig = (pkgs.formats.yaml { }).generate "k3s-kubelet-config" (
|
||||
{
|
||||
apiVersion = "kubelet.config.k8s.io/v1beta1";
|
||||
kind = "KubeletConfiguration";
|
||||
}
|
||||
// kubeletParams
|
||||
);
|
||||
|
||||
kubeProxyConfig = (pkgs.formats.yaml { }).generate "k3s-kubeProxy-config" (
|
||||
{
|
||||
apiVersion = "kubeproxy.config.k8s.io/v1alpha1";
|
||||
kind = "KubeProxyConfiguration";
|
||||
}
|
||||
// cfg.extraKubeProxyConfig
|
||||
);
|
||||
in
|
||||
{
|
||||
description = "k3s service";
|
||||
after = [
|
||||
"firewall.service"
|
||||
"network-online.target"
|
||||
];
|
||||
wants = [
|
||||
"firewall.service"
|
||||
"network-online.target"
|
||||
];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = lib.optional config.boot.zfs.enabled config.boot.zfs.package;
|
||||
serviceConfig = {
|
||||
# See: https://github.com/rancher/k3s/blob/dddbd16305284ae4bd14c0aade892412310d7edc/install.sh#L197
|
||||
Type = if cfg.role == "agent" then "exec" else "notify";
|
||||
KillMode = "process";
|
||||
Delegate = "yes";
|
||||
Restart = "always";
|
||||
RestartSec = "5s";
|
||||
LimitNOFILE = 1048576;
|
||||
LimitNPROC = "infinity";
|
||||
LimitCORE = "infinity";
|
||||
TasksMax = "infinity";
|
||||
EnvironmentFile = cfg.environmentFile;
|
||||
ExecStart = lib.concatStringsSep " \\\n " (
|
||||
[ "${cfg.package}/bin/k3s ${cfg.role}" ]
|
||||
++ (lib.optional cfg.clusterInit "--cluster-init")
|
||||
++ (lib.optional cfg.disableAgent "--disable-agent")
|
||||
++ (lib.optional (cfg.serverAddr != "") "--server ${cfg.serverAddr}")
|
||||
++ (lib.optional (cfg.token != "") "--token ${cfg.token}")
|
||||
++ (lib.optional (cfg.tokenFile != null) "--token-file ${cfg.tokenFile}")
|
||||
++ (lib.optional (cfg.configPath != null) "--config ${cfg.configPath}")
|
||||
++ (lib.optional (kubeletParams != { }) "--kubelet-arg=config=${kubeletConfig}")
|
||||
++ (lib.optional (cfg.extraKubeProxyConfig != { }) "--kube-proxy-arg=config=${kubeProxyConfig}")
|
||||
++ (lib.flatten cfg.extraFlags)
|
||||
);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
meta.maintainers = lib.teams.k3s.members;
|
||||
}
|
||||
@@ -0,0 +1,966 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
mkRancherModule =
|
||||
{
|
||||
# name used in paths/bin names/etc, e.g. k3s
|
||||
name,
|
||||
# systemd service name
|
||||
serviceName ? name,
|
||||
# extra flags to pass to the binary before user-defined extraFlags
|
||||
extraBinFlags ? [ ],
|
||||
# generate manifests as JSON rather than YAML, see rke2.nix
|
||||
jsonManifests ? false,
|
||||
|
||||
# which port on the local node hosts content placed in ${staticContentChartDir} on /static/
|
||||
# if null, it's assumed the content can be accessed via https://%{KUBERNETES_API}%/static/
|
||||
staticContentPort ? null,
|
||||
}:
|
||||
let
|
||||
cfg = config.services.${name};
|
||||
|
||||
# Paths defined here are passed to the downstream modules as `paths`
|
||||
manifestDir = "/var/lib/rancher/${name}/server/manifests";
|
||||
imageDir = "/var/lib/rancher/${name}/agent/images";
|
||||
containerdConfigTemplateFile = "/var/lib/rancher/${name}/agent/etc/containerd/config.toml.tmpl";
|
||||
staticContentChartDir = "/var/lib/rancher/${name}/server/static/charts";
|
||||
|
||||
manifestFormat = if jsonManifests then pkgs.formats.json { } else pkgs.formats.yaml { };
|
||||
# Manifests need a valid suffix to be respected
|
||||
mkManifestTarget =
|
||||
name:
|
||||
if (lib.hasSuffix ".yaml" name || lib.hasSuffix ".yml" name || lib.hasSuffix ".json" name) then
|
||||
name
|
||||
else if jsonManifests then
|
||||
name + ".json"
|
||||
else
|
||||
name + ".yaml";
|
||||
# Returns a path to the final manifest file
|
||||
mkManifestSource =
|
||||
name: manifests:
|
||||
manifestFormat.generate name (
|
||||
if builtins.isList manifests then
|
||||
{
|
||||
apiVersion = "v1";
|
||||
kind = "List";
|
||||
items = manifests;
|
||||
}
|
||||
else
|
||||
manifests
|
||||
);
|
||||
|
||||
# Produces a list containing all duplicate manifest names
|
||||
duplicateManifests = lib.intersectLists (builtins.attrNames cfg.autoDeployCharts) (
|
||||
builtins.attrNames cfg.manifests
|
||||
);
|
||||
# Produces a list containing all duplicate chart names
|
||||
duplicateCharts = lib.intersectLists (builtins.attrNames cfg.autoDeployCharts) (
|
||||
builtins.attrNames cfg.charts
|
||||
);
|
||||
|
||||
# Converts YAML -> JSON -> Nix
|
||||
fromYaml =
|
||||
path:
|
||||
builtins.fromJSON (
|
||||
builtins.readFile (
|
||||
pkgs.runCommand "${path}-converted.json" { nativeBuildInputs = [ pkgs.yq-go ]; } ''
|
||||
yq --no-colors --output-format json ${path} > $out
|
||||
''
|
||||
)
|
||||
);
|
||||
|
||||
# Replace prefixes and characters that are problematic in file names
|
||||
cleanHelmChartName =
|
||||
name:
|
||||
let
|
||||
woPrefix = lib.removePrefix "https://" (lib.removePrefix "oci://" name);
|
||||
in
|
||||
lib.replaceStrings
|
||||
[
|
||||
"/"
|
||||
":"
|
||||
]
|
||||
[
|
||||
"-"
|
||||
"-"
|
||||
]
|
||||
woPrefix;
|
||||
|
||||
# Fetch a Helm chart from a public registry. This only supports a basic Helm pull.
|
||||
fetchHelm =
|
||||
{
|
||||
name,
|
||||
repo,
|
||||
version,
|
||||
hash ? lib.fakeHash,
|
||||
}:
|
||||
let
|
||||
isOci = lib.hasPrefix "oci://" repo;
|
||||
pullCmd = if isOci then repo else "--repo ${repo} ${name}";
|
||||
name' = if isOci then "${repo}-${version}" else "${repo}-${name}-${version}";
|
||||
in
|
||||
pkgs.runCommand (cleanHelmChartName "${name'}.tgz")
|
||||
{
|
||||
inherit (lib.fetchers.normalizeHash { } { inherit hash; }) outputHash outputHashAlgo;
|
||||
impureEnvVars = lib.fetchers.proxyImpureEnvVars;
|
||||
nativeBuildInputs = with pkgs; [
|
||||
kubernetes-helm
|
||||
cacert
|
||||
# Helm requires HOME to refer to a writable dir
|
||||
writableTmpDirAsHomeHook
|
||||
];
|
||||
}
|
||||
''
|
||||
helm pull ${pullCmd} --version ${version}
|
||||
mv ./*.tgz $out
|
||||
'';
|
||||
|
||||
# Returns the path to a YAML manifest file
|
||||
mkExtraDeployManifest =
|
||||
x:
|
||||
# x is a derivation that provides a YAML file
|
||||
if lib.isDerivation x then
|
||||
x.outPath
|
||||
# x is an attribute set that needs to be converted to a YAML file
|
||||
else if builtins.isAttrs x then
|
||||
(manifestFormat.generate "extra-deploy-chart-manifest" x)
|
||||
# assume x is a path to a YAML file
|
||||
else
|
||||
x;
|
||||
|
||||
# Generate a HelmChart custom resource.
|
||||
mkHelmChartCR =
|
||||
name: value:
|
||||
let
|
||||
chartValues = if (lib.isPath value.values) then fromYaml value.values else value.values;
|
||||
# use JSON for values as it's a subset of YAML and understood by the rancher Helm controller
|
||||
valuesContent = builtins.toJSON chartValues;
|
||||
in
|
||||
# merge with extraFieldDefinitions to allow setting advanced values and overwrite generated
|
||||
# values
|
||||
lib.recursiveUpdate {
|
||||
apiVersion = "helm.cattle.io/v1";
|
||||
kind = "HelmChart";
|
||||
metadata = {
|
||||
inherit name;
|
||||
namespace = "kube-system";
|
||||
};
|
||||
spec = {
|
||||
inherit valuesContent;
|
||||
inherit (value) targetNamespace createNamespace;
|
||||
chart =
|
||||
if staticContentPort == null then
|
||||
"https://%{KUBERNETES_API}%/static/charts/${name}.tgz"
|
||||
else
|
||||
"https://localhost:${toString staticContentPort}/static/charts/${name}.tgz";
|
||||
bootstrap = staticContentPort != null; # needed for host network access
|
||||
};
|
||||
} value.extraFieldDefinitions;
|
||||
|
||||
# Generate a HelmChart custom resource together with extraDeploy manifests.
|
||||
mkAutoDeployChartManifest = name: value: {
|
||||
# target is the final name of the link created for the manifest file
|
||||
target = mkManifestTarget name;
|
||||
inherit (value) enable package;
|
||||
# source is a store path containing the complete manifest file
|
||||
source = mkManifestSource "auto-deploy-chart-${name}" (
|
||||
lib.singleton (mkHelmChartCR name value)
|
||||
++ builtins.map (x: fromYaml (mkExtraDeployManifest x)) value.extraDeploy
|
||||
);
|
||||
};
|
||||
|
||||
autoDeployChartsModule = lib.types.submodule (
|
||||
{ config, ... }:
|
||||
{
|
||||
options = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
example = false;
|
||||
description = ''
|
||||
Whether to enable the installation of this Helm chart. Note that setting
|
||||
this option to `false` will not uninstall the chart from the cluster, if
|
||||
it was previously installed. Please use the the `--disable` flag or `.skip`
|
||||
files to delete/disable Helm charts, as mentioned in the
|
||||
[docs](https://docs.k3s.io/installation/packaged-components#disabling-manifests).
|
||||
'';
|
||||
};
|
||||
|
||||
repo = lib.mkOption {
|
||||
type = lib.types.nonEmptyStr;
|
||||
example = "https://kubernetes.github.io/ingress-nginx";
|
||||
description = ''
|
||||
The repo of the Helm chart. Only has an effect if `package` is not set.
|
||||
The Helm chart is fetched during build time and placed as a `.tgz` archive on the
|
||||
filesystem.
|
||||
'';
|
||||
};
|
||||
|
||||
name = lib.mkOption {
|
||||
type = lib.types.nonEmptyStr;
|
||||
example = "ingress-nginx";
|
||||
description = ''
|
||||
The name of the Helm chart. Only has an effect if `package` is not set.
|
||||
The Helm chart is fetched during build time and placed as a `.tgz` archive on the
|
||||
filesystem.
|
||||
'';
|
||||
};
|
||||
|
||||
version = lib.mkOption {
|
||||
type = lib.types.nonEmptyStr;
|
||||
example = "4.7.0";
|
||||
description = ''
|
||||
The version of the Helm chart. Only has an effect if `package` is not set.
|
||||
The Helm chart is fetched during build time and placed as a `.tgz` archive on the
|
||||
filesystem.
|
||||
'';
|
||||
};
|
||||
|
||||
hash = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
example = "sha256-ej+vpPNdiOoXsaj1jyRpWLisJgWo8EqX+Z5VbpSjsPA=";
|
||||
default = "";
|
||||
description = ''
|
||||
The hash of the packaged Helm chart. Only has an effect if `package` is not set.
|
||||
The Helm chart is fetched during build time and placed as a `.tgz` archive on the
|
||||
filesystem.
|
||||
'';
|
||||
};
|
||||
|
||||
package = lib.mkOption {
|
||||
type = with lib.types; either path package;
|
||||
example = lib.literalExpression "../my-helm-chart.tgz";
|
||||
description = ''
|
||||
The packaged Helm chart. Overwrites the options `repo`, `name`, `version`
|
||||
and `hash` in case of conflicts.
|
||||
'';
|
||||
};
|
||||
|
||||
targetNamespace = lib.mkOption {
|
||||
type = lib.types.nonEmptyStr;
|
||||
default = "default";
|
||||
example = "kube-system";
|
||||
description = "The namespace in which the Helm chart gets installed.";
|
||||
};
|
||||
|
||||
createNamespace = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Whether to create the target namespace if not present.";
|
||||
};
|
||||
|
||||
values = lib.mkOption {
|
||||
type = with lib.types; either path attrs;
|
||||
default = { };
|
||||
example = {
|
||||
replicaCount = 3;
|
||||
hostName = "my-host";
|
||||
server = {
|
||||
name = "nginx";
|
||||
port = 80;
|
||||
};
|
||||
};
|
||||
description = ''
|
||||
Override default chart values via Nix expressions. This is equivalent to setting
|
||||
values in a `values.yaml` file.
|
||||
|
||||
**WARNING**: The values (including secrets!) specified here are exposed unencrypted
|
||||
in the world-readable nix store.
|
||||
'';
|
||||
};
|
||||
|
||||
extraDeploy = lib.mkOption {
|
||||
type = with lib.types; listOf (either path attrs);
|
||||
default = [ ];
|
||||
example = lib.literalExpression ''
|
||||
[
|
||||
../manifests/my-extra-deployment.yaml
|
||||
{
|
||||
apiVersion = "v1";
|
||||
kind = "Service";
|
||||
metadata = {
|
||||
name = "app-service";
|
||||
};
|
||||
spec = {
|
||||
selector = {
|
||||
"app.kubernetes.io/name" = "MyApp";
|
||||
};
|
||||
ports = [
|
||||
{
|
||||
name = "name-of-service-port";
|
||||
protocol = "TCP";
|
||||
port = 80;
|
||||
targetPort = "http-web-svc";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
'';
|
||||
description = "List of extra Kubernetes manifests to deploy with this Helm chart.";
|
||||
};
|
||||
|
||||
extraFieldDefinitions = lib.mkOption {
|
||||
inherit (manifestFormat) type;
|
||||
default = { };
|
||||
example = {
|
||||
spec = {
|
||||
bootstrap = true;
|
||||
helmVersion = "v2";
|
||||
backOffLimit = 3;
|
||||
jobImage = "custom-helm-controller:v0.0.1";
|
||||
};
|
||||
};
|
||||
description = ''
|
||||
Extra HelmChart field definitions that are merged with the rest of the HelmChart
|
||||
custom resource. This can be used to set advanced fields or to overwrite
|
||||
generated fields. See <https://docs.${name}.io/helm#helmchart-field-definitions>
|
||||
for possible fields.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config.package = lib.mkDefault (fetchHelm {
|
||||
inherit (config)
|
||||
repo
|
||||
name
|
||||
version
|
||||
hash
|
||||
;
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
manifestModule = lib.types.submodule (
|
||||
{
|
||||
name,
|
||||
config,
|
||||
options,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "Whether this manifest file should be generated.";
|
||||
};
|
||||
|
||||
target = lib.mkOption {
|
||||
type = lib.types.nonEmptyStr;
|
||||
example = "manifest.yaml";
|
||||
description = ''
|
||||
Name of the symlink (relative to {file}`${manifestDir}`).
|
||||
Defaults to the attribute name.
|
||||
'';
|
||||
};
|
||||
|
||||
content = lib.mkOption {
|
||||
type = with lib.types; nullOr (either attrs (listOf attrs));
|
||||
default = null;
|
||||
description = ''
|
||||
Content of the manifest file. A single attribute set will
|
||||
generate a single document YAML file. A list of attribute sets
|
||||
will generate multiple documents separated by `---` in a single
|
||||
YAML file.
|
||||
'';
|
||||
};
|
||||
|
||||
source = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
example = lib.literalExpression "./manifests/app.yaml";
|
||||
description = ''
|
||||
Path of the source `.yaml` file.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
target = lib.mkDefault (mkManifestTarget name);
|
||||
source = lib.mkIf (config.content != null) (
|
||||
let
|
||||
name' = "${name}-manifest-" + builtins.baseNameOf name;
|
||||
mkSource = mkManifestSource name';
|
||||
in
|
||||
lib.mkDerivedConfig options.content mkSource
|
||||
);
|
||||
};
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
paths = {
|
||||
inherit
|
||||
manifestDir
|
||||
imageDir
|
||||
containerdConfigTemplateFile
|
||||
staticContentChartDir
|
||||
;
|
||||
};
|
||||
|
||||
# interface
|
||||
|
||||
options = {
|
||||
enable = lib.mkEnableOption name;
|
||||
|
||||
package = lib.mkPackageOption pkgs name { };
|
||||
|
||||
role = lib.mkOption {
|
||||
description = "Whether ${name} should run as a server or agent.";
|
||||
default = "server";
|
||||
type = lib.types.enum [
|
||||
"server"
|
||||
"agent"
|
||||
];
|
||||
};
|
||||
|
||||
serverAddr = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "The ${name} server to connect to, used to join a cluster.";
|
||||
example = "https://10.0.0.10:6443";
|
||||
default = "";
|
||||
};
|
||||
|
||||
token = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
The ${name} token to use when connecting to a server.
|
||||
|
||||
**WARNING**: This option will expose your token unencrypted in the world-readable nix store.
|
||||
If this is undesired use the tokenFile option instead.
|
||||
'';
|
||||
default = "";
|
||||
};
|
||||
|
||||
tokenFile = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.path;
|
||||
description = "File path containing the ${name} token to use when connecting to a server.";
|
||||
default = null;
|
||||
};
|
||||
|
||||
agentToken = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
The ${name} token agents can use to connect to the server.
|
||||
This option only makes sense on server nodes (`role = server`).
|
||||
|
||||
**WARNING**: This option will expose your token unencrypted in the world-readable nix store.
|
||||
If this is undesired use the tokenFile option instead.
|
||||
'';
|
||||
default = "";
|
||||
};
|
||||
|
||||
agentTokenFile = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.path;
|
||||
description = ''
|
||||
File path containing the ${name} token agents can use to connect to the server.
|
||||
This option only makes sense on server nodes (`role = server`).
|
||||
'';
|
||||
default = null;
|
||||
};
|
||||
|
||||
extraFlags = lib.mkOption {
|
||||
description = "Extra flags to pass to the ${name} command.";
|
||||
type = with lib.types; either str (listOf str);
|
||||
default = [ ];
|
||||
example = [
|
||||
"--etcd-expose-metrics"
|
||||
"--cluster-cidr 10.24.0.0/16"
|
||||
];
|
||||
};
|
||||
|
||||
environmentFile = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.path;
|
||||
description = ''
|
||||
File path containing environment variables for configuring the ${name} service in the format of an EnvironmentFile. See {manpage}`systemd.exec(5)`.
|
||||
'';
|
||||
default = null;
|
||||
};
|
||||
|
||||
configPath = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.path;
|
||||
default = null;
|
||||
description = "File path containing the ${name} YAML config. This is useful when the config is generated (for example on boot).";
|
||||
};
|
||||
|
||||
disable = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
description = "Disable default components via the `--disable` flag.";
|
||||
default = [ ];
|
||||
};
|
||||
|
||||
nodeName = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
description = "Node name.";
|
||||
default = null;
|
||||
};
|
||||
|
||||
nodeLabel = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
description = "Registering and starting kubelet with set of labels.";
|
||||
default = [ ];
|
||||
};
|
||||
|
||||
nodeTaint = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
description = "Registering kubelet with set of taints.";
|
||||
default = [ ];
|
||||
};
|
||||
|
||||
nodeIP = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
description = "IPv4/IPv6 addresses to advertise for node.";
|
||||
default = null;
|
||||
};
|
||||
|
||||
selinux = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
description = "Enable SELinux in containerd.";
|
||||
default = false;
|
||||
};
|
||||
|
||||
manifests = lib.mkOption {
|
||||
type = lib.types.attrsOf manifestModule;
|
||||
default = { };
|
||||
example = lib.literalExpression ''
|
||||
{
|
||||
deployment.source = ../manifests/deployment.yaml;
|
||||
my-service = {
|
||||
enable = false;
|
||||
target = "app-service.yaml";
|
||||
content = {
|
||||
apiVersion = "v1";
|
||||
kind = "Service";
|
||||
metadata = {
|
||||
name = "app-service";
|
||||
};
|
||||
spec = {
|
||||
selector = {
|
||||
"app.kubernetes.io/name" = "MyApp";
|
||||
};
|
||||
ports = [
|
||||
{
|
||||
name = "name-of-service-port";
|
||||
protocol = "TCP";
|
||||
port = 80;
|
||||
targetPort = "http-web-svc";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nginx.content = [
|
||||
{
|
||||
apiVersion = "v1";
|
||||
kind = "Pod";
|
||||
metadata = {
|
||||
name = "nginx";
|
||||
labels = {
|
||||
"app.kubernetes.io/name" = "MyApp";
|
||||
};
|
||||
};
|
||||
spec = {
|
||||
containers = [
|
||||
{
|
||||
name = "nginx";
|
||||
image = "nginx:1.14.2";
|
||||
ports = [
|
||||
{
|
||||
containerPort = 80;
|
||||
name = "http-web-svc";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
{
|
||||
apiVersion = "v1";
|
||||
kind = "Service";
|
||||
metadata = {
|
||||
name = "nginx-service";
|
||||
};
|
||||
spec = {
|
||||
selector = {
|
||||
"app.kubernetes.io/name" = "MyApp";
|
||||
};
|
||||
ports = [
|
||||
{
|
||||
name = "name-of-service-port";
|
||||
protocol = "TCP";
|
||||
port = 80;
|
||||
targetPort = "http-web-svc";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
'';
|
||||
description = ''
|
||||
Auto-deploying manifests that are linked to {file}`${manifestDir}` before ${name} starts.
|
||||
Note that deleting manifest files will not remove or otherwise modify the resources
|
||||
it created. Please use the the `--disable` flag or `.skip` files to delete/disable AddOns,
|
||||
as mentioned in the [docs](https://docs.k3s.io/installation/packaged-components#disabling-manifests).
|
||||
This option only makes sense on server nodes (`role = server`).
|
||||
Read the [auto-deploying manifests docs](https://docs.k3s.io/installation/packaged-components#auto-deploying-manifests-addons)
|
||||
for further information.
|
||||
|
||||
**WARNING**: If you have multiple server nodes, and set this option on more than one server,
|
||||
it is your responsibility to ensure that files stay in sync across those nodes. AddOn content is
|
||||
not synced between nodes, and ${name} cannot guarantee correct behavior if different servers attempt
|
||||
to deploy conflicting manifests.
|
||||
'';
|
||||
};
|
||||
|
||||
containerdConfigTemplate = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
default = null;
|
||||
example = lib.literalExpression ''
|
||||
# Base config
|
||||
{{ template "base" . }}
|
||||
|
||||
# Add a custom runtime
|
||||
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes."custom"]
|
||||
runtime_type = "io.containerd.runc.v2"
|
||||
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes."custom".options]
|
||||
BinaryName = "/path/to/custom-container-runtime"
|
||||
'';
|
||||
description = ''
|
||||
Config template for containerd, to be placed at
|
||||
`/var/lib/rancher/${name}/agent/etc/containerd/config.toml.tmpl`.
|
||||
See the docs on [configuring containerd](https://docs.${name}.io/advanced#configuring-containerd).
|
||||
'';
|
||||
};
|
||||
|
||||
images = lib.mkOption {
|
||||
type = with lib.types; listOf package;
|
||||
default = [ ];
|
||||
example = lib.literalExpression ''
|
||||
[
|
||||
(pkgs.dockerTools.pullImage {
|
||||
imageName = "docker.io/bitnami/keycloak";
|
||||
imageDigest = "sha256:714dfadc66a8e3adea6609bda350345bd3711657b7ef3cf2e8015b526bac2d6b";
|
||||
hash = "sha256-IM2BLZ0EdKIZcRWOtuFY9TogZJXCpKtPZnMnPsGlq0Y=";
|
||||
finalImageTag = "21.1.2-debian-11-r0";
|
||||
})
|
||||
]
|
||||
'';
|
||||
description = ''
|
||||
List of derivations that provide container images.
|
||||
All images are linked to {file}`${imageDir}` before ${name} starts and are consequently imported
|
||||
by the ${name} agent. This option only makes sense on nodes with an enabled agent.
|
||||
'';
|
||||
};
|
||||
|
||||
gracefulNodeShutdown = {
|
||||
enable = lib.mkEnableOption ''
|
||||
graceful node shutdowns where the kubelet attempts to detect
|
||||
node system shutdown and terminates pods running on the node. See the
|
||||
[documentation](https://kubernetes.io/docs/concepts/cluster-administration/node-shutdown/#graceful-node-shutdown)
|
||||
for further information.
|
||||
'';
|
||||
|
||||
shutdownGracePeriod = lib.mkOption {
|
||||
type = lib.types.nonEmptyStr;
|
||||
default = "30s";
|
||||
example = "1m30s";
|
||||
description = ''
|
||||
Specifies the total duration that the node should delay the shutdown by. This is the total
|
||||
grace period for pod termination for both regular and critical pods.
|
||||
'';
|
||||
};
|
||||
|
||||
shutdownGracePeriodCriticalPods = lib.mkOption {
|
||||
type = lib.types.nonEmptyStr;
|
||||
default = "10s";
|
||||
example = "15s";
|
||||
description = ''
|
||||
Specifies the duration used to terminate critical pods during a node shutdown. This should be
|
||||
less than `shutdownGracePeriod`.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
extraKubeletConfig = lib.mkOption {
|
||||
type = with lib.types; attrsOf anything;
|
||||
default = { };
|
||||
example = {
|
||||
podsPerCore = 3;
|
||||
memoryThrottlingFactor = 0.69;
|
||||
containerLogMaxSize = "5Mi";
|
||||
};
|
||||
description = ''
|
||||
Extra configuration to add to the kubelet's configuration file. The subset of the kubelet's
|
||||
configuration that can be configured via a file is defined by the
|
||||
[KubeletConfiguration](https://kubernetes.io/docs/reference/config-api/kubelet-config.v1beta1/)
|
||||
struct. See the
|
||||
[documentation](https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/)
|
||||
for further information.
|
||||
'';
|
||||
};
|
||||
|
||||
extraKubeProxyConfig = lib.mkOption {
|
||||
type = with lib.types; attrsOf anything;
|
||||
default = { };
|
||||
example = {
|
||||
mode = "nftables";
|
||||
clientConnection.kubeconfig = "/var/lib/rancher/${name}/agent/kubeproxy.kubeconfig";
|
||||
};
|
||||
description = ''
|
||||
Extra configuration to add to the kube-proxy's configuration file. The subset of the kube-proxy's
|
||||
configuration that can be configured via a file is defined by the
|
||||
[KubeProxyConfiguration](https://kubernetes.io/docs/reference/config-api/kube-proxy-config.v1alpha1/)
|
||||
struct. Note that the kubeconfig param will be overriden by `clientConnection.kubeconfig`, so you must
|
||||
set the `clientConnection.kubeconfig` option if you want to use `extraKubeProxyConfig`.
|
||||
'';
|
||||
};
|
||||
|
||||
autoDeployCharts = lib.mkOption {
|
||||
type = lib.types.attrsOf autoDeployChartsModule;
|
||||
apply = lib.mapAttrs mkAutoDeployChartManifest;
|
||||
default = { };
|
||||
example = lib.literalExpression ''
|
||||
{
|
||||
harbor = {
|
||||
name = "harbor";
|
||||
repo = "https://helm.goharbor.io";
|
||||
version = "1.14.0";
|
||||
hash = "sha256-fMP7q1MIbvzPGS9My91vbQ1d3OJMjwc+o8YE/BXZaYU=";
|
||||
values = {
|
||||
existingSecretAdminPassword = "harbor-admin";
|
||||
expose = {
|
||||
tls = {
|
||||
enabled = true;
|
||||
certSource = "secret";
|
||||
secret.secretName = "my-tls-secret";
|
||||
};
|
||||
ingress = {
|
||||
hosts.core = "example.com";
|
||||
className = "nginx";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
nginx = {
|
||||
repo = "oci://registry-1.docker.io/bitnamicharts/nginx";
|
||||
version = "20.0.0";
|
||||
hash = "sha256-sy+tzB+i9jIl/tqOMzzuhVhTU4EZVsoSBtPznxF/36c=";
|
||||
};
|
||||
custom-chart = {
|
||||
package = ../charts/my-chart.tgz;
|
||||
values = ../values/my-values.yaml;
|
||||
extraFieldDefinitions = {
|
||||
spec.timeout = "60s";
|
||||
};
|
||||
};
|
||||
}
|
||||
'';
|
||||
description = ''
|
||||
Auto deploying Helm charts that are installed by the ${name} Helm controller. Avoid using
|
||||
attribute names that are also used in the [](#opt-services.${name}.manifests) and
|
||||
[](#opt-services.${name}.charts) options. Manifests with the same name will override
|
||||
auto deploying charts with the same name.
|
||||
This option only makes sense on server nodes (`role = server`). See the
|
||||
[${name} Helm documentation](https://docs.${name}.io/helm) for further information.
|
||||
|
||||
**WARNING**: If you have multiple server nodes, and set this option on more than one server,
|
||||
it is your responsibility to ensure that files stay in sync across those nodes. AddOn content is
|
||||
not synced between nodes, and ${name} cannot guarantee correct behavior if different servers attempt
|
||||
to deploy conflicting manifests.
|
||||
'';
|
||||
};
|
||||
|
||||
charts = lib.mkOption {
|
||||
type = with lib.types; attrsOf (either path package);
|
||||
default = { };
|
||||
example = lib.literalExpression ''
|
||||
nginx = ../charts/my-nginx-chart.tgz;
|
||||
redis = ../charts/my-redis-chart.tgz;
|
||||
'';
|
||||
description = ''
|
||||
Packaged Helm charts that are linked to {file}`${staticContentChartDir}` before ${name} starts.
|
||||
The attribute name will be used as the link target (relative to {file}`${staticContentChartDir}`).
|
||||
The specified charts will only be placed on the file system and made available via ${
|
||||
if staticContentPort == null then
|
||||
"the Kubernetes APIServer from within the cluster"
|
||||
else
|
||||
"port ${toString staticContentPort} on server nodes"
|
||||
}. See the [](#opt-services.${name}.autoDeployCharts) option and the
|
||||
[${name} Helm controller docs](https://docs.${name}.io/helm#using-the-helm-controller)
|
||||
to deploy Helm charts. This option only makes sense on server nodes (`role = server`).
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
# implementation
|
||||
|
||||
config = {
|
||||
warnings =
|
||||
(lib.optional (cfg.role != "server" && cfg.manifests != { })
|
||||
"${name}: Auto deploying manifests are only installed on server nodes (role == server), they will be ignored by this node."
|
||||
)
|
||||
++ (lib.optional (cfg.role != "server" && cfg.autoDeployCharts != { })
|
||||
"${name}: Auto deploying Helm charts are only installed on server nodes (role == server), they will be ignored by this node."
|
||||
)
|
||||
++ (lib.optional (duplicateManifests != [ ])
|
||||
"${name}: The following auto deploying charts are overriden by manifests of the same name: ${toString duplicateManifests}."
|
||||
)
|
||||
++ (lib.optional (duplicateCharts != [ ])
|
||||
"${name}: The following auto deploying charts are overriden by charts of the same name: ${toString duplicateCharts}."
|
||||
)
|
||||
++ (lib.optional (cfg.role != "server" && cfg.charts != { })
|
||||
"${name}: Helm charts are only made available to the cluster on server nodes (role == server), they will be ignored by this node."
|
||||
)
|
||||
++ (lib.optional (
|
||||
cfg.role == "agent" && cfg.configPath == null && cfg.serverAddr == ""
|
||||
) "${name}: serverAddr or configPath (with 'server' key) should be set if role is 'agent'")
|
||||
++ (lib.optional
|
||||
(cfg.role == "agent" && cfg.configPath == null && cfg.tokenFile == null && cfg.token == "")
|
||||
"${name}: token, tokenFile or configPath (with 'token' or 'token-file' keys) should be set if role is 'agent'"
|
||||
)
|
||||
++ (lib.optional (
|
||||
cfg.role == "agent" && !(cfg.agentTokenFile != null || cfg.agentToken != "")
|
||||
) "${name}: agentToken and agentToken should not be set if role is 'agent'");
|
||||
|
||||
environment.systemPackages = [ config.services.${name}.package ];
|
||||
|
||||
# Use systemd-tmpfiles to activate content
|
||||
systemd.tmpfiles.settings."10-${name}" =
|
||||
let
|
||||
# Merge manifest with manifests generated from auto deploying charts, keep only enabled manifests
|
||||
enabledManifests = lib.filterAttrs (_: v: v.enable) (cfg.autoDeployCharts // cfg.manifests);
|
||||
# Make a systemd-tmpfiles rule for a manifest
|
||||
mkManifestRule = manifest: {
|
||||
name = "${manifestDir}/${manifest.target}";
|
||||
value = {
|
||||
"L+".argument = "${manifest.source}";
|
||||
};
|
||||
};
|
||||
# Make a systemd-tmpfiles rule for a container image
|
||||
mkImageRule = image: {
|
||||
name = "${imageDir}/${image.name}";
|
||||
value = {
|
||||
"L+".argument = "${image}";
|
||||
};
|
||||
};
|
||||
# Merge charts with charts contained in enabled auto deploying charts
|
||||
helmCharts =
|
||||
(lib.concatMapAttrs (n: v: { ${n} = v.package; }) (
|
||||
lib.filterAttrs (_: v: v.enable) cfg.autoDeployCharts
|
||||
))
|
||||
// cfg.charts;
|
||||
# Ensure that all chart targets have a .tgz suffix
|
||||
mkChartTarget = name: if (lib.hasSuffix ".tgz" name) then name else name + ".tgz";
|
||||
# Make a systemd-tmpfiles rule for a chart
|
||||
mkChartRule = target: source: {
|
||||
name = "${staticContentChartDir}/${mkChartTarget target}";
|
||||
value = {
|
||||
"L+".argument = "${source}";
|
||||
};
|
||||
};
|
||||
in
|
||||
(lib.mapAttrs' (_: v: mkManifestRule v) enabledManifests)
|
||||
// (builtins.listToAttrs (map mkImageRule cfg.images))
|
||||
// (lib.optionalAttrs (cfg.containerdConfigTemplate != null) {
|
||||
${containerdConfigTemplateFile} = {
|
||||
"L+".argument = "${pkgs.writeText "config.toml.tmpl" cfg.containerdConfigTemplate}";
|
||||
};
|
||||
})
|
||||
// (lib.mapAttrs' mkChartRule helmCharts);
|
||||
|
||||
systemd.services.${serviceName} =
|
||||
let
|
||||
kubeletParams =
|
||||
(lib.optionalAttrs (cfg.gracefulNodeShutdown.enable) {
|
||||
inherit (cfg.gracefulNodeShutdown) shutdownGracePeriod shutdownGracePeriodCriticalPods;
|
||||
})
|
||||
// cfg.extraKubeletConfig;
|
||||
kubeletConfig = manifestFormat.generate "${name}-kubelet-config" (
|
||||
{
|
||||
apiVersion = "kubelet.config.k8s.io/v1beta1";
|
||||
kind = "KubeletConfiguration";
|
||||
}
|
||||
// kubeletParams
|
||||
);
|
||||
|
||||
kubeProxyConfig = manifestFormat.generate "${name}-kubeProxy-config" (
|
||||
{
|
||||
apiVersion = "kubeproxy.config.k8s.io/v1alpha1";
|
||||
kind = "KubeProxyConfiguration";
|
||||
}
|
||||
// cfg.extraKubeProxyConfig
|
||||
);
|
||||
in
|
||||
{
|
||||
description = "${name} service";
|
||||
after = [
|
||||
"firewall.service"
|
||||
"network-online.target"
|
||||
];
|
||||
wants = [
|
||||
"firewall.service"
|
||||
"network-online.target"
|
||||
];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = lib.optional config.boot.zfs.enabled config.boot.zfs.package;
|
||||
serviceConfig = {
|
||||
# See: https://github.com/rancher/k3s/blob/dddbd16305284ae4bd14c0aade892412310d7edc/install.sh#L197
|
||||
Type = if cfg.role == "agent" then "exec" else "notify";
|
||||
KillMode = "process";
|
||||
Delegate = "yes";
|
||||
Restart = "always";
|
||||
RestartSec = "5s";
|
||||
LimitNOFILE = 1048576;
|
||||
LimitNPROC = "infinity";
|
||||
LimitCORE = "infinity";
|
||||
TasksMax = "infinity";
|
||||
TimeoutStartSec = 0;
|
||||
EnvironmentFile = cfg.environmentFile;
|
||||
ExecStart = lib.concatStringsSep " \\\n " (
|
||||
[ "${cfg.package}/bin/${name} ${cfg.role}" ]
|
||||
++ (lib.optional (cfg.serverAddr != "") "--server ${cfg.serverAddr}")
|
||||
++ (lib.optional (cfg.token != "") "--token ${cfg.token}")
|
||||
++ (lib.optional (cfg.tokenFile != null) "--token-file ${cfg.tokenFile}")
|
||||
++ (lib.optional (cfg.agentToken != "") "--agent-token ${cfg.agentToken}")
|
||||
++ (lib.optional (cfg.agentTokenFile != null) "--agent-token-file ${cfg.agentTokenFile}")
|
||||
++ (lib.optional (cfg.configPath != null) "--config ${cfg.configPath}")
|
||||
++ (map (d: "--disable=${d}") cfg.disable)
|
||||
++ (lib.optional (cfg.nodeName != null) "--node-name=${cfg.nodeName}")
|
||||
++ (lib.optionals (cfg.nodeLabel != [ ]) (map (l: "--node-label=${l}") cfg.nodeLabel))
|
||||
++ (lib.optionals (cfg.nodeTaint != [ ]) (map (t: "--node-taint=${t}") cfg.nodeTaint))
|
||||
++ (lib.optional (cfg.nodeIP != null) "--node-ip=${cfg.nodeIP}")
|
||||
++ (lib.optional cfg.selinux "--selinux")
|
||||
++ (lib.optional (kubeletParams != { }) "--kubelet-arg=config=${kubeletConfig}")
|
||||
++ (lib.optional (cfg.extraKubeProxyConfig != { }) "--kube-proxy-arg=config=${kubeProxyConfig}")
|
||||
++ extraBinFlags
|
||||
++ (lib.flatten cfg.extraFlags)
|
||||
);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
imports =
|
||||
# pass mkRancherModule explicitly instead of via
|
||||
# _modules.args to prevent infinite recursion
|
||||
let
|
||||
args = {
|
||||
inherit config lib;
|
||||
inherit mkRancherModule;
|
||||
};
|
||||
in
|
||||
[
|
||||
(import ./k3s.nix args)
|
||||
(import ./rke2.nix args)
|
||||
];
|
||||
|
||||
meta.maintainers = pkgs.rke2.meta.maintainers ++ lib.teams.k3s.members;
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
mkRancherModule,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.services.k3s;
|
||||
baseModule = mkRancherModule {
|
||||
name = "k3s";
|
||||
extraBinFlags =
|
||||
(lib.optional cfg.clusterInit "--cluster-init")
|
||||
++ (lib.optional cfg.disableAgent "--disable-agent");
|
||||
};
|
||||
|
||||
removeOption =
|
||||
config: instruction:
|
||||
lib.mkRemovedOptionModule (
|
||||
[
|
||||
"services"
|
||||
"k3s"
|
||||
]
|
||||
++ config
|
||||
) instruction;
|
||||
in
|
||||
{
|
||||
imports = [ (removeOption [ "docker" ] "k3s docker option is no longer supported.") ];
|
||||
|
||||
# interface
|
||||
|
||||
options.services.k3s = lib.recursiveUpdate baseModule.options {
|
||||
|
||||
# option overrides
|
||||
|
||||
role.description = ''
|
||||
Whether k3s should run as a server or agent.
|
||||
|
||||
If it's a server:
|
||||
|
||||
- By default it also runs workloads as an agent.
|
||||
- Starts by default as a standalone server using an embedded sqlite datastore.
|
||||
- Configure `clusterInit = true` to switch over to embedded etcd datastore and enable HA mode.
|
||||
- Configure `serverAddr` to join an already-initialized HA cluster.
|
||||
|
||||
If it's an agent:
|
||||
|
||||
- `serverAddr` is required.
|
||||
'';
|
||||
|
||||
serverAddr.description = ''
|
||||
The k3s server to connect to.
|
||||
|
||||
Servers and agents need to communicate each other. Read
|
||||
[the networking docs](https://rancher.com/docs/k3s/latest/en/installation/installation-requirements/#networking)
|
||||
to know how to configure the firewall.
|
||||
'';
|
||||
|
||||
disable.description = ''
|
||||
Disable default components, see the [K3s documentation](https://docs.k3s.io/installation/packaged-components#using-the---disable-flag).
|
||||
'';
|
||||
|
||||
images = {
|
||||
example = lib.literalExpression ''
|
||||
[
|
||||
(pkgs.dockerTools.pullImage {
|
||||
imageName = "docker.io/bitnami/keycloak";
|
||||
imageDigest = "sha256:714dfadc66a8e3adea6609bda350345bd3711657b7ef3cf2e8015b526bac2d6b";
|
||||
hash = "sha256-IM2BLZ0EdKIZcRWOtuFY9TogZJXCpKtPZnMnPsGlq0Y=";
|
||||
finalImageTag = "21.1.2-debian-11-r0";
|
||||
})
|
||||
|
||||
config.services.k3s.package.airgap-images
|
||||
]
|
||||
'';
|
||||
description = ''
|
||||
List of derivations that provide container images.
|
||||
All images are linked to {file}`${baseModule.paths.imageDir}` before k3s starts and are consequently imported
|
||||
by the k3s agent. Consider importing the k3s airgap images archive of the k3s package in
|
||||
use, if you want to pre-provision this node with all k3s container images. This option
|
||||
only makes sense on nodes with an enabled agent.
|
||||
'';
|
||||
};
|
||||
|
||||
# k3s-specific options
|
||||
|
||||
clusterInit = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Initialize HA cluster using an embedded etcd datastore.
|
||||
|
||||
If this option is `false` and `role` is `server`
|
||||
|
||||
On a server that was using the default embedded sqlite backend,
|
||||
enabling this option will migrate to an embedded etcd DB.
|
||||
|
||||
If an HA cluster using the embedded etcd datastore was already initialized,
|
||||
this option has no effect.
|
||||
|
||||
This option only makes sense in a server that is not connecting to another server.
|
||||
|
||||
If you are configuring an HA cluster with an embedded etcd,
|
||||
the 1st server must have `clusterInit = true`
|
||||
and other servers must connect to it using `serverAddr`.
|
||||
'';
|
||||
};
|
||||
|
||||
disableAgent = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Only run the server. This option only makes sense for a server.";
|
||||
};
|
||||
};
|
||||
|
||||
# implementation
|
||||
|
||||
config = lib.mkIf cfg.enable (
|
||||
lib.recursiveUpdate baseModule.config {
|
||||
warnings = (
|
||||
lib.optional (
|
||||
cfg.disableAgent && cfg.images != [ ]
|
||||
) "k3s: Images are only imported on nodes with an enabled agent, they will be ignored by this node."
|
||||
);
|
||||
|
||||
assertions = [
|
||||
{
|
||||
assertion = cfg.role == "agent" -> !cfg.disableAgent;
|
||||
message = "k3s: disableAgent must be false if role is 'agent'";
|
||||
}
|
||||
{
|
||||
assertion = cfg.role == "agent" -> !cfg.clusterInit;
|
||||
message = "k3s: clusterInit must be false if role is 'agent'";
|
||||
}
|
||||
];
|
||||
}
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,160 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
mkRancherModule,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.services.rke2;
|
||||
baseModule = mkRancherModule {
|
||||
name = "rke2";
|
||||
serviceName = "rke2-${cfg.role}"; # upstream default, used by rke2-killall.sh
|
||||
|
||||
extraBinFlags =
|
||||
(lib.optional (cfg.cni != null) "--cni=${cfg.cni}")
|
||||
++ (lib.optional cfg.cisHardening "--profile=${
|
||||
if lib.versionAtLeast cfg.package.version "1.25" then
|
||||
"cis"
|
||||
else if lib.versionAtLeast cfg.package.version "1.23" then
|
||||
"cis-1.23"
|
||||
else
|
||||
"cis-1.6"
|
||||
}");
|
||||
|
||||
# RKE2 sometimes tries opening YAML manifests on start with O_RDWR, which we can't support
|
||||
# without ugly workarounds since they're linked from the read-only /nix/store.
|
||||
# https://github.com/rancher/rke2/blob/fa7ed3a87055830924d05009a1071acfbbfbcc2c/pkg/bootstrap/bootstrap.go#L355
|
||||
jsonManifests = true;
|
||||
|
||||
# see https://github.com/rancher/rke2/issues/224
|
||||
# not all charts can be base64-encoded into chartContent due to
|
||||
# https://github.com/k3s-io/helm-controller/issues/267
|
||||
staticContentPort = 9345;
|
||||
};
|
||||
in
|
||||
{
|
||||
# interface
|
||||
|
||||
options.services.rke2 = lib.recursiveUpdate baseModule.options {
|
||||
# option overrides
|
||||
role.description = ''
|
||||
Whether rke2 should run as a server or agent.
|
||||
|
||||
If it's a server:
|
||||
|
||||
- By default it also runs workloads as an agent.
|
||||
- All options can be set.
|
||||
|
||||
If it's an agent:
|
||||
|
||||
- `serverAddr` is required.
|
||||
- `token` or `tokenFile` is required.
|
||||
- `agentToken`, `agentTokenFile`, `disable` and `cni` should not be set.
|
||||
'';
|
||||
|
||||
disable.description = ''
|
||||
Disable default components, see the [RKE2 documentation](https://docs.rke2.io/install/packaged_components#using-the---disable-flag).
|
||||
'';
|
||||
|
||||
images = {
|
||||
example = lib.literalExpression ''
|
||||
[
|
||||
(pkgs.dockerTools.pullImage {
|
||||
imageName = "docker.io/bitnami/keycloak";
|
||||
imageDigest = "sha256:714dfadc66a8e3adea6609bda350345bd3711657b7ef3cf2e8015b526bac2d6b";
|
||||
hash = "sha256-IM2BLZ0EdKIZcRWOtuFY9TogZJXCpKtPZnMnPsGlq0Y=";
|
||||
finalImageTag = "21.1.2-debian-11-r0";
|
||||
})
|
||||
|
||||
config.services.rke2.package.images-core-linux-amd64-tar-zst
|
||||
config.services.rke2.package.images-canal-linux-amd64-tar-zst
|
||||
]
|
||||
'';
|
||||
description = ''
|
||||
List of derivations that provide container images.
|
||||
All images are linked to {file}`${baseModule.paths.imageDir}` before rke2 starts and are consequently imported
|
||||
by the rke2 agent. Consider importing the rke2 core and CNI image archives of the rke2 package in
|
||||
use, if you want to pre-provision this node with all rke2 container images. For a full list of available airgap images, check the
|
||||
[source](https://github.com/NixOS/nixpkgs/blob/c8a1939887ee6e5f5aae29ce97321c0d83165f7d/pkgs/applications/networking/cluster/rke2/1_32/images-versions.json).
|
||||
of the rke2 package in use.
|
||||
'';
|
||||
};
|
||||
|
||||
# rke2-specific options
|
||||
cni = lib.mkOption {
|
||||
type =
|
||||
with lib.types;
|
||||
nullOr (enum [
|
||||
"none"
|
||||
"canal"
|
||||
"cilium"
|
||||
"calico"
|
||||
"flannel"
|
||||
]);
|
||||
description = ''
|
||||
CNI plugins to deploy, one of `none`, `calico`, `canal`, `cilium` or `flannel`.
|
||||
|
||||
All CNI plugins get installed via a helm chart after the main components are up and running
|
||||
and can be [customized by modifying the helm chart options](https://docs.rke2.io/helm).
|
||||
|
||||
[Learn more about RKE2 and CNI plugins](https://docs.rke2.io/networking/basic_network_options)
|
||||
|
||||
> **WARNING**: Flannel support in RKE2 is currently experimental.
|
||||
'';
|
||||
default = null;
|
||||
};
|
||||
|
||||
cisHardening = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enable CIS Hardening for RKE2.
|
||||
|
||||
The OS-level configuration options required to pass the CIS benchmark are enabled by default.
|
||||
This option only creates the `etcd` user and group, and passes the `--profile=cis` flag to RKE2.
|
||||
|
||||
Learn more about [CIS Hardening for RKE2](https://docs.rke2.io/security/hardening_guide).
|
||||
'';
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
|
||||
# implementation
|
||||
|
||||
config = lib.mkIf cfg.enable (
|
||||
lib.recursiveUpdate baseModule.config {
|
||||
warnings = (
|
||||
lib.optional (
|
||||
cfg.role == "agent" && cfg.cni != null
|
||||
) "rke2: cni should not be set if role is 'agent'"
|
||||
);
|
||||
|
||||
# Configure NetworkManager to ignore CNI network interfaces.
|
||||
# See: https://docs.rke2.io/known_issues#networkmanager
|
||||
environment.etc."NetworkManager/conf.d/rke2-canal.conf" = {
|
||||
enable = config.networking.networkmanager.enable;
|
||||
text = ''
|
||||
[keyfile]
|
||||
unmanaged-devices=interface-name:flannel*;interface-name:cali*;interface-name:tunl*;interface-name:vxlan.calico;interface-name:vxlan-v6.calico;interface-name:wireguard.cali;interface-name:wg-v6.cali
|
||||
'';
|
||||
};
|
||||
|
||||
# CIS hardening
|
||||
# https://docs.rke2.io/security/hardening_guide#kernel-parameters
|
||||
# https://github.com/rancher/rke2/blob/ef0fc7aa9d3bbaa95ce9b1895972488cbd92e302/bundle/share/rke2/rke2-cis-sysctl.conf
|
||||
boot.kernel.sysctl = {
|
||||
"vm.panic_on_oom" = 0;
|
||||
"vm.overcommit_memory" = 1;
|
||||
"kernel.panic" = 10;
|
||||
"kernel.panic_on_oops" = 1;
|
||||
};
|
||||
# https://docs.rke2.io/security/hardening_guide#etcd-is-configured-properly
|
||||
users = lib.mkIf cfg.cisHardening {
|
||||
users.etcd = {
|
||||
isSystemUser = true;
|
||||
group = "etcd";
|
||||
};
|
||||
groups.etcd = { };
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
@@ -1,338 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.services.rke2;
|
||||
in
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
options.services.rke2 = {
|
||||
enable = lib.mkEnableOption "rke2";
|
||||
|
||||
package = lib.mkPackageOption pkgs "rke2" { };
|
||||
|
||||
role = lib.mkOption {
|
||||
type = lib.types.enum [
|
||||
"server"
|
||||
"agent"
|
||||
];
|
||||
description = ''
|
||||
Whether rke2 should run as a server or agent.
|
||||
|
||||
If it's a server:
|
||||
|
||||
- By default it also runs workloads as an agent.
|
||||
- any optionals is allowed.
|
||||
|
||||
If it's an agent:
|
||||
|
||||
- `serverAddr` is required.
|
||||
- `token` or `tokenFile` is required.
|
||||
- `agentToken` or `agentTokenFile` or `disable` or `cni` are not allowed.
|
||||
'';
|
||||
default = "server";
|
||||
};
|
||||
|
||||
configPath = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
description = "Load configuration from FILE.";
|
||||
default = "/etc/rancher/rke2/config.yaml";
|
||||
};
|
||||
|
||||
debug = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
description = "Turn on debug logs.";
|
||||
default = false;
|
||||
};
|
||||
|
||||
dataDir = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
description = "The folder to hold state in.";
|
||||
default = "/var/lib/rancher/rke2";
|
||||
};
|
||||
|
||||
token = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
Shared secret used to join a server or agent to a cluster.
|
||||
|
||||
> WARNING: This option will expose store your token unencrypted world-readable in the nix store.
|
||||
If this is undesired use the `tokenFile` option instead.
|
||||
'';
|
||||
default = "";
|
||||
};
|
||||
|
||||
tokenFile = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.path;
|
||||
description = "File path containing rke2 token to use when connecting to the server.";
|
||||
default = null;
|
||||
};
|
||||
|
||||
disable = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
description = "Do not deploy packaged components and delete any deployed components.";
|
||||
default = [ ];
|
||||
};
|
||||
|
||||
nodeName = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
description = "Node name.";
|
||||
default = null;
|
||||
};
|
||||
|
||||
nodeLabel = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
description = "Registering and starting kubelet with set of labels.";
|
||||
default = [ ];
|
||||
};
|
||||
|
||||
nodeTaint = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
description = "Registering kubelet with set of taints.";
|
||||
default = [ ];
|
||||
};
|
||||
|
||||
nodeIP = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
description = "IPv4/IPv6 addresses to advertise for node.";
|
||||
default = null;
|
||||
};
|
||||
|
||||
agentToken = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
Shared secret used to join agents to the cluster, but not servers.
|
||||
|
||||
> **WARNING**: This option will expose store your token unencrypted world-readable in the nix store.
|
||||
If this is undesired use the `agentTokenFile` option instead.
|
||||
'';
|
||||
default = "";
|
||||
};
|
||||
|
||||
agentTokenFile = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.path;
|
||||
description = "File path containing rke2 agent token to use when connecting to the server.";
|
||||
default = null;
|
||||
};
|
||||
|
||||
serverAddr = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "The rke2 server to connect to, used to join a cluster.";
|
||||
example = "https://10.0.0.10:6443";
|
||||
default = "";
|
||||
};
|
||||
|
||||
selinux = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
description = "Enable SELinux in containerd.";
|
||||
default = false;
|
||||
};
|
||||
|
||||
cni = lib.mkOption {
|
||||
type = lib.types.enum [
|
||||
"none"
|
||||
"canal"
|
||||
"cilium"
|
||||
"calico"
|
||||
"flannel"
|
||||
];
|
||||
description = ''
|
||||
CNI Plugins to deploy, one of `none`, `calico`, `canal`, `cilium` or `flannel`.
|
||||
|
||||
All CNI plugins get installed via a helm chart after the main components are up and running
|
||||
and can be [customized by modifying the helm chart options](https://docs.rke2.io/helm).
|
||||
|
||||
[Learn more about RKE2 and CNI plugins](https://docs.rke2.io/networking/basic_network_options)
|
||||
|
||||
> **WARNING**: Flannel support in RKE2 is currently experimental.
|
||||
'';
|
||||
default = "canal";
|
||||
};
|
||||
|
||||
cisHardening = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enable CIS Hardening for RKE2.
|
||||
|
||||
It will set the configurations and controls required to address Kubernetes benchmark controls
|
||||
from the Center for Internet Security (CIS).
|
||||
|
||||
Learn more about [CIS Hardening for RKE2](https://docs.rke2.io/security/hardening_guide).
|
||||
|
||||
> **NOTICE**:
|
||||
>
|
||||
> You may need restart the `systemd-sysctl` muaually by:
|
||||
>
|
||||
> ```shell
|
||||
> sudo systemctl restart systemd-sysctl
|
||||
> ```
|
||||
'';
|
||||
default = false;
|
||||
};
|
||||
|
||||
extraFlags = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
description = ''
|
||||
Extra flags to pass to the rke2 service/agent.
|
||||
|
||||
Here you can find all the available flags:
|
||||
|
||||
- [Server Configuration Reference](https://docs.rke2.io/reference/server_config)
|
||||
- [Agent Configuration Reference](https://docs.rke2.io/reference/linux_agent_config)
|
||||
'';
|
||||
example = [
|
||||
"--disable-kube-proxy"
|
||||
"--cluster-cidr=10.24.0.0/16"
|
||||
];
|
||||
default = [ ];
|
||||
};
|
||||
|
||||
environmentVars = lib.mkOption {
|
||||
type = lib.types.attrsOf lib.types.str;
|
||||
description = ''
|
||||
Environment variables for configuring the rke2 service/agent.
|
||||
|
||||
Here you can find all the available environment variables:
|
||||
|
||||
- [Server Configuration Reference](https://docs.rke2.io/reference/server_config)
|
||||
- [Agent Configuration Reference](https://docs.rke2.io/reference/linux_agent_config)
|
||||
|
||||
Besides the options above, you can also active environment variables by edit/create those files:
|
||||
|
||||
- `/etc/default/rke2`
|
||||
- `/etc/sysconfig/rke2`
|
||||
- `/usr/local/lib/systemd/system/rke2.env`
|
||||
'';
|
||||
# See: https://github.com/rancher/rke2/blob/master/bundle/lib/systemd/system/rke2-server.env#L1
|
||||
default = {
|
||||
HOME = "/root";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion = cfg.role == "agent" -> (builtins.pathExists cfg.configPath || cfg.serverAddr != "");
|
||||
message = "serverAddr or configPath (with 'server' key) should be set if role is 'agent'";
|
||||
}
|
||||
{
|
||||
assertion =
|
||||
cfg.role == "agent"
|
||||
-> (builtins.pathExists cfg.configPath || cfg.tokenFile != null || cfg.token != "");
|
||||
message = "token or tokenFile or configPath (with 'token' or 'token-file' keys) should be set if role is 'agent'";
|
||||
}
|
||||
{
|
||||
assertion = cfg.role == "agent" -> !(cfg.agentTokenFile != null || cfg.agentToken != "");
|
||||
message = "agentToken or agentTokenFile should NOT be set if role is 'agent'";
|
||||
}
|
||||
{
|
||||
assertion = cfg.role == "agent" -> !(cfg.disable != [ ]);
|
||||
message = "disable should not be set if role is 'agent'";
|
||||
}
|
||||
{
|
||||
assertion = cfg.role == "agent" -> !(cfg.cni != "canal");
|
||||
message = "cni should not be set if role is 'agent'";
|
||||
}
|
||||
];
|
||||
|
||||
environment.systemPackages = [ config.services.rke2.package ];
|
||||
# To configure NetworkManager to ignore calico/flannel related network interfaces.
|
||||
# See: https://docs.rke2.io/known_issues#networkmanager
|
||||
environment.etc."NetworkManager/conf.d/rke2-canal.conf" = {
|
||||
enable = config.networking.networkmanager.enable;
|
||||
text = ''
|
||||
[keyfile]
|
||||
unmanaged-devices=interface-name:cali*;interface-name:flannel*
|
||||
'';
|
||||
};
|
||||
# See: https://docs.rke2.io/security/hardening_guide#set-kernel-parameters
|
||||
boot.kernel.sysctl = lib.mkIf cfg.cisHardening {
|
||||
"vm.panic_on_oom" = 0;
|
||||
"vm.overcommit_memory" = 1;
|
||||
"kernel.panic" = 10;
|
||||
"kernel.panic_on_oops" = 1;
|
||||
};
|
||||
|
||||
systemd.services."rke2-${cfg.role}" = {
|
||||
description = "Rancher Kubernetes Engine v2";
|
||||
documentation = [ "https://github.com/rancher/rke2#readme" ];
|
||||
after = [ "network-online.target" ];
|
||||
wants = [ "network-online.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
Type = if cfg.role == "agent" then "exec" else "notify";
|
||||
EnvironmentFile = [
|
||||
"-/etc/default/%N"
|
||||
"-/etc/sysconfig/%N"
|
||||
"-/usr/local/lib/systemd/system/%N.env"
|
||||
];
|
||||
Environment = lib.mapAttrsToList (k: v: "${k}=${v}") cfg.environmentVars;
|
||||
KillMode = "process";
|
||||
Delegate = "yes";
|
||||
LimitNOFILE = 1048576;
|
||||
LimitNPROC = "infinity";
|
||||
LimitCORE = "infinity";
|
||||
TasksMax = "infinity";
|
||||
TimeoutStartSec = 0;
|
||||
Restart = "always";
|
||||
RestartSec = "5s";
|
||||
ExecStartPre = [
|
||||
# There is a conflict between RKE2 and `nm-cloud-setup.service`. This service add a routing table that
|
||||
# interfere with the CNI plugin's configuration. This script checks if the service is enabled and if so,
|
||||
# failed the RKE2 start.
|
||||
# See: https://github.com/rancher/rke2/issues/1053
|
||||
(pkgs.writeScript "check-nm-cloud-setup.sh" ''
|
||||
#! ${pkgs.runtimeShell}
|
||||
set -x
|
||||
! /run/current-system/systemd/bin/systemctl is-enabled --quiet nm-cloud-setup.service
|
||||
'')
|
||||
"-${pkgs.kmod}/bin/modprobe br_netfilter"
|
||||
"-${pkgs.kmod}/bin/modprobe overlay"
|
||||
];
|
||||
ExecStart = "${cfg.package}/bin/rke2 '${cfg.role}' ${
|
||||
lib.escapeShellArgs (
|
||||
(lib.optional (cfg.configPath != "/etc/rancher/rke2/config.yaml") "--config=${cfg.configPath}")
|
||||
++ (lib.optional cfg.debug "--debug")
|
||||
++ (lib.optional (cfg.dataDir != "/var/lib/rancher/rke2") "--data-dir=${cfg.dataDir}")
|
||||
++ (lib.optional (cfg.token != "") "--token=${cfg.token}")
|
||||
++ (lib.optional (cfg.tokenFile != null) "--token-file=${cfg.tokenFile}")
|
||||
++ (lib.optionals (cfg.role == "server" && cfg.disable != [ ]) (
|
||||
map (d: "--disable=${d}") cfg.disable
|
||||
))
|
||||
++ (lib.optional (cfg.nodeName != null) "--node-name=${cfg.nodeName}")
|
||||
++ (lib.optionals (cfg.nodeLabel != [ ]) (map (l: "--node-label=${l}") cfg.nodeLabel))
|
||||
++ (lib.optionals (cfg.nodeTaint != [ ]) (map (t: "--node-taint=${t}") cfg.nodeTaint))
|
||||
++ (lib.optional (cfg.nodeIP != null) "--node-ip=${cfg.nodeIP}")
|
||||
++ (lib.optional (cfg.role == "server" && cfg.agentToken != "") "--agent-token=${cfg.agentToken}")
|
||||
++ (lib.optional (
|
||||
cfg.role == "server" && cfg.agentTokenFile != null
|
||||
) "--agent-token-file=${cfg.agentTokenFile}")
|
||||
++ (lib.optional (cfg.serverAddr != "") "--server=${cfg.serverAddr}")
|
||||
++ (lib.optional cfg.selinux "--selinux")
|
||||
++ (lib.optional (cfg.role == "server" && cfg.cni != "canal") "--cni=${cfg.cni}")
|
||||
++ (lib.optional cfg.cisHardening "--profile=${
|
||||
if cfg.package.version >= "1.25" then "cis-1.23" else "cis-1.6"
|
||||
}")
|
||||
++ cfg.extraFlags
|
||||
)
|
||||
}";
|
||||
ExecStopPost =
|
||||
let
|
||||
killProcess = pkgs.writeScript "kill-process.sh" ''
|
||||
#! ${pkgs.runtimeShell}
|
||||
/run/current-system/systemd/bin/systemd-cgls /system.slice/$1 | \
|
||||
${pkgs.gnugrep}/bin/grep -Eo '[0-9]+ (containerd|kubelet)' | \
|
||||
${pkgs.gawk}/bin/awk '{print $1}' | \
|
||||
${pkgs.findutils}/bin/xargs -r ${pkgs.util-linux}/bin/kill
|
||||
'';
|
||||
in
|
||||
"-${killProcess} %n";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -477,7 +477,6 @@ in
|
||||
# Since some of these have a corresponding package, we only
|
||||
# enable that program module if the package hasn't been excluded
|
||||
# through `environment.gnome.excludePackages`
|
||||
programs.file-roller.enable = notExcluded pkgs.file-roller;
|
||||
programs.geary.enable = notExcluded pkgs.geary;
|
||||
programs.gnome-disks.enable = notExcluded pkgs.gnome-disk-utility;
|
||||
programs.seahorse.enable = notExcluded pkgs.seahorse;
|
||||
|
||||
@@ -307,11 +307,11 @@ in
|
||||
|
||||
(mkIf serviceCfg.apps.enable {
|
||||
programs.evince.enable = mkDefault (notExcluded pkgs.evince);
|
||||
programs.file-roller.enable = mkDefault (notExcluded pkgs.file-roller);
|
||||
|
||||
environment.systemPackages = utils.removePackagesByName (
|
||||
[
|
||||
pkgs.gnome-font-viewer
|
||||
pkgs.file-roller
|
||||
]
|
||||
++ (
|
||||
with pkgs.pantheon;
|
||||
|
||||
@@ -80,7 +80,7 @@ in
|
||||
enable = lib.mkEnableOption "Redmine, a project management web application";
|
||||
|
||||
package = lib.mkPackageOption pkgs "redmine" {
|
||||
example = "redmine.override { ruby = pkgs.ruby_3_4; }";
|
||||
example = "redmine.override { ruby = pkgs.ruby_3_3; }";
|
||||
};
|
||||
|
||||
user = lib.mkOption {
|
||||
|
||||
@@ -330,6 +330,7 @@ in
|
||||
after = [
|
||||
"network.target"
|
||||
"postgresql.target"
|
||||
"rabbitmq.service"
|
||||
];
|
||||
requires = [ "postgresql.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
@@ -250,7 +250,6 @@ in
|
||||
(mkIf serviceCfg.apps.enable {
|
||||
programs.gnome-disks.enable = mkDefault (notExcluded pkgs.gnome-disk-utility);
|
||||
programs.gnome-terminal.enable = mkDefault (notExcluded pkgs.gnome-terminal);
|
||||
programs.file-roller.enable = mkDefault (notExcluded pkgs.file-roller);
|
||||
|
||||
environment.systemPackages =
|
||||
with pkgs;
|
||||
@@ -270,6 +269,7 @@ in
|
||||
gnome-calculator
|
||||
gnome-calendar
|
||||
gnome-screenshot
|
||||
file-roller
|
||||
] config.environment.cinnamon.excludePackages;
|
||||
})
|
||||
];
|
||||
|
||||
@@ -1021,7 +1021,8 @@ in
|
||||
|
||||
fonts.packages = [
|
||||
(if cfg.upscaleDefaultCursor then fontcursormisc_hidpi else pkgs.xorg.fontcursormisc)
|
||||
pkgs.xorg.fontmiscmisc
|
||||
pkgs.font-misc-misc
|
||||
pkgs.font-alias
|
||||
];
|
||||
|
||||
};
|
||||
|
||||
@@ -1139,6 +1139,7 @@ in
|
||||
ombi = runTest ./ombi.nix;
|
||||
omnom = runTest ./omnom;
|
||||
oncall = runTest ./web-apps/oncall.nix;
|
||||
onlyoffice = runTest ./onlyoffice.nix;
|
||||
open-web-calendar = runTest ./web-apps/open-web-calendar.nix;
|
||||
open-webui = runTest ./open-webui.nix;
|
||||
openarena = runTest ./openarena.nix;
|
||||
|
||||
@@ -135,7 +135,7 @@ import ../make-test-python.nix (
|
||||
machine.succeed("test -e /var/lib/rancher/k3s/server/manifests/values-file.yaml")
|
||||
machine.succeed("test -e /var/lib/rancher/k3s/server/manifests/advanced.yaml")
|
||||
# check that the timeout is set correctly, select only the first doc in advanced.yaml
|
||||
advancedManifest = json.loads(machine.succeed("yq -o json 'select(di == 0)' /var/lib/rancher/k3s/server/manifests/advanced.yaml"))
|
||||
advancedManifest = json.loads(machine.succeed("yq -o json '.items[0]' /var/lib/rancher/k3s/server/manifests/advanced.yaml"))
|
||||
t.assertEqual(advancedManifest["spec"]["timeout"], "69s", "unexpected value for spec.timeout")
|
||||
# wait for test jobs to complete
|
||||
machine.wait_until_succeeds("kubectl wait --for=condition=complete job/hello", timeout=180)
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
let
|
||||
port = 8000;
|
||||
in
|
||||
{
|
||||
name = "onlyoffice";
|
||||
|
||||
nodes.machine =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
services.onlyoffice = {
|
||||
enable = true;
|
||||
inherit port;
|
||||
hostname = "office.example.com";
|
||||
securityNonceFile = "${pkgs.writeText "nixos-test-onlyoffice-nonce.conf" ''
|
||||
set $secure_link_secret "nixostest";
|
||||
''}";
|
||||
};
|
||||
|
||||
networking.hosts = {
|
||||
"::1" = [ "office.example.com" ];
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
machine.wait_for_unit("onlyoffice-docservice.service")
|
||||
machine.wait_for_unit("onlyoffice-converter.service")
|
||||
machine.wait_for_open_port(${builtins.toString port})
|
||||
machine.succeed("curl --fail http://office.example.com/healthcheck")
|
||||
'';
|
||||
}
|
||||
@@ -31,46 +31,21 @@ import ../make-test-python.nix (
|
||||
];
|
||||
};
|
||||
};
|
||||
# A daemonset that responds 'hello' on port 8000
|
||||
networkTestDaemonset = pkgs.writeText "test.yml" ''
|
||||
apiVersion: apps/v1
|
||||
kind: DaemonSet
|
||||
metadata:
|
||||
name: test
|
||||
labels:
|
||||
name: test
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
name: test
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
name: test
|
||||
spec:
|
||||
containers:
|
||||
- name: test
|
||||
image: test.local/hello:local
|
||||
imagePullPolicy: Never
|
||||
resources:
|
||||
limits:
|
||||
memory: 20Mi
|
||||
command: ["socat", "TCP4-LISTEN:8000,fork", "EXEC:echo hello"]
|
||||
'';
|
||||
tokenFile = pkgs.writeText "token" "p@s$w0rd";
|
||||
agentTokenFile = pkgs.writeText "agent-token" "agentP@s$w0rd";
|
||||
# Let flannel use eth1 to enable inter-node communication in tests
|
||||
canalConfig = pkgs.writeText "rke2-canal-config.yaml" ''
|
||||
apiVersion: helm.cattle.io/v1
|
||||
kind: HelmChartConfig
|
||||
metadata:
|
||||
name: rke2-canal
|
||||
namespace: kube-system
|
||||
spec:
|
||||
valuesContent: |-
|
||||
flannel:
|
||||
iface: "eth1"
|
||||
'';
|
||||
canalConfig = {
|
||||
apiVersion = "helm.cattle.io/v1";
|
||||
kind = "HelmChartConfig";
|
||||
metadata = {
|
||||
name = "rke2-canal";
|
||||
namespace = "kube-system";
|
||||
};
|
||||
# spec.valuesContent needs to a string, either json or yaml
|
||||
spec.valuesContent = builtins.toJSON {
|
||||
flannel.iface = "eth1";
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
name = "${rke2.name}-multi-node";
|
||||
@@ -85,23 +60,6 @@ import ../make-test-python.nix (
|
||||
...
|
||||
}:
|
||||
{
|
||||
# Setup image archives to be imported by rke2
|
||||
systemd.tmpfiles.settings."10-rke2" = {
|
||||
"/var/lib/rancher/rke2/agent/images/rke2-images-core.tar.zst" = {
|
||||
"L+".argument = "${coreImages}";
|
||||
};
|
||||
"/var/lib/rancher/rke2/agent/images/rke2-images-canal.tar.zst" = {
|
||||
"L+".argument = "${canalImages}";
|
||||
};
|
||||
"/var/lib/rancher/rke2/agent/images/hello.tar.zst" = {
|
||||
"L+".argument = "${helloImage}";
|
||||
};
|
||||
# Copy the canal config so that rke2 can write the remaining default values to it
|
||||
"/var/lib/rancher/rke2/server/manifests/rke2-canal-config.yaml" = {
|
||||
"C".argument = "${canalConfig}";
|
||||
};
|
||||
};
|
||||
|
||||
# Canal CNI with VXLAN
|
||||
networking.firewall.allowedUDPPorts = [ 8472 ];
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
@@ -134,6 +92,41 @@ import ../make-test-python.nix (
|
||||
"rke2-snapshot-controller-crd"
|
||||
"rke2-snapshot-validation-webhook"
|
||||
];
|
||||
images = [
|
||||
coreImages
|
||||
canalImages
|
||||
helloImage
|
||||
];
|
||||
manifests = {
|
||||
canal-config.content = canalConfig;
|
||||
# A daemonset that responds 'hello' on port 8000
|
||||
network-test.content = {
|
||||
apiVersion = "apps/v1";
|
||||
kind = "DaemonSet";
|
||||
metadata = {
|
||||
name = "test";
|
||||
labels.name = "test";
|
||||
};
|
||||
spec = {
|
||||
selector.matchLabels.name = "test";
|
||||
template = {
|
||||
metadata.labels.name = "test";
|
||||
spec.containers = [
|
||||
{
|
||||
name = "hello";
|
||||
image = "${helloImage.imageName}:${helloImage.imageTag}";
|
||||
imagePullPolicy = "Never";
|
||||
command = [
|
||||
"socat"
|
||||
"TCP4-LISTEN:8000,fork"
|
||||
"EXEC:echo hello"
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -145,22 +138,6 @@ import ../make-test-python.nix (
|
||||
...
|
||||
}:
|
||||
{
|
||||
# Setup image archives to be imported by rke2
|
||||
systemd.tmpfiles.settings."10-rke2" = {
|
||||
"/var/lib/rancher/rke2/agent/images/rke2-images-core.linux-amd64.tar.zst" = {
|
||||
"L+".argument = "${coreImages}";
|
||||
};
|
||||
"/var/lib/rancher/rke2/agent/images/rke2-images-canal.linux-amd64.tar.zst" = {
|
||||
"L+".argument = "${canalImages}";
|
||||
};
|
||||
"/var/lib/rancher/rke2/agent/images/hello.tar.zst" = {
|
||||
"L+".argument = "${helloImage}";
|
||||
};
|
||||
"/var/lib/rancher/rke2/server/manifests/rke2-canal-config.yaml" = {
|
||||
"C".argument = "${canalConfig}";
|
||||
};
|
||||
};
|
||||
|
||||
# Canal CNI health checks
|
||||
networking.firewall.allowedTCPPorts = [ 9099 ];
|
||||
# Canal CNI with VXLAN
|
||||
@@ -177,6 +154,12 @@ import ../make-test-python.nix (
|
||||
tokenFile = agentTokenFile;
|
||||
serverAddr = "https://${nodes.server.networking.primaryIPAddress}:9345";
|
||||
nodeIP = config.networking.primaryIPAddress;
|
||||
manifests.canal-config.content = canalConfig;
|
||||
images = [
|
||||
coreImages
|
||||
canalImages
|
||||
helloImage
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -199,8 +182,7 @@ import ../make-test-python.nix (
|
||||
server.succeed("${kubectl} cluster-info")
|
||||
server.wait_until_succeeds("${kubectl} get serviceaccount default")
|
||||
|
||||
# Now create a pod on each node via a daemonset and verify they can talk to each other.
|
||||
server.succeed("${kubectl} apply -f ${networkTestDaemonset}")
|
||||
# Now verify that each daemonset pod can talk to each other.
|
||||
server.wait_until_succeeds(
|
||||
f'[ "$(${kubectl} get ds test -o json | ${jq} .status.numberReady)" -eq {len(machines)} ]'
|
||||
)
|
||||
@@ -217,9 +199,9 @@ import ../make-test-python.nix (
|
||||
server.wait_until_succeeds(f"ping -c 1 {pod_ip}", timeout=5)
|
||||
agent.wait_until_succeeds(f"ping -c 1 {pod_ip}", timeout=5)
|
||||
# Verify the server can exec into the pod
|
||||
# for pod in pods:
|
||||
# resp = server.succeed(f"${kubectl} exec {pod} -- socat TCP:{pod_ip}:8000 -")
|
||||
# assert resp.strip() == "hello", f"Unexpected response from hello daemonset: {resp.strip()}"
|
||||
for pod in pods:
|
||||
resp = server.succeed(f"${kubectl} exec {pod} -- socat TCP:{pod_ip}:8000 -").strip()
|
||||
assert resp == "hello", f"Unexpected response from hello daemonset: {resp}"
|
||||
'';
|
||||
}
|
||||
)
|
||||
|
||||
@@ -26,19 +26,13 @@ import ../make-test-python.nix (
|
||||
copyToRoot = pkgs.hello;
|
||||
config.Entrypoint = [ "${pkgs.hello}/bin/hello" ];
|
||||
};
|
||||
testJobYaml = pkgs.writeText "test.yaml" ''
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: test
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: test
|
||||
image: "test.local/hello:local"
|
||||
restartPolicy: Never
|
||||
'';
|
||||
# A ConfigMap in regular yaml format
|
||||
cmFile = (pkgs.formats.yaml { }).generate "rke2-manifest-from-file.yaml" {
|
||||
apiVersion = "v1";
|
||||
kind = "ConfigMap";
|
||||
metadata.name = "from-file";
|
||||
data.username = "foo-file";
|
||||
};
|
||||
in
|
||||
{
|
||||
name = "${rke2.name}-single-node";
|
||||
@@ -51,19 +45,6 @@ import ../make-test-python.nix (
|
||||
...
|
||||
}:
|
||||
{
|
||||
# Setup image archives to be imported by rke2
|
||||
systemd.tmpfiles.settings."10-rke2" = {
|
||||
"/var/lib/rancher/rke2/agent/images/rke2-images-core.tar.zst" = {
|
||||
"L+".argument = "${coreImages}";
|
||||
};
|
||||
"/var/lib/rancher/rke2/agent/images/rke2-images-canal.tar.zst" = {
|
||||
"L+".argument = "${canalImages}";
|
||||
};
|
||||
"/var/lib/rancher/rke2/agent/images/hello.tar.zst" = {
|
||||
"L+".argument = "${helloImage}";
|
||||
};
|
||||
};
|
||||
|
||||
# RKE2 needs more resources than the default
|
||||
virtualisation.cores = 4;
|
||||
virtualisation.memorySize = 4096;
|
||||
@@ -84,6 +65,47 @@ import ../make-test-python.nix (
|
||||
"rke2-snapshot-controller-crd"
|
||||
"rke2-snapshot-validation-webhook"
|
||||
];
|
||||
images = [
|
||||
coreImages
|
||||
canalImages
|
||||
helloImage
|
||||
];
|
||||
manifests = {
|
||||
test-job.content = {
|
||||
apiVersion = "batch/v1";
|
||||
kind = "Job";
|
||||
metadata.name = "test";
|
||||
spec.template.spec = {
|
||||
containers = [
|
||||
{
|
||||
name = "hello";
|
||||
image = "${helloImage.imageName}:${helloImage.imageTag}";
|
||||
}
|
||||
];
|
||||
restartPolicy = "Never";
|
||||
};
|
||||
};
|
||||
disabled = {
|
||||
enable = false;
|
||||
content = {
|
||||
apiVersion = "v1";
|
||||
kind = "ConfigMap";
|
||||
metadata.name = "disabled";
|
||||
data.username = "foo";
|
||||
};
|
||||
};
|
||||
from-file.source = "${cmFile}";
|
||||
custom-target = {
|
||||
enable = true;
|
||||
target = "my-manifest.json";
|
||||
content = {
|
||||
apiVersion = "v1";
|
||||
kind = "ConfigMap";
|
||||
metadata.name = "custom-target";
|
||||
data.username = "foo-custom";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -95,14 +117,28 @@ import ../make-test-python.nix (
|
||||
''
|
||||
start_all()
|
||||
|
||||
machine.wait_for_unit("rke2-server")
|
||||
machine.succeed("${kubectl} cluster-info")
|
||||
with subtest("Start cluster"):
|
||||
machine.wait_for_unit("rke2-server")
|
||||
machine.succeed("${kubectl} cluster-info")
|
||||
machine.wait_until_succeeds("${kubectl} get serviceaccount default")
|
||||
|
||||
machine.wait_until_succeeds("${kubectl} get serviceaccount default")
|
||||
machine.succeed("${kubectl} apply -f ${testJobYaml}")
|
||||
machine.wait_until_succeeds("${kubectl} wait --for 'condition=complete' job/test")
|
||||
output = machine.succeed("${kubectl} logs -l batch.kubernetes.io/job-name=test")
|
||||
assert output.rstrip() == "Hello, world!", f"unexpected output of test job: {output}"
|
||||
with subtest("Test job completes successfully"):
|
||||
machine.wait_until_succeeds("${kubectl} wait --for 'condition=complete' job/test")
|
||||
output = machine.succeed("${kubectl} logs -l batch.kubernetes.io/job-name=test").rstrip()
|
||||
assert output == "Hello, world!", f"unexpected output of test job: {output}"
|
||||
|
||||
with subtest("ConfigMap from-file exists"):
|
||||
output = machine.succeed("${kubectl} get cm from-file -o=jsonpath='{.data.username}'").rstrip()
|
||||
assert output == "foo-file", f"Unexpected data in Configmap from-file: {output}"
|
||||
|
||||
with subtest("ConfigMap custom-target exists"):
|
||||
# Check that the file exists at the custom target path
|
||||
machine.succeed("ls /var/lib/rancher/rke2/server/manifests/my-manifest.json")
|
||||
output = machine.succeed("${kubectl} get cm custom-target -o=jsonpath='{.data.username}'").rstrip()
|
||||
assert output == "foo-custom", f"Unexpected data in Configmap custom-target: {output}"
|
||||
|
||||
with subtest("Disabled ConfigMap doesn't exist"):
|
||||
machine.fail("${kubectl} get cm disabled")
|
||||
'';
|
||||
}
|
||||
)
|
||||
|
||||
+2
-2
@@ -7,8 +7,8 @@ vscode-utils.buildVscodeMarketplaceExtension (finalAttrs: {
|
||||
mktplcRef = {
|
||||
name = "amazon-q-vscode";
|
||||
publisher = "AmazonWebServices";
|
||||
version = "1.103.0";
|
||||
hash = "sha256-WITAP0DZsLJyeZRhUfWDq34tjenh5nA+1aSb8rxskAw=";
|
||||
version = "1.104.0";
|
||||
hash = "sha256-d97fT6dRiY9pAx7AbzaJ9qQv79b8oa1CJXqlaOycITU=";
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -7,8 +7,8 @@ vscode-utils.buildVscodeMarketplaceExtension {
|
||||
mktplcRef = {
|
||||
name = "claude-code";
|
||||
publisher = "anthropic";
|
||||
version = "2.0.37";
|
||||
hash = "sha256-wXYdMoJhdH5S8EGdELVFbmwrwO7LHgYiEFqiUscQo4Y=";
|
||||
version = "2.0.42";
|
||||
hash = "sha256-GGQVvyQmkPC5503AzSVU8pGXBb1rv5S1W04V1in1T8E=";
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -1005,8 +1005,8 @@ let
|
||||
mktplcRef = {
|
||||
name = "coder-remote";
|
||||
publisher = "coder";
|
||||
version = "1.11.2";
|
||||
hash = "sha256-7peB8y2cNPCYXbdey4POzFcdra/j/RNzSF2gO3SLlGA=";
|
||||
version = "1.11.3";
|
||||
hash = "sha256-7OXk7ykx4JuRZT6HNNGt2r2Bm4qU+q1yaViKPGoT2f0=";
|
||||
};
|
||||
meta = {
|
||||
description = "Extension for Visual Studio Code to open any Coder workspace in VS Code with a single click";
|
||||
@@ -1643,8 +1643,8 @@ let
|
||||
mktplcRef = {
|
||||
name = "vscode-open-in-github";
|
||||
publisher = "fabiospampinato";
|
||||
version = "2.3.1";
|
||||
hash = "sha256-wqY8AArlTpQzoZ9OfV9MzlHIr9M/Ac4QUZL99n327EI=";
|
||||
version = "2.4.0";
|
||||
hash = "sha256-7jHU8sW6nBVumry3DjgM+CNOvm/oZCGBMzrat4lRAtg=";
|
||||
};
|
||||
meta = {
|
||||
changelog = "https://marketplace.visualstudio.com/items/fabiospampinato.vscode-open-in-github/changelog";
|
||||
|
||||
@@ -10,8 +10,8 @@ vscode-utils.buildVscodeMarketplaceExtension {
|
||||
mktplcRef = {
|
||||
name = "wgsl-analyzer";
|
||||
publisher = "wgsl-analyzer";
|
||||
version = "0.11.130";
|
||||
hash = "sha256-bwtyLkMo9+3XQwUzKqSHOlCrSPqJMqKAPF17aeyr4QI=";
|
||||
version = "0.11.141";
|
||||
hash = "sha256-egd9B5mS5pqzDWVry3dEQKfnxT4zI0RdLMJ/x5n6Nek=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
}:
|
||||
mkLibretroCore {
|
||||
core = "bsnes";
|
||||
version = "0-unstable-2025-10-10";
|
||||
version = "0-unstable-2025-11-14";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "libretro";
|
||||
repo = "bsnes-libretro";
|
||||
rev = "57155d8037463346307123daabeaa27298e0f956";
|
||||
hash = "sha256-eQaeAdQ7OWRzPVSbNOPUmMKIvkztZYGm2tzBavJO4Gs=";
|
||||
rev = "c11dd1f8551ad9b6668ebfcbb5833cfc034b7205";
|
||||
hash = "sha256-8QI7/BaAm3GERPUUprzFTrH7CuPK7W0fCAoHEefKeaI=";
|
||||
};
|
||||
|
||||
makefile = "Makefile";
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
}:
|
||||
mkLibretroCore {
|
||||
core = "flycast";
|
||||
version = "0-unstable-2025-10-18";
|
||||
version = "0-unstable-2025-11-15";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "flyinghead";
|
||||
repo = "flycast";
|
||||
rev = "5d628f8167947bc8a2a7608d52e4ff8b71b9ef34";
|
||||
hash = "sha256-QKUAVJsJL1Ff8KNz6lpMU/IZNb1I09++AqqccIBdAPw=";
|
||||
rev = "4747e6190899949bafd3391b3ba33b8e4c37219c";
|
||||
hash = "sha256-su1nWwLEUcJtf85U9ABXMHltWOBVqlrYsMLHqNebWUs=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ A K3s maintainer, maintains K3s's:
|
||||
- [issues](https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+is%3Aopen+k3s)
|
||||
- [pull requests](https://github.com/NixOS/nixpkgs/pulls?q=is%3Aopen+is%3Apr+label%3A%226.topic%3A+k3s%22)
|
||||
- [NixOS tests](https://github.com/NixOS/nixpkgs/tree/master/nixos/tests/k3s)
|
||||
- [NixOS service module](https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/cluster/k3s/default.nix)
|
||||
- [NixOS service module](https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/cluster/rancher)
|
||||
- [update script](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/networking/cluster/k3s/update-script.sh) (the process of updating)
|
||||
- updates (the act of updating) and [r-ryantm bot logs](https://r.ryantm.com/log/k3s/)
|
||||
- deprecations
|
||||
|
||||
@@ -157,6 +157,7 @@ buildGoModule (finalAttrs: {
|
||||
changelog = "https://github.com/rancher/rke2/releases/tag/v${finalAttrs.version}";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [
|
||||
azey7f
|
||||
rorosen
|
||||
zimbatm
|
||||
zygot
|
||||
|
||||
@@ -985,11 +985,11 @@
|
||||
"vendorHash": null
|
||||
},
|
||||
"nutanix_nutanix": {
|
||||
"hash": "sha256-NhVgZCscSyM6O/d4BYokGz9FQ2fSuN2/kw8iZhzzBQY=",
|
||||
"hash": "sha256-pL8c9Q+iY2i4IuoL0zN2sJ+Gepx65FKGvwU9TshkRHs=",
|
||||
"homepage": "https://registry.terraform.io/providers/nutanix/nutanix",
|
||||
"owner": "nutanix",
|
||||
"repo": "terraform-provider-nutanix",
|
||||
"rev": "v2.3.3",
|
||||
"rev": "v2.3.4",
|
||||
"spdx": "MPL-2.0",
|
||||
"vendorHash": "sha256-CZo/GLUwmq/TxRDQr2h49rqENB24Zt4M7k5t7epXHuE="
|
||||
},
|
||||
@@ -1048,11 +1048,11 @@
|
||||
"vendorHash": null
|
||||
},
|
||||
"oracle_oci": {
|
||||
"hash": "sha256-Pp2eOcz1LQv2Ft2oiwW+7dypDO1PuRE0I7Wcr2E/G4w=",
|
||||
"hash": "sha256-1qYfGPM+Vh7r5UZY0cGjKWM/mxk8kF8S9K2NacrOWB8=",
|
||||
"homepage": "https://registry.terraform.io/providers/oracle/oci",
|
||||
"owner": "oracle",
|
||||
"repo": "terraform-provider-oci",
|
||||
"rev": "v7.25.0",
|
||||
"rev": "v7.26.1",
|
||||
"spdx": "MPL-2.0",
|
||||
"vendorHash": null
|
||||
},
|
||||
|
||||
@@ -15,25 +15,25 @@ in
|
||||
{
|
||||
guiStable = mkGui {
|
||||
channel = "stable";
|
||||
version = "2.2.51";
|
||||
hash = "sha256-HXuhaJEcr33qYm2v/wFqnO7Ba4lyZgSzvh6dkNZX9XI=";
|
||||
version = "2.2.54";
|
||||
hash = "sha256-rR7hrNX7BE86x51yaqvTKGfcc8ESnniFNOZ8Bu1Yzuc=";
|
||||
};
|
||||
|
||||
guiPreview = mkGui {
|
||||
channel = "stable";
|
||||
version = "2.2.51";
|
||||
hash = "sha256-HXuhaJEcr33qYm2v/wFqnO7Ba4lyZgSzvh6dkNZX9XI=";
|
||||
version = "2.2.54";
|
||||
hash = "sha256-rR7hrNX7BE86x51yaqvTKGfcc8ESnniFNOZ8Bu1Yzuc=";
|
||||
};
|
||||
|
||||
serverStable = mkServer {
|
||||
channel = "stable";
|
||||
version = "2.2.51";
|
||||
hash = "sha256-Yw6RvHZzVU2wWXVxvuIu7GLFyqjakwqJ0EV6H0ZdVcQ=";
|
||||
version = "2.2.54";
|
||||
hash = "sha256-ih/9zIJtex9ikZ4oCuyYEjZ3U/BtxDojOz6FnJ0HOYU=";
|
||||
};
|
||||
|
||||
serverPreview = mkServer {
|
||||
channel = "stable";
|
||||
version = "2.2.51";
|
||||
hash = "sha256-Yw6RvHZzVU2wWXVxvuIu7GLFyqjakwqJ0EV6H0ZdVcQ=";
|
||||
version = "2.2.54";
|
||||
hash = "sha256-ih/9zIJtex9ikZ4oCuyYEjZ3U/BtxDojOz6FnJ0HOYU=";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -10,13 +10,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "easycrypt";
|
||||
version = "2025.10";
|
||||
version = "2025.11";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "easycrypt";
|
||||
repo = "easycrypt";
|
||||
tag = "r${version}";
|
||||
hash = "sha256-EF508JsM99lLIqTrWkV/gvlKYRSPQgaLfqxDoOkJbhU=";
|
||||
hash = "sha256-BLyC8AB075Nyhb5heIKVkxnWWt4Zn8Doo10ShsACJ4g=";
|
||||
};
|
||||
|
||||
nativeBuildInputs =
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
pkg-config,
|
||||
autoAddDriverRunpath,
|
||||
alsa-lib,
|
||||
android-tools,
|
||||
brotli,
|
||||
bzip2,
|
||||
celt,
|
||||
@@ -27,6 +28,7 @@
|
||||
libva,
|
||||
libvdpau,
|
||||
libxkbcommon,
|
||||
openapv,
|
||||
openssl,
|
||||
openvr,
|
||||
pipewire,
|
||||
@@ -59,6 +61,15 @@ rustPlatform.buildRustPackage rec {
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace alvr/server_openvr/cpp/platform/linux/EncodePipelineVAAPI.cpp \
|
||||
--replace-fail 'FF_PROFILE_H264_MAIN' 'AV_PROFILE_H264_MAIN' \
|
||||
--replace-fail 'FF_PROFILE_H264_BASELINE' 'AV_PROFILE_H264_BASELINE' \
|
||||
--replace-fail 'FF_PROFILE_H264_HIGH' 'AV_PROFILE_H264_HIGH' \
|
||||
--replace-fail 'FF_PROFILE_HEVC_MAIN' 'AV_PROFILE_HEVC_MAIN' \
|
||||
--replace-fail 'FF_PROFILE_AV1_MAIN' 'AV_PROFILE_AV1_MAIN'
|
||||
'';
|
||||
|
||||
env = {
|
||||
NIX_CFLAGS_COMPILE = toString [
|
||||
"-lbrotlicommon"
|
||||
@@ -91,6 +102,7 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
buildInputs = [
|
||||
alsa-lib
|
||||
android-tools
|
||||
brotli
|
||||
bzip2
|
||||
celt
|
||||
@@ -111,6 +123,7 @@ rustPlatform.buildRustPackage rec {
|
||||
libva
|
||||
libvdpau
|
||||
libxkbcommon
|
||||
openapv
|
||||
openssl
|
||||
openvr
|
||||
pipewire
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "amazon-q-cli";
|
||||
version = "1.19.4";
|
||||
version = "1.19.6";
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
@@ -16,14 +16,14 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||
owner = "aws";
|
||||
repo = "amazon-q-developer-cli";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-r5aqlhPwrWRyOKY86E7pKV3Gb7Pnwid+RoT9Gt1DS8Q=";
|
||||
hash = "sha256-lJ1+EYlG+IzeUvbIGpeN+LisJQgFcYdXPN01cuB66Lw=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
rustPlatform.bindgenHook
|
||||
];
|
||||
|
||||
cargoHash = "sha256-s18m3yRJDoDDB8l3HJ0SMLLLmzAs5dZYvopHTG4MbSc=";
|
||||
cargoHash = "sha256-Y411prX2CH3nkZaVMgZuJChs2tjLJjDj2WPWm7b1cuo=";
|
||||
|
||||
cargoBuildFlags = [
|
||||
"-p"
|
||||
|
||||
+4
-4
@@ -5,7 +5,7 @@
|
||||
"packages": {
|
||||
"": {
|
||||
"dependencies": {
|
||||
"@sourcegraph/amp": "^0.0.1762646500-gac8d42"
|
||||
"@sourcegraph/amp": "^0.0.1763236881-g2ce1ea"
|
||||
}
|
||||
},
|
||||
"node_modules/@napi-rs/keyring": {
|
||||
@@ -228,9 +228,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@sourcegraph/amp": {
|
||||
"version": "0.0.1762646500-gac8d42",
|
||||
"resolved": "https://registry.npmjs.org/@sourcegraph/amp/-/amp-0.0.1762646500-gac8d42.tgz",
|
||||
"integrity": "sha512-+1w32tuDcCTUSULBwWeVrOLYGIvS1z/hNWSG4p9v5TC40asudJ6DVHSgIEO4alY4v8lJ3NnDQ1t8FrdwClZi6g==",
|
||||
"version": "0.0.1763236881-g2ce1ea",
|
||||
"resolved": "https://registry.npmjs.org/@sourcegraph/amp/-/amp-0.0.1763236881-g2ce1ea.tgz",
|
||||
"integrity": "sha512-65ghGiRw2y2sjGK2zsh5WaYNYP4g/7Ad87CAHGV51UrVEFYRdB9Mje35foScL/nzWa30rUjRpPNP1pKw55GQxQ==",
|
||||
"license": "Sourcegraph Commercial License",
|
||||
"dependencies": {
|
||||
"@napi-rs/keyring": "1.1.9"
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
|
||||
buildNpmPackage (finalAttrs: {
|
||||
pname = "amp-cli";
|
||||
version = "0.0.1762646500-gac8d42";
|
||||
version = "0.0.1763236881-g2ce1ea";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://registry.npmjs.org/@sourcegraph/amp/-/amp-${finalAttrs.version}.tgz";
|
||||
hash = "sha256-jChd6cb2IBmEBu/gbCywaHJpN2Mj3EUp8YSKQ9HQd0A=";
|
||||
hash = "sha256-2pkn3Anp5MB8D+leDU1GCsyd70N3b0S4FjhQYlyc7bs=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
@@ -45,7 +45,7 @@ buildNpmPackage (finalAttrs: {
|
||||
chmod +x bin/amp-wrapper.js
|
||||
'';
|
||||
|
||||
npmDepsHash = "sha256-uuGqTutlApLDDFHlK+ACrox5B2KpJGYJP6M4CeCj2v0=";
|
||||
npmDepsHash = "sha256-ACMguY9qWJ+3YNYFfwLpv5jZt+kVRabms+YZjMzRhzE=";
|
||||
|
||||
propagatedBuildInputs = [
|
||||
ripgrep
|
||||
|
||||
@@ -26,7 +26,7 @@ crystal.buildCrystalPackage rec {
|
||||
|
||||
meta = with lib; {
|
||||
description = "Gay sharks at your local terminal - lolcat-like CLI tool";
|
||||
homepage = "https://blahaj.queer.software";
|
||||
homepage = "https://blahaj.geopjr.dev";
|
||||
license = licenses.bsd2;
|
||||
maintainers = with maintainers; [
|
||||
aleksana
|
||||
|
||||
@@ -38,6 +38,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||
--zsh target/tmp/bottom/completion/_btm
|
||||
|
||||
install -Dm444 desktop/bottom.desktop -t $out/share/applications
|
||||
install -Dm644 assets/icons/bottom.svg -t $out/share/icons/hicolor/scalable/apps
|
||||
'';
|
||||
|
||||
doInstallCheck = true;
|
||||
|
||||
@@ -7,16 +7,16 @@
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-wipe";
|
||||
version = "0.3.3";
|
||||
version = "0.4.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mihai-dinculescu";
|
||||
repo = "cargo-wipe";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-xMYpZ6a8HdULblkfEqnqLjX8OVFJWx8MHDGNhuFzdTc=";
|
||||
sha256 = "sha256-r+JMM6KUqcqpLi1Js/2RI8FSoaA5f7yXJ1EuCJB1fyE=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-6Od0xP0Sp3839WbvN0VVAIsY8I1LAsR62yzXtcCSXQY=";
|
||||
cargoHash = "sha256-fg1QjHSnK3lxim/t7AO/w1eIKfpJmYqGSGTpakUKBfk=";
|
||||
|
||||
passthru = {
|
||||
updateScript = nix-update-script { };
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
|
||||
buildNpmPackage rec {
|
||||
pname = "cfn-changeset-viewer";
|
||||
version = "0.3.6";
|
||||
version = "0.3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "trek10inc";
|
||||
repo = "cfn-changeset-viewer";
|
||||
tag = version;
|
||||
hash = "sha256-hz1woGmJYOVGuu52DPPwkfbA49F/0hsxoAU6tiTvJx0=";
|
||||
hash = "sha256-RTGKt8Mq0v3zIFZWTeAV+nDlegw0p9b19wpB/BfQGQk=";
|
||||
};
|
||||
|
||||
npmDepsHash = "sha256-NyWZ+8ArlUCsuBN5wZA9vnuX/3HFtuI42/V1+RIKom0=";
|
||||
|
||||
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@anthropic-ai/claude-code",
|
||||
"version": "2.0.37",
|
||||
"version": "2.0.42",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@anthropic-ai/claude-code",
|
||||
"version": "2.0.37",
|
||||
"version": "2.0.42",
|
||||
"license": "SEE LICENSE IN README.md",
|
||||
"bin": {
|
||||
"claude": "cli.js"
|
||||
|
||||
@@ -7,14 +7,14 @@
|
||||
}:
|
||||
buildNpmPackage (finalAttrs: {
|
||||
pname = "claude-code";
|
||||
version = "2.0.37";
|
||||
version = "2.0.42";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-${finalAttrs.version}.tgz";
|
||||
hash = "sha256-x4nHkwTE6qcB2PH+WPC0VyJTGeV6VTzeiiAsiQWChoo=";
|
||||
hash = "sha256-Xn1h9Phw4FLrF0EfrY5MLA0RnOuA6Dk+PWqP7fN1DUU=";
|
||||
};
|
||||
|
||||
npmDepsHash = "sha256-CxhMbABjSEmW4srMjFOhe6YFj7OovrPkgjyOimGSUao=";
|
||||
npmDepsHash = "sha256-lM1BpuRSH7M5R2FoogMCoQLC+opgN5+LcwW2/5VF+ds=";
|
||||
|
||||
postPatch = ''
|
||||
cp ${./package-lock.json} package-lock.json
|
||||
|
||||
@@ -11,16 +11,16 @@ let
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "clouddrive2";
|
||||
version = "0.9.13";
|
||||
version = "0.9.15";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/cloud-fs/cloud-fs.github.io/releases/download/v${finalAttrs.version}/clouddrive-2-${os}-${arch}-${finalAttrs.version}.tgz";
|
||||
hash =
|
||||
{
|
||||
x86_64-linux = "sha256-jSmPbx7t4hJiUgPeKz6iugEMJ5RZ27+sJQFHx5YtEGs=";
|
||||
aarch64-linux = "sha256-UWdVDTj1a+knGNMpXRZvxFlaX6y76Tx631Z0xMnRTjQ=";
|
||||
x86_64-darwin = "sha256-iNUwjiTRwq4VszBw7qdhtinsxf8zMkTnEb66V/MSB48=";
|
||||
aarch64-darwin = "sha256-HvNoiHlCzYW+A3QilpqukcCsBVLn18QfXyVPopgJe/0=";
|
||||
x86_64-linux = "sha256-/VmDByB4uAyx0R2F5EpI7Fve7LIxM2kBMpdAmjFZMLk=";
|
||||
aarch64-linux = "sha256-P3+oaSACVfe48HeRu4hgGmOcpv7XTHSDOuGdGeBFgtU=";
|
||||
x86_64-darwin = "sha256-BcPkuejJU6jYinvgP+UQtefMhhu7q6CSwMCSs9byN/4=";
|
||||
aarch64-darwin = "sha256-r+lIHEEfgGi7RC+TXDg5pdl53ouDicyfJ/HkdCgjIMg=";
|
||||
}
|
||||
.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}");
|
||||
};
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
|
||||
buildGoModule (finalAttrs: {
|
||||
pname = "clusterlint";
|
||||
version = "0.12.0";
|
||||
version = "0.13.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "digitalocean";
|
||||
repo = "clusterlint";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-R6Dm7raIYxpulVtadU5AsSwCd5waOBOJRdD3o2vgGM4=";
|
||||
hash = "sha256-zNrGWXKVpkr4NtDmawkICGy0l8foNr40zcdsdsKVAGY=";
|
||||
};
|
||||
|
||||
vendorHash = null;
|
||||
|
||||
@@ -9,16 +9,16 @@
|
||||
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "difftastic";
|
||||
version = "0.65.0";
|
||||
version = "0.67.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "wilfred";
|
||||
repo = "difftastic";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-w4z1ljIjPQQYPpMGgrcptTYeP5S72iVvVgNvrctN61w=";
|
||||
hash = "sha256-AgY/v1z4ETHawT+yEwTEaPOLC9GmhR8bGUUBKHY/meQ=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-qj2CyHlEVxTo3wsmuivpnhx02/gMbZjmpAM3dp4xXEQ=";
|
||||
cargoHash = "sha256-TTg5Cky1exlvJokIw1IFGbPq4eJe2xSAPsGgI7BU+Jw=";
|
||||
|
||||
env = lib.optionalAttrs stdenv.hostPlatform.isStatic { RUSTFLAGS = "-C relocation-model=static"; };
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
{ etcd_3_5 }:
|
||||
{ etcd_3_6 }:
|
||||
|
||||
etcd_3_5
|
||||
etcd_3_6
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
|
||||
buildGo124Module rec {
|
||||
pname = "etcd";
|
||||
version = "3.4.38";
|
||||
version = "3.4.39";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "etcd-io";
|
||||
repo = "etcd";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-+fRmz52ZqQTL8JJmSsufoVJP/FGHez9LliEwGsoCE7s=";
|
||||
hash = "sha256-S1aNEd7pPgSu8vFhXIYFjEvfBG3OtmuKCvD5Zgj0m30=";
|
||||
};
|
||||
|
||||
proxyVendor = true;
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
}:
|
||||
|
||||
let
|
||||
version = "3.5.24";
|
||||
etcdSrcHash = "sha256-8qzgMiA/ATSFR5XTzWQhK1SmykHkT/FqBNG0RO93H9w=";
|
||||
etcdServerVendorHash = "sha256-yCazbIcCOuabYDu7Tl0UTx47UiF/Rhg5O6r2kb+w4SY=";
|
||||
etcdUtlVendorHash = "sha256-v8JQmyvHhvz7l8i8kwXVX9sAylElVSUnxKD5oUwQDUw=";
|
||||
etcdCtlVendorHash = "sha256-UNdomi/3Q92CEsUYkt49vFF1Dp1QIFGK7wF/08U3dio=";
|
||||
version = "3.5.25";
|
||||
etcdSrcHash = "sha256-7fCvlp/EG1SofsLC8il/twjg0rEaB/lhz6dnUxgLXik=";
|
||||
etcdServerVendorHash = "sha256-R78j1BTuY3ORQiMnm2kWJGnK4jJi7am4x0udW4jjcCE=";
|
||||
etcdUtlVendorHash = "sha256-J+/QgRAU1uk9LXdW8b6AhitFlxx/QU7IkJ+5Jez9MkM=";
|
||||
etcdCtlVendorHash = "sha256-IiggECH1iFkb51MTeFSFnVbVVDUR1KgsQcbxz9IR4c4=";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "etcd-io";
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
}:
|
||||
|
||||
let
|
||||
version = "3.6.5";
|
||||
etcdSrcHash = "sha256-d0Ujg9ynnnSW0PYYYrNEmPtLnYW2HcCl+zcVo8ACiS0=";
|
||||
etcdCtlVendorHash = "sha256-5r3Q+AfWp23tzbYQoD1hXEzRttJrUUKQSpcEV3GIlOE=";
|
||||
etcdUtlVendorHash = "sha256-funO7EEJs28w4sk4sHVA/KR1TiHumVKNs0Gn/xFl4ig=";
|
||||
etcdServerVendorHash = "sha256-OtWpX5A+kyQej2bueTqmNf62oKmXGQzjexzXlK/XJms=";
|
||||
version = "3.6.6";
|
||||
etcdSrcHash = "sha256-MFkO2Rv38TQeREJ3zHgRdj3thnMK0ci3laEjn4CaXHs=";
|
||||
etcdCtlVendorHash = "sha256-VxR/pPS/HR4EBPJJmQin7XqS5MvWreJe2dlOpQn3pqY=";
|
||||
etcdUtlVendorHash = "sha256-xxq9t47985fA9fDvaanq2sPgUDZJDT2w46zp3pggryo=";
|
||||
etcdServerVendorHash = "sha256-0uPIw2T9ZrR92MBB1xBBfbqXQUVg6sNDu8F5m1C+lEQ=";
|
||||
|
||||
src = applyPatches {
|
||||
src = fetchFromGitHub {
|
||||
|
||||
@@ -8,16 +8,16 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "files-cli";
|
||||
version = "2.15.134";
|
||||
version = "2.15.139";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
repo = "files-cli";
|
||||
owner = "files-com";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-gk8oLcCxlS/T2d1IYRQzZokrrJm2b/hrGgL77C8UW1c=";
|
||||
hash = "sha256-4G0obQC2USQY9dGdLoOhfp6OvUYXRk/CsGeZHLpoMjg=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-cjqOv0o8HIHnu6RKFVyCz+Phfh21IZOwRCJlYQdG+Q8=";
|
||||
vendorHash = "sha256-doL9LiFwPQ1RO6ZJzIQ4IBol2/J+Tc7e8dGDEVdpMQo=";
|
||||
|
||||
ldflags = [
|
||||
"-s"
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
bdftopcf,
|
||||
mkfontscale,
|
||||
writeScript,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "font-arabic-misc";
|
||||
version = "1.0.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://xorg/individual/font/font-arabic-misc-${finalAttrs.version}.tar.xz";
|
||||
hash = "sha256-Rv/mG1LHih0tynD/IKny2E1pdEY5yrmghcen7hdmNGc=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
bdftopcf
|
||||
mkfontscale
|
||||
];
|
||||
|
||||
passthru = {
|
||||
updateScript = writeScript "update-${finalAttrs.pname}" ''
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p common-updater-scripts
|
||||
version="$(list-directory-versions --pname ${finalAttrs.pname} \
|
||||
--url https://xorg.freedesktop.org/releases/individual/font/ \
|
||||
| sort -V | tail -n1)"
|
||||
update-source-version ${finalAttrs.pname} "$version"
|
||||
'';
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Arabic newspaper pcf font";
|
||||
homepage = "https://gitlab.freedesktop.org/xorg/font/arabic-misc";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = [ ];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
})
|
||||
@@ -0,0 +1,44 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
bdftopcf,
|
||||
mkfontscale,
|
||||
writeScript,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "font-cursor-misc";
|
||||
version = "1.0.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://xorg/individual/font/font-cursor-misc-${finalAttrs.version}.tar.xz";
|
||||
hash = "sha256-JdnJWVATy4yghCBQmZOmQ0yRflPKH+w/Y6zUWhnU+YI=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
bdftopcf
|
||||
mkfontscale
|
||||
];
|
||||
|
||||
passthru = {
|
||||
updateScript = writeScript "update-${finalAttrs.pname}" ''
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p common-updater-scripts
|
||||
version="$(list-directory-versions --pname ${finalAttrs.pname} \
|
||||
--url https://xorg.freedesktop.org/releases/individual/font/ \
|
||||
| sort -V | tail -n1)"
|
||||
update-source-version ${finalAttrs.pname} "$version"
|
||||
'';
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "X Cursor as a pcf font";
|
||||
homepage = "https://gitlab.freedesktop.org/xorg/font/cursor-misc";
|
||||
# "These ""glyphs"" are unencumbered"
|
||||
license = lib.licenses.publicDomain;
|
||||
maintainers = [ ];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
})
|
||||
@@ -0,0 +1,44 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
bdftopcf,
|
||||
mkfontscale,
|
||||
writeScript,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "font-daewoo-misc";
|
||||
version = "1.0.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://xorg/individual/font/font-daewoo-misc-${finalAttrs.version}.tar.xz";
|
||||
hash = "sha256-9jyLPcjzAJjLhot9ssLAyLWz/Szv0EQDVpekPUx6TzE=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
bdftopcf
|
||||
mkfontscale
|
||||
];
|
||||
|
||||
passthru = {
|
||||
updateScript = writeScript "update-${finalAttrs.pname}" ''
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p common-updater-scripts
|
||||
version="$(list-directory-versions --pname ${finalAttrs.pname} \
|
||||
--url https://xorg.freedesktop.org/releases/individual/font/ \
|
||||
| sort -V | tail -n1)"
|
||||
update-source-version ${finalAttrs.pname} "$version"
|
||||
'';
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Daewoo Gothic and Daewoo Mincho pcf fonts";
|
||||
homepage = "https://gitlab.freedesktop.org/xorg/font/daewoo-misc";
|
||||
# no license, just a copyright notice
|
||||
license = lib.licenses.unfree;
|
||||
maintainers = [ ];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
})
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
bdftopcf,
|
||||
mkfontscale,
|
||||
writeScript,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "font-dec-misc";
|
||||
version = "1.0.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://xorg/individual/font/font-dec-misc-${finalAttrs.version}.tar.xz";
|
||||
hash = "sha256-gtloIB2P+L7A5R3M14G7TU6/F+EQBJRCeb3AIB4WGvc=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
bdftopcf
|
||||
mkfontscale
|
||||
];
|
||||
|
||||
passthru = {
|
||||
updateScript = writeScript "update-${finalAttrs.pname}" ''
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p common-updater-scripts
|
||||
version="$(list-directory-versions --pname ${finalAttrs.pname} \
|
||||
--url https://xorg.freedesktop.org/releases/individual/font/ \
|
||||
| sort -V | tail -n1)"
|
||||
update-source-version ${finalAttrs.pname} "$version"
|
||||
'';
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "DEC cursors in pcf font format";
|
||||
homepage = "https://gitlab.freedesktop.org/xorg/font/dec-misc";
|
||||
license = lib.licenses.hpnd;
|
||||
maintainers = [ ];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
})
|
||||
@@ -0,0 +1,39 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
mkfontscale,
|
||||
writeScript,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "font-ibm-type1";
|
||||
version = "1.0.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://xorg/individual/font/font-ibm-type1-${finalAttrs.version}.tar.xz";
|
||||
hash = "sha256-xDlelbpG1AxK0XN+kcrCDAq3VBEym2DbXZn+2Stgzn8=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [ mkfontscale ];
|
||||
|
||||
passthru = {
|
||||
updateScript = writeScript "update-${finalAttrs.pname}" ''
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p common-updater-scripts
|
||||
version="$(list-directory-versions --pname ${finalAttrs.pname} \
|
||||
--url https://xorg.freedesktop.org/releases/individual/font/ \
|
||||
| sort -V | tail -n1)"
|
||||
update-source-version ${finalAttrs.pname} "$version"
|
||||
'';
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "IBM Courier Type1 fonts";
|
||||
homepage = "https://gitlab.freedesktop.org/xorg/font/ibm-type1";
|
||||
license = lib.licenses.unfreeRedistributable;
|
||||
maintainers = [ ];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
})
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
bdftopcf,
|
||||
mkfontscale,
|
||||
writeScript,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "font-jis-misc";
|
||||
version = "1.0.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://xorg/individual/font/font-jis-misc-${finalAttrs.version}.tar.xz";
|
||||
hash = "sha256-eNHv9sRx96poAqJtYszPUdjlGFWGQG2bbh7mkbC/+tA=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
bdftopcf
|
||||
mkfontscale
|
||||
];
|
||||
|
||||
passthru = {
|
||||
updateScript = writeScript "update-${finalAttrs.pname}" ''
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p common-updater-scripts
|
||||
version="$(list-directory-versions --pname ${finalAttrs.pname} \
|
||||
--url https://xorg.freedesktop.org/releases/individual/font/ \
|
||||
| sort -V | tail -n1)"
|
||||
update-source-version ${finalAttrs.pname} "$version"
|
||||
'';
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "JIS X 9051: 1984 pcf font";
|
||||
homepage = "https://gitlab.freedesktop.org/xorg/font/jis-misc";
|
||||
# licensing is unclear:
|
||||
# - COPYING just says "permission to use"
|
||||
# - The industial standard (JIS X 9051: 1984) this is from, is paid.
|
||||
license = lib.licenses.unfree;
|
||||
maintainers = [ ];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
})
|
||||
@@ -0,0 +1,40 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
mkfontscale,
|
||||
writeScript,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "font-misc-meltho";
|
||||
version = "1.0.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://xorg/individual/font/font-misc-meltho-${finalAttrs.version}.tar.xz";
|
||||
hash = "sha256-Y75ewXB4iY8mPCQJami0OuWwa4iFLkJUmvoD0STWUhk=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [ mkfontscale ];
|
||||
|
||||
passthru = {
|
||||
updateScript = writeScript "update-${finalAttrs.pname}" ''
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p common-updater-scripts
|
||||
version="$(list-directory-versions --pname ${finalAttrs.pname} \
|
||||
--url https://xorg.freedesktop.org/releases/individual/font/ \
|
||||
| sort -V | tail -n1)"
|
||||
update-source-version ${finalAttrs.pname} "$version"
|
||||
'';
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Collection of otf fonts designed for the display of syriac text";
|
||||
homepage = "https://gitlab.freedesktop.org/xorg/font/misc-meltho";
|
||||
# modified Bigelow & Holmes Font License
|
||||
license = lib.licenses.unfreeRedistributable;
|
||||
maintainers = [ ];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
})
|
||||
@@ -0,0 +1,51 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
pkg-config,
|
||||
font-util,
|
||||
bdftopcf,
|
||||
mkfontscale,
|
||||
writeScript,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "font-misc-misc";
|
||||
version = "1.1.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://xorg/individual/font/font-misc-misc-${finalAttrs.version}.tar.xz";
|
||||
hash = "sha256-eavjYfWLshren1ZYmOSGMAzhzGIdUoW+wm4Utqhhj+0=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
bdftopcf
|
||||
font-util
|
||||
mkfontscale
|
||||
];
|
||||
|
||||
buildInputs = [ font-util ];
|
||||
|
||||
configureFlags = [ "--with-fontrootdir=$(out)/share/fonts/X11" ];
|
||||
|
||||
passthru = {
|
||||
updateScript = writeScript "update-${finalAttrs.pname}" ''
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p common-updater-scripts
|
||||
version="$(list-directory-versions --pname ${finalAttrs.pname} \
|
||||
--url https://xorg.freedesktop.org/releases/individual/font/ \
|
||||
| sort -V | tail -n1)"
|
||||
update-source-version ${finalAttrs.pname} "$version"
|
||||
'';
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Misc pcf fonts in different sizes";
|
||||
homepage = "https://gitlab.freedesktop.org/xorg/font/misc-misc";
|
||||
license = lib.licenses.publicDomain;
|
||||
maintainers = [ ];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
})
|
||||
@@ -12,13 +12,13 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "fzf";
|
||||
version = "0.66.1";
|
||||
version = "0.67.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "junegunn";
|
||||
repo = "fzf";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-0dq4m5SGu37AGVUoFLgP40vjBTu6cYoUgB+ZhyfKi+M=";
|
||||
hash = "sha256-P6jyKskc2jT6zMLAMxklN8e/630oWYT4bWim20IMKvo=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-uFXHoseFOxGIGPiWxWfDl339vUv855VHYgSs9rnDyuI=";
|
||||
|
||||
@@ -16,14 +16,14 @@
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "gapless";
|
||||
version = "4.5";
|
||||
version = "4.6";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.gnome.org";
|
||||
owner = "neithern";
|
||||
repo = "g4music";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-P8hmywS/k+24KfFxpQdnBv0ArD+pKgUNcYk/Mnsx5jY=";
|
||||
hash = "sha256-UzOmf0it0vazKo4PhAhaobJFZc5YKBLq7bcexatROOA=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
+149
@@ -0,0 +1,149 @@
|
||||
From c27d6b2f66b26860ddd3811df7a5d02bc59a897c Mon Sep 17 00:00:00 2001
|
||||
From: eljamm <fedi.jamoussi@protonmail.ch>
|
||||
Date: Sun, 9 Nov 2025 20:48:07 +0100
|
||||
Subject: [PATCH] Get version with importlib instead of pkg_resource
|
||||
|
||||
---
|
||||
gdtoolkit/formatter/__main__.py | 4 ++--
|
||||
gdtoolkit/gd2py/__main__.py | 4 ++--
|
||||
gdtoolkit/gdradon/__main__.py | 4 ++--
|
||||
gdtoolkit/linter/__main__.py | 4 ++--
|
||||
gdtoolkit/parser/__main__.py | 4 ++--
|
||||
gdtoolkit/parser/parser.py | 4 ++--
|
||||
6 files changed, 12 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/gdtoolkit/formatter/__main__.py b/gdtoolkit/formatter/__main__.py
|
||||
index f71d1e3..7a6b0e4 100644
|
||||
--- a/gdtoolkit/formatter/__main__.py
|
||||
+++ b/gdtoolkit/formatter/__main__.py
|
||||
@@ -23,7 +23,7 @@ Examples:
|
||||
echo 'tool' | gdformat - # reads from STDIN
|
||||
"""
|
||||
import sys
|
||||
-import pkg_resources
|
||||
+from importlib.metadata import version as pkg_version
|
||||
import difflib
|
||||
from typing import List, Tuple
|
||||
|
||||
@@ -50,7 +50,7 @@ def main():
|
||||
arguments = docopt(
|
||||
__doc__,
|
||||
version="gdformat {}".format(
|
||||
- pkg_resources.get_distribution("gdtoolkit").version
|
||||
+ pkg_version("gdtoolkit")
|
||||
),
|
||||
)
|
||||
|
||||
diff --git a/gdtoolkit/gd2py/__main__.py b/gdtoolkit/gd2py/__main__.py
|
||||
index 47b85b2..bb69c7a 100644
|
||||
--- a/gdtoolkit/gd2py/__main__.py
|
||||
+++ b/gdtoolkit/gd2py/__main__.py
|
||||
@@ -17,7 +17,7 @@ Examples:
|
||||
gd2py ./addons/gut/gut.gd | radon cc -s -
|
||||
"""
|
||||
import sys
|
||||
-import pkg_resources
|
||||
+from importlib.metadata import version as pkg_version
|
||||
|
||||
from docopt import docopt
|
||||
|
||||
@@ -28,7 +28,7 @@ def main():
|
||||
sys.stdout.reconfigure(encoding="utf-8")
|
||||
arguments = docopt(
|
||||
__doc__,
|
||||
- version="gd2py {}".format(pkg_resources.get_distribution("gdtoolkit").version),
|
||||
+ version="gd2py {}".format(pkg_version("gdtoolkit")),
|
||||
)
|
||||
with open(arguments["<path>"], "r", encoding="utf-8") as fh:
|
||||
print(convert_code(fh.read()))
|
||||
diff --git a/gdtoolkit/gdradon/__main__.py b/gdtoolkit/gdradon/__main__.py
|
||||
index d9a2567..289c26e 100644
|
||||
--- a/gdtoolkit/gdradon/__main__.py
|
||||
+++ b/gdtoolkit/gdradon/__main__.py
|
||||
@@ -13,7 +13,7 @@ Examples:
|
||||
gdradon cc file1.gd file2.gd path/
|
||||
"""
|
||||
import sys
|
||||
-import pkg_resources
|
||||
+from importlib.metadata import version as pkg_version
|
||||
from typing import List
|
||||
|
||||
from docopt import docopt
|
||||
@@ -32,7 +32,7 @@ def main():
|
||||
arguments = docopt(
|
||||
__doc__,
|
||||
version="gdradon {}".format(
|
||||
- pkg_resources.get_distribution("gdtoolkit").version
|
||||
+ pkg_version("gdtoolkit")
|
||||
),
|
||||
)
|
||||
|
||||
diff --git a/gdtoolkit/linter/__main__.py b/gdtoolkit/linter/__main__.py
|
||||
index 90a8b4d..136aa5e 100644
|
||||
--- a/gdtoolkit/linter/__main__.py
|
||||
+++ b/gdtoolkit/linter/__main__.py
|
||||
@@ -16,7 +16,7 @@ Options:
|
||||
"""
|
||||
import sys
|
||||
import os
|
||||
-import pkg_resources
|
||||
+from importlib.metadata import version as pkg_version
|
||||
import logging
|
||||
import pathlib
|
||||
from typing import List, Optional
|
||||
@@ -43,7 +43,7 @@ CONFIG_FILE_NAME = "gdlintrc"
|
||||
def main():
|
||||
arguments = docopt(
|
||||
__doc__,
|
||||
- version="gdlint {}".format(pkg_resources.get_distribution("gdtoolkit").version),
|
||||
+ version="gdlint {}".format(pkg_version("gdtoolkit")),
|
||||
)
|
||||
|
||||
if arguments["--verbose"]:
|
||||
diff --git a/gdtoolkit/parser/__main__.py b/gdtoolkit/parser/__main__.py
|
||||
index 132dfc4..9914817 100644
|
||||
--- a/gdtoolkit/parser/__main__.py
|
||||
+++ b/gdtoolkit/parser/__main__.py
|
||||
@@ -13,7 +13,7 @@ Options:
|
||||
--version Show version.
|
||||
"""
|
||||
import sys
|
||||
-import pkg_resources
|
||||
+from importlib.metadata import version as pkg_version
|
||||
from typing import Dict
|
||||
|
||||
import lark
|
||||
@@ -30,7 +30,7 @@ def main():
|
||||
arguments = docopt(
|
||||
__doc__,
|
||||
version="gdparse {}".format(
|
||||
- pkg_resources.get_distribution("gdtoolkit").version
|
||||
+ pkg_version("gdtoolkit")
|
||||
),
|
||||
)
|
||||
files = arguments["<file>"]
|
||||
diff --git a/gdtoolkit/parser/parser.py b/gdtoolkit/parser/parser.py
|
||||
index 37cc544..51021ec 100644
|
||||
--- a/gdtoolkit/parser/parser.py
|
||||
+++ b/gdtoolkit/parser/parser.py
|
||||
@@ -6,7 +6,7 @@ and to get an intermediate representation as a Lark Tree.
|
||||
import os
|
||||
import pickle
|
||||
import sys
|
||||
-import pkg_resources
|
||||
+from importlib.metadata import version as pkg_version
|
||||
|
||||
from lark import Lark, Tree, indenter
|
||||
from lark.grammar import Rule
|
||||
@@ -77,7 +77,7 @@ class Parser:
|
||||
add_metadata: bool = False,
|
||||
grammar_filename: str = "gdscript.lark",
|
||||
) -> Tree:
|
||||
- version: str = pkg_resources.get_distribution("gdtoolkit").version
|
||||
+ version: str = pkg_version("gdtoolkit")
|
||||
|
||||
tree: Tree = None
|
||||
cache_filepath: str = (
|
||||
--
|
||||
2.50.1
|
||||
|
||||
@@ -16,35 +16,41 @@ let
|
||||
src = fetchFromGitHub {
|
||||
owner = "lark-parser";
|
||||
repo = "lark";
|
||||
rev = version;
|
||||
tag = version;
|
||||
hash = "sha256-KN9buVlH8hJ8t0ZP5yefeYM5vH5Gg7a7TEDGKJYpozs=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
patches = [ ];
|
||||
});
|
||||
};
|
||||
};
|
||||
in
|
||||
python.pkgs.buildPythonApplication rec {
|
||||
pname = "gdtoolkit3";
|
||||
version = "3.5.0";
|
||||
format = "setuptools";
|
||||
version = "3.6.0";
|
||||
pyproject = true;
|
||||
|
||||
# If we try to get using fetchPypi it requires GeoIP (but the package dont has that dep!?)
|
||||
src = fetchFromGitHub {
|
||||
owner = "Scony";
|
||||
repo = "godot-gdscript-toolkit";
|
||||
tag = version;
|
||||
hash = "sha256-cMGD5Xdf9ElS1NT7Q0NPB//EvUO0MI0VTtps5JRisZ4=";
|
||||
hash = "sha256-DRZgjCrz/U6jPx1grNuhZTx9iXNyxzR6xWoAm5DKtoA=";
|
||||
};
|
||||
|
||||
disabled = python.pythonOlder "3.7";
|
||||
# pkg_resources is deprecated and causes tests to fail
|
||||
patches = [
|
||||
./0001-Get-version-with-importlib-instead-of-pkg_resource.patch
|
||||
];
|
||||
|
||||
propagatedBuildInputs = with python.pkgs; [
|
||||
build-system = with python.pkgs; [
|
||||
setuptools
|
||||
];
|
||||
|
||||
dependencies = with python.pkgs; [
|
||||
docopt
|
||||
lark
|
||||
pyyaml
|
||||
setuptools
|
||||
radon
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
@@ -60,12 +66,6 @@ python.pkgs.buildPythonApplication rec {
|
||||
writableTmpDirAsHomeHook
|
||||
];
|
||||
|
||||
# The tests are not working on NixOS
|
||||
disabledTests = [
|
||||
"test_cc_on_empty_file_succeeds"
|
||||
"test_cc_on_file_with_single_function_succeeds"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"gdtoolkit"
|
||||
"gdtoolkit.formatter"
|
||||
@@ -73,11 +73,11 @@ python.pkgs.buildPythonApplication rec {
|
||||
"gdtoolkit.parser"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Independent set of tools for working with Godot's GDScript - parser, linter and formatter";
|
||||
homepage = "https://github.com/Scony/godot-gdscript-toolkit";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [
|
||||
shiryel
|
||||
tmarkus
|
||||
];
|
||||
|
||||
@@ -46,6 +46,9 @@ buildNpmPackage (finalAttrs: {
|
||||
|
||||
# Remove node-pty dependency from packages/core/package.json
|
||||
${jq}/bin/jq 'del(.optionalDependencies."node-pty")' packages/core/package.json > packages/core/package.json.tmp && mv packages/core/package.json.tmp packages/core/package.json
|
||||
|
||||
# Get rid of auto-update
|
||||
sed -i '/disableAutoUpdate: {/,/}/ s/default: false/default: true/' packages/cli/src/config/settingsSchema.ts
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
sqlite,
|
||||
zlib,
|
||||
fmt,
|
||||
jsoncpp,
|
||||
icu77,
|
||||
# options
|
||||
enableMysql ? false,
|
||||
libmysqlclient,
|
||||
@@ -121,13 +123,13 @@ let
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gerbera";
|
||||
version = "2.5.0";
|
||||
version = "3.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
repo = "gerbera";
|
||||
owner = "gerbera";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-3X8/8ewqXy9tvy4S9frmPENhsYTwaW6SydtJeiyVH1I=";
|
||||
sha256 = "sha256-dszd4WSTjOWwLNha0yq1gtC5kxCrJMhnnhKYaor8JyU=";
|
||||
};
|
||||
|
||||
postPatch =
|
||||
@@ -140,6 +142,7 @@ stdenv.mkDerivation rec {
|
||||
in
|
||||
''
|
||||
${mysqlPatch}
|
||||
substituteInPlace CMakeLists.txt --replace-fail /usr/share/bash-completion/completions $out/share/bash-completion/completions
|
||||
'';
|
||||
|
||||
cmakeFlags = [
|
||||
@@ -162,6 +165,8 @@ stdenv.mkDerivation rec {
|
||||
sqlite
|
||||
zlib
|
||||
fmt
|
||||
jsoncpp
|
||||
icu77
|
||||
]
|
||||
++ flatten (builtins.catAttrs "packages" (builtins.filter (e: e.enable) options));
|
||||
|
||||
|
||||
@@ -14,14 +14,14 @@
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "git-cola";
|
||||
version = "4.16.0";
|
||||
version = "4.16.1";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "git-cola";
|
||||
repo = "git-cola";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-gBqMwqmpu0+gMeffiFdwy/kBdCUQRpJr+3vzUkBCRSk=";
|
||||
hash = "sha256-rNu0D3mbGP9cEtVekwSgvjUoTKQkoLx6VuSbyXJEqjY=";
|
||||
};
|
||||
|
||||
build-system = with python3Packages; [
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "go2rtc";
|
||||
version = "1.9.11";
|
||||
version = "1.9.12";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "AlexxIT";
|
||||
repo = "go2rtc";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-MJb88RwASZnURnqb8nmCKvf8G3VW+Vd1JlNtbh7i/Ps=";
|
||||
hash = "sha256-NM8xH3HpfHOWVcOEM/bcWIwBSeKNLqhNfFTXE75xjH8=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-iOMIbeNh2+tNSMc5BR2h29a7uAru9ER/tPBI59PeeDY=";
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "goawk";
|
||||
version = "1.30.0";
|
||||
version = "1.30.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "benhoyt";
|
||||
repo = "goawk";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-wy7rMZ0JyOKWr5u0CTaIaUDuu/SlUR8oVNf4gXWsMWY=";
|
||||
hash = "sha256-143KcCeZOwn3FkAtpPkfbyTupYCWw2R+tD7R3ldla6I=";
|
||||
};
|
||||
|
||||
vendorHash = null;
|
||||
|
||||
@@ -6,16 +6,16 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "gogup";
|
||||
version = "0.28.0";
|
||||
version = "0.28.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nao1215";
|
||||
repo = "gup";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-VhkmBTU+Zov7w6t/StgQFM9iB36e114pR3Zo4QO3v7k=";
|
||||
hash = "sha256-n8bYmQcVtiuc55a+/LfS44PbVHCUZ7WUAWOmcodcy9Y=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-jFeP/0cwAWECuuqLwvMas4Nr7gjyB3BPPfD825yglwE=";
|
||||
vendorHash = "sha256-ldsGHIKiuVP48taK4kMqtF/xELl+JqAJUCGFKYZdJGU=";
|
||||
doCheck = false;
|
||||
|
||||
ldflags = [
|
||||
|
||||
@@ -11,18 +11,20 @@
|
||||
asio,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "hidviz";
|
||||
version = "0.2.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hidviz";
|
||||
repo = "hidviz";
|
||||
rev = "v${version}";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-ThDDQ3FN+cLCbdQCrC5zhL4dgg2zAbRWvtei7+qmQg8=";
|
||||
};
|
||||
|
||||
preConfigure = ''
|
||||
postPatch = ''
|
||||
substituteInPlace {hidviz,libhidx{,/libhidx{,_server{,_daemon}}}}/CMakeLists.txt \
|
||||
--replace-fail 'cmake_minimum_required(VERSION 3.2)' 'cmake_minimum_required(VERSION 3.10)'
|
||||
substituteInPlace libhidx/cmake_modules/Findasio.cmake --replace-fail '/usr/include/asio' '${lib.getDev asio}/include/asio'
|
||||
substituteInPlace libhidx/libhidx/src/Connector.cc --replace-fail '/usr/local/libexec' "$out/libexec"
|
||||
'';
|
||||
@@ -47,4 +49,4 @@ stdenv.mkDerivation rec {
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
}:
|
||||
buildGoModule rec {
|
||||
pname = "hyprls";
|
||||
version = "0.9.1";
|
||||
version = "0.10.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hyprland-community";
|
||||
repo = "hyprls";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-7bexF3j8xf68V8sWmf1uJrHhAn7+efZX8W6AWfUb/mE=";
|
||||
hash = "sha256-N6A6j4uhBt64KTIcdhvicAhrLo2EuxwyGbCm5pijCCs=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-QJyG3Kz/lSuuHpGLGDW8fjdhLZK6Pt7PtSPA8EY0ATM=";
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"desktop_webview_window": "sha256-l5n57iKLgsH4TaBYRaTDEPznzljI0jfOGcvxyYcIW6M=",
|
||||
"media_kit": "sha256-nzbpzzc/39qvnjkX5d3tfOE/dG0C7Wgr93Ru3cA2CmY=",
|
||||
"media_kit_libs_android_video": "sha256-nzbpzzc/39qvnjkX5d3tfOE/dG0C7Wgr93Ru3cA2CmY=",
|
||||
"media_kit_libs_ios_video": "sha256-nzbpzzc/39qvnjkX5d3tfOE/dG0C7Wgr93Ru3cA2CmY=",
|
||||
"media_kit_libs_linux": "sha256-nzbpzzc/39qvnjkX5d3tfOE/dG0C7Wgr93Ru3cA2CmY=",
|
||||
"media_kit_libs_macos_video": "sha256-nzbpzzc/39qvnjkX5d3tfOE/dG0C7Wgr93Ru3cA2CmY=",
|
||||
"media_kit_libs_video": "sha256-nzbpzzc/39qvnjkX5d3tfOE/dG0C7Wgr93Ru3cA2CmY=",
|
||||
"media_kit_libs_windows_video": "sha256-nzbpzzc/39qvnjkX5d3tfOE/dG0C7Wgr93Ru3cA2CmY=",
|
||||
"media_kit_video": "sha256-nzbpzzc/39qvnjkX5d3tfOE/dG0C7Wgr93Ru3cA2CmY=",
|
||||
"media_kit": "sha256-DW0dvyO6liA17ji3ZMJHhwWD3B6JDTHOMfx8iuBArVw=",
|
||||
"media_kit_libs_android_video": "sha256-DW0dvyO6liA17ji3ZMJHhwWD3B6JDTHOMfx8iuBArVw=",
|
||||
"media_kit_libs_ios_video": "sha256-DW0dvyO6liA17ji3ZMJHhwWD3B6JDTHOMfx8iuBArVw=",
|
||||
"media_kit_libs_linux": "sha256-DW0dvyO6liA17ji3ZMJHhwWD3B6JDTHOMfx8iuBArVw=",
|
||||
"media_kit_libs_macos_video": "sha256-DW0dvyO6liA17ji3ZMJHhwWD3B6JDTHOMfx8iuBArVw=",
|
||||
"media_kit_libs_video": "sha256-DW0dvyO6liA17ji3ZMJHhwWD3B6JDTHOMfx8iuBArVw=",
|
||||
"media_kit_libs_windows_video": "sha256-DW0dvyO6liA17ji3ZMJHhwWD3B6JDTHOMfx8iuBArVw=",
|
||||
"media_kit_video": "sha256-DW0dvyO6liA17ji3ZMJHhwWD3B6JDTHOMfx8iuBArVw=",
|
||||
"webview_windows": "sha256-6Uk4H2SYhjrs1+/27FmlWopDyM09Mc7SqFJ4syg3dDU="
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
flutter335,
|
||||
flutter338,
|
||||
fetchFromGitHub,
|
||||
autoPatchelfHook,
|
||||
alsa-lib,
|
||||
@@ -17,16 +17,16 @@
|
||||
}:
|
||||
|
||||
let
|
||||
version = "1.8.7";
|
||||
version = "1.8.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Predidit";
|
||||
repo = "Kazumi";
|
||||
tag = version;
|
||||
hash = "sha256-pt5mM6dCI0v+WExs7oExSGhDKj8yJ9Dpjk5NfCvr20I=";
|
||||
hash = "sha256-1Avocrqi5HkYQg+rusQJTiBhcfwnjt7uy+BSzGocc3s=";
|
||||
};
|
||||
in
|
||||
flutter335.buildFlutterApplication {
|
||||
flutter338.buildFlutterApplication {
|
||||
pname = "kazumi";
|
||||
inherit version src;
|
||||
|
||||
|
||||
@@ -969,8 +969,8 @@
|
||||
"dependency": "direct main",
|
||||
"description": {
|
||||
"path": "media_kit",
|
||||
"ref": "8c4b795d373243d1d64fea932ba497696fd89925",
|
||||
"resolved-ref": "8c4b795d373243d1d64fea932ba497696fd89925",
|
||||
"ref": "263aae1413fc5afad9cc5198a0d3e172cc24e418",
|
||||
"resolved-ref": "263aae1413fc5afad9cc5198a0d3e172cc24e418",
|
||||
"url": "https://github.com/Predidit/media-kit.git"
|
||||
},
|
||||
"source": "git",
|
||||
@@ -980,8 +980,8 @@
|
||||
"dependency": "direct overridden",
|
||||
"description": {
|
||||
"path": "libs/android/media_kit_libs_android_video",
|
||||
"ref": "8c4b795d373243d1d64fea932ba497696fd89925",
|
||||
"resolved-ref": "8c4b795d373243d1d64fea932ba497696fd89925",
|
||||
"ref": "263aae1413fc5afad9cc5198a0d3e172cc24e418",
|
||||
"resolved-ref": "263aae1413fc5afad9cc5198a0d3e172cc24e418",
|
||||
"url": "https://github.com/Predidit/media-kit.git"
|
||||
},
|
||||
"source": "git",
|
||||
@@ -991,8 +991,8 @@
|
||||
"dependency": "direct overridden",
|
||||
"description": {
|
||||
"path": "libs/ios/media_kit_libs_ios_video",
|
||||
"ref": "8c4b795d373243d1d64fea932ba497696fd89925",
|
||||
"resolved-ref": "8c4b795d373243d1d64fea932ba497696fd89925",
|
||||
"ref": "263aae1413fc5afad9cc5198a0d3e172cc24e418",
|
||||
"resolved-ref": "263aae1413fc5afad9cc5198a0d3e172cc24e418",
|
||||
"url": "https://github.com/Predidit/media-kit.git"
|
||||
},
|
||||
"source": "git",
|
||||
@@ -1002,8 +1002,8 @@
|
||||
"dependency": "direct overridden",
|
||||
"description": {
|
||||
"path": "libs/linux/media_kit_libs_linux",
|
||||
"ref": "8c4b795d373243d1d64fea932ba497696fd89925",
|
||||
"resolved-ref": "8c4b795d373243d1d64fea932ba497696fd89925",
|
||||
"ref": "263aae1413fc5afad9cc5198a0d3e172cc24e418",
|
||||
"resolved-ref": "263aae1413fc5afad9cc5198a0d3e172cc24e418",
|
||||
"url": "https://github.com/Predidit/media-kit.git"
|
||||
},
|
||||
"source": "git",
|
||||
@@ -1013,8 +1013,8 @@
|
||||
"dependency": "direct overridden",
|
||||
"description": {
|
||||
"path": "libs/macos/media_kit_libs_macos_video",
|
||||
"ref": "8c4b795d373243d1d64fea932ba497696fd89925",
|
||||
"resolved-ref": "8c4b795d373243d1d64fea932ba497696fd89925",
|
||||
"ref": "263aae1413fc5afad9cc5198a0d3e172cc24e418",
|
||||
"resolved-ref": "263aae1413fc5afad9cc5198a0d3e172cc24e418",
|
||||
"url": "https://github.com/Predidit/media-kit.git"
|
||||
},
|
||||
"source": "git",
|
||||
@@ -1024,8 +1024,8 @@
|
||||
"dependency": "direct main",
|
||||
"description": {
|
||||
"path": "libs/universal/media_kit_libs_video",
|
||||
"ref": "8c4b795d373243d1d64fea932ba497696fd89925",
|
||||
"resolved-ref": "8c4b795d373243d1d64fea932ba497696fd89925",
|
||||
"ref": "263aae1413fc5afad9cc5198a0d3e172cc24e418",
|
||||
"resolved-ref": "263aae1413fc5afad9cc5198a0d3e172cc24e418",
|
||||
"url": "https://github.com/Predidit/media-kit.git"
|
||||
},
|
||||
"source": "git",
|
||||
@@ -1035,8 +1035,8 @@
|
||||
"dependency": "direct overridden",
|
||||
"description": {
|
||||
"path": "libs/windows/media_kit_libs_windows_video",
|
||||
"ref": "8c4b795d373243d1d64fea932ba497696fd89925",
|
||||
"resolved-ref": "8c4b795d373243d1d64fea932ba497696fd89925",
|
||||
"ref": "263aae1413fc5afad9cc5198a0d3e172cc24e418",
|
||||
"resolved-ref": "263aae1413fc5afad9cc5198a0d3e172cc24e418",
|
||||
"url": "https://github.com/Predidit/media-kit.git"
|
||||
},
|
||||
"source": "git",
|
||||
@@ -1046,8 +1046,8 @@
|
||||
"dependency": "direct main",
|
||||
"description": {
|
||||
"path": "media_kit_video",
|
||||
"ref": "8c4b795d373243d1d64fea932ba497696fd89925",
|
||||
"resolved-ref": "8c4b795d373243d1d64fea932ba497696fd89925",
|
||||
"ref": "263aae1413fc5afad9cc5198a0d3e172cc24e418",
|
||||
"resolved-ref": "263aae1413fc5afad9cc5198a0d3e172cc24e418",
|
||||
"url": "https://github.com/Predidit/media-kit.git"
|
||||
},
|
||||
"source": "git",
|
||||
@@ -1067,11 +1067,11 @@
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "meta",
|
||||
"sha256": "e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c",
|
||||
"sha256": "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "1.16.0"
|
||||
"version": "1.17.0"
|
||||
},
|
||||
"mime": {
|
||||
"dependency": "transitive",
|
||||
@@ -1117,11 +1117,11 @@
|
||||
"dependency": "direct dev",
|
||||
"description": {
|
||||
"name": "msix",
|
||||
"sha256": "bbb9b3ff4a9f8e7e7507b2a22dc0517fd1fe3db44e72de7ab052cb6b362406ee",
|
||||
"sha256": "f88033fcb9e0dd8de5b18897cbebbd28ea30596810f4a7c86b12b0c03ace87e5",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "3.16.10"
|
||||
"version": "3.16.12"
|
||||
},
|
||||
"nested": {
|
||||
"dependency": "transitive",
|
||||
@@ -1414,7 +1414,7 @@
|
||||
"version": "4.0.1"
|
||||
},
|
||||
"screen_brightness_android": {
|
||||
"dependency": "transitive",
|
||||
"dependency": "direct main",
|
||||
"description": {
|
||||
"name": "screen_brightness_android",
|
||||
"sha256": "d34f5321abd03bc3474f4c381f53d189117eba0b039eac1916aa92cca5fd0a96",
|
||||
@@ -1424,7 +1424,7 @@
|
||||
"version": "2.1.3"
|
||||
},
|
||||
"screen_brightness_ios": {
|
||||
"dependency": "transitive",
|
||||
"dependency": "direct main",
|
||||
"description": {
|
||||
"name": "screen_brightness_ios",
|
||||
"sha256": "2493953340ecfe8f4f13f61db50ce72533a55b0bbd58ba1402893feecf3727f5",
|
||||
@@ -1783,11 +1783,11 @@
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "test_api",
|
||||
"sha256": "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00",
|
||||
"sha256": "ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "0.7.6"
|
||||
"version": "0.7.7"
|
||||
},
|
||||
"timing": {
|
||||
"dependency": "transitive",
|
||||
@@ -2009,16 +2009,6 @@
|
||||
"source": "hosted",
|
||||
"version": "15.0.0"
|
||||
},
|
||||
"volume_controller": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "volume_controller",
|
||||
"sha256": "d75039e69c0d90e7810bfd47e3eedf29ff8543ea7a10392792e81f9bded7edf5",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "3.4.0"
|
||||
},
|
||||
"wakelock_plus": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
@@ -2223,6 +2213,6 @@
|
||||
},
|
||||
"sdks": {
|
||||
"dart": ">=3.8.0 <4.0.0",
|
||||
"flutter": ">=3.35.7"
|
||||
"flutter": ">=3.38.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,16 +6,16 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "kubectl-tree";
|
||||
version = "0.4.3";
|
||||
version = "0.4.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ahmetb";
|
||||
repo = "kubectl-tree";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-J4/fiTECcTE0N2E+MPrQKE9Msvvm8DLdvLbnDUnUo74=";
|
||||
sha256 = "sha256-o5LfWVirp6ENYxqiUSvBDenAzeIIeio2WDD9Ll7Khgk=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-iblEfpYOvTjd3YXQ3Mmj5XckivHoXf4336H+F7NEfBA=";
|
||||
vendorHash = "sha256-8vfZDegdPUh7U1ApOYl3PgTPba5cIk4lwRo+5jTZU0s=";
|
||||
|
||||
meta = {
|
||||
description = "kubectl plugin to browse Kubernetes object hierarchies as a tree";
|
||||
|
||||
@@ -21,10 +21,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
hash = "sha256-Th30XO3m4GVeDvdb/RIwKT6+To9C/YU7y8s8hm7vPi0=";
|
||||
};
|
||||
|
||||
# https://github.com/ultravideo/kvazaar/pull/426
|
||||
postPatch = ''
|
||||
substituteInPlace CMakeLists.txt --replace-fail 'NOT LINUX' 'NOT LINUX AND NOT BSD'
|
||||
|
||||
substituteInPlace tests/util.sh --replace-fail '../libtool' '${lib.getExe libtool}'
|
||||
substituteInPlace tests/util.sh --replace-fail 'TAppDecoderStatic' '${lib.getExe' hm "TAppDecoder"}'
|
||||
|
||||
@@ -46,6 +43,8 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
||||
|
||||
env.XFAIL_TESTS = lib.optionalString stdenv.hostPlatform.isDarwin "test_slices.sh";
|
||||
|
||||
passthru = {
|
||||
updateScript = gitUpdater { rev-prefix = "v"; };
|
||||
tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
||||
|
||||
@@ -25,6 +25,10 @@ stdenv.mkDerivation {
|
||||
})
|
||||
];
|
||||
|
||||
# Allow install_name_tool rewrite paths on darwin.
|
||||
# error: install_name_tool: changing install names or rpaths can't be redone for: /nix/store/...-libamplsolver-.../lib/libamplsolver.dylib (for architecture arm64) because larger updated load commands do not fit (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names)
|
||||
NIX_LDFLAGS = lib.optional stdenv.hostPlatform.isDarwin "-headerpad_max_install_names";
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
pushd sys.$(uname -m).$(uname -s)
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "libdeltachat";
|
||||
version = "2.26.0";
|
||||
version = "2.27.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "chatmail";
|
||||
repo = "core";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-ULOnR1YvNmKr7iEuf8cZ+WgN4JRIG3md9gwyXK81vPQ=";
|
||||
hash = "sha256-kYVT3frpY/OrEhLqIEUFljqT8RW6wV9QiOa48ycCLDc=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
@@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
|
||||
cargoDeps = rustPlatform.fetchCargoVendor {
|
||||
pname = "chatmail-core";
|
||||
inherit version src;
|
||||
hash = "sha256-EkYlG32EhtIFFDpVgbKw8TSqHhPHgxd6Kh3wYN4Moq8=";
|
||||
hash = "sha256-Tz85eTwo+FVjUmwCBnKaRrgLkClsqN4hLE6l5lgMqzk=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchpatch2,
|
||||
fetchurl,
|
||||
cmake,
|
||||
pkg-config,
|
||||
@@ -23,6 +24,13 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "0jf5i1iv8j842imgiixbhwcr6qcwa93m27lzr6gb01ri5v35kggz";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch2 {
|
||||
url = "https://aur.archlinux.org/cgit/aur.git/plain/cmake_min_version.patch?h=libgaminggear&id=bfe7db62db76dbcefa8ba47640a35c80183f91d3";
|
||||
hash = "sha256-loznfqxlucYlDUSYotMdUBmivKu+DD+OYhRIWpcrSgE=";
|
||||
})
|
||||
];
|
||||
|
||||
outputs = [
|
||||
"dev"
|
||||
"out"
|
||||
|
||||
@@ -11,13 +11,13 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "liboqs";
|
||||
version = "0.14.0";
|
||||
version = "0.15.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "open-quantum-safe";
|
||||
repo = "liboqs";
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-BJgsXbKcQjJFk/A7JvkA0NKztv0BAnkgCAXv/TM2/04=";
|
||||
hash = "sha256-ATnI1QFFljTmMib6oOCiieDQMTwnEe+xIvcAzrz3bbI=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
||||
@@ -8,20 +8,20 @@
|
||||
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "librashader";
|
||||
version = "0.9.1";
|
||||
version = "0.9.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "SnowflakePowered";
|
||||
repo = "librashader";
|
||||
tag = "librashader-v${finalAttrs.version}";
|
||||
hash = "sha256-jrx7TzV9Q7JB8se6J5Wfa1iT1RSJnZbjEn7yTZ64zYU=";
|
||||
hash = "sha256-Jv7orDUusmI+CHPFXO7ILZ2vH11OwdSMBQfJuMBrlvI=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./patches/fix-optional-dep-syntax.patch
|
||||
];
|
||||
|
||||
cargoHash = "sha256-LFub48GklgOLncqazAIn2Bz+tSsXgS4TTnAdfYw7xHk=";
|
||||
cargoHash = "sha256-BS4290tih96NWhcpmQeFUjYfM6NKlQP070jCIkyxTuE=";
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "likwid";
|
||||
version = "5.4.1";
|
||||
version = "5.5.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://ftp.fau.de/pub/likwid/likwid-${version}.tar.gz";
|
||||
hash = "sha256-V3OFFFXbukieLjc1kx5RVHN3zReWyYKlrIjQ8imcCBE=";
|
||||
hash = "sha256-aIkk/gE0BwfCwxi3+GfuYPt1G5X0lUvILTofdqOhUFY=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ perl ];
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
vulkan-headers,
|
||||
vulkan-loader,
|
||||
ninja,
|
||||
git,
|
||||
}:
|
||||
|
||||
let
|
||||
@@ -92,7 +91,6 @@ effectiveStdenv.mkDerivation (finalAttrs: {
|
||||
cmake
|
||||
ninja
|
||||
pkg-config
|
||||
git
|
||||
]
|
||||
++ optionals cudaSupport [
|
||||
cudaPackages.cuda_nvcc
|
||||
|
||||
@@ -23,13 +23,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "lms";
|
||||
version = "3.71.0";
|
||||
version = "3.72.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "epoupon";
|
||||
repo = "lms";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-Bla4GmVbBJl/wjaD/CLnlvR/xMrTRwAlVODyMBkxzhw=";
|
||||
hash = "sha256-ZKMw2P9UeBVdQ0jKDdkAQ84GyviJ+YW9afCY/geKWnQ=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
Generated
+30
-25
@@ -1,13 +1,13 @@
|
||||
[
|
||||
{
|
||||
"pname": "BouncyCastle.Cryptography",
|
||||
"version": "2.4.0",
|
||||
"hash": "sha256-DoDZNWtYM+0OLIclOEZ+tjcGXymGlXvdvq2ZMPmiAJA="
|
||||
"version": "2.6.1",
|
||||
"hash": "sha256-0NNwK/UZlnIK4Nb7bs4ya0XfoVluKQPUVQvaR88UHKo="
|
||||
},
|
||||
{
|
||||
"pname": "CsvHelper",
|
||||
"version": "30.0.1",
|
||||
"hash": "sha256-lCfo0ZQUJFXABIi18fy/alC1YGwkwM+lGy2zL47RAWw="
|
||||
"version": "33.1.0",
|
||||
"hash": "sha256-pEfX4o63xupI7uuwe6qa05One0pJ7UbzzJqLh4Shju8="
|
||||
},
|
||||
{
|
||||
"pname": "LiteDB",
|
||||
@@ -16,62 +16,67 @@
|
||||
},
|
||||
{
|
||||
"pname": "MailKit",
|
||||
"version": "4.8.0",
|
||||
"hash": "sha256-ONvrVOwjxyNrIQM8FMzT5mLzlU56Kc8oOwkzegNAiXM="
|
||||
"version": "4.14.1",
|
||||
"hash": "sha256-YSEcfyYVskwJX6xa13wGW4JgHn0VpD04CtUiAGn3et0="
|
||||
},
|
||||
{
|
||||
"pname": "Microsoft.Extensions.DependencyInjection.Abstractions",
|
||||
"version": "8.0.0",
|
||||
"hash": "sha256-75KzEGWjbRELczJpCiJub+ltNUMMbz5A/1KQU+5dgP8="
|
||||
},
|
||||
{
|
||||
"pname": "Microsoft.Extensions.DependencyInjection.Abstractions",
|
||||
"version": "8.0.2",
|
||||
"hash": "sha256-UfLfEQAkXxDaVPC7foE/J3FVEXd31Pu6uQIhTic3JgY="
|
||||
},
|
||||
{
|
||||
"pname": "Microsoft.Extensions.Logging.Abstractions",
|
||||
"version": "8.0.0",
|
||||
"hash": "sha256-Jmddjeg8U5S+iBTwRlVAVLeIHxc4yrrNgqVMOB7EjM4="
|
||||
},
|
||||
{
|
||||
"pname": "Microsoft.Extensions.Logging.Abstractions",
|
||||
"version": "8.0.2",
|
||||
"hash": "sha256-cHpe8X2BgYa5DzulZfq24rg8O2K5Lmq2OiLhoyAVgJc="
|
||||
},
|
||||
{
|
||||
"pname": "Microsoft.IdentityModel.Abstractions",
|
||||
"version": "7.3.1",
|
||||
"hash": "sha256-lbZKfnulWcM4Mxbz6Hkrp/lM41hsOfCnsHLEb+u2czc="
|
||||
"version": "8.14.0",
|
||||
"hash": "sha256-bkCuz1Wj56N+LHWLvHKLcCtIRqBK+3k5vD2qfB7xXKk="
|
||||
},
|
||||
{
|
||||
"pname": "Microsoft.IdentityModel.JsonWebTokens",
|
||||
"version": "7.3.1",
|
||||
"hash": "sha256-C7uySnKBB0e5Wf6z8YNtjbtBbhalJMdqx0EWVcYy7Q4="
|
||||
"version": "8.14.0",
|
||||
"hash": "sha256-YBXaSWnLgxIQxv+Lwt2aRC20miFguNZbbuTc2Jjq+Ys="
|
||||
},
|
||||
{
|
||||
"pname": "Microsoft.IdentityModel.Logging",
|
||||
"version": "7.3.1",
|
||||
"hash": "sha256-6OHGsItAXicCSlW0ghCy5szNi6HwhlCmbykbN1O5yAw="
|
||||
"version": "8.14.0",
|
||||
"hash": "sha256-QvCJplLvTGTXZKGbRMccW2hld6oWUhHkneZd+msn9aE="
|
||||
},
|
||||
{
|
||||
"pname": "Microsoft.IdentityModel.Tokens",
|
||||
"version": "7.3.1",
|
||||
"hash": "sha256-qfTNU0g9QA8kV42VTAez1pSTmfFRJBbeTbGn/nfGFUU="
|
||||
"version": "8.14.0",
|
||||
"hash": "sha256-ALeMe3AjEy4dazHTBeR1JHMtzm+sqS3RbrjQWoNbuno="
|
||||
},
|
||||
{
|
||||
"pname": "MimeKit",
|
||||
"version": "4.8.0",
|
||||
"hash": "sha256-4EB54ktBXuq5QRID9i8E7FzU7YZTE4wwH+2yr7ivi/Q="
|
||||
"version": "4.14.0",
|
||||
"hash": "sha256-06dqA6w2V2D+miq387smCuJ/8fk1FVc0rvRjmglAWyM="
|
||||
},
|
||||
{
|
||||
"pname": "Npgsql",
|
||||
"version": "8.0.5",
|
||||
"hash": "sha256-vGIznPqwfhg8wY9bt5XlinyNWMr5kJ2jJZHDXc73uhI="
|
||||
"version": "9.0.4",
|
||||
"hash": "sha256-YH2QYLe56dH6NNGgSwLIaHefjkKQLh0Sf4vMWoJciyU="
|
||||
},
|
||||
{
|
||||
"pname": "System.Formats.Asn1",
|
||||
"version": "8.0.1",
|
||||
"hash": "sha256-may/Wg+esmm1N14kQTG4ESMBi+GQKPp0ZrrBo/o6OXM="
|
||||
},
|
||||
{
|
||||
"pname": "System.IdentityModel.Tokens.Jwt",
|
||||
"version": "7.3.1",
|
||||
"hash": "sha256-Si60aDtJSjvXvY5ZkVQKF3JzxAkmkAKOw5D/q8CwuyQ="
|
||||
},
|
||||
{
|
||||
"pname": "System.Security.Cryptography.Pkcs",
|
||||
"version": "8.0.0",
|
||||
"hash": "sha256-yqfIIeZchsII2KdcxJyApZNzxM/VKknjs25gDWlweBI="
|
||||
"version": "8.0.1",
|
||||
"hash": "sha256-KMNIkJ3yQ/5O6WIhPjyAIarsvIMhkp26A6aby5KkneU="
|
||||
}
|
||||
]
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
|
||||
buildDotnetModule rec {
|
||||
pname = "lubelogger";
|
||||
version = "1.4.5";
|
||||
version = "1.5.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hargata";
|
||||
repo = "lubelog";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-ZlB9lyfC4xrLWAb+Jbo6eI/LuYjvgMEauQeLxGCqy88=";
|
||||
hash = "sha256-YynkoqifKgEH8yiewcVVmMT0kX+NXaansJ7Z78NfXm4=";
|
||||
};
|
||||
|
||||
projectFile = "CarCareTracker.sln";
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
nix-update-script,
|
||||
}:
|
||||
let
|
||||
version = "0.9.0";
|
||||
version = "0.10.0";
|
||||
in
|
||||
rustPlatform.buildRustPackage {
|
||||
pname = "manga-tui";
|
||||
@@ -20,10 +20,10 @@ rustPlatform.buildRustPackage {
|
||||
owner = "josueBarretogit";
|
||||
repo = "manga-tui";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-Q+zTYdAaCztYYtSgHK1X7oE8Q7oHYpf+hAfGAzU4HoA=";
|
||||
hash = "sha256-HD/27YFapOq32DE89Y6RNTBGHvpCbh/0fOhUECVe8sM=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-FW+nrpFsQl38iqmhMyMmSvF/0W0iVy5+/Hyun8bWJP4=";
|
||||
cargoHash = "sha256-JvN9vG4kxmGd3odR/RnUV0dK7I94EEMITePyr0cP4pg=";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
|
||||
@@ -6,16 +6,16 @@
|
||||
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "mdfried";
|
||||
version = "0.14.4";
|
||||
version = "0.14.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "benjajaja";
|
||||
repo = "mdfried";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-MvyLJyCfZw4pCJOHwqcxtgKVrUE7dHFzoVyQwwfA69k=";
|
||||
hash = "sha256-eEjbWSkQcieHLNAPgWTZ1ZJEvoPkHzIaA0dHuqLzzyA=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-FFKtJI3mBkRQARm6urcgbUNnBEyZA3BI4epsRVb1dwc=";
|
||||
cargoHash = "sha256-sPAcSr+W4W4I3lHa6Km62Grp2ZdOCMHLZdN2KNrC0qw=";
|
||||
|
||||
doCheck = true;
|
||||
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "microcode-intel";
|
||||
version = "20250812";
|
||||
version = "20251111";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "intel";
|
||||
repo = "Intel-Linux-Processor-Microcode-Data-Files";
|
||||
rev = "microcode-${finalAttrs.version}";
|
||||
hash = "sha256-FfHSAMu4cvJKOjufr5ZwYHHn8dYa77jR5Br65vGP5Y8=";
|
||||
hash = "sha256-Gn3VKagfMtYbtkh70TlDmy0OBUUbsRiRxHkJtTGEVrY=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ libarchive ];
|
||||
|
||||
@@ -162,11 +162,11 @@ let
|
||||
in
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
pname = "microsoft-edge";
|
||||
version = "142.0.3595.65";
|
||||
version = "142.0.3595.80";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-stable/microsoft-edge-stable_${finalAttrs.version}-1_amd64.deb";
|
||||
hash = "sha256-aqQH4ttBWTjpzAEeWpheEJiu1FUMKMJu9j8Gu2pldbA=";
|
||||
hash = "sha256-yHOy/9t08GbY4ufsYPMr87NVqsk/CHGc7bu0N/KAOW0=";
|
||||
};
|
||||
|
||||
# With strictDeps on, some shebangs were not being patched correctly
|
||||
|
||||
@@ -52,14 +52,14 @@ let
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "mkvtoolnix";
|
||||
version = "95.0";
|
||||
version = "96.0";
|
||||
|
||||
src = fetchFromGitea {
|
||||
domain = "codeberg.org";
|
||||
owner = "mbunkus";
|
||||
repo = "mkvtoolnix";
|
||||
tag = "release-${finalAttrs.version}";
|
||||
hash = "sha256-FwOVqBHzgDveT8dGRfb2ONIAhCGEKU4UqpM3g7m0klA=";
|
||||
hash = "sha256-0jypoZK6lTWAQwcuOVH3EWtA9B01bVIay4HNgEDJIRI=";
|
||||
};
|
||||
|
||||
passthru = {
|
||||
|
||||
@@ -11,16 +11,16 @@
|
||||
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "mslicer";
|
||||
version = "0.2.2";
|
||||
version = "0.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "connorslade";
|
||||
repo = "mslicer";
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-37EOdMM/stMKwTTpQ0LWYZVUw2Y3CkoEGHWNthyQnSA=";
|
||||
hash = "sha256-k/LoJ+GqtVHZab5BEXQ5k2SJkM9hwbOkPA6c+3i9Ylo=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-nkNoyoMqcFLCuQ8TqRn4e5L2zbgjw615HIAuLVqg0vQ=";
|
||||
cargoHash = "sha256-a+nIVDjR+7Bh36GPNtWqKQvQgNo0w3KHWPmYpU7WMkM=";
|
||||
|
||||
buildInputs = [
|
||||
libglvnd
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "nakama";
|
||||
version = "3.33.1";
|
||||
version = "3.34.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "heroiclabs";
|
||||
repo = "nakama";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-e+Z8BmEbBJazSorIYuVIbrwKHATN9SWTBOh60ol/c8g=";
|
||||
hash = "sha256-fCQM3e1lsy1xHxoUZnVxMsRh+RLvNGGCN86DsEMjQys=";
|
||||
};
|
||||
|
||||
vendorHash = null;
|
||||
|
||||
@@ -22,23 +22,23 @@
|
||||
glib-networking,
|
||||
librsvg,
|
||||
gst_all_1,
|
||||
gitUpdater,
|
||||
nix-update-script,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "newsflash";
|
||||
version = "4.1.4";
|
||||
version = "4.2.1";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "news-flash";
|
||||
repo = "news_flash_gtk";
|
||||
tag = "v.${finalAttrs.version}";
|
||||
hash = "sha256-3RGa1f+V7dIgTxQKOceVSr7RwajUgwq05ypBhg6RjMA=";
|
||||
hash = "sha256-me9/2sA1Thne10+JrSMvicDRxXuevCnM8Tb+kwXzNDI=";
|
||||
};
|
||||
|
||||
cargoDeps = rustPlatform.fetchCargoVendor {
|
||||
inherit (finalAttrs) pname version src;
|
||||
hash = "sha256-CRQH22EP/G6osjsuZJmTWwjq4C06DxiIXlz6zxgbDv4=";
|
||||
hash = "sha256-cgu1zP85UCb/6gYNcj/khc6u1kSwX0UZ2oIjM2UUBOA=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
@@ -65,7 +65,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
# Provides setup hook to fix "Unrecognized image file format"
|
||||
gdk-pixbuf
|
||||
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
@@ -91,17 +90,20 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
gst-plugins-bad
|
||||
]);
|
||||
|
||||
# For https://gitlab.com/news-flash/news_flash_gtk/-/blob/8e5fc4acf5ca6be5b8cd616466a17e7a273f9dda/src/meson.build#L47
|
||||
# For https://gitlab.com/news-flash/news_flash_gtk/-/blob/v.4.2.1/src/meson.build#L48
|
||||
env.CARGO_BUILD_TARGET = stdenv.hostPlatform.rust.rustcTargetSpec;
|
||||
|
||||
passthru.updateScript = gitUpdater {
|
||||
rev-prefix = "v.";
|
||||
ignoredVersions = "(alpha|beta|rc)";
|
||||
passthru.updateScript = nix-update-script {
|
||||
extraArgs = [
|
||||
"--version-regex"
|
||||
"^v.(\\d+\\.\\d+\\.\\d+)$"
|
||||
];
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Modern feed reader designed for the GNOME desktop";
|
||||
homepage = "https://gitlab.com/news-flash/news_flash_gtk";
|
||||
changelog = "https://gitlab.com/news-flash/news_flash_gtk/-/raw/${finalAttrs.src.tag}/data/io.gitlab.news_flash.NewsFlash.appdata.xml.in.in#:~:text=%3Crelease%20version=%22${finalAttrs.version}%22,%3C/release%3E";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
maintainers = with lib.maintainers; [
|
||||
kira-bruneau
|
||||
|
||||
@@ -12,13 +12,13 @@
|
||||
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
pname = "nezha-theme-nazhua";
|
||||
version = "0.7.0";
|
||||
version = "0.8.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hi2shark";
|
||||
repo = "nazhua";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-zzdfttj6yURNgB0uS1DtwIREWbd88+oIkgiupjw/8oA=";
|
||||
hash = "sha256-kXiFvVSwOXn/MDwQIBmN+1wp8wO4P9hw1zcYcTBHmXA=";
|
||||
};
|
||||
|
||||
yarnOfflineCache = fetchYarnDeps {
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
let
|
||||
url = "https://github.com/macports/macports-ports/raw/abae7e550897dc13b7a48763a7a022b709d8793f/editors/nvi/files";
|
||||
hashes = {
|
||||
"dynamic_lookup-11.patch" = "sha256-eXLSMUtslSXLYd1HZRD6pfqcYMIA3EtixWL1yvx4ook=";
|
||||
"patch-common_key.h.diff" = "sha256-AAO/2lHpmFJMYb9fyQrWnGPaJYLdwhrp87tbHu5hr/k=";
|
||||
"patch-dist_port.h.in.diff" = "sha256-GPKgIm9pDGtN6CNqbX3+hANkZbYFql5K5JyjCr5TIKI=";
|
||||
"patch-ex_script.c.diff" = "sha256-IUuJ7b6A5O3q6qQCwZsrc9Bt1LpjU3DgxHTwtMp16Qc=";
|
||||
"patch-includes.diff" = "sha256-j3V4LmcJEFqnTlTHFZFd8NtycEa+GKM+ZIUwZHjq15w=";
|
||||
};
|
||||
in
|
||||
builtins.attrValues (
|
||||
builtins.mapAttrs (n: v: {
|
||||
url = "${url}/${n}";
|
||||
hash = v;
|
||||
extraPrefix = "";
|
||||
}) hashes
|
||||
)
|
||||
@@ -5,6 +5,7 @@
|
||||
fetchpatch,
|
||||
ncurses,
|
||||
db,
|
||||
libiconv,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@@ -13,31 +14,54 @@ stdenv.mkDerivation rec {
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://deb.debian.org/debian/pool/main/n/nvi/nvi_${version}.orig.tar.gz";
|
||||
sha256 = "13cp9iz017bk6ryi05jn7drbv7a5dyr201zqd3r4r8srj644ihwb";
|
||||
hash = "sha256-i8NIiJFZo0zyaPgHILJvRZ29cjtWFhB9NnOdAH5Ml40=";
|
||||
};
|
||||
|
||||
patches =
|
||||
# Apply patches from debian package
|
||||
map fetchurl (import ./debian-patches.nix);
|
||||
(map fetchurl (import ./debian-patches.nix))
|
||||
++
|
||||
# Also select patches from macports
|
||||
# They don't interfere with Linux build
|
||||
# https://github.com/macports/macports-ports/tree/master/editors/nvi/files
|
||||
(map fetchpatch (import ./macports-patches.nix));
|
||||
|
||||
buildInputs = [
|
||||
ncurses
|
||||
db
|
||||
];
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
|
||||
|
||||
preConfigure = ''
|
||||
cd build.unix
|
||||
'';
|
||||
|
||||
configureScript = "../dist/configure";
|
||||
|
||||
configureFlags = [
|
||||
"vi_cv_path_preserve=/tmp"
|
||||
"--enable-widechar"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
env.NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-liconv";
|
||||
|
||||
meta = {
|
||||
description = "Berkeley Vi Editor";
|
||||
license = licenses.free;
|
||||
platforms = platforms.unix;
|
||||
broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/nvi.x86_64-darwin
|
||||
longDescription = ''
|
||||
nvi ("new vi") is a re-implementation of the
|
||||
classic Berkeley text editor vi, written by
|
||||
Keith Bostic at UC Berkeley for 4BSD. Created
|
||||
to replace Unix-derived code in BSD, it provides
|
||||
a clean, unencumbered version of the original
|
||||
editor and is the default vi on all major BSD
|
||||
systems as well as MINIX.
|
||||
'';
|
||||
license = lib.licenses.bsd3;
|
||||
platforms = lib.platforms.unix;
|
||||
mainProgram = "vi";
|
||||
maintainers = with lib.maintainers; [
|
||||
suominen
|
||||
aleksana
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "nzbhydra2";
|
||||
version = "7.19.2";
|
||||
version = "8.0.0";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://github.com/theotherp/nzbhydra2/releases/download/v${version}/nzbhydra2-${version}-generic.zip";
|
||||
hash = "sha256-QFE8Zr7HGfMioiXWUKp5UvofK5IBb+gLpm1ytAEl3HM=";
|
||||
hash = "sha256-I/85BhIF7ROktMWijlaVwL3CrHrWtrJr3ETt3gF8yE4=";
|
||||
stripRoot = false;
|
||||
};
|
||||
|
||||
|
||||
@@ -8,16 +8,16 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "omnictl";
|
||||
version = "1.2.1";
|
||||
version = "1.3.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "siderolabs";
|
||||
repo = "omni";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-c3gsbNfYxnF06a3S2fkIEQrfRrj+NAMpEgcthooHdxg=";
|
||||
hash = "sha256-zeNGS39HD1i7K7SXFWnq30PgDnuvWMKa5vJLuzA0En0=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-Y6316MB3EYnvcLa+9QnfSY1wOHoEte5viMQx1vscvBs=";
|
||||
vendorHash = "sha256-/9SfrqoZuzDX/AALn398OxUXWNacnGd7fEmUUL5vayo=";
|
||||
|
||||
ldflags = [
|
||||
"-s"
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
liberation_ttf_v1,
|
||||
writeScript,
|
||||
xorg,
|
||||
nixosTests,
|
||||
}:
|
||||
|
||||
let
|
||||
@@ -72,6 +73,7 @@ let
|
||||
dontStrip = true;
|
||||
|
||||
passthru = {
|
||||
tests = nixosTests.onlyoffice;
|
||||
fhs = buildFHSEnv {
|
||||
name = "onlyoffice-wrapper";
|
||||
|
||||
|
||||
@@ -9,16 +9,16 @@
|
||||
|
||||
buildNpmPackage (finalAttrs: {
|
||||
pname = "openapi-down-convert";
|
||||
version = "0.14.1";
|
||||
version = "0.14.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "apiture";
|
||||
repo = "openapi-down-convert";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-8csxj2HfOb9agDmwNmksNaiQhRd+3D1tf0vWU2w+XWw=";
|
||||
hash = "sha256-auHZ6xfsOhGetzH4sSsZy+EC9eM06GKMww0h9iN8Heo=";
|
||||
};
|
||||
|
||||
npmDepsHash = "sha256-5VgFAiphahDKz3ZhzNEdQOFxvhvDy+S/qOClqBgMzSg=";
|
||||
npmDepsHash = "sha256-gVRHp28NhremVit34nngq0KvDn16m0xJIyUooiD7MtU=";
|
||||
|
||||
postInstall = ''
|
||||
find $out/lib -type f \( -name '*.ts' \) -delete
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user