nixpkgs/nixos/modules/programs/soundmodem.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
796 B
Nix
Raw Normal View History

{
config,
lib,
pkgs,
...
}:
2024-04-08 19:06:24 +00:00
let
cfg = config.programs.soundmodem;
in
{
options = {
programs.soundmodem = {
enable = lib.mkOption {
type = lib.types.bool;
2024-04-08 19:06:24 +00:00
default = false;
description = ''
2024-04-08 19:06:24 +00:00
Whether to add Soundmodem to the global environment and configure a
wrapper for 'soundmodemconfig' for users in the 'soundmodem' group.
'';
};
package = lib.mkPackageOption pkgs "soundmodem" { };
2024-04-08 19:06:24 +00:00
};
};
config = lib.mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
2024-04-08 19:06:24 +00:00
users.groups.soundmodem = { };
security.wrappers.soundmodemconfig = {
source = "${cfg.package}/bin/soundmodemconfig";
owner = "root";
group = "soundmodem";
permissions = "u+rx,g+x";
};
};
}