mirror of
https://github.com/Jokiller230/puzzlevision.git
synced 2025-09-10 12:50:05 +00:00
♻️⚡️ remove with lib;
everywhere and partially switch to mkOpt
This commit is contained in:
parent
c5283fe60b
commit
124d6b7ede
27 changed files with 72 additions and 53 deletions
|
@ -5,12 +5,14 @@
|
|||
osConfig,
|
||||
namespace,
|
||||
...
|
||||
}: with lib; with lib.${namespace};
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkIf mkOption;
|
||||
inherit (lib.${namespace}) mkOpt;
|
||||
cfg = config.${namespace}.desktop.gnome;
|
||||
in
|
||||
{
|
||||
options.${namespace}.desktop.gnome = with types; {
|
||||
options.${namespace}.desktop.gnome = with lib.types; {
|
||||
enabled-extensions = mkOption {
|
||||
type = listOf package;
|
||||
default = with pkgs.gnomeExtensions; [ dash-to-dock user-themes blur-my-shell appindicator unite color-picker clipboard-history ];
|
||||
|
@ -19,7 +21,7 @@ in
|
|||
};
|
||||
favorite-apps = mkOption {
|
||||
type = listOf str;
|
||||
default = ["org.gnome.Nautilus.desktop" "obsidian.desktop" "zen.desktop" "dev.zed.Zed.desktop"];
|
||||
default = ["org.gnome.Nautilus.desktop" "obsidian.desktop" "firefox.desktop" "dev.zed.Zed.desktop"];
|
||||
example = ["org.gnome.Nautilus.desktop" "obsidian.desktop"];
|
||||
description = "Specify your favorite apps (sorted left to right).";
|
||||
};
|
||||
|
@ -42,7 +44,7 @@ in
|
|||
enable-blur = mkOpt bool false "Whether to enable blur-my-shell application blur.";
|
||||
};
|
||||
};
|
||||
wallpaper = mkOpt str (builtins.toString ./wallpapers/abstract/amber-d.jxl) "Specify the path of your prefered Gnome wallpaper.";
|
||||
wallpaper = mkOpt str (builtins.toString ./wallpapers/arcane/jinx_flare.jpg) "Specify the path of your prefered Gnome wallpaper.";
|
||||
};
|
||||
|
||||
config = mkIf osConfig.${namespace}.desktop.gnome.enable {
|
||||
|
@ -51,7 +53,7 @@ in
|
|||
dconf.settings = {
|
||||
"org/gnome/shell" = {
|
||||
favorite-apps = cfg.favorite-apps;
|
||||
enabled-extensions = forEach cfg.enabled-extensions (x: x.extensionUuid);
|
||||
enabled-extensions = lib.forEach cfg.enabled-extensions (x: x.extensionUuid);
|
||||
disabled-extensions = []; # Make sure none of our extensions are disabled on system rebuild
|
||||
};
|
||||
"org/gnome/shell/extensions/unite" = mkIf (builtins.elem pkgs.gnomeExtensions.unite cfg.enabled-extensions) {
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
{
|
||||
lib,
|
||||
namespace,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: with lib; with lib.${namespace};
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkOption;
|
||||
palette = (pkgs.lib.importJSON (config.catppuccin.sources.palette + "/palette.json")).${config.catppuccin.flavor}.colors;
|
||||
in
|
||||
{
|
||||
options.palette = mkOption { type = types.attrsOf types.raw; };
|
||||
options.palette = mkOption { type = lib.types.attrsOf lib.types.raw; };
|
||||
|
||||
config = {
|
||||
inherit palette;
|
||||
|
|
|
@ -4,8 +4,10 @@
|
|||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: with lib; with lib.${namespace};
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
|
||||
# Stolen from Oli @ git.gay, basically just themes default libadwaita components.
|
||||
css = pkgs.writeTextFile {
|
||||
name = "gtk-css";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue