Luke Granger-Brown
57725ef3ec
git-subtree-dir: third_party/nixpkgs git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
50 lines
1.2 KiB
Nix
50 lines
1.2 KiB
Nix
{ config, pkgs, lib, ... }:
|
|
|
|
{
|
|
# interface
|
|
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.
|
|
'';
|
|
};
|
|
};
|
|
|
|
# implementation
|
|
config = lib.mkIf config.programs.k3b.enable {
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
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";
|
|
};
|
|
};
|
|
|
|
};
|
|
}
|