updated dotfiles

This commit is contained in:
Thilo Billerbeck 2023-05-01 21:07:37 +02:00
parent 757ec9bab0
commit 8450ff1abd

181
home.nix
View file

@ -1,9 +1,24 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
let let
chromeArgs = "--force-dark-mode --enable-features=WebUIDarkMode --enable-smooth-scrolling --ozone-platform-hint=auto --ignore-gpu-blocklist --enable-gpu-rasterization --enable-zero-copy"; chromeArgs =
"--force-dark-mode --enable-features=WebUIDarkMode --enable-smooth-scrolling --ozone-platform-hint=auto --ignore-gpu-blocklist --enable-gpu-rasterization --enable-zero-copy";
nixgl = import <nixgl> { };
nixGLWrap = pkg:
pkgs.runCommand "${pkg.name}-nixgl-wrapper" { } ''
mkdir $out
ln -s ${pkg}/* $out
rm $out/bin
mkdir $out/bin
for bin in ${pkg}/bin/*; do
wrapped_bin=$out/bin/$(basename $bin)
echo "exec ${lib.getExe nixgl.auto.nixGLDefault} $bin \$@" > $wrapped_bin
chmod +x $wrapped_bin
done
'';
in { in {
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
targets.genericLinux.enable = true; targets.genericLinux.enable = true;
news.display = "silent";
home = { home = {
username = "thilo"; username = "thilo";
@ -15,15 +30,17 @@ in {
pkgs.cargo-update pkgs.cargo-update
pkgs.htop pkgs.htop
pkgs.rustup pkgs.rustup
(pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" "FiraCode" "FiraMono" ]; }) pkgs.nixfmt
(pkgs.vivaldi.override { (pkgs.nerdfonts.override {
fonts = [ "JetBrainsMono" "FiraCode" "FiraMono" ];
})
(nixGLWrap (pkgs.vivaldi.override {
proprietaryCodecs = true; proprietaryCodecs = true;
enableWidevine = true; enableWidevine = true;
commandLineArgs = chromeArgs; commandLineArgs = chromeArgs;
}) }))
(pkgs.google-chrome.override { (nixGLWrap
commandLineArgs = chromeArgs; (pkgs.google-chrome.override { commandLineArgs = chromeArgs; }))
})
(pkgs.writeShellScriptBin "ssh-fix-permissions" '' (pkgs.writeShellScriptBin "ssh-fix-permissions" ''
chmod 700 ~/.ssh chmod 700 ~/.ssh
chmod 600 ~/.ssh/* chmod 600 ~/.ssh/*
@ -31,11 +48,9 @@ in {
'') '')
]; ];
file = { file = {
".config/htop/htoprc".source = ./dotfiles/htoprc;
".config/nano/nanorc".source = ./dotfiles/nanorc; ".config/nano/nanorc".source = ./dotfiles/nanorc;
".config/locale.conf".source = ./dotfiles/locale.conf; ".config/locale.conf".source = ./dotfiles/locale.conf;
".ssh/config".source = ./dotfiles/ssh-config; ".ssh/config".source = ./dotfiles/ssh-config;
".config/beets/config.yaml".source = ./dotfiles/beets.yaml;
}; };
sessionVariables = { sessionVariables = {
@ -45,14 +60,13 @@ in {
after = [ "writeBoundary" "createXdgUserDirectories" ]; after = [ "writeBoundary" "createXdgUserDirectories" ];
before = [ ]; before = [ ];
data = '' data = ''
rm -rf ${config.xdg.dataHome}/"applications/home-manager" for dir in ${config.home.homeDirectory}/.nix-profile/share/applications/*; do
mkdir -p ${config.xdg.dataHome}/"applications/home-manager" chmod +x $(realpath $dir) -v
cp -Lr ${config.home.homeDirectory}/.nix-profile/share/applications/* ${config.xdg.dataHome}/"applications/home-manager/" done
''; '';
}; };
}; };
} };
;
xdg = { xdg = {
enable = true; enable = true;
mime.enable = true; mime.enable = true;
@ -62,7 +76,77 @@ in {
home-manager.enable = true; home-manager.enable = true;
vscode = { vscode = {
enable = true; enable = true;
package = pkgs.vscode.override { commandLineArgs = "--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --gtk-version=4"; }; package = (nixGLWrap (pkgs.vscode.override {
commandLineArgs =
"--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --gtk-version=4";
}));
};
htop = {
enable = true;
settings = {
fields="0 48 17 18 38 39 40 2 46 47 49 1";
sort_key="46";
sort_direction="1";
tree_sort_key="0";
tree_sort_direction="1";
hide_kernel_threads="1";
hide_userland_threads="0";
shadow_other_users="0";
show_thread_names="0";
show_program_path="1";
highlight_base_name="0";
highlight_megabytes="1";
highlight_threads="1";
highlight_changes="0";
highlight_changes_delay_secs="5";
find_comm_in_cmdline="1";
strip_exe_from_cmdline="1";
show_merged_command="0";
tree_view="1";
tree_view_always_by_pid="0";
header_margin="1";
detailed_cpu_time="0";
cpu_count_from_one="0";
show_cpu_usage="1";
show_cpu_frequency="0";
show_cpu_temperature="0";
degree_fahrenheit="0";
update_process_names="0";
account_guest_in_cpu_meter="0";
color_scheme="0";
enable_mouse="1";
delay="15";
left_meters="LeftCPUs2 CPU Memory DiskIO NetworkIO";
left_meter_modes="1 1 1 2 2";
right_meters="RightCPUs2 Tasks LoadAverage Uptime Battery";
right_meter_modes="1 2 2 2 2";
hide_function_bar="0";
};
};
beets = {
enable = true;
settings = {
directory = "~/Music/dj/Library";
library = "~/Music/dj/library.db";
plugins = "spotify acousticbrainz badfiles duplicates fetchart";
import = {
write = "yes";
copy = "yes";
resume = "no";
duplicate_action = "ask";
default_action = "apply";
};
badfiles = {
check_on_import = "yes";
};
match = {
max_rec = {
track_length = "strong";
track_title = "strong";
track_artist = "strong";
};
};
};
}; };
zsh = { zsh = {
enable = true; enable = true;
@ -70,6 +154,27 @@ in {
enableCompletion = true; enableCompletion = true;
enableSyntaxHighlighting = true; enableSyntaxHighlighting = true;
enableVteIntegration = true; enableVteIntegration = true;
zplug = {
enable = true;
plugins = [
{
name = "plugins/git";
tags = [ from:oh-my-zsh ];
}
{
name = "plugins/archlinux";
tags = [ from:oh-my-zsh ];
}
{
name = "plugins/composer";
tags = [ from:oh-my-zsh ];
}
{
name = "plugins/colored-man-pages";
tags = [ from:oh-my-zsh ];
}
];
};
}; };
git = { git = {
enable = true; enable = true;
@ -85,23 +190,15 @@ in {
ui = true; ui = true;
pager = true; pager = true;
}; };
log = { log = { date = "short"; };
date = "short"; rerere = { enabled = "1"; };
};
rerere = {
enabled = "1";
};
core = { core = {
whitespace="fix,-indent-with-non-tab,trailing-space,cr-at-eol"; whitespace = "fix,-indent-with-non-tab,trailing-space,cr-at-eol";
excludesfile = "~/.gitignore-rab"; excludesfile = "~/.gitignore-rab";
autocrlf = "input"; autocrlf = "input";
}; };
apply = { apply = { whitespace = "nowarn"; };
whitespace = "nowarn"; branch = { autosetuprebase = "always"; };
};
branch = {
autosetuprebase = "always";
};
}; };
}; };
direnv = { direnv = {
@ -112,37 +209,32 @@ in {
enable = true; enable = true;
settings = { settings = {
add_newline = false; add_newline = false;
character = { character = { success_symbol = "[](bold white)"; };
success_symbol = "[](bold white)"; package = { disabled = true; };
};
package = {
disabled = true;
};
}; };
}; };
topgrade = { topgrade = {
enable = true; enable = true;
settings = { settings = {
assume_yes = true; assume_yes = true;
ignore_failures = ["git_repos"]; ignore_failures = [ "git_repos" ];
no_retry = true; no_retry = true;
pre_sudo = false; pre_sudo = false;
cleanup = true; cleanup = true;
skip_notify = true; skip_notify = true;
firmware = { firmware = { upgrade = true; };
upgrade = true;
};
}; };
}; };
alacritty = { alacritty = {
enable = true; enable = true;
package = (nixGLWrap pkgs.alacritty);
settings = { settings = {
window = { window = {
decorations = "full"; decorations = "full";
dynamic_title = true; dynamic_title = true;
gtk_theme_variant = "None"; gtk_theme_variant = "None";
}; };
background_opacity = 1; window.opacity = 1;
font = { font = {
normal = { normal = {
family = "FiraMono Nerd Font"; family = "FiraMono Nerd Font";
@ -153,9 +245,7 @@ in {
style = "Bold"; style = "Bold";
}; };
size = 14; size = 14;
offset = { offset = { x = 1; };
x = 1;
};
}; };
cursor.style.shape = "Beam"; cursor.style.shape = "Beam";
colors = { colors = {
@ -186,15 +276,16 @@ in {
}; };
}; };
}; };
yt-dlp = {
enable = true;
};
neovim = { neovim = {
defaultEditor = true; defaultEditor = true;
enable = true; enable = true;
viAlias = true; viAlias = true;
vimAlias = true; vimAlias = true;
vimdiffAlias = true; vimdiffAlias = true;
coc = { coc = { enable = true; };
enable = true;
};
extraConfig = '' extraConfig = ''
set title set title
set number set number