dotfiles/home-manager/kalle-pc/kalle.nix

358 lines
8.2 KiB
Nix

{ inputs
, outputs
, lib
, config
, pkgs
, ...
}:
{
home = {
username = "kalle";
homeDirectory = "/home/kalle";
};
imports =
[
../../nvim
../../tmux
../../eww
../../hyprland
../../hyprland/hyprpaper.nix
../../ags
];
hyprland =
let
mod = "SUPER"; in
{
mod = mod;
primaryMonitor = "DP-2";
monitors = [
{
name = "DP-2";
width = 1920;
height = 1080;
refreshRate = 144;
x = 0;
y = 1080;
vrr = 1;
}
{
name = "HDMI-A-1";
width = 1920;
height = 1080;
x = 1500;
y = 0;
}
{
name = "HDMI-A-2";
width = 1920;
height = 1080;
x = 1920;
y = 1080;
transform = 3;
}
];
autoStart = [
# Bar
"${pkgs.dunst}/bin/dunst"
"${pkgs.firefox}/bin/firefox"
"${pkgs.discord}/bin/discord"
];
environment = {
XCURSOR_SIZE = "24";
QT_QPA_PLATFORMTHEME = "qt5ct";
};
sensitivity = 0.1;
layout = "dwindle";
layerRules = {
"gtk-layer-shell" = [ "blur" "ignorezero" ];
"notifications2" = [ "noanim" "blur" "ignorezero"];
};
windowRules = {
# Auto workspace
firefox = [ "workspace 1 silent" ];
discord = [ "workspace name:HDMI-A-2" ];
};
windowRulesV2 = {
# ULauncher
"class:^(ulauncher)$" = [
"forceinput"
"dimaround"
];
};
# Media keys
# bind = ,XF86AudioPlay, exec, playerctl --player plasma-browser-integration play-pause
# bind = ,XF86AudioPrev, exec, playerctl previous
# bind = ,XF86AudioNext, exec, playerctl next
# bind = ,XF86AudioLowerVolume, exec, playerctl --player plasma-browser-integration volume 0.01-
# bind = ,XF86AudioRaiseVolume, exec, playerctl --player plasma-browser-integration volume 0.01+
# This is a dumb work around for hyprland not passing ALT half the time with the pass dispatcher.
# bind = ALT, M, exec, xdotool key 'ALT+m'
# bind = ALT, B, exec, xdotool key 'ALT+b'
binds = {
"${mod}, return" = "exec, kitty";
"${mod}, E" = "exec, ulauncher-toggle #wofi --show drun";
"${mod}, Print" = "exec, bash -c \"grim -g \\\"$(slurp)\\\" - | wl-copy\"";
# Clipboard history
# bind = $mainMod, V, exec, cliphist list | wofi --dmenu | cliphist decode | wl-copy
};
mouseBinds = { };
};
hyprpaper = {
wallpaperFolder = "/home/kalle/Pictures/Wallpapers";
};
services.dunst = {
enable = true;
settings = {
global = {
monitor = 0;
follow = "none";
width = 300;
height = 300;
origin = "top-left";
offset = "10x10";
scale = 0;
notification_limit = 20;
progress_bar = true;
progress_bar_height = 10;
progress_bar_frame_width = 0;
progress_bar_min_width = 150;
progress_bar_max_width = 300;
progress_bar_corner_radius = 0;
icon_corner_radius = 0;
indicate_hidden = "yes";
transparency = "0.3";
separator_height = 2;
padding = 8;
horizontal_padding = 8;
text_icon_padding = 0;
frame_width = 0;
frame_color = "#aaaaaa";
gap_size = 10;
separator_color = "frame";
sort = "yes";
font = "Monospace 8";
line_height = 0;
markup = "full";
format = "<b>%s</b>\n%b";
alignment = "left";
vertical_alignment = "center";
show_age_threshold = 60;
ellipsize = "middle";
ignore_newline = "no";
stack_duplicates = true;
hide_duplicate_count = false;
show_indicators = "yes";
enable_recursive_icon_lookup = true;
icon_theme = "Adwaita";
icon_position = "left";
min_icon_size = 32;
max_icon_size = 128;
icon_path = "/usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/";
sticky_history = "yes";
history_length = 20;
dmenu = "/usr/bin/dmenu -p dunst:";
browser = "/usr/bin/xdg-open";
always_run_script = true;
title = "Dunst";
class = "Dunst";
corner_radius = 0;
ignore_dbusclose = false;
force_xwayland = false;
force_xinerama = false;
mouse_left_click = "close_current";
mouse_middle_click = "do_action, close_current";
mouse_right_click = "close_all";
};
experimental = {
per_monitor_dpi = false;
};
urgency_low = {
background = "#222222";
foreground = "#888888";
timeout = 10;
};
urgency_normal = {
background = "#285577";
foreground = "#ffffff";
timeout = 10;
};
urgency_critical = {
background = "#900000";
foreground = "#ffffff";
frame_color = "#ff0000";
timeout = 0;
};
};
};
nixpkgs = {
overlays = with outputs.overlays; [
nvim-plugins
];
config = {
allowUnfree = true;
allowUnfreePredicate = _: true;
permittedInsecurePackages = [
"electron-25.9.0"
];
};
};
# The home.packages option allows you to install Nix packages into your
# environment.
home.packages = with pkgs; [
discord
vesktop
firefox
chromium
httpie
kate
dolphin
ark
rustup
gcc
prismlauncher
pavucontrol
difftastic
sops
(obsidian.override {
electron = pkgs.electron_29-bin;
})
unzip
vlc
cachix
];
programs.home-manager.enable = true;
gtk = {
enable = true;
theme = {
name = "Adwaita-dark";
package = pkgs.gnome-themes-extra;
};
iconTheme = {
name = "breeze-dark";
package = pkgs.kdePackages.breeze-icons;
};
cursorTheme = {
name = "breeze_cursors";
package = pkgs.libsForQt5.breeze-qt5;
};
};
qt = {
enable = true;
style.name = "breeze-dark";
};
dconf = {
enable = true;
settings = {
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
};
};
};
programs.bash = {
enable = true;
shellAliases = {
# Git aliases
gg = "git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an (%ae)%C(reset)' --all";
gca = "git add -A; git commit -a --amend --no-edit";
gs = "git status";
# Replace some commands with better versions
ssh = "kitty +kitten ssh";
diff = "${pkgs.difftastic}/bin/difft";
};
initExtra = ''
function open() {
xdg-open $@ &> /dev/null &
}
'';
};
programs.kitty = {
enable = true;
theme = "Catppuccin-Mocha";
settings = {
background_opacity = "0.8";
allow_remote_control = true;
enable_audio_bell = false;
};
};
programs.starship = {
enable = true;
settings = {
add_newline = true;
# Remove text from nix shell component
nix_shell.format = "via [$symbol]($style) ";
git_status.disabled = true;
package.disabled = true;
};
};
programs.direnv = {
enable = true;
enableBashIntegration = true;
nix-direnv.enable = true;
};
programs.git = {
enable = true;
userName = "Kalle Struik";
userEmail = "kalle@kallestruik.nl";
difftastic.enable = true;
extraConfig = {
init.defaultBranch = "main";
};
};
home.sessionVariables = {
EDITOR = "nvim";
};
# This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release
# introduces backwards incompatible changes.
#
# You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
home.stateVersion = "23.05"; # Please read the comment before changing.
}