Merge pull request #302656 from Stunkymonkey/soundmodem-dekstop-sudo
This commit is contained in:
commit
1501bf1129
3 changed files with 51 additions and 3 deletions
|
@ -265,6 +265,7 @@
|
|||
./programs/skim.nix
|
||||
./programs/slock.nix
|
||||
./programs/sniffnet.nix
|
||||
./programs/soundmodem.nix
|
||||
./programs/spacefm.nix
|
||||
./programs/ssh.nix
|
||||
./programs/starship.nix
|
||||
|
@ -286,8 +287,8 @@
|
|||
./programs/virt-manager.nix
|
||||
./programs/wavemon.nix
|
||||
./programs/wayland/cardboard.nix
|
||||
./programs/wayland/labwc.nix
|
||||
./programs/wayland/hyprland.nix
|
||||
./programs/wayland/labwc.nix
|
||||
./programs/wayland/river.nix
|
||||
./programs/wayland/sway.nix
|
||||
./programs/wayland/waybar.nix
|
||||
|
|
34
nixos/modules/programs/soundmodem.nix
Normal file
34
nixos/modules/programs/soundmodem.nix
Normal file
|
@ -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";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
{ lib, stdenv, fetchurl, pkg-config, alsa-lib, audiofile, gtk2, libxml2 }:
|
||||
{ lib, stdenv, fetchurl, pkg-config, alsa-lib, audiofile, gtk2, libxml2, copyDesktopItems, makeDesktopItem }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "soundmodem";
|
||||
|
@ -9,13 +9,26 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "156l3wjnh5rcisxb42kcmlf74swf679v4xnj09zy5j74rd4h721z";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
copyDesktopItems
|
||||
];
|
||||
buildInputs = [ alsa-lib audiofile gtk2 libxml2 ];
|
||||
|
||||
patches = [ ./matFix.patch ];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
desktopItems = [
|
||||
(makeDesktopItem {
|
||||
name = "SoundmodemConfig";
|
||||
exec = "soundmodemconfig";
|
||||
desktopName = "SoundModemConfig";
|
||||
comment = "Audio based modem for ham radio supporting ax.25";
|
||||
categories = [ "Audio" ];
|
||||
})
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Audio based modem for ham radio supporting ax.25";
|
||||
longDescription = ''
|
||||
|
|
Loading…
Reference in a new issue