mirror of
https://github.com/Jokiller230/puzzlevision.git
synced 2025-01-18 18:03:06 +01:00
refactor: move gnome extension config to new home-manager module
This commit is contained in:
parent
9ada1f7c67
commit
d06c14e32d
2 changed files with 40 additions and 29 deletions
|
@ -2,37 +2,8 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
home.packages = with pkgs.gnomeExtensions; [
|
|
||||||
dash-to-dock
|
|
||||||
user-themes
|
|
||||||
blur-my-shell
|
|
||||||
appindicator
|
|
||||||
unite
|
|
||||||
color-picker
|
|
||||||
clipboard-history
|
|
||||||
];
|
|
||||||
|
|
||||||
# Use `dconf watch /` to track stateful changes you are doing, then set them here.
|
# Use `dconf watch /` to track stateful changes you are doing, then set them here.
|
||||||
dconf.settings = {
|
dconf.settings = {
|
||||||
"org/gnome/shell" = {
|
|
||||||
favorite-apps = [
|
|
||||||
"org.gnome.Nautilus.desktop"
|
|
||||||
"obsidian.desktop"
|
|
||||||
"zen.desktop"
|
|
||||||
"phpstorm.desktop"
|
|
||||||
];
|
|
||||||
|
|
||||||
enabled-extensions = [
|
|
||||||
pkgs.gnomeExtensions.unite.extensionUuid
|
|
||||||
pkgs.gnomeExtensions.color-picker.extensionUuid
|
|
||||||
pkgs.gnomeExtensions.clipboard-history.extensionUuid
|
|
||||||
pkgs.gnomeExtensions.blur-my-shell.extensionUuid
|
|
||||||
pkgs.gnomeExtensions.user-themes.extensionUuid
|
|
||||||
pkgs.gnomeExtensions.dash-to-dock.extensionUuid
|
|
||||||
pkgs.gnomeExtensions.appindicator.extensionUuid
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/desktop/wm/preferences" = {
|
"org/gnome/desktop/wm/preferences" = {
|
||||||
workspace-names = [ "Main" ];
|
workspace-names = [ "Main" ];
|
||||||
};
|
};
|
||||||
|
|
40
modules/home/desktop/gnome/default.nix
Normal file
40
modules/home/desktop/gnome/default.nix
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
host,
|
||||||
|
config,
|
||||||
|
osConfig,
|
||||||
|
namespace,
|
||||||
|
...
|
||||||
|
}: with lib; with lib.${namespace};
|
||||||
|
let
|
||||||
|
cfg = config.${host}.desktop.gnome;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.${host}.desktop.gnome = with types; {
|
||||||
|
extensions = mkOption {
|
||||||
|
type = listOf package;
|
||||||
|
default = with pkgs.gnomeExtensions; [ dash-to-dock user-themes blur-my-shell appindicator unite color-picker clipboard-history ];
|
||||||
|
example = [ dash-to-dock blur-my-shell ];
|
||||||
|
description = "Specify gnome extensions to install.";
|
||||||
|
};
|
||||||
|
favorite-apps = mkOption {
|
||||||
|
type = listOf string;
|
||||||
|
default = ["org.gnome.Nautilus.desktop" "obsidian.desktop" "zen.desktop" "dev.zed.Zed.desktop"];
|
||||||
|
example = ["org.gnome.Nautilus.desktop" "obsidian.desktop"];
|
||||||
|
description = "Specify your favorite apps (sorted left to right)";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf osConfig.${namespace}.desktop.gnome.enable {
|
||||||
|
home.packages = cfg.extensions;
|
||||||
|
|
||||||
|
dconf.settings = {
|
||||||
|
"org/gnome/shell" = {
|
||||||
|
favorite-apps = cfg.favorite-apps;
|
||||||
|
enabled-extensions = forEach cfg.extensions (x: x.extensionUuid);
|
||||||
|
disabled-extensions = []; # Make sure none of our extensions are disabled on system rebuild
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue