From 03500126f80a38170448fc0b74b6fc8132de815f Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Mon, 24 Jun 2024 13:36:10 +0300 Subject: [PATCH] Settin : Use module instead of raw nix. --- android/default.nix | 1 - flake.nix | 10 +- module/Ollama.nix | 6 +- module/common/Keyd.nix | 4 +- module/common/Nvim.nix | 2 +- module/common/nvim/module/plugin/Ollama.nix | 4 +- module/common/tmux/default.nix | 2 +- module/desktop/App.nix | 4 +- module/desktop/DisplayManager.nix | 6 +- module/desktop/dconf/Input.nix | 4 +- module/desktop/dconf/Key.nix | 12 +- module/desktop/sway/default.nix | 2 +- module/desktop/sway/module/Brightness.nix | 4 +- module/desktop/sway/module/Input.nix | 8 +- module/desktop/sway/module/Sound.nix | 6 +- module/desktop/sway/module/System.nix | 4 +- module/desktop/sway/module/Terminal.nix | 4 +- module/desktop/waybar/config/default.nix | 12 +- part/Setting.nix | 132 ++++++++++++++++---- user/Dasha.nix | 2 +- user/Root.nix | 2 +- user/Voronind.nix | 2 +- user/common/default.nix | 2 +- user/common/foot/default.nix | 4 +- user/common/fuzzel/default.nix | 6 +- user/common/keyd/module/DRG.nix | 4 +- user/common/keyd/module/Jetbrains.nix | 4 +- user/common/mako/default.nix | 4 +- user/common/top/btop/default.nix | 4 +- user/common/yazi/default.nix | 2 +- user/common/yazi/module/Yazi.nix | 4 +- 31 files changed, 180 insertions(+), 87 deletions(-) diff --git a/android/default.nix b/android/default.nix index 4f16932..256795c 100644 --- a/android/default.nix +++ b/android/default.nix @@ -4,7 +4,6 @@ , style , util , key -, setting , secret , ... } @args: let # Path where Termux stores user data. diff --git a/flake.nix b/flake.nix index a79d747..b0321c6 100644 --- a/flake.nix +++ b/flake.nix @@ -148,7 +148,10 @@ ); in { # Here I import everything from those directories. - imports = (lsFiles ./module/common) ++ (lsFiles ./overlay) ++ [ ./user/Root.nix ]; + imports = (lsFiles ./module/common) ++ (lsFiles ./overlay) ++ [ + ./part/Setting.nix + ./user/Root.nix + ]; }; # Function to create a host. It does basic setup, like adding common modules. @@ -194,7 +197,6 @@ flake = self; # This Flake itself. inputs = inputs; # Our dependencies. secret = import ./part/Secret.nix {}; # Secrets (public keys). - setting = import ./part/Setting.nix {}; # My own global settings. style = import ./part/Style.nix { inherit config; }; # Style abstraction. util = import ./part/Util.nix { inherit pkgs lib; }; # Util functions. wallpaper = import ./part/Wallpaper.nix { inherit pkgs; }; # Wallpaper. @@ -347,6 +349,9 @@ # I put all my Android configuration there. ./android + + # Common settings. + ./part/Setting.nix ]; # SpecialArgs allows you to pass objects down to other configuration. @@ -359,7 +364,6 @@ flake = self; # This Flake itself. inputs = inputs; # Our dependencies. secret = import ./part/Secret.nix {}; # Secrets (public keys). - setting = import ./part/Setting.nix {}; # My own global settings. style = import ./part/Style.nix { config = import ./part/style/Gruvbox.nix {}; }; # Style abstraction. Stylix is not available for Android so I provide static Gruvbox style. util = import ./part/Util.nix { inherit pkgs lib; }; # Util functions. }; diff --git a/module/Ollama.nix b/module/Ollama.nix index c430192..b7bd5f1 100644 --- a/module/Ollama.nix +++ b/module/Ollama.nix @@ -1,5 +1,5 @@ # https://github.com/ollama/ollama -{ pkgsStable, lib, setting, ... }: let +{ pkgsStable, lib, config, ... }: let pkgs = pkgsStable; in { environment = { @@ -7,7 +7,7 @@ in { systemPackages = with pkgs; [ ollama ]; # Specify default model. - variables.OLLAMA_MODEL = setting.ollama.primaryModel; + variables.OLLAMA_MODEL = config.setting.ollama.primaryModel; }; # Enable Ollama server. @@ -31,7 +31,7 @@ in { serviceConfig.Type = "simple"; script = '' sleep 5 - ${lib.getExe pkgs.ollama} pull ${setting.ollama.primaryModel} + ${lib.getExe pkgs.ollama} pull ${config.setting.ollama.primaryModel} ''; }; } diff --git a/module/common/Keyd.nix b/module/common/Keyd.nix index 93a397f..a584dbd 100644 --- a/module/common/Keyd.nix +++ b/module/common/Keyd.nix @@ -1,4 +1,4 @@ -{ pkgs, setting, ... }: { +{ pkgs, config, ... }: { environment.systemPackages = with pkgs; [ keyd ]; services.keyd = { @@ -10,7 +10,7 @@ backspace = "delete"; # Delete key on backspace. capslock = "overload(control, esc)"; # Ctrl/esc combo. compose = "layer(layer_number)"; # Number input layer. - esc = "${setting.sysctrl}"; # System controls. + esc = "${config.setting.sysctrl}"; # System controls. leftcontrol = "overload(layer_alternative, leftcontrol)"; # Alternative layer for home, end etc. rightcontrol = "layer(layer_control)"; # Media and other controls. rightshift = "backspace"; # Backspace. diff --git a/module/common/Nvim.nix b/module/common/Nvim.nix index 29b8a62..4a616d3 100644 --- a/module/common/Nvim.nix +++ b/module/common/Nvim.nix @@ -1,4 +1,4 @@ -{ inputs, pkgs, util, key, setting, ... } @args: let +{ inputs, pkgs, util, key, config, ... } @args: let nvim = import ./nvim args; in { environment = { diff --git a/module/common/nvim/module/plugin/Ollama.nix b/module/common/nvim/module/plugin/Ollama.nix index b8695bf..1932ddf 100644 --- a/module/common/nvim/module/plugin/Ollama.nix +++ b/module/common/nvim/module/plugin/Ollama.nix @@ -1,7 +1,7 @@ -{ setting, ... }: { +{ config, ... }: { text = '' require("ollama").setup { - model = "${setting.ollama.primaryModel}", + model = "${config.setting.ollama.primaryModel}", url = "http://127.0.0.1:11434", -- View the actual default prompts in ./lua/ollama/prompts.lua prompts = { diff --git a/module/common/tmux/default.nix b/module/common/tmux/default.nix index 5d3b611..fb3d44b 100644 --- a/module/common/tmux/default.nix +++ b/module/common/tmux/default.nix @@ -1,3 +1,3 @@ -{ style, key, util, setting, ... } @args: { +{ style, key, util, config, ... } @args: { config = util.catText (util.ls ./module) args; } diff --git a/module/desktop/App.nix b/module/desktop/App.nix index 977144c..1fc6b1c 100644 --- a/module/desktop/App.nix +++ b/module/desktop/App.nix @@ -1,4 +1,4 @@ -{ pkgs, pkgsStable, pkgsMaster, setting, ... } @args: let +{ pkgs, pkgsStable, pkgsMaster, config, ... } @args: let mangohud = import ./mangohud args; in { imports = [ @@ -69,7 +69,7 @@ in { # Terminal settings. TERM = "xterm-256color"; - TERMINAL = setting.terminal.bin; + TERMINAL = config.setting.terminal.bin; }; }; diff --git a/module/desktop/DisplayManager.nix b/module/desktop/DisplayManager.nix index f16f979..c64e720 100644 --- a/module/desktop/DisplayManager.nix +++ b/module/desktop/DisplayManager.nix @@ -1,7 +1,7 @@ -{ setting, ... }: { +{ config, ... }: { services.xserver.enable = true; services.xserver.xkb = { - layout = setting.keyboard.layouts; - options = setting.keyboard.options; + layout = config.setting.keyboard.layouts; + options = config.setting.keyboard.options; }; } diff --git a/module/desktop/dconf/Input.nix b/module/desktop/dconf/Input.nix index 50c1610..bbd30e6 100644 --- a/module/desktop/dconf/Input.nix +++ b/module/desktop/dconf/Input.nix @@ -1,11 +1,11 @@ -{ lib, setting, ... }: { +{ lib, config, ... }: { "org/gnome/desktop/input-sources" = with lib.gvariant; { current = mkUint32 0; mru-sources = [ (mkTuple [ "xkb" "us" ]) (mkTuple [ "xkb" "ru" ]) ]; per-window = false; show-all-sources = true; sources = [ (mkTuple [ "xkb" "us" ]) (mkTuple [ "xkb" "ru" ]) ]; - xkb-options = [ setting.keyboard.options ]; + xkb-options = [ config.setting.keyboard.options ]; }; "org/gnome/desktop/peripherals/mouse" = { diff --git a/module/desktop/dconf/Key.nix b/module/desktop/dconf/Key.nix index 2a018e1..95211e9 100644 --- a/module/desktop/dconf/Key.nix +++ b/module/desktop/dconf/Key.nix @@ -1,4 +1,4 @@ -{ setting, ... }: let +{ config, ... }: let mod = ""; in { "org/gnome/desktop/wm/keybindings" = { @@ -82,31 +82,31 @@ in { }; "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = { - binding = "${setting.sysctrl}z"; + binding = "${config.setting.sysctrl}z"; command = "systemctl suspend -i"; name = "System Sleep"; }; "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2" = { - binding = "${setting.sysctrl}x"; + binding = "${config.setting.sysctrl}x"; command = "systemctl poweroff -i"; name = "System Poweroff"; }; "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom3" = { - binding = "${setting.sysctrl}c"; + binding = "${config.setting.sysctrl}c"; command = "systemctl reboot -i"; name = "System Reboot"; }; "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom4" = { - binding = "${setting.sysctrl}p"; + binding = "${config.setting.sysctrl}p"; command = "powersave toggle"; name = "Toggle Powersave"; }; "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom5" = { - binding = "${setting.sysctrl}l"; + binding = "${config.setting.sysctrl}l"; command = "powerlimit toggle"; name = "Toggle Powerlimit"; }; diff --git a/module/desktop/sway/default.nix b/module/desktop/sway/default.nix index 9bd6951..17697af 100644 --- a/module/desktop/sway/default.nix +++ b/module/desktop/sway/default.nix @@ -1,4 +1,4 @@ -{ pkgs, wallpaper, style, util, setting, ... } @args: let +{ pkgs, wallpaper, style, util, config, ... } @args: let # Order is required for Sway configuration. swayRc = util.catText [ ./module/Style.nix diff --git a/module/desktop/sway/module/Brightness.nix b/module/desktop/sway/module/Brightness.nix index 245d890..8075aa3 100644 --- a/module/desktop/sway/module/Brightness.nix +++ b/module/desktop/sway/module/Brightness.nix @@ -1,5 +1,5 @@ -{ setting, ... }: let - step = setting.step.brightness; +{ config, ... }: let + step = config.setting.step.brightness; in { text = '' bindsym XF86MonBrightnessDown exec light -U ${toString step} diff --git a/module/desktop/sway/module/Input.nix b/module/desktop/sway/module/Input.nix index 2bf8d5f..cc07650 100644 --- a/module/desktop/sway/module/Input.nix +++ b/module/desktop/sway/module/Input.nix @@ -1,4 +1,4 @@ -{ setting, ... }: { +{ config, ... }: { text = '' ### Input configuration # @@ -33,11 +33,11 @@ } input type:keyboard { - xkb_layout ${setting.keyboard.layouts} - xkb_options ${setting.keyboard.options} + xkb_layout ${config.setting.keyboard.layouts} + xkb_options ${config.setting.keyboard.options} } # Hide mouse cursor after a period of inactivity. - seat seat0 hide_cursor ${toString setting.timeout.popup} + seat seat0 hide_cursor ${toString config.setting.timeout.popup} ''; } diff --git a/module/desktop/sway/module/Sound.nix b/module/desktop/sway/module/Sound.nix index ffbc44c..bd71777 100644 --- a/module/desktop/sway/module/Sound.nix +++ b/module/desktop/sway/module/Sound.nix @@ -1,6 +1,6 @@ -{ setting, ... }: let - step_volume = setting.step.volume; - step_music = setting.step.media; +{ config, ... }: let + step_volume = config.setting.step.volume; + step_music = config.setting.step.media; in { text = '' bindsym XF86AudioRaiseVolume exec 'pactl set-sink-volume @DEFAULT_SINK@ +${toString step_volume}%' diff --git a/module/desktop/sway/module/System.nix b/module/desktop/sway/module/System.nix index 90110a7..c7bb573 100644 --- a/module/desktop/sway/module/System.nix +++ b/module/desktop/sway/module/System.nix @@ -1,5 +1,5 @@ -{ setting, ... }: let - mod = setting.sysctrl; +{ config, ... }: let + mod = config.setting.sysctrl; in { text = '' bindsym ${mod}+c exec 'systemctl reboot -i' diff --git a/module/desktop/sway/module/Terminal.nix b/module/desktop/sway/module/Terminal.nix index 58dddbd..cdf2269 100644 --- a/module/desktop/sway/module/Terminal.nix +++ b/module/desktop/sway/module/Terminal.nix @@ -1,6 +1,6 @@ -{ setting, ... }: { +{ config, ... }: { text = '' - set $term ${setting.terminal.bin} + set $term ${config.setting.terminal.bin} bindsym $mod+Escape exec $term -e bash -c "tmux new-session -A -s $USER; bash" ''; diff --git a/module/desktop/waybar/config/default.nix b/module/desktop/waybar/config/default.nix index 71aff8c..befea13 100644 --- a/module/desktop/waybar/config/default.nix +++ b/module/desktop/waybar/config/default.nix @@ -1,4 +1,4 @@ -{ setting, style, pkgs, ... }: let +{ config, style, pkgs, ... }: let refreshInterval = 2; in { file = (pkgs.formats.json {}).generate "WaybarConfig" { @@ -73,7 +73,7 @@ in { on-click-right = "powerlimit toggle"; }; pulseaudio = { - scroll-step = setting.step.volume; + scroll-step = config.setting.step.volume; format = "{volume}% {icon}"; format-muted = "󰸈"; format-icons = { @@ -100,26 +100,26 @@ in { cpu = { format = "{usage}% ({load})"; interval = refreshInterval; - on-click = "${setting.terminal.bin} -e bash -c btop"; + on-click = "${config.setting.terminal.bin} -e bash -c btop"; on-click-right = "powersave toggle"; tooltip = false; }; memory = { format = "{percentage}%"; interval = refreshInterval; - on-click = "${setting.terminal.bin} -e bash -c btop"; + on-click = "${config.setting.terminal.bin} -e bash -c btop"; on-click-right = "powersave toggle"; }; temperature = { format = "{temperatureC}°C"; interval = refreshInterval; - on-click = "${setting.terminal.bin} -e bash -c btop"; + on-click = "${config.setting.terminal.bin} -e bash -c btop"; on-click-right = "powersave toggle"; }; "custom/powersave" = { exec = "powersave waybar"; interval = refreshInterval; - on-click = "${setting.terminal.bin} -e bash -c btop"; + on-click = "${config.setting.terminal.bin} -e bash -c btop"; on-click-right = "powersave toggle"; }; "custom/display" = { diff --git a/part/Setting.nix b/part/Setting.nix index e142a88..59ce4dc 100644 --- a/part/Setting.nix +++ b/part/Setting.nix @@ -1,29 +1,119 @@ # Global settings. # Just like I can configure each package, here I configure my config! :O) -{ ... }: { - ollama.primaryModel = "llama3"; - browser.bin = "firefox-esr"; - terminal.bin = "foot"; - dpiAware = false; - sysctrl = "print"; +{ pkgs +, config +,lib +, ... }: { + options.setting = with lib; { + ollama = mkOption { + default = { }; + type = types.submodule { + # freeformType = lib.jsonFormat.type; + options = { + primaryModel = mkOption { + default = "llama3"; + type = types.str; + }; + }; + }; + }; - keyboard = { - layouts = "us,ru"; - options = "grp:toggle"; - }; + browser = mkOption { + default = { }; + type = types.submodule { + options = { + bin = mkOption { + default = "firefox-esr"; + type = types.str; + }; + }; + }; + }; - refresh = { - top = 2000; - }; + terminal = mkOption { + default = { }; + type = types.submodule { + options = { + bin = mkOption { + default = "foot"; + type = types.str; + }; + }; + }; + }; - step = { - brightness = 5; - volume = 5; - media = 10; - }; + dpiAware = mkOption { + default = false; + type = types.bool; + }; - timeout = { - popup = 5000; - keyd = 150; + sysctrl = mkOption { + default = "print"; + type = types.str; + }; + + keyboard = mkOption { + default = { }; + type = types.submodule { + options = { + layouts = mkOption { + default = "us,ru"; + type = types.str; + }; + options = mkOption { + default = "grp:toggle"; + type = types.str; + }; + }; + }; + }; + + refresh = mkOption { + default = { }; + type = types.submodule { + options = { + top = mkOption { + default = 2000; + type = types.int; + }; + }; + }; + }; + + step = mkOption { + default = { }; + type = types.submodule { + options = { + brightness = mkOption { + default = 5; + type = types.int; + }; + volume = mkOption { + default = 5; + type = types.int; + }; + media = mkOption { + default = 10; + type = types.int; + }; + }; + }; + }; + + timeout = mkOption { + default = { }; + type = types.submodule { + options = { + popup = mkOption { + default = 5000; + type = types.int; + }; + keyd = mkOption { + default = 150; + type = types.int; + }; + }; + }; + }; }; } diff --git a/user/Dasha.nix b/user/Dasha.nix index 44714e3..709be44 100644 --- a/user/Dasha.nix +++ b/user/Dasha.nix @@ -3,7 +3,7 @@ , style , pkgs , lib -, setting +, config , key , secret , ... } @args: { diff --git a/user/Root.nix b/user/Root.nix index fbdcd27..e444098 100644 --- a/user/Root.nix +++ b/user/Root.nix @@ -2,7 +2,7 @@ , util , style , pkgs -, setting +, config , key , secret , ... } @args: { diff --git a/user/Voronind.nix b/user/Voronind.nix index c6932c4..3bdf9af 100644 --- a/user/Voronind.nix +++ b/user/Voronind.nix @@ -3,7 +3,7 @@ , style , pkgs , lib -, setting +, config , key , secret , ... } @args: { diff --git a/user/common/default.nix b/user/common/default.nix index afc3663..d013f80 100644 --- a/user/common/default.nix +++ b/user/common/default.nix @@ -4,7 +4,7 @@ , key , pkgs , secret -, setting +, config , style , username , util diff --git a/user/common/foot/default.nix b/user/common/foot/default.nix index a55a716..e472b33 100644 --- a/user/common/foot/default.nix +++ b/user/common/foot/default.nix @@ -1,5 +1,5 @@ -{ style, setting, pkgs, ... }: let - dpiAware = if setting.dpiAware then "yes" else "no"; +{ style, config, pkgs, ... }: let + dpiAware = if config.setting.dpiAware then "yes" else "no"; fontStep = 1; in { file = (pkgs.formats.iniWithGlobalSection {}).generate "FootConfig" { diff --git a/user/common/fuzzel/default.nix b/user/common/fuzzel/default.nix index 9c2d8ee..b2989b9 100644 --- a/user/common/fuzzel/default.nix +++ b/user/common/fuzzel/default.nix @@ -1,5 +1,5 @@ -{ pkgs, style, setting, ... }: let - dpiAware = if setting.dpiAware then "yes" else "no"; +{ pkgs, style, config, ... }: let + dpiAware = if config.setting.dpiAware then "yes" else "no"; in { file = (pkgs.formats.ini {}).generate "FuzzelConfig" { main = { @@ -8,7 +8,7 @@ in { lines = 20; prompt = "\"\""; show-actions = "yes"; - terminal = setting.terminal.bin; + terminal = config.setting.terminal.bin; width = 40; # list-executables-in-path = "no"; }; diff --git a/user/common/keyd/module/DRG.nix b/user/common/keyd/module/DRG.nix index a4dfec2..5f86d9e 100644 --- a/user/common/keyd/module/DRG.nix +++ b/user/common/keyd/module/DRG.nix @@ -1,4 +1,4 @@ -{ setting, pkgs, ... }: { +{ config, pkgs, ... }: { file = (pkgs.formats.ini {}).generate "KeydDrgConfig" { steam-app-548430 = { "alt.1" = "macro(enter 10ms L e t ' s space d o space t h i s space T e x a s space s t y l e ! enter)"; @@ -26,7 +26,7 @@ "alt.w" = "macro(enter 10ms r enter)"; "alt.x" = "macro(enter 10ms > space H e r e space < enter)"; "alt.z" = "macro(enter 10ms < space L e f t enter)"; - leftshift = "timeout(leftcontrol, ${toString setting.timeout.keyd}, leftshift)"; + leftshift = "timeout(leftcontrol, ${toString config.setting.timeout.keyd}, leftshift)"; }; }; } diff --git a/user/common/keyd/module/Jetbrains.nix b/user/common/keyd/module/Jetbrains.nix index 07d861e..976f57f 100644 --- a/user/common/keyd/module/Jetbrains.nix +++ b/user/common/keyd/module/Jetbrains.nix @@ -1,4 +1,4 @@ -{ setting, pkgs, ... }: { +{ config, pkgs, ... }: { file = (pkgs.formats.ini {}).generate "KeydJetbrainsConfig" { "jetbrains-*" = { "alt./" = "C-/"; @@ -16,7 +16,7 @@ "alt.q" = "A-left"; "alt.r" = "S-f10"; "alt.s" = "C-A-s"; - "alt.tab" = "timeout(f8, ${toString setting.timeout.keyd}, macro2(0, 0, f7))"; + "alt.tab" = "timeout(f8, ${toString config.setting.timeout.keyd}, macro2(0, 0, f7))"; "alt.v" = "C-q"; "alt.w" = "C-S-A-t"; "alt.x" = "C-f4"; diff --git a/user/common/mako/default.nix b/user/common/mako/default.nix index e852ee3..ded6a57 100644 --- a/user/common/mako/default.nix +++ b/user/common/mako/default.nix @@ -1,4 +1,4 @@ -{ style, pkgs, setting, ... }: let +{ style, pkgs, config, ... }: let alpha = style.opacity.hex; in { file = (pkgs.formats.iniWithGlobalSection {}).generate "MakoConfig" { @@ -6,7 +6,7 @@ in { anchor = "top-center"; background-color = "#${style.color.bg.dark}${alpha}"; border-color = "#${style.color.border}${alpha}"; - default-timeout = setting.timeout.popup; + default-timeout = config.setting.timeout.popup; font = "${style.font.serif.name} ${toString style.font.size.popup}"; height = 120; icons = 0; diff --git a/user/common/top/btop/default.nix b/user/common/top/btop/default.nix index 17dc270..f12d730 100644 --- a/user/common/top/btop/default.nix +++ b/user/common/top/btop/default.nix @@ -1,4 +1,4 @@ -{ setting, util, ... }: { +{ config, util, ... }: { text = util.trimTabs '' #? Config file for btop v. 1.3.0 @@ -55,7 +55,7 @@ shown_boxes = "cpu mem net proc" #* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs. - update_ms = ${toString setting.refresh.top} + update_ms = ${toString config.setting.refresh.top} #* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct", #* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly. diff --git a/user/common/yazi/default.nix b/user/common/yazi/default.nix index 3376ef9..45bf9a4 100644 --- a/user/common/yazi/default.nix +++ b/user/common/yazi/default.nix @@ -1,4 +1,4 @@ -{ pkgs, setting, util, ... } @args: { +{ pkgs, config, util, ... } @args: { init = (import ./module/Init.nix args).file; keymap = (import ./module/Keymap.nix args).file; theme = (import ./module/Theme.nix args).file; diff --git a/user/common/yazi/module/Yazi.nix b/user/common/yazi/module/Yazi.nix index 7dcd195..d2ce566 100644 --- a/user/common/yazi/module/Yazi.nix +++ b/user/common/yazi/module/Yazi.nix @@ -1,4 +1,4 @@ -{ pkgs, setting, ... }: { +{ pkgs, config, ... }: { file = (pkgs.formats.toml {}).generate "YaziYaziConfig" { manager = { # linemode = "mtime"; @@ -30,7 +30,7 @@ browser = [{ desc = "Browser"; orphan = true; - run = openWith setting.browser.bin; + run = openWith config.setting.browser.bin; }]; text = [{ desc = "Text";