nixos/modules/desktop/awesome/default.nix

42 lines
936 B
Nix
Raw Normal View History

2022-11-27 18:09:44 +00:00
{ config, pkgs, lib, ... }:
2023-04-19 20:41:53 +01:00
let
cfg = config.custom.desktop.awesome;
in
2022-11-27 18:09:44 +00:00
{
2023-04-19 20:41:53 +01:00
options.custom.desktop.awesome = {
enable = lib.mkEnableOption "awesome";
2022-11-27 18:09:44 +00:00
};
2023-01-28 21:06:42 +00:00
2023-04-19 20:41:53 +01:00
config = lib.mkIf cfg.enable {
services.xserver = {
enable = true;
windowManager.awesome.enable = true;
};
2023-04-19 20:41:53 +01:00
home-manager.users."${config.custom.user}" = {
xdg.configFile."awesome/rc.lua" =
let
awesomeConfig = ''
-- Configure paths filled in by Nix
terminal = "${pkgs.alacritty}/bin/alacritty"
tmux = "${pkgs.tmux}/bin/tmux"
'' + builtins.readFile ./rc.lua;
in
{
text = awesomeConfig;
onChange = with pkgs; "echo 'awesome.restart()' | ${awesome}/bin/awesome-client";
};
programs.alacritty = {
enable = true;
settings = {
font = {
size = 8.0;
};
};
};
};
2023-01-28 21:06:42 +00:00
};
2022-11-27 18:09:44 +00:00
}