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