Skip to content

nixos/traefik: refactor - #482512

Merged
adamcstephens merged 4 commits into
NixOS:masterfrom
SigmaSquadron:push-lysqxmrwmzlt
Feb 10, 2026
Merged

nixos/traefik: refactor#482512
adamcstephens merged 4 commits into
NixOS:masterfrom
SigmaSquadron:push-lysqxmrwmzlt

Conversation

@SigmaSquadron

Copy link
Copy Markdown
Contributor

@TheRealGramdalf's Traefik refactor, split off from #437073

Closes #471071

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

@SigmaSquadron

Copy link
Copy Markdown
Contributor Author

@ofborg test simple

@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: changelog This PR adds or changes release notes 8.has: module (update) This PR changes an existing module in `nixos/` 8.has: documentation This PR adds or changes documentation labels Jan 22, 2026

@TheRealGramdalf TheRealGramdalf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a couple things that need fixing, but they are mostly minor. Feel free to make the changes, I doubt I'll have a ton of time in the near future.

Comment thread nixos/modules/services/web-servers/traefik.nix Outdated
Comment thread nixos/modules/services/web-servers/traefik.nix
Comment thread nixos/modules/services/web-servers/traefik.nix Outdated
Comment thread nixos/modules/services/web-servers/traefik.nix Outdated
Comment thread nixos/modules/services/web-servers/traefik.nix Outdated
Comment thread nixos/modules/services/web-servers/traefik.nix Outdated
Comment thread nixos/modules/services/web-servers/traefik.nix
Comment thread nixos/modules/services/web-servers/traefik.nix
Comment thread nixos/modules/services/web-servers/traefik.nix
Comment thread nixos/modules/services/web-servers/traefik.nix
@SigmaSquadron

Copy link
Copy Markdown
Contributor Author

Reorganised the module, and dropped dynamic.settings and extraFiles, so we just have dynamic.files instead.

@SigmaSquadron
SigmaSquadron force-pushed the push-lysqxmrwmzlt branch 3 times, most recently from f396626 to bc137fe Compare January 22, 2026 13:39
Comment thread nixos/modules/services/networking/pangolin.nix
Comment thread nixos/modules/services/web-servers/traefik.nix
Comment thread nixos/doc/manual/release-notes/rl-2605.section.md Outdated
Comment thread nixos/modules/services/web-servers/traefik.nix Outdated
@SigmaSquadron

Copy link
Copy Markdown
Contributor Author

Everything should be ready now.

@TheRealGramdalf

Copy link
Copy Markdown
Contributor

LGTM!

Thanks again for all the work to bring this over the finish line.

@SigmaSquadron

Copy link
Copy Markdown
Contributor Author

Minor update to make sure an assertion actually fires and isn't smothered by another assertion.

@nixpkgs-ci nixpkgs-ci Bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Jan 22, 2026
@SigmaSquadron

Copy link
Copy Markdown
Contributor Author

Fixed the logic of the docker group warning

@nixpkgs-ci nixpkgs-ci Bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Jan 23, 2026
@SigmaSquadron

Copy link
Copy Markdown
Contributor Author

Thanks for the review, Sandro. Changes addressed.

@nixpkgs-ci nixpkgs-ci Bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Jan 23, 2026
TheRealGramdalf and others added 4 commits January 24, 2026 09:16
Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
NPROC is per UID, which can cause problems in containerized setups; TasksMax
should be preferred as it is only for this service and not the UID.
Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
@adamcstephens

Copy link
Copy Markdown
Contributor

Are we good to go on this? Any final concerns @SuperSandro2000 ?

@SigmaSquadron
SigmaSquadron deleted the push-lysqxmrwmzlt branch February 7, 2026 06:20
@SigmaSquadron
SigmaSquadron restored the push-lysqxmrwmzlt branch February 7, 2026 06:22
@SigmaSquadron SigmaSquadron reopened this Feb 7, 2026
@SigmaSquadron

SigmaSquadron commented Feb 7, 2026

Copy link
Copy Markdown
Contributor Author

Wrong lever!

@TheRealGramdalf

TheRealGramdalf commented Feb 7, 2026

Copy link
Copy Markdown
Contributor

Wrong lever!

"A llama? He's supposed to be dead!"

My only concern would be making a post to the unstable updates discourse thread. This shouldn't be a breaking change, but it's a fairly large overhaul with the potential for wacky edge cases.

@SigmaSquadron

Copy link
Copy Markdown
Contributor Author

As soon as it's merged I can add a reply there.

@adamcstephens adamcstephens left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's do this.

@adamcstephens
adamcstephens added this pull request to the merge queue Feb 10, 2026
Merged via the queue into NixOS:master with commit e1c8086 Feb 10, 2026
54 of 56 checks passed
@nixos-discourse

Copy link
Copy Markdown

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/breaking-changes-announcement-for-unstable/17574/121

@SigmaSquadron
SigmaSquadron deleted the push-lysqxmrwmzlt branch February 10, 2026 13:08
@MatthewCroughan

Copy link
Copy Markdown
Contributor

This PR should not have been merged whilst the traefik.tests continued to fail, and was not updated in line with the module change.

nix-build -A traefik.tests
error:
       … while evaluating the attribute 'drvPath'
         at /home/matthew/git/nixpkgs/lib/customisation.nix:446:7:
          445|     // {
          446|       drvPath =
             |       ^
          447|         assert condition;

       … while calling the 'derivationStrict' builtin
         at «nix-internal»/derivation-internal.nix:37:12:
           36|
           37|   strict = derivationStrict drvAttrs;
             |            ^
           38|

       … while evaluating the option `nodes.traefik.system.build.toplevel':

       … while evaluating definitions from `/home/matthew/git/nixpkgs/nixos/modules/system/activation/top-level.nix':

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error:
       Failed assertions:
       - 'services.traefik.dynamic.files' requires the dynamic file provider to be set
       to a directory. Please set a path for 'services.traefik.dynamic.dir'.

@SigmaSquadron

Copy link
Copy Markdown
Contributor Author

Followup in #490814.

@TheRealGramdalf

Copy link
Copy Markdown
Contributor

I looked into this a little bit and I don't recognize this: https://github.com/NixOS/nixpkgs/pull/482512/changes#diff-023d14a18ce025c19e53d56dbf4a5f5ccb5d8e82676905b55cf31ffe385b5ac4R434-R444
I don't fully know what happened yet, but I do not think that code means what you think it means. I was quite intentional with how I implemented the changes, such that migration would be simple and that the new system would be powerful but not obtuse. I think I was too tolerant of changes, with the end result being a compromise between my initial idea and what others wanted.

Perhaps this is selfish, but I would propose we revert to my initial implementation of dynamic settings - I felt like it was a good way to add some quality of life without adding a black box that tries to do everything for you.

@SigmaSquadron

Copy link
Copy Markdown
Contributor Author

If you believe that this hasn't been reviewed enough, I think it is best to revert this for now and try again later. The blast radius is thankfully limited to unstable.

@adamcstephens

Copy link
Copy Markdown
Contributor

Sorry everyone. While I did put this through some of my own tests with my config and things looked ok, I clearly didn't validate enough. And also neglected the tests 😞

@jackrosenberg

Copy link
Copy Markdown
Member

Followup in #490985

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: changelog This PR adds or changes release notes 8.has: documentation This PR adds or changes documentation 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nixos/modules/services/web-servers/traefik.nix: 'group' option not applied correctly

8 participants