dotfiles/modules/desktop/xorg.nix

65 lines
1.3 KiB
Nix
Raw Normal View History

2022-05-15 00:29:03 +00:00
{ config, pkgs, lib, ... }:
let
gtkTheme = {
name = config.gui.gtk.theme.name;
package = pkgs.${config.gui.gtk.theme.package};
};
in {
2022-04-29 01:56:21 +00:00
config = lib.mkIf config.gui.enable {
2022-04-29 01:56:21 +00:00
2022-04-30 16:32:00 +00:00
# Enable the X11 windowing system.
services.xserver = {
enable = config.gui.enable;
2022-04-29 01:56:21 +00:00
2022-04-30 16:32:00 +00:00
# Enable touchpad support
libinput.enable = true;
2022-04-29 01:56:21 +00:00
2022-04-30 16:32:00 +00:00
# Login screen
displayManager = {
lightdm = {
enable = config.services.xserver.enable;
2022-04-29 01:56:21 +00:00
2022-04-30 16:32:00 +00:00
# Make the login screen dark
2022-05-15 00:29:03 +00:00
greeters.gtk.theme = gtkTheme;
2022-04-30 16:32:00 +00:00
};
2022-04-29 01:56:21 +00:00
};
2022-04-30 16:32:00 +00:00
2022-04-29 01:56:21 +00:00
};
2022-04-30 16:32:00 +00:00
environment.systemPackages = with pkgs;
[
xclip # Clipboard
];
2022-04-29 01:56:21 +00:00
2022-05-15 00:29:03 +00:00
# Required for setting GTK theme (for preferred-color-scheme in browser)
services.dbus.packages = [ pkgs.dconf ];
programs.dconf.enable = true;
environment.sessionVariables = { GTK_THEME = config.gui.gtk.theme.name; };
2022-05-12 12:44:03 +00:00
home-manager.users.${config.user} = {
2022-05-15 00:29:03 +00:00
2022-05-12 12:44:03 +00:00
programs.fish.shellAliases = {
pbcopy = "xclip -selection clipboard -in";
pbpaste = "xclip -selection clipboard -out";
};
2022-05-15 00:29:03 +00:00
gtk = let gtkExtraConfig = { gtk-application-prefer-dark-theme = true; };
in {
enable = true;
theme = gtkTheme;
gtk3.extraConfig = gtkExtraConfig;
gtk4.extraConfig = gtkExtraConfig;
};
2022-04-30 16:32:00 +00:00
};
2022-04-29 02:12:16 +00:00
2022-04-30 14:21:43 +00:00
};
2022-04-29 01:56:21 +00:00
}