Yazi : Add config.
This commit is contained in:
parent
2890c81cef
commit
a4c027fbb3
|
@ -1,4 +1,4 @@
|
||||||
{ lib, container, ... }: let
|
{ pkgs, container, ... }: let
|
||||||
iconTheme = "fa-solid";
|
iconTheme = "fa-solid";
|
||||||
|
|
||||||
mkGroup = name: icon: items: {
|
mkGroup = name: icon: items: {
|
||||||
|
@ -15,7 +15,6 @@
|
||||||
config = {
|
config = {
|
||||||
title = "Dashboard";
|
title = "Dashboard";
|
||||||
subtitle = "Home";
|
subtitle = "Home";
|
||||||
|
|
||||||
header = false;
|
header = false;
|
||||||
footer = false;
|
footer = false;
|
||||||
connectivityCheck = false;
|
connectivityCheck = false;
|
||||||
|
@ -97,5 +96,5 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
text = lib.generators.toYAML {} config;
|
text = (pkgs.formats.yaml {}).generate "HomerConfig" config;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@ in {
|
||||||
services.gnome.gnome-keyring.enable = lib.mkForce false;
|
services.gnome.gnome-keyring.enable = lib.mkForce false;
|
||||||
environment = {
|
environment = {
|
||||||
systemPackages = with pkgs; [
|
systemPackages = with pkgs; [
|
||||||
|
fuzzel # Application launcher.
|
||||||
grim slurp # Screenshot.
|
grim slurp # Screenshot.
|
||||||
mako # Notification system.
|
mako # Notification system.
|
||||||
networkmanagerapplet # Internet configuration.
|
networkmanagerapplet # Internet configuration.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
config = {
|
config = {
|
||||||
credential.helper = "store";
|
credential.helper = "store";
|
||||||
gpg.format = secret.crypto.sign.git.format;
|
gpg.format = secret.crypto.sign.git.format;
|
||||||
gpg.ssh.allowedSignersFile = toString(secret.crypto.sign.git.allowed);
|
gpg.ssh.allowedSignersFile = toString secret.crypto.sign.git.allowed;
|
||||||
init.defaultBranch = "main";
|
init.defaultBranch = "main";
|
||||||
pull.rebase = true;
|
pull.rebase = true;
|
||||||
push.autoSetupRemote = true;
|
push.autoSetupRemote = true;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
push.autoSetupRemote = true;
|
push.autoSetupRemote = true;
|
||||||
rebase.autoStash = true;
|
rebase.autoStash = true;
|
||||||
user.signingkey = builtins.readFile secret.crypto.sign.git.key;
|
user.signingkey = builtins.readFile secret.crypto.sign.git.key;
|
||||||
gpg.ssh.allowedSignersFile = toString(secret.crypto.sign.git.allowed);
|
gpg.ssh.allowedSignersFile = toString secret.crypto.sign.git.allowed;
|
||||||
gpg.format = secret.crypto.sign.git.format;
|
gpg.format = secret.crypto.sign.git.format;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -22,12 +22,12 @@
|
||||||
experimental-features = nix-command flakes
|
experimental-features = nix-command flakes
|
||||||
keep-derivations = true
|
keep-derivations = true
|
||||||
keep-outputs = true
|
keep-outputs = true
|
||||||
min-free = ${toString(50 * 1000 * 1000 * 1000)}
|
min-free = ${toString 50 * 1000 * 1000 * 1000}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# NOTE: Currently I run GC completely, but this setting (put above near min-free)
|
# NOTE: Currently I run GC completely, but this setting (put above near min-free)
|
||||||
# can stop GC when you hit 101 GB of free space available.
|
# can stop GC when you hit 101 GB of free space available.
|
||||||
# max-free = ${toString(101 * 1024 * 1024 * 1024)}
|
# max-free = ${toString 101 * 1024 * 1024 * 1024}
|
||||||
|
|
||||||
# NOTE: Enable this if you want to run GC on schedule. I instead use `min-free`.
|
# NOTE: Enable this if you want to run GC on schedule. I instead use `min-free`.
|
||||||
# nix.gc = {
|
# nix.gc = {
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
curl # CLI http client.
|
curl # CLI http client.
|
||||||
ddrescue testdisk # Apps to recover data from drives.
|
ddrescue testdisk # Apps to recover data from drives.
|
||||||
dnsutils # Dns utilities like host.
|
dnsutils # Dns utilities like host.
|
||||||
|
exiftool # Image info.
|
||||||
fastfetch # Systeminfo summary.
|
fastfetch # Systeminfo summary.
|
||||||
ffmpeg # Video/audio converter.
|
ffmpeg # Video/audio converter.
|
||||||
file # Get general info about a file.
|
file # Get general info about a file.
|
||||||
|
|
|
@ -8,7 +8,8 @@
|
||||||
# Current dir by default.
|
# Current dir by default.
|
||||||
# Usage: l [DIRS]
|
# Usage: l [DIRS]
|
||||||
function l() {
|
function l() {
|
||||||
ls -lhv --si --group-directories-first --color=auto -- "$@"
|
# ls -lhv --si --group-directories-first --color=auto -- "$@"
|
||||||
|
ccd
|
||||||
}
|
}
|
||||||
|
|
||||||
# List last modified files first.
|
# List last modified files first.
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
vim.opt.autoindent = true
|
vim.opt.autoindent = true
|
||||||
vim.opt.expandtab = false
|
vim.opt.expandtab = false
|
||||||
-- vim.opt.smartindent = true
|
-- vim.opt.smartindent = true
|
||||||
vim.opt.shiftwidth = ${toString(setting.nvim.editor.indent.default)}
|
vim.opt.shiftwidth = ${toString setting.nvim.editor.indent.default}
|
||||||
vim.opt.softtabstop = ${toString(setting.nvim.editor.indent.default)}
|
vim.opt.softtabstop = ${toString setting.nvim.editor.indent.default}
|
||||||
vim.opt.tabstop = ${toString(setting.nvim.editor.indent.default)}
|
vim.opt.tabstop = ${toString setting.nvim.editor.indent.default}
|
||||||
|
|
||||||
-- Disable Markdown forced formatting.
|
-- Disable Markdown forced formatting.
|
||||||
vim.g.markdown_recommended_style = 0
|
vim.g.markdown_recommended_style = 0
|
||||||
|
|
|
@ -19,10 +19,10 @@
|
||||||
rekey_normal("<Leader>${key.action.hide}", "<C-w>q") -- Close split.
|
rekey_normal("<Leader>${key.action.hide}", "<C-w>q") -- Close split.
|
||||||
|
|
||||||
-- Resize splits.
|
-- Resize splits.
|
||||||
rekey_normal("<Leader>${key.action.resize.left}", "${toString(setting.tmux.resize.step.horizontal)}<C-w><")
|
rekey_normal("<Leader>${key.action.resize.left}", "${toString setting.tmux.resize.step.horizontal}<C-w><")
|
||||||
rekey_normal("<Leader>${key.action.resize.right}", "${toString(setting.tmux.resize.step.horizontal)}<C-w>>")
|
rekey_normal("<Leader>${key.action.resize.right}", "${toString setting.tmux.resize.step.horizontal}<C-w>>")
|
||||||
rekey_normal("<Leader>${key.action.resize.down}", "${toString(setting.tmux.resize.step.vertical)}<C-w>+")
|
rekey_normal("<Leader>${key.action.resize.down}", "${toString setting.tmux.resize.step.vertical}<C-w>+")
|
||||||
rekey_normal("<Leader>${key.action.resize.up}", "${toString(setting.tmux.resize.step.vertical)}<C-w>-")
|
rekey_normal("<Leader>${key.action.resize.up}", "${toString setting.tmux.resize.step.vertical}<C-w>-")
|
||||||
|
|
||||||
-- Move splits.
|
-- Move splits.
|
||||||
rekey_normal("<Leader>${key.navigation.move.left}", "<C-w>A")
|
rekey_normal("<Leader>${key.navigation.move.left}", "<C-w>A")
|
||||||
|
|
|
@ -9,10 +9,10 @@ in {
|
||||||
bind -n ${mod}-${key.action.split.vertical} split-window -h -c "#{pane_current_path}"
|
bind -n ${mod}-${key.action.split.vertical} split-window -h -c "#{pane_current_path}"
|
||||||
bind -n ${mod}-${key.action.split.horizontal} split-window -v -c "#{pane_current_path}"
|
bind -n ${mod}-${key.action.split.horizontal} split-window -v -c "#{pane_current_path}"
|
||||||
bind -n ${mod}-${key.action.resize.equalize} select-layout tiled
|
bind -n ${mod}-${key.action.resize.equalize} select-layout tiled
|
||||||
bind -n ${mod}-${key.action.resize.up} resize-pane -U ${toString(setting.tmux.resize.step.vertical)}
|
bind -n ${mod}-${key.action.resize.up} resize-pane -U ${toString setting.tmux.resize.step.vertical}
|
||||||
bind -n ${mod}-${key.action.resize.down} resize-pane -D ${toString(setting.tmux.resize.step.vertical)}
|
bind -n ${mod}-${key.action.resize.down} resize-pane -D ${toString setting.tmux.resize.step.vertical}
|
||||||
bind -n ${mod}-${key.action.resize.left} resize-pane -L ${toString(setting.tmux.resize.step.horizontal)}
|
bind -n ${mod}-${key.action.resize.left} resize-pane -L ${toString setting.tmux.resize.step.horizontal}
|
||||||
bind -n ${mod}-${key.action.resize.right} resize-pane -R ${toString(setting.tmux.resize.step.horizontal)}
|
bind -n ${mod}-${key.action.resize.right} resize-pane -R ${toString setting.tmux.resize.step.horizontal}
|
||||||
bind -n ${mod}-${key.navigation.move.left} swap-pane -U
|
bind -n ${mod}-${key.navigation.move.left} swap-pane -U
|
||||||
bind -n ${mod}-${key.navigation.move.right} swap-pane -D
|
bind -n ${mod}-${key.navigation.move.right} swap-pane -D
|
||||||
unbind '"'
|
unbind '"'
|
||||||
|
|
|
@ -7,13 +7,13 @@
|
||||||
in {
|
in {
|
||||||
text = ''
|
text = ''
|
||||||
bind-key -n ${mod}-${key.tmux.status.toggle} set-option -g status;
|
bind-key -n ${mod}-${key.tmux.status.toggle} set-option -g status;
|
||||||
set -g status-interval ${toString(setting.tmux.status.interval)}
|
set -g status-interval ${toString setting.tmux.status.interval}
|
||||||
set -g status-position bottom
|
set -g status-position bottom
|
||||||
set -g status-justify left
|
set -g status-justify left
|
||||||
set -g status-style "fg=#${fg}"
|
set -g status-style "fg=#${fg}"
|
||||||
|
|
||||||
set -g status-left "#[bold] #H-#S "
|
set -g status-left "#[bold] #H-#S "
|
||||||
set -g status-left-length ${toString(setting.tmux.status.length)}
|
set -g status-left-length ${toString setting.tmux.status.length}
|
||||||
set -g status-right ""
|
set -g status-right ""
|
||||||
|
|
||||||
set-window-option -g window-status-separator ""
|
set-window-option -g window-status-separator ""
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
|
|
||||||
// Fonts.
|
// Fonts.
|
||||||
pref("browser.display.use_document_fonts", 0);
|
pref("browser.display.use_document_fonts", 0);
|
||||||
lockPref("font.minimum-size.x-cyrillic", ${toString(style.font.size.application)});
|
lockPref("font.minimum-size.x-cyrillic", ${toString style.font.size.application});
|
||||||
lockPref("font.minimum-size.x-unicode", ${toString(style.font.size.application)});
|
lockPref("font.minimum-size.x-unicode", ${toString style.font.size.application});
|
||||||
lockPref("font.minimum-size.x-western", ${toString(style.font.size.application)});
|
lockPref("font.minimum-size.x-western", ${toString style.font.size.application});
|
||||||
lockPref("font.name.monospace.x-cyrillic", "${style.font.monospace.name}");
|
lockPref("font.name.monospace.x-cyrillic", "${style.font.monospace.name}");
|
||||||
lockPref("font.name.monospace.x-unicode", "${style.font.monospace.name}");
|
lockPref("font.name.monospace.x-unicode", "${style.font.monospace.name}");
|
||||||
lockPref("font.name.monospace.x-western", "${style.font.monospace.name}");
|
lockPref("font.name.monospace.x-western", "${style.font.monospace.name}");
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{ setting, ... }: let
|
{ setting, ... }: let
|
||||||
step = toString(setting.brightness.step);
|
step = toString setting.brightness.step;
|
||||||
in {
|
in {
|
||||||
text = ''
|
text = ''
|
||||||
bindsym XF86MonBrightnessDown exec light -U ${step}
|
bindsym XF86MonBrightnessDown exec light -U ${step}
|
||||||
|
|
|
@ -38,6 +38,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
# Hide mouse cursor after a period of inactivity.
|
# Hide mouse cursor after a period of inactivity.
|
||||||
seat seat0 hide_cursor ${toString(setting.popup.timeout.ms)}
|
seat seat0 hide_cursor ${toString setting.popup.timeout.ms}
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ style, key, ... }: let
|
{ style, key, ... }: let
|
||||||
fontName = style.font.serif.name;
|
fontName = style.font.serif.name;
|
||||||
fontSize = toString(style.font.size.desktop);
|
fontSize = toString style.font.size.desktop;
|
||||||
|
|
||||||
accent = style.color.accent;
|
accent = style.color.accent;
|
||||||
bg = style.color.bg.dark;
|
bg = style.color.bg.dark;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
{ key, setting, ... }: {
|
{ key, setting, ... }: {
|
||||||
text = ''
|
text = ''
|
||||||
bindsym $mod+${key.action.resize.down} resize grow height ${toString(setting.sway.resize.step.vertical)}px
|
bindsym $mod+${key.action.resize.down} resize grow height ${toString setting.sway.resize.step.vertical}px
|
||||||
bindsym $mod+${key.action.resize.up} resize shrink height ${toString(setting.sway.resize.step.vertical)}px
|
bindsym $mod+${key.action.resize.up} resize shrink height ${toString setting.sway.resize.step.vertical}px
|
||||||
bindsym $mod+${key.action.resize.left} resize shrink width ${toString(setting.sway.resize.step.horizontal)}px
|
bindsym $mod+${key.action.resize.left} resize shrink width ${toString setting.sway.resize.step.horizontal}px
|
||||||
bindsym $mod+${key.action.resize.right} resize grow width ${toString(setting.sway.resize.step.horizontal)}px
|
bindsym $mod+${key.action.resize.right} resize grow width ${toString setting.sway.resize.step.horizontal}px
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{ key, style, ... }: let
|
{ key, style, ... }: let
|
||||||
lock = "swaylock -f -F -c 000000 -k --font \"${style.font.serif.name}\" --font-size ${toString(style.font.size.desktop)}";
|
lock = "swaylock -f -F -c 000000 -k --font \"${style.font.serif.name}\" --font-size ${toString style.font.size.desktop}";
|
||||||
in {
|
in {
|
||||||
text = ''
|
text = ''
|
||||||
bindsym $mod+${key.action.wait} exec '_twice 1 ${lock}'
|
bindsym $mod+${key.action.wait} exec '_twice 1 ${lock}'
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ setting, ... }: let
|
{ setting, ... }: let
|
||||||
step_volume = toString(setting.volume.step);
|
step_volume = toString setting.volume.step;
|
||||||
step_music = toString(setting.media.step);
|
step_music = toString setting.media.step;
|
||||||
in {
|
in {
|
||||||
text = ''
|
text = ''
|
||||||
bindsym XF86AudioRaiseVolume exec 'pactl set-sink-volume @DEFAULT_SINK@ +${step_volume}%'
|
bindsym XF86AudioRaiseVolume exec 'pactl set-sink-volume @DEFAULT_SINK@ +${step_volume}%'
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
bindsym $mod+${key.action.close} kill
|
bindsym $mod+${key.action.close} kill
|
||||||
|
|
||||||
# Add gaps.
|
# Add gaps.
|
||||||
gaps inner ${toString(style.window.gap)}
|
gaps inner ${toString style.window.gap}
|
||||||
|
|
||||||
# Launch everything tiled.
|
# Launch everything tiled.
|
||||||
# for_window [all] floating disable
|
# for_window [all] floating disable
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{ style, ... }: let
|
{ style, ... }: let
|
||||||
borderSize = toString(style.window.border);
|
borderSize = toString style.window.border;
|
||||||
in {
|
in {
|
||||||
text = ''
|
text = ''
|
||||||
# Disable title bar.
|
# Disable title bar.
|
||||||
|
|
|
@ -8,9 +8,9 @@ in {
|
||||||
"position": "top",
|
"position": "top",
|
||||||
"height": 30,
|
"height": 30,
|
||||||
"spacing": 4,
|
"spacing": 4,
|
||||||
"margin-top": ${toString(style.window.gap)},
|
"margin-top": ${toString style.window.gap},
|
||||||
"margin-left": ${toString(style.window.gap)},
|
"margin-left": ${toString style.window.gap},
|
||||||
"margin-right": ${toString(style.window.gap)},
|
"margin-right": ${toString style.window.gap},
|
||||||
"mode": "dock",
|
"mode": "dock",
|
||||||
// "exclusive": false,
|
// "exclusive": false,
|
||||||
"start_hidden": false,
|
"start_hidden": false,
|
||||||
|
@ -68,15 +68,15 @@ in {
|
||||||
"format-alt": "{time} {icon}",
|
"format-alt": "{time} {icon}",
|
||||||
"format-icons": ["", "", "", "", ""],
|
"format-icons": ["", "", "", "", ""],
|
||||||
"on-click-right": "powerlimit toggle",
|
"on-click-right": "powerlimit toggle",
|
||||||
"interval": ${toString(refreshInterval)},
|
"interval": ${toString refreshInterval},
|
||||||
},
|
},
|
||||||
"custom/powerlimit": {
|
"custom/powerlimit": {
|
||||||
"exec": "powerlimit waybar",
|
"exec": "powerlimit waybar",
|
||||||
"interval": ${toString(refreshInterval)},
|
"interval": ${toString refreshInterval},
|
||||||
"on-click-right": "powerlimit toggle"
|
"on-click-right": "powerlimit toggle"
|
||||||
},
|
},
|
||||||
"pulseaudio": {
|
"pulseaudio": {
|
||||||
"scroll-step": ${toString(setting.volume.step)},
|
"scroll-step": ${toString setting.volume.step},
|
||||||
"format": "{volume}% {icon}",
|
"format": "{volume}% {icon}",
|
||||||
"format-muted": "",
|
"format-muted": "",
|
||||||
"format-icons": {
|
"format-icons": {
|
||||||
|
@ -105,29 +105,29 @@ in {
|
||||||
"tooltip": false,
|
"tooltip": false,
|
||||||
"on-click": "foot -e bash -c btop",
|
"on-click": "foot -e bash -c btop",
|
||||||
"on-click-right": "powersave toggle",
|
"on-click-right": "powersave toggle",
|
||||||
"interval": ${toString(refreshInterval)},
|
"interval": ${toString refreshInterval},
|
||||||
},
|
},
|
||||||
"memory": {
|
"memory": {
|
||||||
"format": "{percentage}%",
|
"format": "{percentage}%",
|
||||||
"on-click": "foot -e bash -c btop",
|
"on-click": "foot -e bash -c btop",
|
||||||
"on-click-right": "powersave toggle",
|
"on-click-right": "powersave toggle",
|
||||||
"interval": ${toString(refreshInterval)},
|
"interval": ${toString refreshInterval},
|
||||||
},
|
},
|
||||||
"temperature": {
|
"temperature": {
|
||||||
"format": "{temperatureC}°C",
|
"format": "{temperatureC}°C",
|
||||||
"on-click": "foot -e bash -c btop",
|
"on-click": "foot -e bash -c btop",
|
||||||
"on-click-right": "powersave toggle",
|
"on-click-right": "powersave toggle",
|
||||||
"interval": ${toString(refreshInterval)},
|
"interval": ${toString refreshInterval},
|
||||||
},
|
},
|
||||||
"custom/powersave": {
|
"custom/powersave": {
|
||||||
"exec": "powersave waybar",
|
"exec": "powersave waybar",
|
||||||
"interval": ${toString(refreshInterval)},
|
"interval": ${toString refreshInterval},
|
||||||
"on-click": "foot -e bash -c btop",
|
"on-click": "foot -e bash -c btop",
|
||||||
"on-click-right": "powersave toggle"
|
"on-click-right": "powersave toggle"
|
||||||
},
|
},
|
||||||
"custom/display": {
|
"custom/display": {
|
||||||
"exec": "swayscript monbar",
|
"exec": "swayscript monbar",
|
||||||
"interval": ${toString(refreshInterval)},
|
"interval": ${toString refreshInterval},
|
||||||
"return-type": "json",
|
"return-type": "json",
|
||||||
"on-click": "sleep 0.1 && swayscript montoggle", // FIXME: remove sleep when resolved: https://github.com/Alexays/Waybar/issues/2166
|
"on-click": "sleep 0.1 && swayscript montoggle", // FIXME: remove sleep when resolved: https://github.com/Alexays/Waybar/issues/2166
|
||||||
"on-click-right": "sleep 0.1 && swayscript vrrtoggle"
|
"on-click-right": "sleep 0.1 && swayscript vrrtoggle"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
text = ''
|
text = ''
|
||||||
* {
|
* {
|
||||||
font-family: "${style.font.serif.name}", "Terminess Nerd Font Propo";
|
font-family: "${style.font.serif.name}", "Terminess Nerd Font Propo";
|
||||||
font-size: ${toString(style.font.size.desktop)}px;
|
font-size: ${toString style.font.size.desktop}px;
|
||||||
color: #${style.color.fg.light};
|
color: #${style.color.fg.light};
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -17,8 +17,8 @@ in {
|
||||||
#scratchpad,
|
#scratchpad,
|
||||||
#language {
|
#language {
|
||||||
padding: ${paddingV} ${paddingH};
|
padding: ${paddingV} ${paddingH};
|
||||||
border-top: ${toString(style.window.border)}px solid transparent;
|
border-top: ${toString style.window.border}px solid transparent;
|
||||||
border-bottom: ${toString(style.window.border)}px solid transparent;
|
border-bottom: ${toString style.window.border}px solid transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
#cpu {
|
#cpu {
|
||||||
|
@ -58,24 +58,24 @@ in {
|
||||||
#tray:hover,
|
#tray:hover,
|
||||||
#scratchpad:hover,
|
#scratchpad:hover,
|
||||||
#workspaces button:hover {
|
#workspaces button:hover {
|
||||||
background-color: rgba(${style.color.border-r},${style.color.border-g},${style.color.border-b},${toString(style.opacity.desktop)});
|
background-color: rgba(${style.color.border-r},${style.color.border-g},${style.color.border-b},${toString style.opacity.desktop});
|
||||||
}
|
}
|
||||||
|
|
||||||
#pulseaudio.muted,
|
#pulseaudio.muted,
|
||||||
#battery.critical,
|
#battery.critical,
|
||||||
#tray.needs-attention,
|
#tray.needs-attention,
|
||||||
#custom-display.modified {
|
#custom-display.modified {
|
||||||
border-top: ${toString(style.window.border)}px solid #${style.color.accent};
|
border-top: ${toString style.window.border}px solid #${style.color.accent};
|
||||||
}
|
}
|
||||||
|
|
||||||
#workspaces button {
|
#workspaces button {
|
||||||
padding: ${paddingV} 4px;
|
padding: ${paddingV} 4px;
|
||||||
border-top: ${toString(style.window.border)}px solid transparent;
|
border-top: ${toString style.window.border}px solid transparent;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#workspaces button.focused {
|
#workspaces button.focused {
|
||||||
border-top: ${toString(style.window.border)}px solid #${style.color.accent};
|
border-top: ${toString style.window.border}px solid #${style.color.accent};
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
{ style, ... }: {
|
{ style, ... }: {
|
||||||
text = ''
|
text = ''
|
||||||
window#waybar {
|
window#waybar {
|
||||||
background-color: rgba(${style.color.bg-r},${style.color.bg-g},${style.color.bg-b},${toString(style.opacity.desktop)});
|
background-color: rgba(${style.color.bg-r},${style.color.bg-g},${style.color.bg-b},${toString style.opacity.desktop});
|
||||||
border: ${toString(style.window.border)}px solid rgba(${style.color.border-r},${style.color.border-g},${style.color.border-b},${toString(style.opacity.desktop)});
|
border: ${toString style.window.border}px solid rgba(${style.color.border-r},${style.color.border-g},${style.color.border-b},${toString style.opacity.desktop});
|
||||||
}
|
}
|
||||||
|
|
||||||
.modules-left > widget:first-child > #workspaces {
|
.modules-left > widget:first-child > #workspaces {
|
||||||
margin-left: ${toString(style.window.border)}px;
|
margin-left: ${toString style.window.border}px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modules-right > widget:last-child > #workspaces {
|
.modules-right > widget:last-child > #workspaces {
|
||||||
margin-right: ${toString(style.window.border)}px;
|
margin-right: ${toString style.window.border}px;
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,4 +63,6 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
ollama.primaryModel = "llama3";
|
ollama.primaryModel = "llama3";
|
||||||
|
|
||||||
|
browser = "firefox-esr";
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,11 @@
|
||||||
acc + trimTabs ((import mod args).text)
|
acc + trimTabs ((import mod args).text)
|
||||||
) "" files;
|
) "" files;
|
||||||
|
|
||||||
|
# Concat all file paths by `file` key.
|
||||||
|
catFile = files: args: builtins.foldl' (acc: mod:
|
||||||
|
acc + trimTabs (builtins.readFile (import mod args).file)
|
||||||
|
) "" files;
|
||||||
|
|
||||||
# Concat all files as a set.
|
# Concat all files as a set.
|
||||||
catSet = files: args: lib.mkMerge (map (file: import file args) files);
|
catSet = files: args: lib.mkMerge (map (file: import file args) files);
|
||||||
|
|
||||||
|
|
|
@ -10,13 +10,14 @@
|
||||||
, util
|
, util
|
||||||
, ... } @args: let
|
, ... } @args: let
|
||||||
# Configuration modules.
|
# Configuration modules.
|
||||||
btop = import ./top/btop args;
|
btop = import ./top/btop args;
|
||||||
editorconfig = import ./editorconfig args;
|
editor = import ./editorconfig args;
|
||||||
foot = import ./foot args;
|
foot = import ./foot args;
|
||||||
gtk3 = import ./gtk/3 args;
|
gtk3 = import ./gtk/3 args;
|
||||||
htop = import ./top/htop args;
|
htop = import ./top/htop args;
|
||||||
keyd = import ./keyd args;
|
keyd = import ./keyd args;
|
||||||
mako = import ./mako args;
|
mako = import ./mako args;
|
||||||
|
yazi = import ./yazi args;
|
||||||
in {
|
in {
|
||||||
home-manager = {
|
home-manager = {
|
||||||
# If file exists, rename it with a new extension.
|
# If file exists, rename it with a new extension.
|
||||||
|
@ -28,15 +29,18 @@ in {
|
||||||
homeDirectory = homeDir;
|
homeDirectory = homeDir;
|
||||||
stateVersion = const.stateVersion;
|
stateVersion = const.stateVersion;
|
||||||
file = {
|
file = {
|
||||||
".config/btop/btop.conf".text = btop.text;
|
".config/btop/btop.conf".text = btop.text;
|
||||||
".config/foot/foot.ini".text = foot.text;
|
".config/foot/foot.ini".source = foot.file;
|
||||||
".config/gtk-3.0/bookmarks".text = gtk3.bookmarks;
|
".config/gtk-3.0/bookmarks".text = gtk3.bookmarks;
|
||||||
".config/htop/htoprc".text = htop.text;
|
".config/htop/htoprc".text = htop.text;
|
||||||
".config/keyd/app.conf".text = keyd.text;
|
".config/keyd/app.conf".text = keyd.text;
|
||||||
".config/mako/config".text = mako.text;
|
".config/mako/config".source = mako.file;
|
||||||
".editorconfig".text = editorconfig.text;
|
".config/yazi/init.lua".source = yazi.init;
|
||||||
".parallel/will-cite".text = "";
|
".config/yazi/keymap.toml".source = yazi.keymap;
|
||||||
"media/template".source = ./template;
|
".config/yazi/yazi.toml".source = yazi.yazi;
|
||||||
|
".editorconfig".source = editor.file;
|
||||||
|
".parallel/will-cite".text = "";
|
||||||
|
"media/template".source = ./template;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{ lib, ... }: {
|
{ pkgs, ... }: {
|
||||||
text = lib.generators.toINIWithGlobalSection {} {
|
file = (pkgs.formats.iniWithGlobalSection {}).generate "EditorconfigConfig" {
|
||||||
globalSection.root = true;
|
globalSection.root = true;
|
||||||
|
|
||||||
sections = {
|
sections = {
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{ style, setting, lib, ... }: let
|
{ style, setting, pkgs, ... }: let
|
||||||
dpiaware = if setting.foot.font.dpi then "yes" else "no";
|
dpiaware = if setting.foot.font.dpi then "yes" else "no";
|
||||||
in {
|
in {
|
||||||
text = lib.generators.toINIWithGlobalSection {} {
|
file = (pkgs.formats.iniWithGlobalSection {}).generate "FootConfig" {
|
||||||
globalSection = {
|
globalSection = {
|
||||||
font = "${style.font.monospace.name}:size=${toString(style.font.size.terminal)}";
|
font = "${style.font.monospace.name}:size=${toString style.font.size.terminal}";
|
||||||
# font-bold = "${style.font.monospace.name}:size=${toString(style.font.size.terminal)}";
|
# font-bold = "${style.font.monospace.name}:size=${toString style.font.size.terminal}";
|
||||||
font-italic = "${style.font.monospace.name}:size=${toString(style.font.size.terminal)}";
|
font-italic = "${style.font.monospace.name}:size=${toString style.font.size.terminal}";
|
||||||
font-bold-italic = "${style.font.monospace.name}:size=${toString(style.font.size.terminal)}";
|
font-bold-italic = "${style.font.monospace.name}:size=${toString style.font.size.terminal}";
|
||||||
dpi-aware = dpiaware;
|
dpi-aware = dpiaware;
|
||||||
font-size-adjustment = setting.foot.font.step;
|
font-size-adjustment = setting.foot.font.step;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
{ util, ... } @args: {
|
{ util, ... } @args: {
|
||||||
text = util.catText (util.ls ./module) args;
|
text = util.catFile (util.ls ./module) args;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{ setting, lib, ... }: {
|
{ setting, pkgs, ... }: {
|
||||||
text = lib.generators.toINI {} {
|
file = (pkgs.formats.ini {}).generate "KeydDrgConfig" {
|
||||||
steam-app-548430 = {
|
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)";
|
"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)";
|
||||||
"alt.2" = "macro(enter 10ms H e c k space y e s ! enter)";
|
"alt.2" = "macro(enter 10ms H e c k space y e s ! enter)";
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
"alt.w" = "macro(enter 10ms r enter)";
|
"alt.w" = "macro(enter 10ms r enter)";
|
||||||
"alt.x" = "macro(enter 10ms > space H e r e space < enter)";
|
"alt.x" = "macro(enter 10ms > space H e r e space < enter)";
|
||||||
"alt.z" = "macro(enter 10ms < space L e f t enter)";
|
"alt.z" = "macro(enter 10ms < space L e f t enter)";
|
||||||
leftshift = "timeout(leftcontrol, ${toString(setting.keyd.timeout.ms)}, leftshift)";
|
leftshift = "timeout(leftcontrol, ${toString setting.keyd.timeout.ms}, leftshift)";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{ lib, ... }: {
|
{ pkgs, ... }: {
|
||||||
text = lib.generators.toINI {} {
|
file = (pkgs.formats.ini {}).generate "KeydFirefoxConfig" {
|
||||||
"firefox" = {
|
"firefox" = {
|
||||||
"alt.E" = "C-S-pagedown";
|
"alt.E" = "C-S-pagedown";
|
||||||
"alt.N" = "S-f3";
|
"alt.N" = "S-f3";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{ setting, lib, ... }: {
|
{ setting, pkgs, ... }: {
|
||||||
text = lib.generators.toINI {} {
|
file = (pkgs.formats.ini {}).generate "KeydJetbrainsConfig" {
|
||||||
"jetbrains-*" = {
|
"jetbrains-*" = {
|
||||||
"alt./" = "C-/";
|
"alt./" = "C-/";
|
||||||
"alt.=" = "C-A-l";
|
"alt.=" = "C-A-l";
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
"alt.q" = "A-left";
|
"alt.q" = "A-left";
|
||||||
"alt.r" = "S-f10";
|
"alt.r" = "S-f10";
|
||||||
"alt.s" = "C-A-s";
|
"alt.s" = "C-A-s";
|
||||||
"alt.tab" = "timeout(f8, ${toString(setting.keyd.timeout.ms)}, macro2(0, 0, f7))";
|
"alt.tab" = "timeout(f8, ${toString setting.keyd.timeout.ms}, macro2(0, 0, f7))";
|
||||||
"alt.v" = "C-q";
|
"alt.v" = "C-q";
|
||||||
"alt.w" = "C-S-A-t";
|
"alt.w" = "C-S-A-t";
|
||||||
"alt.x" = "C-f4";
|
"alt.x" = "C-f4";
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
{ style, lib, setting, ... }: let
|
{ style, pkgs, setting, ... }: let
|
||||||
alpha = style.opacity.hex;
|
alpha = style.opacity.hex;
|
||||||
in {
|
in {
|
||||||
text = lib.generators.toINIWithGlobalSection {} {
|
file = (pkgs.formats.iniWithGlobalSection {}).generate "MakoConfig" {
|
||||||
globalSection = {
|
globalSection = {
|
||||||
anchor = "top-center";
|
anchor = "top-center";
|
||||||
background-color = "#${style.color.bg.dark}${alpha}";
|
background-color = "#${style.color.bg.dark}${alpha}";
|
||||||
border-color = "#${style.color.bg.regular}${alpha}";
|
border-color = "#${style.color.bg.regular}${alpha}";
|
||||||
default-timeout = setting.popup.timeout.ms;
|
default-timeout = setting.popup.timeout.ms;
|
||||||
font = "${style.font.serif.name} ${toString(style.font.size.popup)}";
|
font = "${style.font.serif.name} ${toString style.font.size.popup}";
|
||||||
height = 120;
|
height = 120;
|
||||||
icons = 0;
|
icons = 0;
|
||||||
margin = 32;
|
margin = 32;
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
JAVA_HOME = "${jdk}";
|
JAVA_HOME = "${jdk}";
|
||||||
LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}";
|
LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}";
|
||||||
ANDROID_SDK_ROOT = "${androidSdk}/libexec/android-sdk/";
|
ANDROID_SDK_ROOT = "${androidSdk}/libexec/android-sdk/";
|
||||||
SOURCE_DATE_EPOCH = "${toString(self.lastModified)}";
|
SOURCE_DATE_EPOCH = "${toString self.lastModified}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
nativeBuildInputs = with pkgs; [ ];
|
nativeBuildInputs = with pkgs; [ ];
|
||||||
buildInputs = with pkgs; [ ];
|
buildInputs = with pkgs; [ ];
|
||||||
|
|
||||||
SOURCE_DATE_EPOCH = "${toString(self.lastModified)}";
|
SOURCE_DATE_EPOCH = "${toString self.lastModified}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
tex
|
tex
|
||||||
];
|
];
|
||||||
buildInputs = with pkgs; [ ];
|
buildInputs = with pkgs; [ ];
|
||||||
SOURCE_DATE_EPOCH = "${toString(self.lastModified)}";
|
SOURCE_DATE_EPOCH = "${toString self.lastModified}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
xorg.libXi
|
xorg.libXi
|
||||||
];
|
];
|
||||||
LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}";
|
LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}";
|
||||||
SOURCE_DATE_EPOCH = "${toString(self.lastModified)}";
|
SOURCE_DATE_EPOCH = "${toString self.lastModified}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
shown_boxes = "cpu mem net proc"
|
shown_boxes = "cpu mem net proc"
|
||||||
|
|
||||||
#* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs.
|
#* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs.
|
||||||
update_ms = ${toString(setting.top.refresh.ms)}
|
update_ms = ${toString setting.top.refresh.ms}
|
||||||
|
|
||||||
#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct",
|
#* 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.
|
#* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly.
|
||||||
|
|
5
user/common/yazi/default.nix
Normal file
5
user/common/yazi/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{ pkgs, setting, util, ... } @args: {
|
||||||
|
init = (import ./module/Init.nix args).file;
|
||||||
|
keymap = (import ./module/Keymap.nix args).file;
|
||||||
|
yazi = (import ./module/Yazi.nix args).file;
|
||||||
|
}
|
10
user/common/yazi/module/Init.nix
Normal file
10
user/common/yazi/module/Init.nix
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{ util, pkgs, ... }: {
|
||||||
|
file = pkgs.writeText "YaziInitConfig" (util.trimTabs ''
|
||||||
|
-- Hide Status Bar.
|
||||||
|
function Status:render() return {} end
|
||||||
|
local old_manager_render = Manager.render
|
||||||
|
function Manager:render(area)
|
||||||
|
return old_manager_render(self, ui.Rect { x = area.x, y = area.y, w = area.w, h = area.h + 1 })
|
||||||
|
end
|
||||||
|
'');
|
||||||
|
}
|
3
user/common/yazi/module/Keymap.nix
Normal file
3
user/common/yazi/module/Keymap.nix
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
file = (pkgs.formats.toml {}).generate "YaziKeymapConfig" {};
|
||||||
|
}
|
89
user/common/yazi/module/Yazi.nix
Normal file
89
user/common/yazi/module/Yazi.nix
Normal file
|
@ -0,0 +1,89 @@
|
||||||
|
{ pkgs, setting, ... }: {
|
||||||
|
file = (pkgs.formats.toml {}).generate "YaziYaziConfig" {
|
||||||
|
manager = {
|
||||||
|
linemode = "mtime";
|
||||||
|
mouse_events = [];
|
||||||
|
ratio = [ 1 4 3 ];
|
||||||
|
scrolloff = 1;
|
||||||
|
show_hidden = false;
|
||||||
|
show_symlink = true;
|
||||||
|
sort_by = "natural";
|
||||||
|
sort_dir_first = true;
|
||||||
|
sort_sensitive = true;
|
||||||
|
sort_translit = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# preview = {
|
||||||
|
# # image_filter = "triangle";
|
||||||
|
# image_filter = "lanczos3";
|
||||||
|
# image_quality = 80;
|
||||||
|
# };
|
||||||
|
|
||||||
|
opener = let
|
||||||
|
openWith = app: "${app} \"$@\"";
|
||||||
|
in {
|
||||||
|
default = [{
|
||||||
|
orphan = true;
|
||||||
|
run = openWith "xdg-open";
|
||||||
|
}];
|
||||||
|
browser = [{
|
||||||
|
orphan = true;
|
||||||
|
run = openWith setting.browser;
|
||||||
|
}];
|
||||||
|
text = [{
|
||||||
|
block = true;
|
||||||
|
run = openWith "nvim";
|
||||||
|
}];
|
||||||
|
audio = [{
|
||||||
|
orphan = true;
|
||||||
|
run = openWith "mpv --no-video";
|
||||||
|
}];
|
||||||
|
video = [{
|
||||||
|
orphan = true;
|
||||||
|
run = openWith "mpv";
|
||||||
|
}];
|
||||||
|
document = [{
|
||||||
|
orphan = true;
|
||||||
|
run = openWith "onlyoffice";
|
||||||
|
}];
|
||||||
|
pdf = [{
|
||||||
|
orphan = true;
|
||||||
|
run = openWith "evince";
|
||||||
|
}];
|
||||||
|
image = [{
|
||||||
|
orphan = true;
|
||||||
|
run = openWith "loupe";
|
||||||
|
}];
|
||||||
|
};
|
||||||
|
|
||||||
|
open = {
|
||||||
|
rules = [
|
||||||
|
{
|
||||||
|
mime = "application/pdf";
|
||||||
|
use = "pdf";
|
||||||
|
} {
|
||||||
|
mime = "text/*";
|
||||||
|
use = "text";
|
||||||
|
} {
|
||||||
|
mime = "application/vnd.openxmlformats-officedocument.*";
|
||||||
|
use = "document";
|
||||||
|
} {
|
||||||
|
mime = "image/*";
|
||||||
|
use = "image";
|
||||||
|
} {
|
||||||
|
mime = "video/*";
|
||||||
|
use = "video";
|
||||||
|
} {
|
||||||
|
mime = "audio/*";
|
||||||
|
use = "audio";
|
||||||
|
} {
|
||||||
|
name = "*.json";
|
||||||
|
use = "text";
|
||||||
|
} {
|
||||||
|
name = "*.html";
|
||||||
|
use = [ "browser" "text" ];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue