ma awesome-config: use home-manager instead of patching the awesome package itself

This commit is contained in:
makefu 2020-07-02 08:39:58 +02:00
parent 7608f2a509
commit 023ea390e4
No known key found for this signature in database
GPG Key ID: 36F7711F3FC0F225

View File

@ -1,6 +1,6 @@
{config, lib, pkgs, ... }:
with import <stockholm/lib>;
with lib;
let
cfg = config.makefu.awesome;
out = {
@ -27,13 +27,10 @@ let
};
};
imp = {
# TODO: configure display manager as well
nixpkgs.config.packageOverrides = pkgs: rec {
awesome = pkgs.stdenv.lib.overrideDerivation pkgs.awesome (oldAttrs : {
postFixup = let
rclua = cfg.baseConfig.override { inherit (cfg) modkey; };
in "cp ${rclua} $out/etc/xdg/awesome/rc.lua";
});
home-manager.users.makefu.home.file.".config/awesome/rc.lua".source =
cfg.baseConfig.override {
inherit (cfg) modkey;
};
};
in out