nix-conf/home-manager/zsh.nix
Thiago Sposito d0b63ce601
feat: initialize repo with NixOS and Home Manager configs
- Add .gitignore for common languages, tools, and OS/editor artifacts
- Configure .gitattributes for Git LFS (fonts, images, archives, ISOs)
- Add README with repo description
- Add flake.nix defining inputs and outputs for NixOS, Home Manager, and related modules
- Introduce home-manager configs:
  - Base home.nix with packages, services, and programs
  - Hyprland WM configuration (waybar, fuzzel, keybindings, theming)
  - Vim (nixvim) setup with LSP and plugins
  - Zsh setup with aliases, Oh My Zsh, clipboard helpers
  - Systemd user services (e.g., librespot)
- Add scripts (GPU monitor, RAM build helper, install automation)
- Add host configurations:
  - Nixbook (Apple laptop) with hardware, disko, and install script
  - Nixstation (desktop) with firewall, virtualization, Btrfs scrub timer
  - Nixtest (test VM) with QEMU + Alpine-based install test harness
  - Common modules (network, NVIDIA, rclone, screen, keychron, users)
- Include statix config for linting
2025-08-20 23:49:49 -03:00

63 lines
1.3 KiB
Nix

{ config
, lib
, pkgs
, ...
}:
let
isWayland = config.custom.sessionType == "wayland";
in
{
options.custom.sessionType = lib.mkOption {
type = lib.types.str;
default = "x11";
description = "The X session type: 'wayland' or 'x11'";
};
config = {
home.file."scripts/lsgpu.sh" = {
source = ./scripts/lsgpu.sh;
executable = true;
};
programs.zsh = {
enable = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
initContent = ''
eval "$(direnv hook zsh)"
export GPG_TTY=$(tty)
'';
shellAliases = lib.mkMerge [
{
"vi" = "nvim";
"vim" = "nvim";
"ll" = "ls -l";
"lsgpu" = "$HOME/scripts/lsgpu.sh";
"gedit" = "gnome-text-editor";
}
(lib.mkIf isWayland {
"pbcopy" = "wl-copy";
"pbpaste" = "wl-paste";
})
(lib.mkIf (!isWayland) {
"pbcopy" = "xclip -selection clipboard -i";
"pbpaste" = "xclip -selection clipboard -o";
})
];
oh-my-zsh = {
enable = true;
theme = "bureau";
plugins = [
"git"
"history"
];
};
};
home.packages = with pkgs; [ xclip ];
};
}