dotfiles-mirror/etc/nixos/home.nix

128 lines
4.1 KiB
Nix
Raw Normal View History

2025-10-03 08:06:43 +03:30
{ config, pkgs, ... }: let
2025-10-25 16:16:41 +03:30
dotDir = "${config.home.homeDirectory}/.local/src/config/";
mkSl = path: config.lib.file.mkOutOfStoreSymlink path;
configs = {
kitty = "kitty";
foot = "foot";
qtile = "qtile";
mako = "mako";
nvim = "nvim";
eww = "eww";
};
modifier = "Mod4";
terminal = "footclient";
menu = "${pkgs.wmenu}/bin/wmenu-run";
2025-10-03 09:55:56 +03:30
in {
2025-10-25 16:16:41 +03:30
home.username = "coast";
home.homeDirectory = "/home/coast";
home.stateVersion = "25.05";
xdg.configFile = builtins.mapAttrs (name: subpath: { source = mkSl "${dotDir}/${subpath}"; recursive = true; }) configs;
2025-10-03 09:55:56 +03:30
2025-10-25 16:16:41 +03:30
home.packages = with pkgs; [
alsa-utils nix-search-cli neofetch dysk nsxiv tree wl-clipboard appimage-run libnotify grim slurp yazi mate.caja htop nixpkgs-fmt
swaybg wmenu mako nwg-look xorg.xkill
mpv vesktop wlr-randr autotiling
nodejs gcc gnumake clang-tools ruby_3_4 pkg-config dmd dtools rustup
];
2025-10-03 09:55:56 +03:30
2025-10-25 16:16:41 +03:30
wayland.windowManager.sway = {
enable = true;
wrapperFeatures.gtk = true;
config = {
modifier = "Mod4";
gaps = {
inner = 5;
outer = 10;
2025-10-03 09:55:56 +03:30
};
2025-10-25 16:16:41 +03:30
output.eDP-1.disable = "";
keybindings = {
"${modifier}+Return" = "exec ${terminal}";
"${modifier}+r" = "exec ${menu} -l 10";
"${modifier}+s" = "kill";
"${modifier}+Print" = "exec /home/coast/.local/src/local/bin/screenie-wlr";
"${modifier}+1" = "workspace 1";
"${modifier}+2" = "workspace 2";
"${modifier}+3" = "workspace 3";
"${modifier}+4" = "workspace 4";
"${modifier}+5" = "workspace 5";
"${modifier}+6" = "workspace 6";
"${modifier}+7" = "workspace 7";
"${modifier}+8" = "workspace 8";
"${modifier}+9" = "workspace 9";
"${modifier}+0" = "workspace 10";
"${modifier}+Shift+1" = "move container to workspace 1";
"${modifier}+Shift+2" = "move container to workspace 2";
"${modifier}+Shift+3" = "move container to workspace 3";
"${modifier}+Shift+4" = "move container to workspace 4";
"${modifier}+Shift+5" = "move container to workspace 5";
"${modifier}+Shift+6" = "move container to workspace 6";
"${modifier}+Shift+7" = "move container to workspace 7";
"${modifier}+Shift+8" = "move container to workspace 8";
"${modifier}+Shift+9" = "move container to workspace 9";
"${modifier}+h" = "focus left";
"${modifier}+j" = "focus down";
"${modifier}+k" = "focus up";
"${modifier}+l" = "focus right";
"${modifier}+Shift+i" = "exec caja";
"${modifier}+Shift+r" = "reload";
2025-10-03 09:55:56 +03:30
};
2025-10-25 16:16:41 +03:30
startup = [
{ command = "autotiling"; }
{ command = "foot -s"; }
];
};
};
programs.zsh = {
enable = true;
history = {
path = "/home/coast/.cache/zsh/history";
size = 100000000;
save = 100000000;
append = true;
};
enableCompletion = true;
shellAliases = {
nf = "neofetch";
nrs = "doas nixos-rebuild switch";
emoji = "cat ~/.local/src/local/share/emoji | grep";
ls = "ls --color=auto";
smi = "nvidia-smi";
battery = "sb-battery";
weather = "curl wttr.in/masjedsoleyman";
las = "ls";
c = "clear";
cear = "clear";
".." = "cd ..";
hotp = "htop";
main = "man";
mian = "man";
mna = "man";
dias = "doas";
delgen = "doas nix-env --delete-generations old --profile /nix/var/nix/profiles/system";
alsamixer = "alsamixer -c 0 --no-color";
la = "ls --color=auto -la";
2025-10-03 09:55:56 +03:30
};
2025-10-25 16:16:41 +03:30
initContent = ''
autoload -U compinit
zstyle ':completion:*' menu select
zmodload zsh/complist
compinit
comp_options+=(globdots)
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=12"
autoload -U colors && colors && setopt prompt_subst
PROMPT="[%n@%m %~]%% "
export LIBCLANG_PATH=/usr/lib/llvm/20/lib64
export PATH=$PATH:/home/coast/.spicetify
source ~/.local/src/zsh.d/zsh-autosuggestions.zsh
export PATH="/usr/bin:$PATH"
export PATH="$HOME/.local/bin:$PATH"
'';
};
2025-09-30 15:29:42 +03:30
}