Hello.
So I was finally able to upgrade to 25.05 and I figured out that weechat serivice is broken.
Jun 06 23:09:35 machine systemd[1]: Started weechat.service.
Jun 06 23:09:35 machine weechat-start[22708]: Error accessing /var/empty/.screen
Jun 06 23:09:35 machine systemd[1]: weechat.service: Main process exited, code=exited, status=1/FAILURE
Jun 06 23:09:35 machine systemd[1]: weechat.service: Failed with result 'exit-code'.
I’m just using:
services.weechat.enable = true;
in my configuration.nix file.
Possible workaround:
services.weechat = {
enable = true;
};
users.users.weechat = {
isSystemUser = true;
description = "Weechat system user";
home = "/var/lib/weechat";
createHome = true;
shell = "${pkgs.shadow}/bin/nologin";
};
1 Like
Bug already opened by someone else with different solution:
opened 05:58PM - 16 Mar 25 UTC
0.kind: bug
6.topic: nixos
### Nixpkgs version
- Unstable (25.05)
### Describe the bug
Please see in-con… text explanation here:
https://github.com/NixOS/nixpkgs/commit/e66ee6f45f1ce59a07a5fc88f2c95bb3dc06a01a#commitcomment-153807595
Copied here:
Commit https://github.com/NixOS/nixpkgs/commit/e66ee6f45f1ce59a07a5fc88f2c95bb3dc06a01a removes `createHome`. Therefore, upgrading a config that overrides `root` fails with the following:
```
Cannot access /var/empty/.screen: No such file or directory
weechat.service: Failed with result 'exit-code'.
```
which makes sense because screen needs somewhere to put its state, and it doesn't have a home for that with said commit.
I believe the recent changes were not tested with a non-default `root`, even though this option looks supported and non-deprecated.
I had to manually apply the following workarounds to make it work again:
```nix
services.weechat = { enable = true; root = "/not/your/usual/path"; };
# Set HOME, needed by screen.
systemd.services.weechat.environment.HOME = "/var/lib/weechat";
# Use systemd to create a home for weechat,
# even if the actual state is under `services.weechat.root`
# which is NOT `/var/lib/weechat` in my case.
systemd.services.weechat.serviceConfig.StateDirectory = "weechat";
```
### Steps to reproduce
```nix
services.weechat = { enable = true; root = "/not/your/usual/path"; };
```
### Expected behaviour
weechat.service starts successfully
### Screenshots
_No response_
### Relevant log output
```console
Mar 16 18:05:36 nas systemd[1]: Started weechat.service.
Mar 16 18:05:36 nas weechat-start[3064282]: Cannot access /var/empty/.screen: No such file or directory
Mar 16 18:05:36 nas systemd[1]: weechat.service: Main process exited, code=exited, status=1/FAILURE
Mar 16 18:05:36 nas systemd[1]: weechat.service: Failed with result 'exit-code'.
```
### Additional context
_No response_
### System metadata
Irrelevant.
### Notify maintainers
@felixsinger
### I assert that this issue is relevant for Nixpkgs
- [x] I assert that this is a bug and not a support request.
- [x] I assert that this is not a [duplicate of an existing issue](https://github.com/NixOS/nixpkgs/issues?q=is%3Aopen+is%3Aissue+label%3A%220.kind%3A+bug%22+label%3A%226.topic%3A+nixos%22).
- [x] I assert that I have read the [NixOS Code of Conduct](https://github.com/NixOS/.github/blob/master/CODE_OF_CONDUCT.md) and agree to abide by it.
### Is this issue important to you?
Add a :+1: [reaction] to [issues you find important].
[reaction]: https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/
[issues you find important]: https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc
1 Like