2022-03-12 19:27:17 +01:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
# interface
|
|
|
|
options.programs.k3b = {
|
|
|
|
enable = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
default = false;
|
2022-08-15 07:16:25 +02:00
|
|
|
description = lib.mdDoc ''
|
2022-03-12 19:27:17 +01:00
|
|
|
Whether to enable k3b, the KDE disk burning application.
|
|
|
|
|
2022-08-15 07:16:25 +02:00
|
|
|
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.
|
2022-03-12 19:27:17 +01:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# implementation
|
|
|
|
config = mkIf config.programs.k3b.enable {
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
k3b
|
|
|
|
dvdplusrwtools
|
|
|
|
cdrdao
|
2023-02-03 03:30:22 +01:00
|
|
|
cdrtools
|
2022-03-12 19:27:17 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
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";
|
2023-02-03 03:30:22 +01:00
|
|
|
source = "${pkgs.cdrtools}/bin/cdrecord";
|
2022-03-12 19:27:17 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
}
|