2021-04-11 00:25:36 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
nglib = config.magic_rb.pins.nixng.lib pkgs.stdenv.system;
|
|
|
|
cfg = config.magic_rb.programs.xmonad;
|
|
|
|
in
|
2021-01-24 17:43:50 +01:00
|
|
|
{
|
2021-04-11 00:25:36 +02:00
|
|
|
options.magic_rb.programs.xmonad = {
|
|
|
|
enable = mkEnableOption "Enable xmonad config";
|
2021-01-24 17:43:50 +01:00
|
|
|
|
2021-04-11 00:25:36 +02:00
|
|
|
enableDunst = mkOption {
|
|
|
|
description = "Enable dunst";
|
|
|
|
type = types.bool;
|
|
|
|
default = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
enablePicom = mkOption {
|
|
|
|
description = "Enable picom";
|
|
|
|
type = types.bool;
|
|
|
|
default = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
picomExperimentalBackends = mkOption {
|
|
|
|
description = "Enable experimental backends in picom";
|
|
|
|
type = types.bool;
|
|
|
|
default = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
home.packages = with pkgs; [
|
|
|
|
powerline-fonts
|
|
|
|
font-awesome
|
|
|
|
dejavu_fonts
|
|
|
|
];
|
|
|
|
|
|
|
|
home.file.".xmonad/xmonad.hs".source = nglib.writeSubstitutedFile {
|
|
|
|
name = "xmonad.hs";
|
|
|
|
file = ./xmonad.hs;
|
|
|
|
substitutes = {
|
|
|
|
"xmobar" = "${pkgs.xmobar}/bin/xmobar";
|
|
|
|
"xmobarConfig" = ./xmobarrc;
|
|
|
|
"screenshot" = "${pkgs.magic_rb.screenshot}/bin/screenshot";
|
|
|
|
"dmenu_run" = "${pkgs.dmenu}/bin/dmenu_run";
|
|
|
|
|
2021-04-11 01:03:36 +02:00
|
|
|
"dunst" = "${pkgs.dunst}/bin/dunst";
|
2021-04-11 00:25:36 +02:00
|
|
|
"enableDunst" = if cfg.enableDunst then "True" else "False";
|
|
|
|
"dunstConfig" = ./dunstrc;
|
|
|
|
|
2021-04-11 01:03:36 +02:00
|
|
|
"picom" = "${pkgs.picom}/bin/picom";
|
2021-04-11 00:25:36 +02:00
|
|
|
"enablePicom" = if cfg.enablePicom then "True" else "False";
|
|
|
|
"picomConfig" = ./picom.conf;
|
|
|
|
"experimentalBackends" = if cfg.picomExperimentalBackends then "--experimental-backends" else "";
|
|
|
|
};
|
2021-01-24 17:43:50 +01:00
|
|
|
};
|
2021-02-26 10:24:58 +01:00
|
|
|
};
|
2021-01-24 17:43:50 +01:00
|
|
|
}
|