at 24.11-pre 1.2 kB view raw
1{ config, pkgs, lib, ... }: 2 3{ 4 # interface 5 options.programs.k3b = { 6 enable = lib.mkOption { 7 type = lib.types.bool; 8 default = false; 9 description = '' 10 Whether to enable k3b, the KDE disk burning application. 11 12 Additionally to installing `k3b` enabling this will 13 add `setuid` wrappers in `/run/wrappers/bin` 14 for both `cdrdao` and `cdrecord`. On first 15 run you must manually configure the path of `cdrdae` and 16 `cdrecord` to correspond to the appropriate paths under 17 `/run/wrappers/bin` in the "Setup External Programs" menu. 18 ''; 19 }; 20 }; 21 22 # implementation 23 config = lib.mkIf config.programs.k3b.enable { 24 25 environment.systemPackages = with pkgs; [ 26 k3b 27 dvdplusrwtools 28 cdrdao 29 cdrtools 30 ]; 31 32 security.wrappers = { 33 cdrdao = { 34 setuid = true; 35 owner = "root"; 36 group = "cdrom"; 37 permissions = "u+wrx,g+x"; 38 source = "${pkgs.cdrdao}/bin/cdrdao"; 39 }; 40 cdrecord = { 41 setuid = true; 42 owner = "root"; 43 group = "cdrom"; 44 permissions = "u+wrx,g+x"; 45 source = "${pkgs.cdrtools}/bin/cdrecord"; 46 }; 47 }; 48 49 }; 50}