2022-04-27 09:35:20 +00:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
# interface
|
|
|
|
options.programs.k3b = {
|
2024-05-15 15:35:15 +00:00
|
|
|
enable = lib.mkOption {
|
|
|
|
type = lib.types.bool;
|
2022-04-27 09:35:20 +00:00
|
|
|
default = false;
|
2024-04-21 15:54:59 +00:00
|
|
|
description = ''
|
2022-04-27 09:35:20 +00:00
|
|
|
Whether to enable k3b, the KDE disk burning application.
|
|
|
|
|
2022-08-21 13:32:41 +00: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-04-27 09:35:20 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# implementation
|
2024-05-15 15:35:15 +00:00
|
|
|
config = lib.mkIf config.programs.k3b.enable {
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
k3b
|
|
|
|
dvdplusrwtools
|
|
|
|
cdrdao
|
2023-02-09 11:40:11 +00:00
|
|
|
cdrtools
|
2022-04-27 09:35:20 +00: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-09 11:40:11 +00:00
|
|
|
source = "${pkgs.cdrtools}/bin/cdrecord";
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
}
|