{pkgs, lib,  ...}:
with lib.hm.gvariant;
{
    ## Gnome extensions
    programs.gnome-shell = {
        enable = true;
        extensions = [
            {
                package = pkgs.gnomeExtensions.dash-to-dock;
            }
            {
                id = "tilingshell@ferrarodomenico.com";
                package = pkgs.gnome-shell-extensions;
            }
            {
                id = "search-light@icedman.github.com";
                package = pkgs.gnome-shell-extensions;
            }
            {
                package = pkgs.gnomeExtensions.window-gestures;
            }
            {
                package = pkgs.gnomeExtensions.random-wallpaper;
            }
        ];
    };


    ## And their settings (stored in dconf)
    dconf.settings."org/gnome/shell/extensions/tilingshell" = {
        inner-gaps = mkUint32 8;
        layouts-json = ''
            [{"id":"Layout 2","tiles":[{"x":0,"y":0,"width":0.22,"height":1,"groups":[1]},{"x":0.22,"y":0,"width":0.56,"height":1,"groups":[1,2]},{"x":0.78,"y":0,"width":0.22,"height":1,"groups":[2]}]},{"id":"Layout 3","tiles":[{"x":0,"y":0,"width":0.33,"height":1,"groups":[1]},{"x":0.33,"y":0,"width":0.67,"height":1,"groups":[1]}]},{"id":"Layout 4","tiles":[{"x":0,"y":0,"width":0.67,"height":1,"groups":[1]},{"x":0.67,"y":0,"width":0.33,"height":1,"groups":[1]}]},{"id":"2732837","tiles":[{"x":0,"y":0,"width":0.5002604166666667,"height":1,"groups":[1]},{"x":0.5002604166666667,"y":0,"width":0.49973958333333335,"height":1,"groups":[1]}]},{"id":"241562","tiles":[{"x":0,"y":0,"width":0.3328488372093023,"height":1,"groups":[1]},{"x":0.3328488372093023,"y":0,"width":0.33430232558139533,"height":1,"groups":[2,1]},{"x":0.6671511627906976,"y":0,"width":0.3328488372093023,"height":1,"groups":[2]}]}]
        '';
        outer-gaps = mkUint32 0;
        overridden-settings = ''
            {"org.gnome.mutter.keybindings":{"toggle-tiled-right":"['<Super>Right']","toggle-tiled-left":"['<Super>Left']"},"org.gnome.desktop.wm.keybindings":{"maximize":"['<Super>Up']","unmaximize":"['<Super>Down', '<Alt>F5']"},"org.gnome.mutter":{"edge-tiling":"true"}}
        '';
        selected-layouts = [ "Layout 4" ];
    };


    dconf.settings."org/gnome/shell/extensions/search-light" = {
        background-color = mkTuple [ 0.20333333313465118 0.20333333313465118 0.20333333313465118 0.80236488580703735 ];
        blur-background = false;
        entry-font-size = 1;
        monitor-count = 1;
        scale-height = 0.10000000000000001;
        scale-width = 0.20000000000000001;
        shortcut-search = [ "<Control><Alt>space" ];
        popup-at-cursor-monitor = true;
        show-panel-icon = false;
    };

    dconf.settings."org/gnome/shell/extensions/windowgestures" = {
        pinch-enable = false;
        swipe4-left = 9;
        swipe4-right = 8;
        swipe4-updown = 0;
        three-finger = true;
    };

    dconf.settings."org/gnome/shell/extensions/dash-to-dock" = {
        background-opacity = 0.80000000000000004;
        custom-theme-shrink = true;
        dash-max-icon-size = 40;
        dock-position = "BOTTOM";
        height-fraction = 0.90000000000000002;
        preview-size-scale = 0.29999999999999999;
        show-running = true;
        show-trash = false;
        show-windows-preview = true;
    };

    dconf.settings."org/gnome/mutter" = {
        dynamic-workspaces = true;
        edge-tiling = false;
        workspaces-only-on-primary = true;
    };


    dconf.settings."org/gnome/desktop/interface" = {
        color-scheme = "prefer-dark";
        show-battery-percentage = true;
    };

}