nixpkgs/nixos/modules/programs/soundmodem.nix

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

35 lines
783 B
Nix
Raw Normal View History

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