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

277 lines
6.0 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.ags}/bin/ags"
"${pkgs.firefox}/bin/firefox"
"${pkgs.discord}/bin/discord"
"${pkgs.kitty}/bin/kitty"
];
environment = {
XCURSOR_SIZE = "24";
};
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)$" = [
"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, ${pkgs.kitty}/bin/kitty";
"${mod}, E" = "exec, ${pkgs.ulauncher}/bin/ulauncher-toggle #wofi --show drun";
"${mod}, Print" = "exec, ${pkgs.bash}/bin/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";
};
nixpkgs = {
overlays = with outputs.overlays; [ nvim-plugins ];
config = {
allowUnfree = true;
allowUnfreePredicate = _: true;
permittedInsecurePackages = [
"electron-25.9.0"
"electron-29.4.6"
];
};
};
# The home.packages option allows you to install Nix packages into your
# environment.
home.packages = with pkgs; [
discord
discord-canary
vesktop
chromium
httpie
kate
dolphin
ark
rustup
gcc
prismlauncher
pavucontrol
difftastic
sops
(obsidian.override { electron = electron_29-bin; })
unzip
vlc
feishin
cachix
];
programs.home-manager.enable = true;
programs.firefox = {
enable = true;
nativeMessagingHosts = [ pkgs.plasma-browser-integration ];
};
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";
};
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;
themeFile = "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.
}