workflows/a-happy-gnome: move to programs.dconf.profiles setup

We can even combine already existing keyfiles with Nix data which is nice.
This commit is contained in:
Gabriel Arazas 2023-12-28 16:37:12 +08:00
parent b3ff513304
commit da2dc887e7
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC
6 changed files with 51 additions and 47 deletions

View File

@ -59,23 +59,3 @@ locations = [ <(uint32 2, <('New York', 'KNYC', true, [(0.71180344078725644, -1.
[org/gnome/system/location]
enabled = false
# Disable notification pop-outs for the common messenger apps.
[org/gnome/desktop/notifications/application/re-sonny-tangram]
show-banners = false
[org/gnome/desktop/notifications/application/org-gnome-polari]
show-banners = false
[org/gnome/desktop/notifications/application/thunderbird]
show-banners = false
[org/gnome/desktop/notifications/application/io-github-hexchat]
show-banners = false
[org/gnome/desktop/notifications/application/org-gnome-evolution-alarm-notify]
show-banners = false
# Disable several search providers by default.
[org/gnome/desktop/search-providers]
disabled = [ 'org.gnome.seahorse.Application.desktop', 'org.gnome.Photos.desktop', 'org.gnome.Epiphany.desktop', 'app.drey.Dialect.desktop', 'com.belmoussaoui.Authenticator.desktop' ]

View File

@ -3,6 +3,7 @@
arc-menu-icon = 64
arc-menu-placement = 'Panel'
disable-recently-installed-apps = false
menu-button-appearance = 'None'
menu-button-icon = 'Arc_Menu_Icon'
menu-height = 550
@ -23,7 +24,6 @@ apps-show-extra-details = true
# Minor tweaks ahoy!
[org/gnome/shell/extensions/just-perfection]
activities-button = false
clock-menu-position-offset = 9
clock-menu-position = 1
notification-banner-position = 2
@ -47,16 +47,19 @@ fire-close-effect = false
fire-open-effect = false
# Subtle effects FTW!
tv-animation-time = 250
tv-close-effect = true
tv-open-effect = true
tv-glitch-animation-time = 560
tv-glitch-scale = 1.65
tv-glitch-strength = 3.0
tv-glitch-speed = 3.0
tv-glitch-close-effect = true
tv-glitch-open-effect = true
glide-animation-time = 200
glide-scale = 1.0
glide-shift = -0.02
glide-squish = 0.0
glide-open-effect = true
glide-close-effect = true
glitch-animation-time = 560
glitch-scale = 1.65
glitch-strength = 3.0
glitch-speed = 3.0
glitch-open-effect = true
glitch-close-effect = true
# Make app grid somewhat usable.
[org/gnome/shell/extensions/alphabetical-app-grid]

View File

@ -1,2 +0,0 @@
user-db:user
system-db:a-happy-gnome-conf

View File

@ -2,20 +2,6 @@
let
cfg = config.workflows.workflows.a-happy-gnome;
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.
dconfConfig = pkgs.runCommand "install-a-happy-gnome-dconf-keyfiles" { } ''
mkdir -p $out/etc/dconf && cp --no-preserve=mode -r ${./config/dconf}/* $out/etc/dconf/
install -Dm644 ${enabledExtensions} $out/etc/dconf/db/a-happy-gnome-conf.d/90-enabled-extensions.conf
'';
in
{
options.workflows.workflows.a-happy-gnome = {
@ -129,7 +115,44 @@ in
# Bring all of the dconf keyfiles in there.
programs.dconf = {
enable = true;
packages = [ dconfConfig ];
profiles = {
user.databases = lib.singleton {
# Get them keyfiles.
keyfiles = [ ./config/dconf ];
settings = lib.mkMerge [
{
"org/gnome/desktop/search-providers" = {
disabled = [
"org.gnome.seahorse.Application.desktop"
"org.gnome.Photos.desktop"
"org.gnome.Epiphany.desktop"
"app.drey.Dialect.desktop"
"com.belmoussaoui.Authenticator.desktop"
];
};
"org/gnome/shell" = {
enabled-extensions = builtins.map (p: p.extensionUuid) cfg.shellExtensions;
};
}
# Disable all of the messenger's notification (only the annoying
# ones).
(lib.listToAttrs
(builtins.map (app:
lib.nameValuePair
"org/gnome/desktop/notifications/application/${app}"
{ show-banners = false; })
[
"re-sonny-tangram"
"org-gnome-polari"
"io-github-hexchat"
"org-gnome-evolution-alarm-notify"
"thunderbird"
]))
];
};
};
};
xdg.mime = {