···16161717- `linuxPackages_testing_bcachefs` is now fully deprecated by `linuxPackages_latest`, and is therefore no longer available.
18181919+- The default kernel package has been updated from 6.1 to 6.6. All supported kernels remain available.
2020+1921- NixOS now installs a stub ELF loader that prints an informative error message when users attempt to run binaries not made for NixOS.
2022 - This can be disabled through the `environment.stub-ld.enable` option.
2123 - If you use `programs.nix-ld.enable`, no changes are needed. The stub will be disabled automatically.
···3636 provisioned outside of Nix store.
3737 '';
3838 };
3939+ nutVariables = mkOption {
4040+ type = types.listOf types.str;
4141+ default = [ ];
4242+ description = ''
4343+ List of NUT variable names to monitor.
4444+4545+ If no variables are set, all numeric variables will be exported automatically.
4646+ See the [upstream docs](https://github.com/DRuggeri/nut_exporter?tab=readme-ov-file#variables-and-information)
4747+ for more information.
4848+ '';
4949+ };
3950 };
4051 serviceOpts = {
4152 script = ''
···4455 ${pkgs.prometheus-nut-exporter}/bin/nut_exporter \
4556 --nut.server=${cfg.nutServer} \
4657 --web.listen-address="${cfg.listenAddress}:${toString cfg.port}" \
4747- ${optionalString (cfg.nutUser != "") "--nut.username=${cfg.nutUser}"}
5858+ ${optionalString (cfg.nutUser != "") "--nut.username=${cfg.nutUser}"} \
5959+ ${optionalString (cfg.nutVariables != []) "--nut.vars_enable=${concatStringsSep "," cfg.nutVariables}"} \
6060+ ${concatStringsSep " " cfg.extraFlags}
4861 '';
4962 };
5063}
+5
nixos/tests/k3s/default.nix
···66 allK3s = lib.filterAttrs (n: _: lib.strings.hasPrefix "k3s_" n) pkgs;
77in
88{
99+ # Testing K3s with Etcd backend
1010+ etcd = lib.mapAttrs (_: k3s: import ./etcd.nix {
1111+ inherit system pkgs k3s;
1212+ inherit (pkgs) etcd;
1313+ }) allK3s;
914 # Run a single node k3s cluster and verify a pod can run
1015 single-node = lib.mapAttrs (_: k3s: import ./single-node.nix { inherit system pkgs k3s; }) allK3s;
1116 # Run a multi-node k3s cluster and verify pod networking works across nodes
+100
nixos/tests/k3s/etcd.nix
···11+import ../make-test-python.nix ({ pkgs, lib, k3s, etcd, ... }:
22+33+{
44+ name = "${k3s.name}-etcd";
55+66+ nodes = {
77+88+ etcd = { ... }: {
99+ services.etcd = {
1010+ enable = true;
1111+ openFirewall = true;
1212+ listenClientUrls = [ "http://192.168.1.1:2379" "http://127.0.0.1:2379" ];
1313+ listenPeerUrls = [ "http://192.168.1.1:2380" ];
1414+ initialAdvertisePeerUrls = [ "http://192.168.1.1:2380" ];
1515+ initialCluster = [ "etcd=http://192.168.1.1:2380" ];
1616+ };
1717+ networking = {
1818+ useDHCP = false;
1919+ defaultGateway = "192.168.1.1";
2020+ interfaces.eth1.ipv4.addresses = pkgs.lib.mkForce [
2121+ { address = "192.168.1.1"; prefixLength = 24; }
2222+ ];
2323+ };
2424+ };
2525+2626+ k3s = { pkgs, ... }: {
2727+ environment.systemPackages = with pkgs; [ jq ];
2828+ # k3s uses enough resources the default vm fails.
2929+ virtualisation.memorySize = 1536;
3030+ virtualisation.diskSize = 4096;
3131+3232+ services.k3s = {
3333+ enable = true;
3434+ role = "server";
3535+ extraFlags = builtins.toString [
3636+ "--datastore-endpoint=\"http://192.168.1.1:2379\""
3737+ "--disable" "coredns"
3838+ "--disable" "local-storage"
3939+ "--disable" "metrics-server"
4040+ "--disable" "servicelb"
4141+ "--disable" "traefik"
4242+ "--node-ip" "192.168.1.2"
4343+ ];
4444+ };
4545+4646+ networking = {
4747+ firewall = {
4848+ allowedTCPPorts = [ 2379 2380 6443 ];
4949+ allowedUDPPorts = [ 8472 ];
5050+ };
5151+ useDHCP = false;
5252+ defaultGateway = "192.168.1.2";
5353+ interfaces.eth1.ipv4.addresses = pkgs.lib.mkForce [
5454+ { address = "192.168.1.2"; prefixLength = 24; }
5555+ ];
5656+ };
5757+ };
5858+5959+ };
6060+6161+ testScript = ''
6262+ with subtest("should start etcd"):
6363+ etcd.start()
6464+ etcd.wait_for_unit("etcd.service")
6565+6666+ with subtest("should wait for etcdctl endpoint status to succeed"):
6767+ etcd.wait_until_succeeds("etcdctl endpoint status")
6868+6969+ with subtest("should start k3s"):
7070+ k3s.start()
7171+ k3s.wait_for_unit("k3s")
7272+7373+ with subtest("should test if kubectl works"):
7474+ k3s.wait_until_succeeds("k3s kubectl get node")
7575+7676+ with subtest("should wait for service account to show up; takes a sec"):
7777+ k3s.wait_until_succeeds("k3s kubectl get serviceaccount default")
7878+7979+ with subtest("should create a sample secret object"):
8080+ k3s.succeed("k3s kubectl create secret generic nixossecret --from-literal thesecret=abacadabra")
8181+8282+ with subtest("should check if secret is correct"):
8383+ k3s.wait_until_succeeds("[[ $(kubectl get secrets nixossecret -o json | jq -r .data.thesecret | base64 -d) == abacadabra ]]")
8484+8585+ with subtest("should have a secret in database"):
8686+ etcd.wait_until_succeeds("[[ $(etcdctl get /registry/secrets/default/nixossecret | head -c1 | wc -c) -ne 0 ]]")
8787+8888+ with subtest("should delete the secret"):
8989+ k3s.succeed("k3s kubectl delete secret nixossecret")
9090+9191+ with subtest("should not have a secret in database"):
9292+ etcd.wait_until_fails("[[ $(etcdctl get /registry/secrets/default/nixossecret | head -c1 | wc -c) -ne 0 ]]")
9393+9494+ with subtest("should shutdown k3s and etcd"):
9595+ k3s.shutdown()
9696+ etcd.shutdown()
9797+ '';
9898+9999+ meta.maintainers = etcd.meta.maintainers ++ k3s.meta.maintainers;
100100+})
···11+{ lib
22+, autoreconfHook
33+, bc
44+, fetchFromGitHub
55+, gettext
66+, makeWrapper
77+, perl
88+, python3
99+, screen
1010+, stdenv
1111+, vim
1212+, tmux
1313+}:
1414+1515+let
1616+ pythonEnv = python3.withPackages (ps: with ps; [ snack ]);
1717+in
1818+stdenv.mkDerivation (finalAttrs: {
1919+ pname = "byobu";
2020+ version = "6.12";
2121+2222+ src = fetchFromGitHub {
2323+ owner = "dustinkirkland";
2424+ repo = "byobu";
2525+ rev = finalAttrs.version;
2626+ hash = "sha256-NzC9Njsnz14mfKnERGDZw8O3vux0wnfCKwjUeTBQswc=";
2727+ };
2828+2929+ nativeBuildInputs = [
3030+ autoreconfHook
3131+ gettext
3232+ makeWrapper
3333+ ];
3434+3535+ buildInputs = [
3636+ perl # perl is needed for `lib/byobu/include/*` scripts
3737+ screen
3838+ tmux
3939+ ];
4040+4141+ doCheck = true;
4242+ strictDeps = true;
4343+4444+ postPatch = ''
4545+ for file in usr/bin/byobu-export.in usr/lib/byobu/menu; do
4646+ substituteInPlace $file \
4747+ --replace "gettext" "${gettext}/bin/gettext"
4848+ done
4949+ '';
5050+5151+ postInstall = ''
5252+ # By some reason the po files are not being compiled
5353+ for po in po/*.po; do
5454+ lang=''${po#po/}
5555+ lang=''${lang%.po}
5656+ # Path where byobu looks for translations, as observed in the source code
5757+ # and strace
5858+ mkdir -p $out/share/byobu/po/$lang/LC_MESSAGES/
5959+ msgfmt --verbose $po -o $out/share/byobu/po/$lang/LC_MESSAGES/byobu.mo
6060+ done
6161+6262+ # Override the symlinks, otherwise they mess with the wrapping
6363+ cp --remove-destination $out/bin/byobu $out/bin/byobu-screen
6464+ cp --remove-destination $out/bin/byobu $out/bin/byobu-tmux
6565+6666+ for file in $out/bin/byobu*; do
6767+ # We don't use the usual "-wrapped" suffix because arg0 within the shebang
6868+ # scripts points to the filename and byobu matches against this to know
6969+ # which backend to start with
7070+ bname="$(basename $file)"
7171+ mv "$file" "$out/bin/.$bname"
7272+ makeWrapper "$out/bin/.$bname" "$out/bin/$bname" \
7373+ --argv0 $bname \
7474+ --prefix PATH ":" "$out/bin" \
7575+ --set BYOBU_PATH ${lib.makeBinPath [ vim bc ]} \
7676+ --set BYOBU_PYTHON "${pythonEnv}/bin/python"
7777+ done
7878+ '';
7979+8080+ meta = {
8181+ homepage = "https://www.byobu.org/";
8282+ description = "Text-based window manager and terminal multiplexer";
8383+ longDescription = ''
8484+ Byobu is a text-based window manager and terminal multiplexer. It was
8585+ originally designed to provide elegant enhancements to the otherwise
8686+ functional, plain, practical GNU Screen, for the Ubuntu server
8787+ distribution. Byobu now includes an enhanced profiles, convenient
8888+ keybindings, configuration utilities, and toggle-able system status
8989+ notifications for both the GNU Screen window manager and the more modern
9090+ Tmux terminal multiplexer, and works on most Linux, BSD, and Mac
9191+ distributions.
9292+ '';
9393+ license = with lib.licenses; [ gpl3Plus ];
9494+ mainProgram = "byobu";
9595+ maintainers = with lib.maintainers; [ AndersonTorres ];
9696+ platforms = lib.platforms.unix;
9797+ };
9898+})
···11{ lib
22, buildPythonPackage
33+, cloudpickle
44+, einops
35, fetchFromGitHub
66+, jax
47, jaxlib
55-, pythonRelaxDepsHook
66-, setuptools-scm
77-, jax
88+, keras
99+, matplotlib
810, msgpack
911, numpy
1012, optax
1313+, orbax-checkpoint
1414+, pytest-xdist
1515+, pytestCheckHook
1616+, pythonOlder
1717+, pythonRelaxDepsHook
1118, pyyaml
1219, rich
2020+, setuptools-scm
2121+, tensorflow
1322, tensorstore
1423, typing-extensions
1515-, matplotlib
1616-, cloudpickle
1717-, einops
1818-, keras
1919-, pytest-xdist
2020-, pytestCheckHook
2121-, tensorflow
2224}:
23252426buildPythonPackage rec {
···2628 version = "0.7.5";
2729 pyproject = true;
28303131+ disabled = pythonOlder "3.8";
3232+2933 src = fetchFromGitHub {
3034 owner = "google";
3135 repo = "flax";
···4448 msgpack
4549 numpy
4650 optax
5151+ orbax-checkpoint
4752 pyyaml
4853 rich
4954 tensorstore
···7580 disabledTestPaths = [
7681 # Docs test, needs extra deps + we're not interested in it.
7782 "docs/_ext/codediff_test.py"
7878-7983 # The tests in `examples` are not designed to be executed from a single test
8084 # session and thus either have the modules that conflict with each other or
8185 # wrong import paths, depending on how they're invoked. Many tests also have
···8387 # `tensorflow_datasets`, `vocabulary`) so the benefits of trying to run them
8488 # would be limited anyway.
8589 "examples/*"
8686-8790 # See https://github.com/google/flax/issues/3232.
8891 "tests/jax_utils_test.py"
9292+ # Requires tree
9393+ "tests/tensorboard_test.py"
9494+ ];
89959090- # Requires orbax which is not packaged as of 2023-07-27.
9191- "tests/checkpoints_test.py"
9696+ disabledTests = [
9797+ # ValueError: Checkpoint path should be absolute
9898+ "test_overwrite_checkpoints0"
9299 ];
9310094101 meta = with lib; {
···11-{ lib, stdenv, fetchurl, makeWrapper
22-, python3, perl, textual-window-manager
33-, gettext, vim, bc, screen }:
44-55-let
66- pythonEnv = python3.withPackages (ps: with ps; [ snack ]);
77-in
88-stdenv.mkDerivation rec {
99- version = "5.133";
1010- pname = "byobu";
1111-1212- src = fetchurl {
1313- url = "https://launchpad.net/byobu/trunk/${version}/+download/byobu_${version}.orig.tar.gz";
1414- sha256 = "0qvmmdnvwqbgbhn5c8asmrmjhclcl029py2d2zvmd7h5ij7s93jd";
1515- };
1616-1717- doCheck = true;
1818-1919- strictdeps = true;
2020- nativeBuildInputs = [ makeWrapper gettext ];
2121- buildInputs = [ perl ]; # perl is needed for `lib/byobu/include/*` scripts
2222- propagatedBuildInputs = [ textual-window-manager screen ];
2323-2424- postPatch = ''
2525- substituteInPlace usr/bin/byobu-export.in \
2626- --replace "gettext" "${gettext}/bin/gettext"
2727- substituteInPlace usr/lib/byobu/menu \
2828- --replace "gettext" "${gettext}/bin/gettext"
2929- '';
3030-3131- postInstall = ''
3232- # Byobu does not compile its po files for some reason
3333- for po in po/*.po; do
3434- lang=''${po#po/}
3535- lang=''${lang%.po}
3636- # Path where byobu looks for translations as observed in the source code and strace
3737- mkdir -p $out/share/byobu/po/$lang/LC_MESSAGES/
3838- msgfmt $po -o $out/share/byobu/po/$lang/LC_MESSAGES/byobu.mo
3939- done
4040-4141- # Override the symlinks otherwise they mess with the wrapping
4242- cp --remove-destination $out/bin/byobu $out/bin/byobu-screen
4343- cp --remove-destination $out/bin/byobu $out/bin/byobu-tmux
4444-4545- for i in $out/bin/byobu*; do
4646- # We don't use the usual ".$package-wrapped" because arg0 within the shebang scripts
4747- # points to the filename and byobu matches against this to know which backend
4848- # to start with
4949- file=".$(basename $i)"
5050- mv $i $out/bin/$file
5151- makeWrapper "$out/bin/$file" "$out/bin/$(basename $i)" --argv0 $(basename $i) \
5252- --set BYOBU_PATH ${lib.escapeShellArg (lib.makeBinPath [ vim bc ])} \
5353- --set BYOBU_PYTHON "${pythonEnv}/bin/python"
5454- done
5555- '';
5656-5757- meta = with lib; {
5858- homepage = "https://launchpad.net/byobu/";
5959- description = "Text-based window manager and terminal multiplexer";
6060-6161- longDescription =
6262- ''Byobu is a GPLv3 open source text-based window manager and terminal multiplexer.
6363- It was originally designed to provide elegant enhancements to the otherwise functional,
6464- plain, practical GNU Screen, for the Ubuntu server distribution.
6565- Byobu now includes an enhanced profiles, convenient keybindings,
6666- configuration utilities, and toggle-able system status notifications for both
6767- the GNU Screen window manager and the more modern Tmux terminal multiplexer,
6868- and works on most Linux, BSD, and Mac distributions.
6969- '';
7070-7171- license = licenses.gpl3;
7272-7373- platforms = platforms.unix;
7474- maintainers = with maintainers; [ qknight berbiche ];
7575- };
7676-}
···669669 });
670670671671 packageAliases = {
672672- linux_default = packages.linux_6_1;
672672+ linux_default = packages.linux_6_6;
673673 # Update this when adding the newest kernel major version!
674674 linux_latest = packages.linux_6_7;
675675 linux_mptcp = throw "'linux_mptcp' has been moved to https://github.com/teto/mptcp-flake";