mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00

This reverts commit 8a34d575f6
.
PR #351093 removed the `programs.k3b` module due to some confusion about
its relevance. In order to write CDs, the security wrappers that allow
running cdrao and cdrecord with elevated privileges are in fact
necessary.
53 lines
1.2 KiB
Nix
53 lines
1.2 KiB
Nix
{
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}:
|
|
|
|
{
|
|
options.programs.k3b = {
|
|
enable = lib.mkOption {
|
|
type = lib.types.bool;
|
|
default = false;
|
|
description = ''
|
|
Whether to enable k3b, the KDE disk burning application.
|
|
|
|
Additionally to installing `k3b` enabling this will
|
|
add `setuid` wrappers in `/run/wrappers/bin`
|
|
for both `cdrdao` and `cdrecord`. On first
|
|
run you must manually configure the path of `cdrdae` and
|
|
`cdrecord` to correspond to the appropriate paths under
|
|
`/run/wrappers/bin` in the "Setup External Programs" menu.
|
|
'';
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf config.programs.k3b.enable {
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
kdePackages.k3b
|
|
dvdplusrwtools
|
|
cdrdao
|
|
cdrtools
|
|
];
|
|
|
|
security.wrappers = {
|
|
cdrdao = {
|
|
setuid = true;
|
|
owner = "root";
|
|
group = "cdrom";
|
|
permissions = "u+wrx,g+x";
|
|
source = "${pkgs.cdrdao}/bin/cdrdao";
|
|
};
|
|
cdrecord = {
|
|
setuid = true;
|
|
owner = "root";
|
|
group = "cdrom";
|
|
permissions = "u+wrx,g+x";
|
|
source = "${pkgs.cdrtools}/bin/cdrecord";
|
|
};
|
|
};
|
|
|
|
};
|
|
}
|