2022-04-20 17:05:02 +00:00
|
|
|
{ pkgs, config, lib, ... }:
|
2022-10-17 08:24:54 +00:00
|
|
|
let
|
|
|
|
cfg = config.linux.graphical;
|
|
|
|
in
|
2022-04-20 17:05:02 +00:00
|
|
|
with lib;
|
|
|
|
{
|
|
|
|
imports = [ ./x11/hidpi.nix ./x11/i3.nix ];
|
2022-10-17 08:24:54 +00:00
|
|
|
options.linux.graphical.hasDE = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
description = "When enabled, disable stuff that already comes with a DE";
|
|
|
|
default = true;
|
|
|
|
};
|
|
|
|
config = mkIf (cfg.type == "x11") {
|
2022-04-20 17:05:02 +00:00
|
|
|
# X Session settings
|
|
|
|
xsession.enable = true;
|
|
|
|
|
|
|
|
# Additional packages
|
|
|
|
home.packages = with pkgs; [
|
|
|
|
xsel # Clipboard management
|
|
|
|
|
|
|
|
# Mimic the clipboard stuff in MacOS
|
|
|
|
(pkgs.writeShellScriptBin "pbcopy" ''
|
|
|
|
exec ${pkgs.xsel}/bin/xsel -ib
|
|
|
|
'')
|
|
|
|
(pkgs.writeShellScriptBin "pbpaste" ''
|
|
|
|
exec ${pkgs.xsel}/bin/xsel -ob
|
|
|
|
'')
|
|
|
|
];
|
|
|
|
|
2022-05-28 16:35:20 +00:00
|
|
|
# Apply cursor settings
|
|
|
|
home.pointerCursor.x11.enable = true;
|
|
|
|
|
2022-04-20 17:05:02 +00:00
|
|
|
# Notification system
|
2022-10-17 08:24:54 +00:00
|
|
|
services.X11.xfce4-notifyd.enable = !cfg.hasDE;
|
2022-04-20 17:05:02 +00:00
|
|
|
|
|
|
|
# Picom: X Compositor
|
2022-10-17 08:24:54 +00:00
|
|
|
services.picom = mkIf (!cfg.hasDE) {
|
2022-04-20 17:05:02 +00:00
|
|
|
enable = true;
|
|
|
|
blur = true;
|
|
|
|
fade = true;
|
|
|
|
fadeDelta = 3;
|
|
|
|
shadow = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|