nixos-config/modules/programs/gnome/default.nix

161 lines
4.4 KiB
Nix
Raw Normal View History

2021-07-29 20:21:51 +00:00
{ pkgs, config, lib, ... }:
let
cfg = config.ptw.services.gnome;
in {
options.ptw.services.gnome = {
enable = lib.mkEnableOption "Configure GNOME using HomeManager";
};
config = lib.mkIf cfg.enable {
2021-08-04 17:07:42 +00:00
environment = {
systemPackages = with pkgs; [
2022-04-26 15:14:30 +00:00
# Themes
2021-08-04 17:07:42 +00:00
arc-theme
2022-04-26 15:14:30 +00:00
libsForQt5.qtstyleplugin-kvantum
# Gnome Shell Extensions
2021-08-04 17:07:42 +00:00
gnomeExtensions.appindicator
gnomeExtensions.caffeine
gnomeExtensions.gnome-40-ui-improvements
2022-02-02 11:07:26 +00:00
gnomeExtensions.notification-timeout
gnomeExtensions.window-is-ready-remover
2021-08-04 17:07:42 +00:00
gnomeExtensions.application-volume-mixer
2022-01-01 21:05:16 +00:00
gnomeExtensions.tiling-assistant
gnomeExtensions.tilingnome
2021-10-22 19:45:06 +00:00
gnomeExtensions.tray-icons-reloaded
2021-09-04 17:26:11 +00:00
gnomeExtensions.gsconnect
2021-09-02 18:58:41 +00:00
gnomeExtensions.blur-my-shell
2022-01-12 16:35:17 +00:00
gnomeExtensions.forge
2022-09-13 06:39:12 +00:00
gnomeExtensions.dash-to-dock
gnomeExtensions.sound-output-device-chooser
2022-04-26 15:14:30 +00:00
# Programs
2021-08-04 17:07:42 +00:00
gnome.eog
gnome.nautilus
2022-01-06 15:47:30 +00:00
gnome.evince
2021-08-04 17:07:42 +00:00
gnome.gnome-terminal
gnome-console
2021-08-04 17:07:42 +00:00
pinentry-gnome
2022-04-26 15:14:30 +00:00
mousai
gnome.geary
gnome.gnome-calendar
gnome.gedit
2022-04-26 15:14:30 +00:00
# For config
2021-08-04 17:07:42 +00:00
dconf # For home-manager
];
2021-07-29 20:21:51 +00:00
};
2021-08-28 12:51:14 +00:00
2021-08-04 17:07:42 +00:00
services = {
accounts-daemon.enable = true;
colord.enable = false;
geoclue2.enable = false;
dleyna-renderer.enable = false;
dleyna-server.enable = false;
2022-01-06 12:25:51 +00:00
gvfs.enable = true;
2021-08-04 17:07:42 +00:00
telepathy.enable = false;
gnome = {
chrome-gnome-shell.enable = false;
gnome-initial-setup.enable = false;
gnome-remote-desktop.enable = false;
rygel.enable = false;
gnome-online-accounts.enable = false;
evolution-data-server.enable = lib.mkForce false;
tracker.enable = false;
tracker-miners.enable = false;
core-utilities.enable = false;
games.enable = false;
};
2021-07-29 20:21:51 +00:00
2021-08-04 17:07:42 +00:00
udev.packages = with pkgs; [ gnome.gnome-settings-daemon ];
2021-07-29 20:21:51 +00:00
2021-08-04 17:07:42 +00:00
xserver = {
enable = true;
layout = "de";
libinput.enable = true;
desktopManager.gnome.enable = true;
2021-07-29 20:21:51 +00:00
};
};
2021-08-04 17:07:42 +00:00
xdg.portal = {
enable = true;
2021-10-22 19:45:06 +00:00
#extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
2022-10-18 18:04:39 +00:00
#gtkUsePortal = true;
2021-08-04 17:07:42 +00:00
};
2022-02-02 11:07:26 +00:00
qt5 = {
style = "adwaita-dark";
platformTheme = "gnome";
enable = true;
};
home-manager.users."${config.ptw.system.singleUser}" = {
2022-02-02 11:07:26 +00:00
#xdg.configFile = {
# # Make QT apps use a dark theme
# "Kvantum/kvantum.kvconfig".text = ''
# [General]
# theme=KvArcDark
# '';
#};
2021-08-28 12:51:14 +00:00
2021-08-04 17:07:42 +00:00
dconf.settings = {
# The packages come in from modules/programs/gnome
# Theme
"org/gnome/desktop/interface" = {
gtk-theme = "Arc-Dark";
};
# Nightlight (TODO: ?)
"org/gnome/settings-daemon/plugins/color" = {
night-light-enabled = true;
};
# Extensions
"org/gnome/shell" = {
2022-01-01 21:05:16 +00:00
enabled-extensions = let
isMiku = config.ptw.system.hostName == "miku";
isNishimiya = config.ptw.system.hostName == "nishimiya";
in [
2021-08-04 17:07:42 +00:00
"caffeine@patapon.info"
"notification-timeout@chlumskyvaclav.gmail.com"
"gnome-ui-tune@itstime.tech"
"volume-mixer@evermiss.net"
2021-08-24 16:15:26 +00:00
"windowIsReady_Remover@nunofarruca@gmail.com"
2021-09-02 18:58:41 +00:00
"blur-my-shell@aunetx"
2021-09-04 17:26:11 +00:00
"gsconnect@andyholmes.github.io"
2022-02-02 11:07:26 +00:00
"trayIconsReloaded@selfmade.pl"
2022-01-01 21:05:16 +00:00
] ++ (lib.optional isMiku "tiling-assistant@leleat-on-github")
++ (lib.optional (isNishimiya || isMiku) "tilingnome@rliang.github.com");
2021-08-04 17:07:42 +00:00
};
"org/gnome/shell/extensions/caffeine" = {
show-notifications = false;
inhibit-apps = [ "mpv.desktop" ];
};
"org/gnome/shell/extensions/notification-timeout" = {
timeout = 3000;
};
"org/gnome/shell/extensions/gnome-ui-tune" = {
hide-search = true;
};
# Shortcuts
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = {
binding = "<Alt>Return";
command = "gnome-terminal";
name = "Terminal";
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = {
binding = "<Super>s";
command = "systemctl suspend";
name = "Suspend";
};
};
};
2021-07-29 20:21:51 +00:00
};
}