home: Format with nixfmt-rfc-style

This commit is contained in:
Donovan Glover 2024-08-03 14:22:47 -04:00
parent 4f8625c1bf
commit 14f65a9633
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
16 changed files with 914 additions and 807 deletions

View File

@ -2,16 +2,24 @@
let
inherit (config.home) homeDirectory;
inherit (config.xdg.userDirs) download documents music pictures videos;
inherit (config.lib.stylix.colors.withHashtag) base00 base05;
inherit (pkgs) eww;
inherit (config.xdg.userDirs)
download
documents
music
pictures
videos
;
fluent-icons = pkgs.callPackage ../packages/fluent-icons.nix { };
in
{
home.packages = [ eww ];
xdg.configFile."eww/eww.yuck".text = /* yuck */ ''
xdg.configFile."eww/eww.yuck".text = # yuck
''
(defwidget icons []
(box :orientation "h" :spacing 32
(icon :img "default-user-home" :exec "${homeDirectory}")
@ -42,7 +50,8 @@ in
time)
'';
xdg.configFile."eww/eww.scss".text = /* scss */ ''
xdg.configFile."eww/eww.scss".text = # scss
''
img {
all: unset;
}

View File

@ -8,7 +8,8 @@ let
in
{
xdg.dataFile = {
"fcitx5/themes/${themeName}/theme.conf".text = /* ini */ ''
"fcitx5/themes/${themeName}/theme.conf".text = # ini
''
[Metadata]
Name=${themeName}
Version=0.1
@ -93,7 +94,8 @@ in
xdg.configFile = {
"mozc/ibus_config.textproto" = {
force = true;
text = /* textproto */ ''
text = # textproto
''
engines {
name : "mozc-jp"
longname : "Mozc"
@ -108,7 +110,8 @@ in
"fcitx5/config" = {
force = true;
text = /* ini */ ''
text = # ini
''
[Hotkey]
EnumerateWithTriggerKeys=True
AltTriggerKeys=
@ -157,7 +160,8 @@ in
"fcitx5/profile" = {
force = true;
text = /* ini */ ''
text = # ini
''
[Groups/0]
Name="Group 1"
Default Layout=us
@ -178,7 +182,8 @@ in
"fcitx5/conf/classicui.conf" = {
force = true;
text = /* ini */ ''
text = # ini
''
Vertical Candidate List=False
PerScreenDPI=True
WheelForPaging=True
@ -196,7 +201,8 @@ in
"fcitx5/conf/clipboard.conf" = {
force = true;
text = /* ini */ ''
text = # ini
''
TriggerKey=
PastePrimaryKey=
Number of entries=5
@ -205,7 +211,8 @@ in
"fcitx5/conf/mozc.conf" = {
force = true;
text = /* ini */ ''
text = # ini
''
InitialMode=Hiragana
Vertical=True
ExpandMode="On Focus"

View File

@ -4,7 +4,8 @@
programs.fish = {
enable = true;
shellInit = /* fish */ ''
shellInit = # fish
''
set -U fish_greeting ""
set -x -U LESS_TERMCAP_md (printf "\e[01;31m")
@ -129,7 +130,8 @@
};
functions = {
wav2flac = /* fish */ ''
wav2flac = # fish
''
set ORIGINAL_SIZE (du -hs | cut -f1)
fd -e wav -x ffmpeg -i "{}" -loglevel quiet -stats "{.}.flac"
@ -140,7 +142,8 @@
echo "Done. Reduced file size from $ORIGINAL_SIZE to $NEW_SIZE"
'';
opus = /* fish */ ''
opus = # fish
''
set ORIGINAL_SIZE (du -hs | cut -f1)
fd -e wav -e flac -x ffmpeg -i "{}" -c:a libopus -b:a 128K -loglevel quiet -stats "{.}.opus"
@ -151,7 +154,8 @@
echo "Done. Reduced file size from $ORIGINAL_SIZE to $NEW_SIZE"
'';
epub2pdf = /* fish */ ''
epub2pdf = # fish
''
if string match -qe -- ".epub" "$argv";
set BASE (string split -f 1 ".epub" "$argv")
${pkgs.calibre}/bin/ebook-convert "$argv" "$BASE.pdf"; and trash "$argv"
@ -160,7 +164,8 @@
end
'';
tmp = /* fish */ ''
tmp = # fish
''
set MULLVAD_CACHE "/tmp/mullvad.json"
if not test -e $MULLVAD_CACHE
@ -186,7 +191,8 @@
"$argv"
'';
ex = /* fish */ ''
ex = # fish
''
if string match -qe -- ".part1." "$argv";
set BASE (string split -f 1 ".part1." "$argv")

View File

@ -4,7 +4,10 @@ let
inherit (pkgs) tig mgitstatus;
in
{
home.packages = [ tig mgitstatus ];
home.packages = [
tig
mgitstatus
];
xdg.configFile."tig/config".text = ''
color cursor black green bold
@ -22,9 +25,7 @@ in
verify = "log --show-signature";
};
attributes = [
"*.lockb binary diff=lockb"
];
attributes = [ "*.lockb binary diff=lockb" ];
extraConfig = {
include.path = "~/.gituser";

View File

@ -1,4 +1,9 @@
{ pkgs, lib, vars, ... }:
{
pkgs,
lib,
vars,
...
}:
let
inherit (pkgs) polkit_gnome callPackage;
@ -258,7 +263,8 @@ in
];
};
extraConfig = /* hyprlang */ ''
extraConfig = # hyprlang
''
bind = CTRL, Alt_L, submap, passthrough
submap = passthrough
bind = CTRL, Alt_L, submap, reset
@ -269,7 +275,8 @@ in
xdg.configFile = {
${gapsScript} = {
executable = true;
text = /* fish */ ''
text = # fish
''
#!/usr/bin/env fish
hyprctl keyword general:gaps_out $(math 10 - $(hyprctl getoption general:gaps_out -j | jq -r ".custom" | choose 1))
@ -281,7 +288,8 @@ in
${setBackgroundScript} = {
executable = true;
text = /* fish */ ''
text = # fish
''
#!/usr/bin/env fish
if [ (hyprctl getoption animations:enabled -j | jq -r ".int") = "1" ]
@ -307,7 +315,8 @@ in
${randomBackgroundScript} = {
executable = true;
text = /* fish */ ''
text = # fish
''
#!/usr/bin/env fish
for monitor in (hyprctl monitors -j | jq -r '.[].name')
@ -318,7 +327,8 @@ in
${swapBackgroundScript} = {
executable = true;
text = /* fish */ ''
text = # fish
''
#!/usr/bin/env fish
set M "$(swww query | cut -d ':' -f 5)"
@ -332,7 +342,8 @@ in
${monitorScript} = {
executable = true;
text = /* fish */ ''
text = # fish
''
#!/usr/bin/env fish
if test -n "$(hyprctl monitors -j | jq -r '.[] | select(.name | contains("eDP-1"))')"

View File

@ -1,11 +1,23 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
inherit (lib) singleton;
inherit (config.lib.stylix.colors.withHashtag) base00 base01 base04 base05 base0D;
inherit (pkgs) ironbar inotify-tools;
inherit (builtins) toJSON;
inherit (config.lib.stylix.colors.withHashtag)
base00
base01
base04
base05
base0D
;
mullvadScript = "ironbar/mullvad.fish";
volumeScript = "ironbar/volume.fish";
volumeGet = "ironbar/volume-get.fish";
@ -63,13 +75,12 @@ in
type = "clock";
format = "%x%a%R";
}
{
type = "notifications";
}
{ type = "notifications"; }
];
};
"ironbar/style.css".text = /* css */ ''
"ironbar/style.css".text = # css
''
* {
font-family: "Noto Sans CJK JP", "Font Awesome 6 Free Solid";
font-size: 16px;
@ -178,7 +189,8 @@ in
${mullvadScript} = {
executable = true;
text = /* fish */ ''
text = # fish
''
#!/usr/bin/env fish
sleep 2
@ -246,7 +258,8 @@ in
${volumeScript} = {
executable = true;
text = /* fish */ ''
text = # fish
''
#!/usr/bin/env fish
function get_volume
@ -262,7 +275,8 @@ in
${volumeGet} = {
executable = true;
text = /* fish */ ''
text = # fish
''
#!/usr/bin/env fish
set VOLUME (wpctl get-volume @DEFAULT_AUDIO_SINK@ | choose 1)

View File

@ -7,9 +7,7 @@ in
programs.librewolf = {
enable = true;
package = librewolf.override {
cfg.speechSynthesisSupport = false;
};
package = librewolf.override { cfg.speechSynthesisSupport = false; };
settings = {
"middlemouse.paste" = false;

View File

@ -54,7 +54,8 @@
universal-ctags
];
extraConfig = /* vim */ ''
extraConfig = # vim
''
filetype plugin indent on
set undofile
set spell
@ -113,7 +114,8 @@
{
plugin = nvim-tree-lua;
type = "lua";
config = /* lua */ ''
config = # lua
''
require("nvim-tree").setup()
vim.api.nvim_create_autocmd({"QuitPre"}, {
@ -139,21 +141,24 @@
{
plugin = indent-blankline-nvim;
type = "lua";
config = /* lua */ ''
config = # lua
''
require("ibl").setup()
'';
}
{
plugin = pkgs.callPackage ../packages/chameleon-nvim.nix { };
type = "lua";
config = /* lua */ ''
config = # lua
''
require("chameleon").setup()
'';
}
{
plugin = gitsigns-nvim;
type = "lua";
config = /* lua */ ''
config = # lua
''
require('gitsigns').setup()
'';
}
@ -164,14 +169,16 @@
{
plugin = nvim-scrollbar;
type = "lua";
config = /* lua */ ''
config = # lua
''
require("scrollbar").setup()
'';
}
{
plugin = nvim-lspconfig;
type = "lua";
config = /* lua */ ''
config = # lua
''
local lspconfig = require('lspconfig')
local capabilities = require("cmp_nvim_lsp").default_capabilities()
@ -242,7 +249,8 @@
{
plugin = nvim-cmp;
type = "lua";
config = /* lua */ ''
config = # lua
''
local capabilities = require("cmp_nvim_lsp").default_capabilities()
local lspconfig = require('lspconfig')
@ -318,7 +326,8 @@
{
plugin = luasnip;
type = "lua";
config = /* lua */ ''
config = # lua
''
require("luasnip.loaders.from_vscode").lazy_load()
'';
}
@ -326,7 +335,8 @@
{
plugin = lualine-nvim;
type = "lua";
config = /* lua */ ''
config = # lua
''
local theme = require("lualine.themes.base16")
theme.normal.b.bg = nil
theme.normal.c.bg = nil
@ -353,7 +363,8 @@
{
plugin = comment-nvim;
type = "lua";
config = /* lua */ ''
config = # lua
''
require('Comment').setup {
pre_hook = require('ts_context_commentstring.integrations.comment_nvim').create_pre_hook()
}
@ -362,20 +373,23 @@
{
plugin = nvim-autopairs;
type = "lua";
config = /* lua */ ''
config = # lua
''
require("nvim-autopairs").setup()
'';
}
{
plugin = auto-save-nvim;
type = "lua";
config = /* lua */ ''
config = # lua
''
require("auto-save").setup()
'';
}
{
plugin = vimtex;
config = /* vim */ ''
config = # vim
''
let g:vimtex_mappings_enabled = 0
let g:vimtex_imaps_enabled = 0
let g:vimtex_view_method = 'zathura'
@ -389,7 +403,8 @@
}
{
plugin = vim-markdown;
config = /* vim */ ''
config = # vim
''
let g:vim_markdown_folding_disabled = 1
let g:vim_markdown_conceal = 0
let g:vim_markdown_frontmatter = 1
@ -400,28 +415,32 @@
{
plugin = nvim-ts-autotag;
type = "lua";
config = /* lua */ ''
config = # lua
''
require('nvim-ts-autotag').setup()
'';
}
{
plugin = nvim-surround;
type = "lua";
config = /* lua */ ''
config = # lua
''
require('nvim-surround').setup()
'';
}
{
plugin = tailwindcss-colors-nvim;
type = "lua";
config = /* lua */ ''
config = # lua
''
require('tailwindcss-colors').setup()
'';
}
{
plugin = nvim-ts-context-commentstring;
type = "lua";
config = /* lua */ ''
config = # lua
''
require('ts_context_commentstring').setup {
enable_autocmd = false,
}
@ -430,7 +449,8 @@
{
plugin = nvim-treesitter.withAllGrammars;
type = "lua";
config = /* lua */ ''
config = # lua
''
require'nvim-treesitter.configs'.setup {
highlight = {
enable = true,
@ -453,7 +473,8 @@
}
{
plugin = vista-vim;
config = /* vim */ ''
config = # vim
''
let g:vista_default_executive = 'nvim_lsp'
let g:vista_executive_for = {
\ 'rust': 'ctags',

View File

@ -9,10 +9,7 @@ in
settings = {
url = {
start_pages = [
"about:blank"
];
start_pages = [ "about:blank" ];
default_page = "about:blank";
};
@ -42,9 +39,30 @@ in
fileselect = {
handler = "external";
folder.command = [ "kitty" "-e" "yazi" "--cwd-file" "{}" ];
multiple_files.command = [ "kitty" "-e" "yazi" "--chooser-file" "{}" ];
single_file.command = [ "kitty" "-e" "yazi" "--chooser-file" "{}" ];
folder.command = [
"kitty"
"-e"
"yazi"
"--cwd-file"
"{}"
];
multiple_files.command = [
"kitty"
"-e"
"yazi"
"--chooser-file"
"{}"
];
single_file.command = [
"kitty"
"-e"
"yazi"
"--chooser-file"
"{}"
];
};
downloads = {
@ -55,11 +73,21 @@ in
};
qt = {
args = [ "disable-backing-store-limit" "enable-accelerated-video-decode" "disable-gpu-driver-bug-workarounds" ];
args = [
"disable-backing-store-limit"
"enable-accelerated-video-decode"
"disable-gpu-driver-bug-workarounds"
];
chromium.low_end_device_mode = "never";
};
editor.command = [ "kitty" "-e" "nvim" "{}" ];
editor.command = [
"kitty"
"-e"
"nvim"
"{}"
];
};
keyBindings = {
@ -104,7 +132,8 @@ in
DEFAULT = "https://search.goo.ne.jp/web.jsp?MT={}";
};
extraConfig = /* python */ ''
extraConfig = # python
''
from qutebrowser.mainwindow import tabwidget
tabwidget.TabWidget.MUTE_STRING = ""

View File

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
inherit (pkgs) rofi-wayland;
@ -64,7 +69,10 @@ in
border-radius = mkLiteral "2px";
border-color = mkLiteral "${base05}40";
children = map mkLiteral [ "icon-search" "entry" ];
children = map mkLiteral [
"icon-search"
"entry"
];
};
prompt = {

View File

@ -1,3 +1 @@
{
services.swaync.enable = true;
}
{ services.swaync.enable = true; }

View File

@ -1,3 +1 @@
{
services.swayosd.enable = true;
}
{ services.swayosd.enable = true; }

View File

@ -1,5 +1,6 @@
{
xdg.configFile."xfce4/helpers.rc".text = /* ini */ ''
xdg.configFile."xfce4/helpers.rc".text = # ini
''
TerminalEmulator=kitty
TerminalEmulatorDismissed=true
'';

View File

@ -1,3 +1 @@
{
services.udiskie.enable = true;
}
{ services.udiskie.enable = true; }

View File

@ -3,7 +3,10 @@
let
inherit (config.home) homeDirectory;
no = { name = ""; noDisplay = true; };
no = {
name = "";
noDisplay = true;
};
in
{
xdg = {

View File

@ -4,9 +4,14 @@
settings = {
manager = {
ratio = [ 1 2 4 ];
sort_dir_first = true;
linemode = "mtime";
ratio = [
1
2
4
];
};
preview = {