diff options
author | Felix Buehler <account@buehler.rocks> | 2024-04-08 21:06:24 +0200 |
---|---|---|
committer | Felix Buehler <account@buehler.rocks> | 2024-04-08 22:15:16 +0200 |
commit | a172aaec9b12473ffb6c4596dec1fd964538d62c (patch) | |
tree | de03c92bbfd6842591a3d987a5793252126fa961 /nixos/modules/programs/soundmodem.nix | |
parent | 9d05397e502674799ad3a983fcd19e5763940d39 (diff) |
nixos/soundmodem: init
Diffstat (limited to 'nixos/modules/programs/soundmodem.nix')
-rw-r--r-- | nixos/modules/programs/soundmodem.nix | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/nixos/modules/programs/soundmodem.nix b/nixos/modules/programs/soundmodem.nix new file mode 100644 index 0000000000000..59c1f2fb2dedd --- /dev/null +++ b/nixos/modules/programs/soundmodem.nix @@ -0,0 +1,34 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.programs.soundmodem; +in +{ + options = { + programs.soundmodem = { + enable = mkOption { + type = types.bool; + default = false; + description = lib.mdDoc '' + 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 = [ soundmodem ]; + users.groups.soundmodem = { }; + + security.wrappers.soundmodemconfig = { + source = "${cfg.package}/bin/soundmodemconfig"; + owner = "root"; + group = "soundmodem"; + permissions = "u+rx,g+x"; + }; + }; +} |