updated dotfiles

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

177
home.nix
View file

@ -1,9 +1,24 @@
{ config, pkgs, lib, ... }:
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 {
nixpkgs.config.allowUnfree = true;
targets.genericLinux.enable = true;
news.display = "silent";
home = {
username = "thilo";
@ -15,15 +30,17 @@ in {
pkgs.cargo-update
pkgs.htop
pkgs.rustup
(pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" "FiraCode" "FiraMono" ]; })
(pkgs.vivaldi.override {
pkgs.nixfmt
(pkgs.nerdfonts.override {
fonts = [ "JetBrainsMono" "FiraCode" "FiraMono" ];
})
(nixGLWrap (pkgs.vivaldi.override {
proprietaryCodecs = true;
enableWidevine = true;
commandLineArgs = chromeArgs;
})
(pkgs.google-chrome.override {
commandLineArgs = chromeArgs;
})
}))
(nixGLWrap
(pkgs.google-chrome.override { commandLineArgs = chromeArgs; }))
(pkgs.writeShellScriptBin "ssh-fix-permissions" ''
chmod 700 ~/.ssh
chmod 600 ~/.ssh/*
@ -31,11 +48,9 @@ in {
'')
];
file = {
".config/htop/htoprc".source = ./dotfiles/htoprc;
".config/nano/nanorc".source = ./dotfiles/nanorc;
".config/locale.conf".source = ./dotfiles/locale.conf;
".ssh/config".source = ./dotfiles/ssh-config;
".config/beets/config.yaml".source = ./dotfiles/beets.yaml;
};
sessionVariables = {
@ -45,14 +60,13 @@ in {
after = [ "writeBoundary" "createXdgUserDirectories" ];
before = [ ];
data = ''
rm -rf ${config.xdg.dataHome}/"applications/home-manager"
mkdir -p ${config.xdg.dataHome}/"applications/home-manager"
cp -Lr ${config.home.homeDirectory}/.nix-profile/share/applications/* ${config.xdg.dataHome}/"applications/home-manager/"
for dir in ${config.home.homeDirectory}/.nix-profile/share/applications/*; do
chmod +x $(realpath $dir) -v
done
'';
};
};
}
;
};
xdg = {
enable = true;
mime.enable = true;
@ -62,7 +76,77 @@ in {
home-manager.enable = true;
vscode = {
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 = {
enable = true;
@ -70,6 +154,27 @@ in {
enableCompletion = true;
enableSyntaxHighlighting = 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 = {
enable = true;
@ -85,23 +190,15 @@ in {
ui = true;
pager = true;
};
log = {
date = "short";
};
rerere = {
enabled = "1";
};
log = { date = "short"; };
rerere = { enabled = "1"; };
core = {
whitespace = "fix,-indent-with-non-tab,trailing-space,cr-at-eol";
excludesfile = "~/.gitignore-rab";
autocrlf = "input";
};
apply = {
whitespace = "nowarn";
};
branch = {
autosetuprebase = "always";
};
apply = { whitespace = "nowarn"; };
branch = { autosetuprebase = "always"; };
};
};
direnv = {
@ -112,12 +209,8 @@ in {
enable = true;
settings = {
add_newline = false;
character = {
success_symbol = "[](bold white)";
};
package = {
disabled = true;
};
character = { success_symbol = "[](bold white)"; };
package = { disabled = true; };
};
};
topgrade = {
@ -129,20 +222,19 @@ in {
pre_sudo = false;
cleanup = true;
skip_notify = true;
firmware = {
upgrade = true;
};
firmware = { upgrade = true; };
};
};
alacritty = {
enable = true;
package = (nixGLWrap pkgs.alacritty);
settings = {
window = {
decorations = "full";
dynamic_title = true;
gtk_theme_variant = "None";
};
background_opacity = 1;
window.opacity = 1;
font = {
normal = {
family = "FiraMono Nerd Font";
@ -153,9 +245,7 @@ in {
style = "Bold";
};
size = 14;
offset = {
x = 1;
};
offset = { x = 1; };
};
cursor.style.shape = "Beam";
colors = {
@ -186,15 +276,16 @@ in {
};
};
};
yt-dlp = {
enable = true;
};
neovim = {
defaultEditor = true;
enable = true;
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
coc = {
enable = true;
};
coc = { enable = true; };
extraConfig = ''
set title
set number