diff options
author | Aaron Andersen <aaron@fosslib.net> | 2022-04-30 09:17:27 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-30 09:17:27 -0400 |
commit | 213febe39a1908874008b321b848d364e004ea44 (patch) | |
tree | 31d0518d5d005fc7f05e0750c8c96e7ec6201786 /nixos | |
parent | c3932802025fa431e347c0f64cf22f1ac4735c87 (diff) | |
parent | 87b4440a6001bb239a210e1c4a1fec2e95fdd1d6 (diff) |
Merge pull request #163883 from ngiger/k3b
nixos/k3b: init
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/module-list.nix | 1 | ||||
-rw-r--r-- | nixos/modules/programs/k3b.nix | 52 |
2 files changed, 53 insertions, 0 deletions
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 2349e5e62bda2..b132808ad06da 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -172,6 +172,7 @@ ./programs/java.nix ./programs/k40-whisperer.nix ./programs/kclock.nix + ./programs/k3b.nix ./programs/kdeconnect.nix ./programs/kbdlight.nix ./programs/less.nix diff --git a/nixos/modules/programs/k3b.nix b/nixos/modules/programs/k3b.nix new file mode 100644 index 0000000000000..68a4d08f349c2 --- /dev/null +++ b/nixos/modules/programs/k3b.nix @@ -0,0 +1,52 @@ +{ config, pkgs, lib, ... }: + +with lib; + +{ + # interface + options.programs.k3b = { + enable = mkOption { + type = types.bool; + default = false; + description = '' + Whether to enable k3b, the KDE disk burning application. + + Additionally to installing <package>k3b</package> enabling this will + add <literal>setuid</literal> wrappers in <literal>/run/wrappers/bin</literal> + for both <package>cdrdao</package> and <package>cdrecord</package>. On first + run you must manually configure the path of <package>cdrdae</package> and + <package>cdrecord</package> to correspond to the appropriate paths under + <literal>/run/wrappers/bin</literal> in the "Setup External Programs" menu. + ''; + }; + }; + + # implementation + config = mkIf config.programs.k3b.enable { + + environment.systemPackages = with pkgs; [ + k3b + dvdplusrwtools + cdrdao + cdrkit + ]; + + 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.cdrkit}/bin/cdrecord"; + }; + }; + + }; +} |