From 6a8e8e92a7d666f4b462dd0a84cae604c72dd0e5 Mon Sep 17 00:00:00 2001 From: Nikita Uvarov Date: Tue, 12 Sep 2017 16:26:52 +0200 Subject: [PATCH] blueman-applet: add module --- modules/default.nix | 1 + modules/misc/news.nix | 6 ++++++ modules/services/blueman-applet.nix | 29 +++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 modules/services/blueman-applet.nix diff --git a/modules/default.nix b/modules/default.nix index 67e855a36..03ab0764b 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -34,6 +34,7 @@ let ./programs/texlive.nix ./programs/vim.nix ./programs/zsh.nix + ./services/blueman-applet.nix ./services/dunst.nix ./services/gnome-keyring.nix ./services/gpg-agent.nix diff --git a/modules/misc/news.nix b/modules/misc/news.nix index 0fdb66049..13735b45e 100644 --- a/modules/misc/news.nix +++ b/modules/misc/news.nix @@ -107,6 +107,12 @@ in config = { news.entries = [ + { + time = "2017-09-12T14:22:18+00:00"; + message = '' + A new service is available: 'services.blueman-applet'. + ''; + } { time = "2017-09-12T13:11:48+00:00"; condition = ( diff --git a/modules/services/blueman-applet.nix b/modules/services/blueman-applet.nix new file mode 100644 index 000000000..d8e58385c --- /dev/null +++ b/modules/services/blueman-applet.nix @@ -0,0 +1,29 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + options = { + services.blueman-applet = { + enable = mkEnableOption "Blueman applet"; + }; + }; + + config = mkIf config.services.blueman-applet.enable { + systemd.user.services.blueman-applet = { + Unit = { + Description = "Blueman applet"; + After = [ "graphical-session-pre.target" ]; + PartOf = [ "graphical-session.target" ]; + }; + + Install = { + WantedBy = [ "graphical-session.target" ]; + }; + + Service = { + ExecStart = "${pkgs.blueman}/bin/blueman-applet"; + }; + }; + }; +}