From 7e9a8131a37ed019ee80016ff7cbf7bed0d2e3b3 Mon Sep 17 00:00:00 2001 From: Jean-Pierre PRUNARET Date: Mon, 18 Jul 2016 12:14:43 +0200 Subject: [PATCH] =?UTF-8?q?d=C3=A9placement=20de=20la=20d=C3=A9finition=20?= =?UTF-8?q?de=20la=20variable=20awesome?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- activation-manuelle/app-awesome.nix | 20 ++++++++++++++++++++ desktop.nix | 10 +--------- 2 files changed, 21 insertions(+), 9 deletions(-) create mode 100644 activation-manuelle/app-awesome.nix diff --git a/activation-manuelle/app-awesome.nix b/activation-manuelle/app-awesome.nix new file mode 100644 index 0000000..e0ccfd0 --- /dev/null +++ b/activation-manuelle/app-awesome.nix @@ -0,0 +1,20 @@ +{ config, lib, pkgs, ... }: +let + inherit (lib) mkIf; + cfg = config.r6d.config-generator; + profiles = config.r6d.profiles; +in { + imports = [ + ]; + + environment.variables = mkIf cfg.awesome { + # Export the current path for the awesome derivation, useful for users rc.lua + # Example usage in rc.lua : + # + # config = {} + # config.dir = os.getenv("AWESOME_CONFIG_DIR") + # beautiful.init(config.dir .. "/share/awesome//themes/zenburn/theme.lua") + # + AWESOME_CONFIG_DIR = "${pkgs.awesome}"; + }; +} diff --git a/desktop.nix b/desktop.nix index 8a1a7e3..c5ecbcc 100644 --- a/desktop.nix +++ b/desktop.nix @@ -3,6 +3,7 @@ { imports = [ # applications : # commandées par config-generator + ./activation-manuelle/app-awesome.nix # pour les profils awesome ./activation-manuelle/app-docker.nix # pour activer docker ./activation-manuelle/app-jeux.nix # permettant de jouer ;) ./activation-manuelle/app-virtualbox.nix # pour exploiter virtualbox @@ -50,15 +51,6 @@ mumble = pkgs.mumble.override { pulseSupport = true; }; }; - # Export the current path for the awesome derivation, useful for users rc.lua - # Example usage in rc.lua : - # - # config = {} - # config.dir = os.getenv("AWESOME_CONFIG_DIR") - # beautiful.init(config.dir .. "/share/awesome//themes/zenburn/theme.lua") - # - environment.variables.AWESOME_CONFIG_DIR = "${pkgs.awesome}"; - # Enable the X11 windowing system. services.xserver = { enable = true;