1
0
forked from extern/nix-config

nix: Nixify more dotfiles

This commit is contained in:
Donovan Glover 2023-05-11 07:30:41 -04:00
parent 0d0c00f1d9
commit 5322fc02b8
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
10 changed files with 97 additions and 174 deletions

View File

@ -49,7 +49,8 @@
sub-file-paths = "subs:subtitles:";
fullscreen = "yes";
title = "\${filename} - mpv";
script-opts = "osc-title=\${filename},osc-boxalpha=150,osc-showfullscreen=no,osc-boxvideo=yes";
script-opts =
"osc-title=\${filename},osc-boxalpha=150,osc-showfullscreen=no,osc-boxvideo=yes";
osc = "no";
osd-on-seek = "no";
osd-bar = "no";
@ -69,7 +70,50 @@
"browser.tabs.insertAfterCurrent" = true;
};
};
programs.git = { diff-so-fancy = { enable = true; }; };
programs.chromium = {
enable = true;
package = pkgs."ungoogled-chromium";
commandLineArgs = [ "--ozone-platform-hint=auto" ];
extensions = [{ id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; }];
};
programs.git = {
enable = true;
extraConfig = {
commit = { gpgsign = true; };
core = {
editor = "nvim";
autocrlf = false;
quotePath = false;
};
web = { browser = "librewolf"; };
push = { default = "simple"; };
branch = { autosetuprebase = "always"; };
init = { defaultBranch = "master"; };
rerere = { enabled = true; };
color = { ui = true; };
alias = {
contrib = "shortlog -n -s";
remotes = "remote -v";
praise = "blame";
verify = "log --show-signature";
};
"color \"diff-highlight\"" = {
oldNormal = "red bold";
oldHighlight = "red bold";
newNormal = "green bold";
newHighlight = "green bold";
};
"color \"diff\"" = {
meta = "yellow";
frag = "magenta bold";
commit = "yellow bold";
old = "red bold";
new = "green bold";
whitespace = "red reverse";
};
};
diff-so-fancy = { enable = true; };
};
programs.lf = { enable = true; };
services.udiskie.enable = true;
};

View File

@ -1,65 +0,0 @@
[include]
path = ~/.gituser
# Always sign commits
[commit]
gpgsign = true
[core]
editor = nvim
autocrlf = false
pager = diff-so-fancy | less --tabs=4 -RFX
excludesfile = ~/.gitignore
quotePath = false
[diff]
tool = kitty
guitool = kitty.gui
[difftool]
prompt = false
trustExitCode = true
[difftool "kitty"]
cmd = kitty +kitten diff $LOCAL $REMOTE
[difftool "kitty.gui"]
cmd = kitty kitty +kitten diff $LOCAL $REMOTE
[web]
browser = librewolf
[push]
default = simple
[branch]
autosetuprebase = always
[init]
defaultBranch = master
[rerere]
enabled = true
[color]
ui = true
[alias]
contrib = shortlog -n -s
remotes = remote -v
praise = blame
verify = log --show-signature
[color "diff-highlight"]
oldNormal = red bold
oldHighlight = red bold
newNormal = green bold
newHighlight = green bold
[color "diff"]
meta = yellow
frag = magenta bold
commit = yellow bold
old = red bold
new = green bold
whitespace = red reverse

9
git/.gitignore vendored
View File

@ -1,9 +0,0 @@
# New Start: A modern Arch workflow built with an emphasis on functionality.
# Copyright (C) 2017-2018 Donovan Glover
# Don't track temporary vim files
*~
.*.sw*
# Don't track Plasma directory files
.directory

View File

@ -1,6 +0,0 @@
# This .stow-local-ignore file is used to prevent stow from
# ignoring the .gitignore file by default.
#
# https://www.gnu.org/software/stow/manual/stow.html#Ignore-Lists
README.md

View File

@ -1,33 +0,0 @@
# Git
[Git][git] is the standard version control tool.
# Use Cases
Git can be used to:
- Keep track of file changes over time
- Keep a record of all contributors to a code base
- Rollback to a previous version of a project
- Create snapshots of a project with tags (also known as versions)
You should not use Git if:
- You are dealing with binary files
- You are dealing with large files that change often
## Usage
First, install [diff-so-fancy][diff-so-fancy], an amazing git diff utility.
Then, create a `~/.gituser` with the following:
```gitconfig
[user]
name = <the name you use for git commits>
email = <the email you use for git commits>
signingkey = <the subkey you use to sign git commits>
```
[git]: https://github.com/git/git
[diff-so-fancy]: https://github.com/so-fancy/diff-so-fancy

