helm/modules/desktop/awesomewm.nix
Henrik Lissner b9d3279034 Update fennel + awesomewm config
+ Bumped fennel: 0.8.1 -> 0.9.2.
+ Use luajit for awesomewm + fennel.
+ Add barebones awesomewm fennel config (more to come later).
2021-07-05 13:06:41 -04:00

58 lines
1.4 KiB
Nix

{ options, config, lib, pkgs, ... }:
with lib;
with lib.my;
let cfg = config.modules.desktop.awesomewm;
configDir = config.dotfiles.configDir;
in {
options.modules.desktop.awesomewm = {
enable = mkBoolOpt false;
};
config = mkIf cfg.enable {
nixpkgs.overlays = [
(self: super: with super; {
awesome = super.awesome.override { luaPackages = super.luajitPackages; };
})
];
environment.systemPackages = with pkgs; [
luajit
my.fennel
];
services = {
picom.enable = true;
redshift.enable = true;
xserver = {
enable = true;
displayManager = {
lightdm.enable = true;
# lightdm.greeters.mini.enable = true;
};
windowManager.awesome.enable = true;
};
};
home.configFile = {
"awesome" = { source = "${configDir}/awesome"; recursive = true; };
"awesome/rc.lua".text = ''
-- File was auto-generated by nix. Do not touch!
-- Load system fennel
package.path = package.path .. ";${pkgs.my.fennel}/?.lua"
local fennel = require("fennel")
debug.traceback = fennel.traceback
-- Then load our awesomewm config
fennel.path = fennel.path .. ";.config/awesome/?.fnl"
table.insert(package.loaders or package.searchers, fennel.makeSearcher({
correlate = true,
useMetadata = true
}))
require("init")
'';
};
};
}