2016-04-17 02:03:15 +02:00
|
|
|
{config, lib, pkgs, ... }:
|
|
|
|
|
2020-07-02 08:39:58 +02:00
|
|
|
with lib;
|
2016-04-17 02:03:15 +02:00
|
|
|
let
|
|
|
|
cfg = config.makefu.awesome;
|
|
|
|
out = {
|
|
|
|
options.makefu.awesome = api;
|
|
|
|
config = lib.mkIf cfg.enable imp;
|
|
|
|
};
|
|
|
|
api = {
|
|
|
|
enable = mkEnableOption "awesome custom config";
|
|
|
|
modkey = mkOption {
|
|
|
|
type = types.str;
|
|
|
|
description = "Modkey to be used";
|
|
|
|
default = "Mod4";
|
|
|
|
};
|
|
|
|
baseConfig = mkOption {
|
|
|
|
type = types.path;
|
|
|
|
description = ''
|
|
|
|
rc.lua file to be used as default
|
|
|
|
This module will use substituteAll to replace strings before writing to
|
|
|
|
/etc/xdg/awesome/rc.lua
|
|
|
|
'';
|
2018-03-13 11:34:28 +01:00
|
|
|
default = pkgs.awesomecfg.full.override {
|
|
|
|
locker = "${pkgs.i3lock}/bin/i3lock -i /var/lib/wallpaper/wallpaper";
|
|
|
|
};
|
2016-04-17 02:03:15 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
imp = {
|
2020-07-02 08:39:58 +02:00
|
|
|
home-manager.users.makefu.home.file.".config/awesome/rc.lua".source =
|
|
|
|
cfg.baseConfig.override {
|
|
|
|
inherit (cfg) modkey;
|
|
|
|
};
|
|
|
|
|
2016-04-17 02:03:15 +02:00
|
|
|
};
|
|
|
|
in out
|