2022-09-28 11:49:44 +00:00
|
|
|
{ config, options, lib, pkgs, ... }@attrs:
|
2021-11-25 11:55:30 +00:00
|
|
|
|
|
|
|
let
|
2021-12-04 15:27:10 +00:00
|
|
|
name = "a-happy-gnome";
|
2022-08-23 10:24:44 +00:00
|
|
|
cfg = config.workflows.workflows.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-11-19 03:05:31 +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-11-05 01:45:13 +00:00
|
|
|
install -Dm644 ${enabledExtensions} $out/etc/dconf/db/${name}-conf.d/90-enabled-extensions.conf
|
2023-09-05 21:45:04 +00:00
|
|
|
install -Dm644 ${./config/dconf/user} $out/etc/dconf/profile/user
|
2022-01-09 05:41:07 +00:00
|
|
|
'';
|
2021-11-25 11:55:30 +00:00
|
|
|
in
|
|
|
|
{
|
2022-08-23 10:24:44 +00:00
|
|
|
options.workflows.workflows.a-happy-gnome = {
|
2022-05-20 06:17:10 +00:00
|
|
|
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
|
2023-07-27 03:13:39 +00:00
|
|
|
contain `passthru.extensionUuid` to be used for
|
2022-05-20 06:17:10 +00:00
|
|
|
enabling the extensions.
|
|
|
|
'';
|
|
|
|
default = with pkgs.gnomeExtensions; [
|
|
|
|
alphabetical-app-grid
|
2023-05-09 02:48:00 +00:00
|
|
|
appindicator
|
|
|
|
arcmenu
|
2022-05-20 06:17:10 +00:00
|
|
|
burn-my-windows
|
2022-06-10 00:43:14 +00:00
|
|
|
caffeine
|
2022-05-20 06:17:10 +00:00
|
|
|
desktop-cube
|
|
|
|
gsconnect
|
|
|
|
just-perfection
|
2023-05-09 02:48:00 +00:00
|
|
|
kimpanel
|
2022-05-20 06:17:10 +00:00
|
|
|
mpris-indicator-button
|
2023-07-14 14:29:00 +00:00
|
|
|
paperwm
|
|
|
|
pop-shell
|
2023-05-09 02:48:00 +00:00
|
|
|
runcat
|
|
|
|
x11-gestures
|
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; [
|
2023-05-15 14:11:03 +00:00
|
|
|
adw-gtk3 # A nice theme for GTK3.
|
2022-07-14 00:00:13 +00:00
|
|
|
amberol # An unambitious music player.
|
|
|
|
authenticator # 2-factor codes for 2-factor storages.
|
|
|
|
blanket # Zen...
|
2023-05-09 02:48:00 +00:00
|
|
|
dialect # Your gateway to polyglotting.
|
2023-02-25 02:02:14 +00:00
|
|
|
eyedropper # Some nice eyedropper tool.
|
2023-05-02 04:33:42 +00:00
|
|
|
flowtime # Some nice timer for those overworking.
|
2022-10-10 03:45:45 +00:00
|
|
|
fractal # Your gateway to the matrix.
|
2023-06-11 04:28:07 +00:00
|
|
|
gnome-decoder # Go with them QR codes.
|
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.
|
2023-05-09 02:48:00 +00:00
|
|
|
gnome.dconf-editor # A saner version of Windows registry.
|
2022-07-31 06:44:02 +00:00
|
|
|
gnome.gnome-boxes # Virtual machines, son.
|
2022-10-10 03:45:45 +00:00
|
|
|
gnome.polari # Your gateway to one of the most hidden and cobweb-ridden parts of the internet. ;)
|
2023-06-08 04:17:17 +00:00
|
|
|
gradience # Make it rain!
|
2023-05-15 14:11:03 +00:00
|
|
|
handbrake # Take a break from those custom ffmpeg conversion scripts.
|
2022-07-14 00:00:13 +00:00
|
|
|
shortwave # Yer' humble internet radio.
|
2023-05-09 02:48:00 +00:00
|
|
|
tangram # Your social media manager, probably.
|
2022-07-18 23:07:53 +00:00
|
|
|
ymuse # Simple MPD client.
|
|
|
|
|
2022-11-05 01:45:13 +00:00
|
|
|
gnome.gnome-backgrounds # Default backgrounds.
|
|
|
|
|
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.
|
2023-07-21 05:11:57 +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
|
|
|
|
2022-09-28 11:49:44 +00:00
|
|
|
config = lib.mkIf cfg.enable (lib.mkMerge [
|
|
|
|
{
|
|
|
|
# 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-09-28 11:49:44 +00:00
|
|
|
# All GNOME-related additional options.
|
|
|
|
services.gnome = {
|
|
|
|
core-os-services.enable = true;
|
|
|
|
core-shell.enable = true;
|
|
|
|
core-utilities.enable = true;
|
2022-07-14 09:01:11 +00:00
|
|
|
|
2022-09-28 11:49:44 +00:00
|
|
|
# It doesn't need to since we're not first-timers, yeah?
|
|
|
|
gnome-initial-setup.enable = false;
|
|
|
|
};
|
2022-07-14 00:00:13 +00:00
|
|
|
|
2023-02-14 03:02:50 +00:00
|
|
|
# It makes Nix store directory read/write so no...
|
2022-09-28 11:49:44 +00:00
|
|
|
services.packagekit.enable = false;
|
|
|
|
|
2023-02-14 03:02:50 +00:00
|
|
|
# Setting up split DNS with systemd-resolved. The domains should already
|
|
|
|
# be configured somewhere else.
|
|
|
|
services.resolved.enable = true;
|
2023-03-09 03:12:15 +00:00
|
|
|
networking.networkmanager.dns = "systemd-resolved";
|
2023-02-14 03:02:50 +00:00
|
|
|
|
2022-09-28 11:49:44 +00:00
|
|
|
# Since we're using KDE Connect, we'll have to use gsconnect.
|
|
|
|
programs.kdeconnect = {
|
|
|
|
enable = true;
|
|
|
|
package = pkgs.gnomeExtensions.gsconnect;
|
|
|
|
};
|
2021-12-08 04:18:37 +00:00
|
|
|
|
2022-09-28 11:49:44 +00:00
|
|
|
# Bring all of the dconf keyfiles in there.
|
|
|
|
programs.dconf = {
|
|
|
|
enable = true;
|
|
|
|
packages = [ dconfConfig ];
|
2022-02-04 08:38:52 +00:00
|
|
|
};
|
2022-01-09 05:41:07 +00:00
|
|
|
|
2022-09-28 11:49:44 +00:00
|
|
|
xdg.mime = {
|
|
|
|
enable = true;
|
|
|
|
defaultApplications = {
|
|
|
|
# Default application for web browser.
|
|
|
|
"text/html" = "re.sonny.Junction.desktop";
|
2022-03-28 00:19:12 +00:00
|
|
|
|
2022-09-28 11:49:44 +00:00
|
|
|
# Default handler for all files. Not all applications will
|
|
|
|
# respect it, though.
|
|
|
|
"x-scheme-handler/file" = "re.sonny.Junction.desktop";
|
2022-03-28 00:19:12 +00:00
|
|
|
|
2022-09-28 11:49:44 +00:00
|
|
|
# Default handler for directories.
|
|
|
|
"inode/directory" = "re.sonny.Junction.desktop";
|
|
|
|
};
|
2022-03-28 00:19:12 +00:00
|
|
|
};
|
|
|
|
|
2022-09-28 11:49:44 +00:00
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
# The application menu.
|
|
|
|
junction
|
|
|
|
] ++ cfg.shellExtensions ++ cfg.extraApps;
|
|
|
|
}
|
|
|
|
|
|
|
|
# Check whether this is inside of my personal configuration or nah.
|
2023-07-28 00:30:12 +00:00
|
|
|
(lib.mkIf (attrs ? _isfoodogsquaredcustom && attrs._isfoodogsquaredcustom) {
|
2022-09-28 11:49:44 +00:00
|
|
|
profiles.i18n = lib.mkDefault {
|
|
|
|
enable = true;
|
|
|
|
ibus.enable = true;
|
|
|
|
};
|
|
|
|
})
|
|
|
|
]);
|
2021-11-25 11:55:30 +00:00
|
|
|
}
|