{config, pkgs, ...}: { # ── Identity ──────────────────────────────────────────────────────────────── home.username = "ulve"; home.homeDirectory = "/home/ulve"; home.stateVersion = "26.05"; # ── Shell ─────────────────────────────────────────────────────────────────── programs.bash = { enable = true; shellAliases = { n = "nvim"; rebuild = "sudo nixos-rebuild switch --flake ~/nixos-dotfiles"; }; }; programs.zsh = { enable = true; shellAliases = { n = "nvim"; rebuild = "sudo nixos-rebuild switch --flake ~/nixos-dotfiles"; tree = "eza --tree --level=2"; }; history = { size = 10000; save = 10000; ignoreDups = true; share = true; extended = true; }; initContent = '' autoload -Uz up-line-or-beginning-search down-line-or-beginning-search zle -N up-line-or-beginning-search zle -N down-line-or-beginning-search bindkey "^[[A" up-line-or-beginning-search bindkey "^[[B" down-line-or-beginning-search bindkey "^[OA" up-line-or-beginning-search bindkey "^[OB" down-line-or-beginning-search function y() { local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd command yazi "$@" --cwd-file="$tmp" IFS= read -r -d "" cwd < "$tmp" [ -n "$cwd" ] && [ "$cwd" != "$PWD" ] && builtin cd -- "$cwd" rm -f -- "$tmp" } ''; }; programs.starship = { enable = true; enableZshIntegration = true; settings = { format = "$directory$git_branch$git_status$line_break$character"; right_format = "$time"; directory = { truncation_length = 3; truncate_to_repo = false; style = "bold cyan"; }; git_branch = { format = "[$symbol$branch]($style) "; style = "bold purple"; }; git_status = { format = "([\\[$all_status$ahead_behind\\]]($style) )"; style = "bold red"; ahead = "⇡$count"; behind = "⇣$count"; diverged = "⇕⇡$ahead_count⇣$behind_count"; modified = "!$count"; untracked = "?$count"; staged = "+$count"; deleted = "✘$count"; }; time = { disabled = false; format = "[$time]($style)"; style = "dimmed white"; time_format = "%H:%M:%S"; }; character = { success_symbol = "[❯](bold green)"; error_symbol = "[❯](bold red)"; }; }; }; # ── CLI tools ──────────────────────────────────────────────────────────────── programs.fzf = { enable = true; enableZshIntegration = true; }; programs.zoxide = { enable = true; enableZshIntegration = true; options = [ "--cmd z" ]; }; programs.eza = { enable = true; enableZshIntegration = true; git = true; icons = "auto"; }; programs.bat = { enable = true; }; home.sessionVariables = { _ZO_FZF_OPTS = "--preview 'eza --tree --level=2 --color=always {2..}' --preview-window=right:40%"; }; # ── Git ───────────────────────────────────────────────────────────────────── programs.git = { enable = true; settings.user.name = "ulve"; settings.user.email = "johansson.olov@gmail.com"; }; programs.delta = { enable = true; enableGitIntegration = true; }; # ── SSH ───────────────────────────────────────────────────────────────────── programs.ssh = { enable = true; enableDefaultConfig = false; settings = { "codeberg.org" = { IdentityFile = "~/.ssh/id_ed25519_codeberg"; }; }; }; # ── Config files ───────────────────────────────────────────────────────────── xdg.configFile."qtile".source = ./config/qtile; xdg.configFile."nvim" = { source = config.lib.file.mkOutOfStoreSymlink "/home/ulve/nixos-dotfiles/config/dottily"; }; xdg.configFile."sway".source = ./config/sway; xdg.configFile."waybar".source = ./config/waybar; xdg.configFile."foot".source = ./config/foot; # ── Packages ───────────────────────────────────────────────────────────────── home.packages = with pkgs; [ # general claude-code # ai coding assistant brave # browser fastfetch # vanity jq # json processor powershell # yes teams-for-linux # teams # desktop / wayland wl-clipboard # wayland copy utils slurp # select region in wayland for copy grim # grab images from wayland wlogout # logout menu wmenu # dynamic menu swaylock # lock screen swayidle # idle management (dims/locks/sleeps) waybar # status bar with left/center/right sections telegram-desktop # Messaging signal-desktop # Messaging # terminal foot # terminal tmux # terminal multiplexer btop # resource monitor htop # process viewer fd # fast find alternative ripgrep # fast grep alternative # file managers yazi # terminal file manager thunar # gui file manager # editors neovim # editor # compilers / runtimes gcc # c compiler (also needed by treesitter) nodejs # javascript runtime go # go toolchain (needed by gopls + revive) dotnet-sdk # .net sdk (c#) # nvim: lsp servers tree-sitter # parser generator (nvim) nil # language server for nix lua-language-server # lsp: lua pyright # lsp: python bash-language-server # lsp: bash vtsls # lsp: typescript/javascript gopls # lsp: go omnisharp-roslyn # lsp: c# efm-langserver # lsp: general purpose (runs linters/formatters) # nvim: formatters and linters nixpkgs-fmt # formatter: nix stylua # formatter: lua black # formatter: python prettierd # formatter: js/ts/html/css/json (daemon) fixjson # formatter: json gofumpt # formatter: go (stricter gofmt) shfmt # formatter: bash/sh lua54Packages.luacheck # linter: lua python3Packages.flake8 # linter: python eslint_d # linter: js/ts (daemon) shellcheck # linter: bash/sh revive # linter: go ]; }