2021-11-25 11:55:30 +00:00
|
|
|
{ config, options, lib, pkgs, ... }:
|
|
|
|
|
2021-12-11 05:16:45 +00:00
|
|
|
# TODO: Custom dconf database which is not yet possible.
|
|
|
|
# See https://github.com/NixOS/nixpkgs/issues/54150 for more details.
|
2021-11-25 11:55:30 +00:00
|
|
|
let
|
2021-12-04 15:27:10 +00:00
|
|
|
name = "a-happy-gnome";
|
2021-11-25 11:55:30 +00:00
|
|
|
cfg = config.modules.themes.a-happy-gnome;
|
2021-12-04 15:27:10 +00:00
|
|
|
dconf = pkgs.gnome3.dconf;
|
|
|
|
customDconfDb = pkgs.stdenv.mkDerivation {
|
|
|
|
name = "${name}-dconf-db";
|
2021-12-05 02:18:50 +00:00
|
|
|
buildCommand = "${dconf}/bin/dconf compile $out ${./config/dconf}";
|
2021-12-04 15:27:10 +00:00
|
|
|
};
|
2021-11-25 11:55:30 +00:00
|
|
|
in
|
|
|
|
{
|
2021-12-11 05:16:45 +00:00
|
|
|
options.modules.themes.a-happy-gnome.enable = lib.mkEnableOption "'A happy GNOME', foo-dogsquared's configuration of GNOME desktop environment";
|
2021-11-25 11:55:30 +00:00
|
|
|
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
services.xserver.enable = true;
|
|
|
|
services.xserver.displayManager.gdm.enable = true;
|
|
|
|
services.xserver.desktopManager.gnome.enable = true;
|
|
|
|
|
2021-12-08 04:18:37 +00:00
|
|
|
# Since we're using KDE Connect, we'll have to use gsconnect.
|
|
|
|
programs.kdeconnect = {
|
|
|
|
enable = true;
|
|
|
|
package = pkgs.gnomeExtensions.gsconnect;
|
|
|
|
};
|
|
|
|
|
2021-12-04 15:27:10 +00:00
|
|
|
# Don't need most of the GNOME's offering so...
|
|
|
|
environment.gnome.excludePackages = with pkgs.gnome; [
|
|
|
|
gedit
|
|
|
|
eog
|
|
|
|
geary
|
|
|
|
totem
|
|
|
|
epiphany
|
|
|
|
gnome-terminal
|
|
|
|
gnome-music
|
|
|
|
gnome-software
|
|
|
|
yelp
|
2021-12-05 02:18:50 +00:00
|
|
|
] ++ (with pkgs; [
|
2021-12-04 15:27:10 +00:00
|
|
|
gnome-user-docs
|
|
|
|
gnome-tour
|
2021-12-05 02:18:50 +00:00
|
|
|
]);
|
2021-12-04 15:27:10 +00:00
|
|
|
|
|
|
|
programs.dconf = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
# This is an internal function which is subject to change.
|
|
|
|
# However, this seems to be in for some time but still, be wary.
|
|
|
|
# The function is found on `nixos/programs/dconf.nix` from nixpkgs.
|
|
|
|
profiles.customGnomeConfig = pkgs.writeTextFile {
|
|
|
|
name = "${name}-dconf-profile";
|
|
|
|
text = ''
|
|
|
|
user-db:user
|
|
|
|
file-db:${customDconfDb}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
2021-12-02 13:45:49 +00:00
|
|
|
|
2021-11-25 13:45:48 +00:00
|
|
|
# I'm pretty sure this is already done but just to make sure.
|
|
|
|
services.gnome.chrome-gnome-shell.enable = true;
|
2021-11-25 11:55:30 +00:00
|
|
|
|
2021-11-25 13:45:48 +00:00
|
|
|
environment.systemPackages = with pkgs; [
|
2021-11-27 08:04:01 +00:00
|
|
|
# It is required for custom menus in extensions.
|
|
|
|
gnome-menus
|
|
|
|
|
2021-12-02 13:45:49 +00:00
|
|
|
# My preferred extensions.
|
2021-11-25 11:55:30 +00:00
|
|
|
gnomeExtensions.arcmenu
|
2021-12-02 13:45:49 +00:00
|
|
|
gnomeExtensions.gsconnect
|
2021-11-25 11:55:30 +00:00
|
|
|
gnomeExtensions.x11-gestures
|
2021-12-02 13:45:49 +00:00
|
|
|
|
|
|
|
# Setting up Pop shell.
|
|
|
|
gnome-shell-extension-pop-shell
|
|
|
|
pop-launcher
|
|
|
|
pop-launcher-plugin-duckduckgo-bangs
|
2021-11-25 11:55:30 +00:00
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|