2022-08-26 06:50:38 +02:00
|
|
|
{ config, pkgs, lib, ... } :
|
|
|
|
with lib;
|
2022-11-30 04:29:21 +01:00
|
|
|
let
|
|
|
|
cfg = config.local.gui;
|
|
|
|
in
|
2022-08-26 06:50:38 +02:00
|
|
|
{
|
2022-11-30 04:29:21 +01:00
|
|
|
options.local.gui = {
|
|
|
|
enable = mkEnableOption "GUI settings and programs";
|
|
|
|
desktop = mkEnableOption "i3 desktop envirorment"
|
|
|
|
};
|
2022-08-26 06:50:38 +02:00
|
|
|
|
2022-11-30 00:46:55 +01:00
|
|
|
imports = [
|
2022-11-30 01:55:34 +01:00
|
|
|
./autorandr.nix
|
2022-11-30 04:29:21 +01:00
|
|
|
./fonts.nix
|
|
|
|
./gtk.nix
|
2022-11-30 00:46:55 +01:00
|
|
|
./i3.nix
|
|
|
|
./polybar.nix
|
|
|
|
./startx.nix
|
|
|
|
];
|
2022-08-26 06:50:38 +02:00
|
|
|
|
2022-11-30 04:29:21 +01:00
|
|
|
config = mkIf cfg.enable {
|
|
|
|
|
|
|
|
local.gui = {
|
|
|
|
fonts.enable = mkDefault true;
|
|
|
|
gtk.enable = mkDefault true;
|
2022-08-26 06:50:38 +02:00
|
|
|
|
2022-11-30 04:29:21 +01:00
|
|
|
autorandr.enable = mkDefault cfg.desktop;
|
|
|
|
i3.enable = mkDefault cfg.desktop;
|
|
|
|
polybar.enable = mkDefault cfg.desktop;
|
|
|
|
startx.enable = mkDefault cfg.desktop;
|
2022-08-26 06:50:38 +02:00
|
|
|
};
|
2022-11-30 04:29:21 +01:00
|
|
|
|
|
|
|
services = mkIf cfg.desktop {
|
|
|
|
picom = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
dunst = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
betterlockscreen = {
|
|
|
|
enable = true;
|
2022-08-26 06:50:38 +02:00
|
|
|
};
|
|
|
|
};
|
2022-11-30 04:29:21 +01:00
|
|
|
|
|
|
|
xdg.mimeApps.enable = true;
|
2022-08-26 06:50:38 +02:00
|
|
|
};
|
|
|
|
}
|