Files
nixos-template-base/configuration/awesome.nix

26 lines
735 B
Nix
Raw Normal View History

{ config, lib, pkgs, ... }:
let
2016-08-12 12:46:36 +02:00
inherit (lib) mkIf mkMerge mkThenElse;
annuaire = config.r6d.machines;
currentMachine = annuaire."${config.networking.fqdn}";
flags = currentMachine.configurationFlags;
2016-08-08 22:58:30 +02:00
in
2017-03-01 23:58:43 +01:00
# TODO: rc.lua par défaut (système)
2017-04-27 22:06:12 +02:00
mkIf flags.awesome {
environment.variables = {
# 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}";
};
environment.etc."xdg/awesome/rc.lua".text = builtins.readFile ./../public/config-awesome-4-rc.lua;
}