View File

@ -1,11 +0,0 @@
[Settings]
gtk-cursor-theme-name=phinger-cursors
gtk-decoration-layout=menu:
gtk-font-name=Noto Sans CJK JP 11
gtk-icon-theme-name=Papirus
gtk-theme-name=Dracula
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle=hintfull
gtk-xft-rgba=rgb
gtk-recent-files-enabled=false

View File

@ -1,18 +0,0 @@
# gtk-settings
[GTK][gtk] is the widget toolkit used by Firefox, Electron, and many (if not all) GNOME applications.
GTK's `settings.ini` only affects window managers and not the GNOME desktop environment. This is because GNOME manages user preferences with [`dconf` through `gsettings`][gnome].
## Use Cases
gtk-settings can be used to:
- Control the appearance of GTK applications under non-GNOME environments
You do not need to use gtk-settings if:
- You are using the GNOME desktop environment
[gtk]: https://wiki.archlinux.org/index.php/GTK+
[gnome]: https://wiki.archlinux.org/index.php/GNOME#Configuration

View File

@ -22,6 +22,17 @@
TerminalEmulator=kitty
TerminalEmulatorDismissed=true
'';
xdg.configFile."mozc/ibus_config.textproto".text = ''
engines {
name : "mozc-jp"
longname : "Mozc"
layout : "default"
layout_variant : ""
layout_option : ""
rank : 80
}
active_on_launch: True
'';
gtk = {
enable = true;
cursorTheme = {
@ -63,15 +74,12 @@
map g scroll_to start
map G scroll_to end
'';
programs.bat = {
enable = true;
};
programs.bat = { enable = true; };
programs.swaylock = {
package = pkgs."swaylock-effects";
settings = {
show-keyboard-layout = true;
daemonize = true;
font = "Noto Sans CJK JP";
effect-blur = "5x2";
clock = true;
indicator = true;
@ -198,7 +206,44 @@
toggle_auto_zoom = "m";
};
};
services.mpd = { enable = true; };
programs.ncmpcpp = { enable = true; };
services.mpd = {
enable = true;
extraConfig = ''
auto_update "yes"
'';
};
programs.ncmpcpp = {
enable = true;
bindings = [
{ key = "mouse"; command = "dummy"; }
{ key = "h"; command = ["previous_column" "jump_to_parent_directory"]; }
{ key = "j"; command = "scroll_down"; }
{ key = "k"; command = "scroll_up"; }
{ key = "l"; command = [ "next_column" "enter_directory" "play_item"]; }
{ key = "H"; command = [ "select_item" "scroll_down"]; }
{ key = "J"; command = ["move_sort_order_down" "move_selected_items_down"]; }
{ key = "K"; command = ["move_sort_order_up" "move_selected_items_up"]; }
{ key = "L"; command = [ "select_item" "scroll_up"]; }
{ key = "'"; command = "remove_selection"; }
{ key = "ctrl-u"; command = "page_up"; }
{ key = "ctrl-d"; command = "page_down"; }
{ key = "u"; command = "page_up"; }
{ key = "d"; command = "page_down"; }
{ key = "n"; command = "next_found_item"; }
{ key = "N"; command = "previous_found_item"; }
{ key = "t"; command = "next_screen"; }
{ key = "g"; command = "move_home"; }
{ key = "G"; command = "move_end"; }
{ key = "w"; command = "next"; }
{ key = "b"; command = "previous"; }
{ key = ";"; command = "seek_forward"; }
{ key = ","; command = "seek_backward"; }
{ key = "f"; command = "apply_filter"; }
{ key = "i"; command = "select_item"; }
{ key = "x"; command = [ "delete_playlist_items" "delete_browser_items" "delete_stored_playlist" ]; }
{ key = "U"; command = "update_database"; }
{ key = "m"; command = "add_random_items"; }
];
};
};
}

View File

@ -1,9 +0,0 @@
engines {
name : "mozc-jp"
longname : "Mozc"
layout : "default"
layout_variant : ""
layout_option : ""
rank : 80
}
active_on_launch: True

View File

@ -1,15 +0,0 @@
# Mozc
[Mozc][mozc] is the standard Japanese IME.
## Use Cases
Mozc can be used to:
- Type in Japanese
You should not use Mozc if:
- You should use Mozc.
[mozc]: https://github.com/google/mozc