mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 10:58:02 +00:00
nixos/workflows/a-happy-gnome: add options for disabling specific settings
Also refactored some things yey. Also made the entire module not so internal anymore, another yey.
This commit is contained in:
parent
749e85ca49
commit
e3d03a206d
@ -3,6 +3,11 @@
|
|||||||
let
|
let
|
||||||
workflowName = "a-happy-gnome";
|
workflowName = "a-happy-gnome";
|
||||||
cfg = config.workflows.workflows.${workflowName};
|
cfg = config.workflows.workflows.${workflowName};
|
||||||
|
|
||||||
|
requiredApps = with pkgs; [
|
||||||
|
# The application menu.
|
||||||
|
junction
|
||||||
|
];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.workflows.enable = lib.mkOption {
|
options.workflows.enable = lib.mkOption {
|
||||||
@ -40,7 +45,6 @@ in
|
|||||||
just-perfection
|
just-perfection
|
||||||
];
|
];
|
||||||
'';
|
'';
|
||||||
internal = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
extraApps = lib.mkOption {
|
extraApps = lib.mkOption {
|
||||||
@ -80,7 +84,46 @@ in
|
|||||||
example = lib.literalExpression ''
|
example = lib.literalExpression ''
|
||||||
with pkgs; [ gnome.polari ];
|
with pkgs; [ gnome.polari ];
|
||||||
'';
|
'';
|
||||||
internal = true;
|
};
|
||||||
|
|
||||||
|
disableSearchProviders = lib.mkOption {
|
||||||
|
type = with lib.types; listOf (
|
||||||
|
coercedTo str (lib.removeSuffix ".desktop") str
|
||||||
|
);
|
||||||
|
description = ''
|
||||||
|
A list of the application filenames (without the `.desktop` part) where
|
||||||
|
its GNOME Shell search provider is to be disabled.
|
||||||
|
|
||||||
|
By default, it disables some of the search providers from the default
|
||||||
|
list of applications in
|
||||||
|
{option}`workflows.workflows.a-happy-gnome.extraApps`.
|
||||||
|
'';
|
||||||
|
default = [
|
||||||
|
"org.gnome.seahorse.Application"
|
||||||
|
"org.gnome.Photos"
|
||||||
|
"org.gnome.Epiphany"
|
||||||
|
"app.drey.Dialect"
|
||||||
|
"com.belmoussaoui.Authenticator"
|
||||||
|
];
|
||||||
|
apply = builtins.map (x: "${x}.desktop");
|
||||||
|
};
|
||||||
|
|
||||||
|
disableNotifications = lib.mkOption {
|
||||||
|
type = with lib.types; listOf str;
|
||||||
|
description = ''
|
||||||
|
A list of identifiers of the application's notification to be disabled
|
||||||
|
within GNOME Shell.
|
||||||
|
|
||||||
|
By default, it just list a few from the default value of
|
||||||
|
{option}`workflows.workflows.a-happy-gnome.extraApps`.
|
||||||
|
'';
|
||||||
|
default = [
|
||||||
|
"re-sonny-tangram"
|
||||||
|
"org-gnome-polari"
|
||||||
|
"io-github-hexchat"
|
||||||
|
"org-gnome-evolution-alarm-notify"
|
||||||
|
"thunderbird"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -123,13 +166,7 @@ in
|
|||||||
settings = lib.mkMerge [
|
settings = lib.mkMerge [
|
||||||
{
|
{
|
||||||
"org/gnome/desktop/search-providers" = {
|
"org/gnome/desktop/search-providers" = {
|
||||||
disabled = [
|
disabled = cfg.disableSearchProviders;
|
||||||
"org.gnome.seahorse.Application.desktop"
|
|
||||||
"org.gnome.Photos.desktop"
|
|
||||||
"org.gnome.Epiphany.desktop"
|
|
||||||
"app.drey.Dialect.desktop"
|
|
||||||
"com.belmoussaoui.Authenticator.desktop"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
"org/gnome/shell" = {
|
"org/gnome/shell" = {
|
||||||
enabled-extensions = builtins.map (p: p.extensionUuid) cfg.shellExtensions;
|
enabled-extensions = builtins.map (p: p.extensionUuid) cfg.shellExtensions;
|
||||||
@ -138,19 +175,14 @@ in
|
|||||||
|
|
||||||
# Disable all of the messenger's notification (only the annoying
|
# Disable all of the messenger's notification (only the annoying
|
||||||
# ones).
|
# ones).
|
||||||
(lib.listToAttrs
|
(lib.pipe cfg.disableNotifications [
|
||||||
(builtins.map
|
(builtins.map (app:
|
||||||
(app:
|
lib.nameValuePair
|
||||||
lib.nameValuePair
|
"org/gnome/desktop/notifications/application/${app}"
|
||||||
"org/gnome/desktop/notifications/application/${app}"
|
{ show-banners = false; }))
|
||||||
{ show-banners = false; })
|
|
||||||
[
|
lib.listToAttrs
|
||||||
"re-sonny-tangram"
|
])
|
||||||
"org-gnome-polari"
|
|
||||||
"io-github-hexchat"
|
|
||||||
"org-gnome-evolution-alarm-notify"
|
|
||||||
"thunderbird"
|
|
||||||
]))
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -170,9 +202,6 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = requiredApps ++ cfg.shellExtensions ++ cfg.extraApps;
|
||||||
# The application menu.
|
|
||||||
junction
|
|
||||||
] ++ cfg.shellExtensions ++ cfg.extraApps;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user