about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorMichael Peyton Jones <me@michaelpj.com>2018-12-04 19:00:18 +0000
committerJan Tojnar <jtojnar@gmail.com>2018-12-18 00:32:13 +0100
commitf64bc036a55bb387b60c879bed89a54afd2c7a89 (patch)
treebab1d7e51d7e0c5e3986c1c94139bd40ff767bfd /nixos
parent758f271fba854a25eef3ccd314b7e8a36407a765 (diff)
downloadnixlib-f64bc036a55bb387b60c879bed89a54afd2c7a89.tar
nixlib-f64bc036a55bb387b60c879bed89a54afd2c7a89.tar.gz
nixlib-f64bc036a55bb387b60c879bed89a54afd2c7a89.tar.bz2
nixlib-f64bc036a55bb387b60c879bed89a54afd2c7a89.tar.lz
nixlib-f64bc036a55bb387b60c879bed89a54afd2c7a89.tar.xz
nixlib-f64bc036a55bb387b60c879bed89a54afd2c7a89.tar.zst
nixlib-f64bc036a55bb387b60c879bed89a54afd2c7a89.zip
nixos: add XDG sounds module
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/config/xdg/sounds.nix22
-rw-r--r--nixos/modules/module-list.nix1
2 files changed, 23 insertions, 0 deletions
diff --git a/nixos/modules/config/xdg/sounds.nix b/nixos/modules/config/xdg/sounds.nix
new file mode 100644
index 000000000000..148240d631cf
--- /dev/null
+++ b/nixos/modules/config/xdg/sounds.nix
@@ -0,0 +1,22 @@
+{ config, lib, ... }:
+
+with lib;
+{
+  options = {
+    xdg.sounds.enable = mkOption {
+      type = types.bool;
+      default = true;
+      description = ''
+        Whether to install files to support the
+        <link xlink:href="https://www.freedesktop.org/wiki/Specifications/sound-theme-spec/">XDG Sound Theme specification</link>.
+      '';
+    };
+  };
+
+  config = mkIf config.xdg.sounds.enable {
+    environment.pathsToLink = [
+      "/share/sounds"
+    ];
+  };
+
+}
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index 09ed55c0699a..01eb766fb4dd 100644
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
@@ -12,6 +12,7 @@
   ./config/xdg/menus.nix
   ./config/xdg/mime.nix
   ./config/appstream.nix
+  ./config/xdg/sounds.nix
   ./config/gtk/gtk-icon-cache.nix
   ./config/gnu.nix
   ./config/i18n.nix