-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos/murmur: support setting custom stateDir, user and group #348534
Conversation
3ef7d3c
to
8cb7aff
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<policy user="murmur">
<allow own="net.sourceforge.mumble.murmur"/>
</policy>
Policy user needs to be changed as well.
8cb7aff
to
c554357
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
environmentFile = mkOption {
type = types.nullOr types.path;
default = null;
example = "/var/lib/murmur/murmurd.env";
...
};
Make use of cfg.stateDir in the example.
Looks good otherwise.
c554357
to
6ccd9a8
Compare
@GrahamcOfBorg test mumble |
For some reason apparmor gets triggered because of denied accesses, but I can't see why. @thoughtpolice Since you are listed as the maintainer of the Mumble tests can you help here? |
With the trailing slash there are no more DENIED messages in the nixosTests.mumble's log. diff --git a/nixos/modules/services/networking/murmur.nix b/nixos/modules/services/networking/murmur.nix
index ef1dcde16748..3d8a5ca96298 100644
--- a/nixos/modules/services/networking/murmur.nix
+++ b/nixos/modules/services/networking/murmur.nix
@@ -414,7 +414,7 @@ in
r ${config.environment.etc."lsb-release".source},
owner rwk ${cfg.stateDir}/murmur.sqlite,
owner rw ${cfg.stateDir}/murmur.sqlite-journal,
- owner r ${cfg.stateDir},
+ owner r ${cfg.stateDir}/,
r /run/murmur/murmurd.pid,
r /run/murmur/murmurd.ini,
r ${configFile}, |
6ccd9a8
to
9de1a21
Compare
Sorry to have overlooked the trailing slash. I've added it in this PR. |
@GrahamcOfBorg test mumble |
9de1a21
to
59b354d
Compare
This PR supports setting custom state directory, user and group for the Murmur service:
The
stateDir
,user
, andgroup
options are common in other modules as well. It should be easy for users to use and bring no breaking changes.Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.