Skip to content

systemd: specify default-user-shell#458591

Merged
ElvishJerricco merged 1 commit into
NixOS:stagingfrom
andre4ik3:systemd-user-shell-bash
Nov 5, 2025
Merged

systemd: specify default-user-shell#458591
ElvishJerricco merged 1 commit into
NixOS:stagingfrom
andre4ik3:systemd-user-shell-bash

Conversation

@andre4ik3

Copy link
Copy Markdown
Contributor

This option is used to specify the default shell used for homed users, among other things. By default it is set to /bin/bash which doesn't exist on NixOS.

Setting this option makes homectl create work without having to specify --shell /run/current-system/sw/bin/bash.

(I'm currently building the NixOS tests but it will take a while due to needing to rebuild the world in staging. I tested the change by setting systemd.package on unstable and it worked.)

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.

Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 6.topic: systemd Software suite that provides an array of system components for Linux operating systems. labels Nov 4, 2025

@ElvishJerricco ElvishJerricco 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.

Incidentally, I was experimenting with exactly this a couple of weeks ago and discovered the need for the exact same fix. So I've already tested this weeks ago and found it good :P Forgot to open a PR though. Thanks!

Probably still need to run relevant NixOS tests though. I'll do that soon.

@nixpkgs-ci nixpkgs-ci Bot added 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. labels Nov 4, 2025
@ElvishJerricco

Copy link
Copy Markdown
Contributor

nixosTests.systemd-homed passes

@ElvishJerricco ElvishJerricco added this pull request to the merge queue Nov 4, 2025
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 4, 2025
@andre4ik3

andre4ik3 commented Nov 4, 2025

Copy link
Copy Markdown
Contributor Author

It's failing to run nixfmt due to a hash mismatch?

image

The code is definitely properly formatted because the check passed for the PR. Not sure what to do here...

@mdaniels5757

Copy link
Copy Markdown
Member

Re-running CI due to a since-fixed unrelated treefmt-nix failure

@mdaniels5757 mdaniels5757 reopened this Nov 5, 2025
@andre4ik3

Copy link
Copy Markdown
Contributor Author

@mdaniels5757 Looks like it's still broken 😕

@mdaniels5757

mdaniels5757 commented Nov 5, 2025

Copy link
Copy Markdown
Member

Hmm. It fixed itself on other PRs when re-running, though. Maybe let's try again???

@mdaniels5757

Copy link
Copy Markdown
Member

OH, this targets staging.

This option is used to specify the default shell used for homed users,
among other things. By default it is set to `/bin/bash` which doesn't
exist on NixOS.

Setting this option makes `homectl create` work without having to
specify `--shell /run/current-system/sw/bin/bash`.
@andre4ik3 andre4ik3 force-pushed the systemd-user-shell-bash branch from d4fe9a6 to 21f767a Compare November 5, 2025 07:21
@andre4ik3

Copy link
Copy Markdown
Contributor Author

I did a force-push with the same commit contents, just a different timestamp to trigger the CI to run again.

@ElvishJerricco ElvishJerricco added this pull request to the merge queue Nov 5, 2025
Merged via the queue into NixOS:staging with commit 1988d10 Nov 5, 2025
26 of 30 checks passed
@andre4ik3 andre4ik3 deleted the systemd-user-shell-bash branch November 5, 2025 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: systemd Software suite that provides an array of system components for Linux operating systems. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants