2022-11-02 21:29:14 -04:00
|
|
|
{ config, pkgs, lib, ... }: {
|
2022-05-14 20:29:03 -04:00
|
|
|
|
2022-11-02 21:29:14 -04:00
|
|
|
options = {
|
|
|
|
gtk.theme = {
|
|
|
|
name = lib.mkOption {
|
|
|
|
type = lib.types.str;
|
|
|
|
description = "Theme name for GTK applications";
|
|
|
|
};
|
|
|
|
package = lib.mkOption {
|
|
|
|
type = lib.types.str;
|
|
|
|
description = "Theme package name for GTK applications";
|
|
|
|
default = "gnome-themes-extra";
|
|
|
|
};
|
|
|
|
};
|
2022-05-14 20:29:03 -04:00
|
|
|
};
|
|
|
|
|
2022-11-02 21:29:14 -04:00
|
|
|
config = let
|
2022-12-21 14:18:03 -07:00
|
|
|
|
2022-11-02 21:29:14 -04:00
|
|
|
gtkTheme = {
|
|
|
|
name = config.gtk.theme.name;
|
|
|
|
package = pkgs."${config.gtk.theme.package}";
|
|
|
|
};
|
2022-12-21 14:18:03 -07:00
|
|
|
|
2022-12-22 00:31:25 +00:00
|
|
|
in lib.mkIf config.gui.enable {
|
2022-04-28 21:56:21 -04:00
|
|
|
|
2022-04-30 12:32:00 -04:00
|
|
|
# Enable the X11 windowing system.
|
|
|
|
services.xserver = {
|
2022-05-05 23:01:56 -04:00
|
|
|
enable = config.gui.enable;
|
2022-04-28 21:56:21 -04:00
|
|
|
|
2022-04-30 12:32:00 -04:00
|
|
|
# Enable touchpad support
|
|
|
|
libinput.enable = true;
|
2022-04-28 21:56:21 -04:00
|
|
|
|
2022-04-30 12:32:00 -04:00
|
|
|
# Login screen
|
|
|
|
displayManager = {
|
|
|
|
lightdm = {
|
|
|
|
enable = config.services.xserver.enable;
|
2022-11-02 21:29:14 -04:00
|
|
|
background = config.wallpaper;
|
2022-04-28 21:56:21 -04:00
|
|
|
|
2022-04-30 12:32:00 -04:00
|
|
|
# Make the login screen dark
|
2022-05-14 20:29:03 -04:00
|
|
|
greeters.gtk.theme = gtkTheme;
|
2022-04-30 12:32:00 -04:00
|
|
|
|
2022-10-30 20:16:37 -04:00
|
|
|
# Show default user
|
|
|
|
extraSeatDefaults = ''
|
|
|
|
greeter-hide-users = false
|
|
|
|
'';
|
|
|
|
|
2022-04-30 12:32:00 -04:00
|
|
|
};
|
2022-04-28 21:56:21 -04:00
|
|
|
};
|
2022-04-30 12:32:00 -04:00
|
|
|
|
2022-04-28 21:56:21 -04:00
|
|
|
};
|
|
|
|
|
2022-04-30 12:32:00 -04:00
|
|
|
environment.systemPackages = with pkgs;
|
|
|
|
[
|
|
|
|
xclip # Clipboard
|
|
|
|
];
|
2022-04-28 21:56:21 -04:00
|
|
|
|
2022-05-14 20:29:03 -04:00
|
|
|
# Required for setting GTK theme (for preferred-color-scheme in browser)
|
|
|
|
services.dbus.packages = [ pkgs.dconf ];
|
|
|
|
programs.dconf.enable = true;
|
|
|
|
|
2022-11-02 21:29:14 -04:00
|
|
|
environment.sessionVariables = { GTK_THEME = config.gtk.theme.name; };
|
2022-05-14 20:29:03 -04:00
|
|
|
|
2022-05-12 08:44:03 -04:00
|
|
|
home-manager.users.${config.user} = {
|
2022-05-14 20:29:03 -04:00
|
|
|
|
2022-05-12 08:44:03 -04:00
|
|
|
programs.fish.shellAliases = {
|
|
|
|
pbcopy = "xclip -selection clipboard -in";
|
|
|
|
pbpaste = "xclip -selection clipboard -out";
|
|
|
|
};
|
2022-05-14 20:29:03 -04:00
|
|
|
|
2022-11-02 21:29:14 -04:00
|
|
|
gtk = let
|
|
|
|
gtkExtraConfig = {
|
|
|
|
gtk-application-prefer-dark-theme = config.theme.dark;
|
|
|
|
};
|
2022-05-14 20:29:03 -04:00
|
|
|
in {
|
|
|
|
enable = true;
|
|
|
|
theme = gtkTheme;
|
|
|
|
gtk3.extraConfig = gtkExtraConfig;
|
|
|
|
gtk4.extraConfig = gtkExtraConfig;
|
|
|
|
};
|
|
|
|
|
2022-04-30 12:32:00 -04:00
|
|
|
};
|
2022-04-28 22:12:16 -04:00
|
|
|
|
2022-04-30 10:21:43 -04:00
|
|
|
};
|
|
|
|
|
2022-04-28 21:56:21 -04:00
|
|
|
}
|