2021-11-25 11:55:30 +00:00
|
|
|
{ config, options, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
2021-12-04 15:27:10 +00:00
|
|
|
name = "a-happy-gnome";
|
2022-01-09 05:38:59 +00:00
|
|
|
cfg = config.themes.themes.a-happy-gnome;
|
2022-05-20 06:17:10 +00:00
|
|
|
|
|
|
|
enabledExtensions = pkgs.writeTextFile {
|
|
|
|
name = "a-happy-gnome-extensions";
|
|
|
|
text = ''
|
|
|
|
[org/gnome/shell]
|
|
|
|
enabled-extensions=[${ lib.concatStringsSep ", " (lib.concatMap (e: [ ("'" + e.extensionUuid + "'") ]) cfg.shellExtensions) }]
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
# We're combining all of the custom dconf database into a package to be installed.
|
2022-01-09 05:41:07 +00:00
|
|
|
dconfConfig = pkgs.runCommand "install-a-happy-gnome-dconf-keyfiles" {} ''
|
2022-02-04 08:38:52 +00:00
|
|
|
install -Dm644 ${./config/dconf}/*.conf -t $out/etc/dconf/db/${name}-conf.d
|
2022-05-20 06:17:10 +00:00
|
|
|
install -Dm644 ${enabledExtensions} $out/etc/dconf/db/${name}-conf.d/enabled-extensions.conf
|
2022-01-09 05:41:07 +00:00
|
|
|
'';
|
2021-11-25 11:55:30 +00:00
|
|
|
in
|
|
|
|
{
|
2022-05-20 06:17:10 +00:00
|
|
|
options.themes.themes.a-happy-gnome = {
|
|
|
|
enable = lib.mkEnableOption "'A happy GNOME', foo-dogsquared's configuration of GNOME desktop environment";
|
|
|
|
|
|
|
|
shellExtensions = lib.mkOption {
|
|
|
|
type = with lib.types; listOf package;
|
|
|
|
description = ''
|
|
|
|
A list of GNOME Shell extensions to be included. Take note the package
|
|
|
|
contain <literal>passthru.extensionUuid</literal> to be used for
|
|
|
|
enabling the extensions.
|
|
|
|
'';
|
|
|
|
default = with pkgs.gnomeExtensions; [
|
|
|
|
arcmenu
|
|
|
|
appindicator
|
|
|
|
alphabetical-app-grid
|
|
|
|
burn-my-windows
|
2022-06-10 00:43:14 +00:00
|
|
|
caffeine
|
2022-05-20 06:17:10 +00:00
|
|
|
desktop-cube
|
|
|
|
gsconnect
|
|
|
|
x11-gestures
|
|
|
|
kimpanel
|
|
|
|
runcat
|
|
|
|
just-perfection
|
|
|
|
mpris-indicator-button
|
|
|
|
] ++ [
|
|
|
|
pkgs.gnome-shell-extension-fly-pie
|
2022-07-14 00:00:13 +00:00
|
|
|
pkgs.gnome-shell-extension-pop-shell
|
2022-05-20 06:17:10 +00:00
|
|
|
];
|
|
|
|
example = lib.literalExpression ''
|
|
|
|
with pkgs.gnomeExtensions; [
|
|
|
|
appindicator
|
|
|
|
gsconnect
|
|
|
|
runcat
|
|
|
|
just-perfection
|
|
|
|
];
|
|
|
|
'';
|
|
|
|
internal = true;
|
|
|
|
};
|
|
|
|
|
2022-06-10 00:43:14 +00:00
|
|
|
extraApps = lib.mkOption {
|
|
|
|
type = with lib.types; listOf package;
|
|
|
|
description = "A list of applications to be included in the theme.";
|
|
|
|
default = with pkgs; [
|
2022-07-14 00:00:13 +00:00
|
|
|
amberol # An unambitious music player.
|
|
|
|
authenticator # 2-factor codes for 2-factor storages.
|
|
|
|
blanket # Zen...
|
|
|
|
gnome.dconf-editor # A saner version of Windows registry.
|
2022-07-19 05:54:51 +00:00
|
|
|
dialect # Your gateway to polyglotting.
|
2022-07-16 09:23:29 +00:00
|
|
|
gnome-frog # Graphical OCR with Tesseract that I always wanted.
|
2022-07-14 00:00:13 +00:00
|
|
|
gnome-solanum # Cute little matodor timers.
|
2022-07-31 06:44:02 +00:00
|
|
|
gnome.gnome-boxes # Virtual machines, son.
|
2022-07-14 00:00:13 +00:00
|
|
|
shortwave # Yer' humble internet radio.
|
2022-07-18 23:07:53 +00:00
|
|
|
ymuse # Simple MPD client.
|
|
|
|
|
2022-07-16 09:23:29 +00:00
|
|
|
gnome-menus # It is required for custom menus in extensions.
|
|
|
|
gnome-extension-manager # The cooler GNOME extensions app.
|
|
|
|
gnome-search-provider-recoll # This is here for some reason.
|
2022-07-14 00:00:13 +00:00
|
|
|
|
|
|
|
# Nautilus extensions.
|
|
|
|
nautilus-annotations
|
|
|
|
nautilus-open-any-terminal
|
2022-06-10 00:43:14 +00:00
|
|
|
];
|
|
|
|
example = lib.literalExpression ''
|
|
|
|
with pkgs; [ gnome.polari ];
|
|
|
|
'';
|
|
|
|
internal = true;
|
|
|
|
};
|
2022-05-20 06:17:10 +00:00
|
|
|
};
|
2021-11-25 11:55:30 +00:00
|
|
|
|
|
|
|
config = lib.mkIf cfg.enable {
|
2022-01-20 08:17:15 +00:00
|
|
|
# Enable GNOME and GDM.
|
|
|
|
services.xserver = {
|
|
|
|
enable = true;
|
|
|
|
displayManager.gdm.enable = true;
|
|
|
|
desktopManager.gnome.enable = true;
|
|
|
|
};
|
2021-11-25 11:55:30 +00:00
|
|
|
|
2022-08-07 11:46:29 +00:00
|
|
|
xdg.portal = {
|
|
|
|
enable = true;
|
|
|
|
extraPortals = with pkgs; [
|
|
|
|
xdg-desktop-portal-wlr
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2022-07-14 09:01:11 +00:00
|
|
|
# All GNOME-related additional options.
|
|
|
|
services.gnome = {
|
|
|
|
core-os-services.enable = true;
|
|
|
|
core-shell.enable = true;
|
|
|
|
core-utilities.enable = true;
|
|
|
|
};
|
|
|
|
|
2022-07-31 06:44:02 +00:00
|
|
|
services.packagekit.enable = false;
|
|
|
|
|
2022-07-14 00:00:13 +00:00
|
|
|
i18n.inputMethod = {
|
|
|
|
enabled = "ibus";
|
|
|
|
ibus.engines = with pkgs.ibus-engines; [
|
|
|
|
mozc
|
|
|
|
rime
|
|
|
|
hangul
|
|
|
|
table
|
|
|
|
table-others
|
|
|
|
typing-booster
|
2022-08-04 05:55:12 +00:00
|
|
|
uniemoji
|
2022-07-14 00:00:13 +00:00
|
|
|
];
|
|
|
|
};
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
2022-01-20 08:17:15 +00:00
|
|
|
# Bring all of the dconf keyfiles in there.
|
|
|
|
programs.dconf = {
|
|
|
|
enable = true;
|
|
|
|
packages = [ dconfConfig ];
|
2022-02-04 08:38:52 +00:00
|
|
|
|
|
|
|
# The `user` profile needed to set custom system-wide settings in GNOME.
|
2022-05-20 06:17:10 +00:00
|
|
|
# Also, this is a private option so take precautions with this.
|
2022-02-04 08:38:52 +00:00
|
|
|
profiles.user = pkgs.writeTextFile {
|
|
|
|
name = "a-happy-gnome";
|
|
|
|
text = ''
|
|
|
|
user-db:user
|
|
|
|
system-db:${name}-conf
|
|
|
|
'';
|
|
|
|
};
|
2022-01-20 08:17:15 +00:00
|
|
|
};
|
2022-01-09 05:41:07 +00:00
|
|
|
|
2022-03-28 00:19:12 +00:00
|
|
|
xdg.mime = {
|
|
|
|
enable = true;
|
|
|
|
defaultApplications = {
|
|
|
|
# Default application for web browser.
|
|
|
|
"text/html" = "re.sonny.Junction.desktop";
|
|
|
|
|
|
|
|
# Default handler for all files. Not all applications will
|
|
|
|
# respect it, though.
|
|
|
|
"x-scheme-handler/file" = "re.sonny.Junction.desktop";
|
|
|
|
|
|
|
|
# Default handler for directories.
|
|
|
|
"inode/directory" = "re.sonny.Junction.desktop";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-01-20 08:17:15 +00:00
|
|
|
environment.systemPackages = with pkgs; [
|
2022-02-24 03:46:50 +00:00
|
|
|
# The application menu.
|
|
|
|
junction
|
2022-06-10 00:43:14 +00:00
|
|
|
] ++ cfg.shellExtensions ++ cfg.extraApps;
|
2021-11-25 11:55:30 +00:00
|
|
|
};
|
|
|
|
}
|