Compare commits
1 commit
main
...
feature/in
Author | SHA1 | Date | |
---|---|---|---|
4be4a7979f |
36 changed files with 346 additions and 605 deletions
13
.envrc
13
.envrc
|
@ -1,7 +1,8 @@
|
|||
export DIRENV_WARN_TIMEOUT=20s
|
||||
use flake .nix
|
||||
|
||||
eval "$(devenv direnvrc)"
|
||||
|
||||
# The use_devenv function supports passing flags to the devenv command
|
||||
# For example: use devenv --impure --option services.postgres.enable:bool true
|
||||
use devenv
|
||||
if on_git_branch; then
|
||||
echo
|
||||
git status --short --branch
|
||||
echo
|
||||
git fetch
|
||||
fi
|
||||
|
|
10
.gitignore
vendored
10
.gitignore
vendored
|
@ -2,13 +2,3 @@
|
|||
# Ignore build outputs from performing a nix-build or `nix build` command
|
||||
result
|
||||
result-*
|
||||
|
||||
# Devenv
|
||||
.devenv*
|
||||
devenv.local.nix
|
||||
|
||||
# direnv
|
||||
.direnv
|
||||
|
||||
# pre-commit
|
||||
.pre-commit-config.yaml
|
||||
|
|
25
.nix/flake.lock
generated
Normal file
25
.nix/flake.lock
generated
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1729665710,
|
||||
"narHash": "sha256-AlcmCXJZPIlO5dmFzV3V2XF6x/OpNWUV8Y/FMPGd8Z4=",
|
||||
"rev": "2768c7d042a37de65bb1b5b3268fc987e534c49d",
|
||||
"revCount": 696158,
|
||||
"type": "tarball",
|
||||
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.696158%2Brev-2768c7d042a37de65bb1b5b3268fc987e534c49d/0192bd28-d6c0-735c-ab86-8ab9d12f7d62/source.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.%2A.tar.gz"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
32
.nix/flake.nix
Normal file
32
.nix/flake.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
description = "A flake editing flake";
|
||||
|
||||
inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz";
|
||||
|
||||
outputs = { nixpkgs, ... }:
|
||||
let
|
||||
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
|
||||
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
});
|
||||
in
|
||||
{
|
||||
devShells = forEachSupportedSystem ({ pkgs }: {
|
||||
default = pkgs.mkShell.override
|
||||
{
|
||||
# Override stdenv in order to change compiler:
|
||||
# stdenv = pkgs.clangStdenv;
|
||||
}
|
||||
{
|
||||
packages = with pkgs; [
|
||||
pre-commit
|
||||
commitizen
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
pre-commit install --allow-missing-config --hook-type pre-commit --hook-type commit-msg
|
||||
'';
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
27
.pre-commit-config.yaml
Normal file
27
.pre-commit-config.yaml
Normal file
|
@ -0,0 +1,27 @@
|
|||
# See https://pre-commit.com for more information
|
||||
# See https://pre-commit.com/hooks.html for more hooks
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.6.0
|
||||
hooks:
|
||||
- id: trailing-whitespace
|
||||
- id: end-of-file-fixer
|
||||
- id: check-yaml
|
||||
- id: check-added-large-files
|
||||
- id: detect-private-key
|
||||
- id: mixed-line-ending
|
||||
|
||||
- repo: https://github.com/commitizen-tools/commitizen
|
||||
rev: v3.27.0
|
||||
hooks:
|
||||
- id: commitizen
|
||||
stages: [commit-msg]
|
||||
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: home-manager-check
|
||||
name: Home Manager Config Check
|
||||
entry: home-manager switch --dry-run
|
||||
language: system
|
||||
pass_filenames: false
|
||||
exclude: ^docs/
|
103
devenv.lock
103
devenv.lock
|
@ -1,103 +0,0 @@
|
|||
{
|
||||
"nodes": {
|
||||
"devenv": {
|
||||
"locked": {
|
||||
"dir": "src/modules",
|
||||
"lastModified": 1747116279,
|
||||
"owner": "cachix",
|
||||
"repo": "devenv",
|
||||
"rev": "79e442e0b24f0f45db0d853d88d3d27dff422b3b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"dir": "src/modules",
|
||||
"owner": "cachix",
|
||||
"repo": "devenv",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1747046372,
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"git-hooks": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"gitignore": "gitignore",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1746537231,
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"rev": "fa466640195d38ec97cf0493d6d6882bc4d14969",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gitignore": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"git-hooks",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709087332,
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1746807397,
|
||||
"owner": "cachix",
|
||||
"repo": "devenv-nixpkgs",
|
||||
"rev": "c5208b594838ea8e6cca5997fbf784b7cca1ca90",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "cachix",
|
||||
"ref": "rolling",
|
||||
"repo": "devenv-nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"devenv": "devenv",
|
||||
"git-hooks": "git-hooks",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"pre-commit-hooks": [
|
||||
"git-hooks"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
27
devenv.nix
27
devenv.nix
|
@ -1,27 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
packages = with pkgs; [
|
||||
watchexec
|
||||
];
|
||||
|
||||
git-hooks = {
|
||||
hooks = {
|
||||
alejandra.enable = true;
|
||||
check-case-conflicts.enable = true;
|
||||
check-merge-conflicts.enable = true;
|
||||
commitizen.enable = true;
|
||||
deadnix.enable = true;
|
||||
detect-private-keys.enable = true;
|
||||
end-of-file-fixer.enable = true;
|
||||
markdownlint.enable = true;
|
||||
mdformat.enable = true;
|
||||
};
|
||||
|
||||
hooks.home-manager-check = {
|
||||
enable = true;
|
||||
name = "Home Manager Config Check";
|
||||
entry = "home-manager switch --dry-run";
|
||||
pass_filenames = false;
|
||||
excludes = ["^docs/"];
|
||||
};
|
||||
};
|
||||
}
|
15
devenv.yaml
15
devenv.yaml
|
@ -1,15 +0,0 @@
|
|||
# yaml-language-server: $schema=https://devenv.sh/devenv.schema.json
|
||||
inputs:
|
||||
nixpkgs:
|
||||
url: github:cachix/devenv-nixpkgs/rolling
|
||||
|
||||
# If you're using non-OSS software, you can set allowUnfree to true.
|
||||
# allowUnfree: true
|
||||
|
||||
# If you're willing to use a package that's vulnerable
|
||||
# permittedInsecurePackages:
|
||||
# - "openssl-1.1.1w"
|
||||
|
||||
# If you have more than one devenv you can merge them
|
||||
#imports:
|
||||
# - ./backend
|
12
flake.lock
generated
12
flake.lock
generated
|
@ -7,11 +7,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1750730235,
|
||||
"narHash": "sha256-rZErlxiV7ssvI8t7sPrKU+fRigNc2KvoKZG3gtUtK50=",
|
||||
"lastModified": 1734093295,
|
||||
"narHash": "sha256-hSwgGpcZtdDsk1dnzA0xj5cNaHgN9A99hRF/mxMtwS4=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "d07e9cceb4994ed64a22b9b36f8b76923e87ac38",
|
||||
"rev": "66c5d8b62818ec4c1edb3e941f55ef78df8141a8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -22,11 +22,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1750506804,
|
||||
"narHash": "sha256-VLFNc4egNjovYVxDGyBYTrvVCgDYgENp5bVi9fPTDYc=",
|
||||
"lastModified": 1734119587,
|
||||
"narHash": "sha256-AKU6qqskl0yf2+JdRdD0cfxX4b9x3KKV5RqA6wijmPM=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "4206c4cb56751df534751b058295ea61357bbbaa",
|
||||
"rev": "3566ab7246670a43abd2ffa913cc62dad9cdf7d5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
21
flake.nix
21
flake.nix
|
@ -59,6 +59,27 @@
|
|||
vimwikiPath = "~/vimwiki";
|
||||
};
|
||||
};
|
||||
"ubuntu" = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
|
||||
modules = [
|
||||
./shell
|
||||
./git
|
||||
./gpg
|
||||
./neovim
|
||||
./horsch.nix
|
||||
];
|
||||
|
||||
extraSpecialArgs = {
|
||||
user = "ubuntu";
|
||||
userName = "Michael Mandl";
|
||||
userEmail = "michael.mandl@horsch.com";
|
||||
gpgSigningKey = "088ED38F036C7AF2";
|
||||
gpgSSHKeys = [ "AEB2BF3FF9CF9529E9A3C6F1A202D21686FF9278" ];
|
||||
theme = "dark";
|
||||
vimwikiPath = "~/vimwiki";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
117
git/default.nix
117
git/default.nix
|
@ -1,17 +1,9 @@
|
|||
{ pkgs, userName, userEmail, gpgSigningKey, ... }:
|
||||
|
||||
{
|
||||
pkgs,
|
||||
userName,
|
||||
userEmail,
|
||||
gpgSigningKey,
|
||||
...
|
||||
}: {
|
||||
programs = {
|
||||
less.enable = true;
|
||||
git-credential-oauth.enable = true;
|
||||
git-worktree-switcher = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
|
||||
git = {
|
||||
enable = true;
|
||||
|
@ -24,24 +16,9 @@
|
|||
signByDefault = true;
|
||||
};
|
||||
|
||||
delta = {
|
||||
enable = true;
|
||||
options = {
|
||||
dark = true;
|
||||
theme = "Solarized (dark)";
|
||||
side-by-side = true;
|
||||
line-numbers = true;
|
||||
true-color = "always";
|
||||
plus-style = "syntax \"#003800\"";
|
||||
minus-style = "syntax \"#380000\"";
|
||||
};
|
||||
};
|
||||
|
||||
difftastic = {
|
||||
enable = false;
|
||||
enable = true;
|
||||
background = "light";
|
||||
display = "side-by-side-show-both";
|
||||
enableAsDifftool = true;
|
||||
};
|
||||
|
||||
lfs = {
|
||||
|
@ -49,34 +26,14 @@
|
|||
};
|
||||
|
||||
extraConfig = {
|
||||
branch.sort = "-committerdate";
|
||||
core.editor = "nvim";
|
||||
core.pager = "less -FX";
|
||||
|
||||
core = {
|
||||
editor = "nvim";
|
||||
fsmonitor = true;
|
||||
untrackedCache = true;
|
||||
};
|
||||
diff.ignoreSubmodules = "none";
|
||||
|
||||
column.ui = "auto";
|
||||
|
||||
commit.verbose = true;
|
||||
|
||||
diff = {
|
||||
algorithm = "histogram";
|
||||
colorMoved = "plain";
|
||||
ignoreSubmodules = "none";
|
||||
mnemonicPrefix = true;
|
||||
renames = true;
|
||||
};
|
||||
|
||||
fetch = {
|
||||
all = true;
|
||||
parallel = 8;
|
||||
prune = true;
|
||||
pruneTags = true;
|
||||
recurseSubmodules = true;
|
||||
writeCommitGraph = true;
|
||||
};
|
||||
fetch.parallel = 8;
|
||||
fetch.writeCommitGraph = true;
|
||||
fetch.recurseSubmodules = true;
|
||||
|
||||
format.pretty = "format:%C(yellow)%h %Cblue%>(12)%ad %C(red)%G? %Cgreen%<(7,trunc)%aN%Cred%d %Creset%s";
|
||||
|
||||
|
@ -84,49 +41,28 @@
|
|||
|
||||
log.date = "relative";
|
||||
|
||||
merge = {
|
||||
conflictstyle = "zdiff3";
|
||||
ff = false;
|
||||
tool = "nvim";
|
||||
};
|
||||
merge.ff = false;
|
||||
merge.tool = "nvim";
|
||||
|
||||
mergetool.nvim.cmd = "nvim -d $BASE $LOCAL $REMOTE $MERGED -c 'DiffviewOpen'";
|
||||
mergetool.nvim.trustExitCode = false;
|
||||
mergetool.nvim.cmd = "nvim -f -c \"Gdiffsplit!\" \"$MERGED\"";
|
||||
mergetool.prompt = false;
|
||||
|
||||
pager.difftool = true;
|
||||
|
||||
pull.rebase = true;
|
||||
|
||||
push = {
|
||||
autoSetupRemote = true;
|
||||
default = "simple";
|
||||
followTags = true;
|
||||
recurseSubmodules = "on-demand";
|
||||
};
|
||||
push.recurseSubmodules = "on-demand";
|
||||
|
||||
rebase = {
|
||||
qutoSquash = true;
|
||||
autoStash = true;
|
||||
updateRefs = true;
|
||||
};
|
||||
rebase.autostash = true;
|
||||
|
||||
rerere = {
|
||||
autoupdate = true;
|
||||
enabled = true;
|
||||
};
|
||||
rerere.enabled = true;
|
||||
|
||||
status.submoduleSummary = true;
|
||||
|
||||
submodule.fetchJobs = 8;
|
||||
submodule.recurse = true;
|
||||
|
||||
tag.sort = "version:refname";
|
||||
|
||||
worktree = {
|
||||
guessRemote = true;
|
||||
useRelativePaths = true;
|
||||
};
|
||||
worktree.guessRemote = true;
|
||||
};
|
||||
|
||||
aliases = {
|
||||
|
@ -165,5 +101,26 @@
|
|||
git -C ''${dir}/.base checkout --detach HEAD
|
||||
git -C ''${dir}/.base worktree add ../''${branch}
|
||||
'')
|
||||
|
||||
(writeShellScriptBin "git-make-relative" ''
|
||||
|
||||
gitfile=''${1}
|
||||
|
||||
if [[ -z ''${gitfile} ]]; then
|
||||
gitfile=".git"
|
||||
fi
|
||||
|
||||
if [[ ! -f ''${gitfile} ]]; then
|
||||
echo "file ''${gitfile} does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
gitdir=$(grep "gitdir:" ''${gitfile} | cut -d: -f2 | xargs)
|
||||
rel_gitdir=$(realpath -s --relative-to=. ''${gitdir})
|
||||
|
||||
echo "relative path: ''${rel_gitdir}"
|
||||
|
||||
sed -i -e "s,gitdir:.*,gitdir: ''${rel_gitdir}," ''${gitfile}
|
||||
'')
|
||||
];
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
services.gpg-agent = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
pinentry.package = pkgs.pinentry-curses;
|
||||
pinentryPackage = pkgs.pinentry-curses;
|
||||
enableSshSupport = true;
|
||||
sshKeys = gpgSSHKeys;
|
||||
defaultCacheTtl = 3600 * 12;
|
||||
|
|
|
@ -1,43 +1,11 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
nixpkgs.config.allowUnfreePredicate = pkg:
|
||||
builtins.elem (lib.getName pkg) [
|
||||
"gh-copilot"
|
||||
];
|
||||
programs.gh = {
|
||||
enable = true;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
delta
|
||||
];
|
||||
|
||||
programs = {
|
||||
gh = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
git_protocol = "ssh";
|
||||
};
|
||||
|
||||
extensions = with pkgs; [
|
||||
gh-copilot
|
||||
gh-dash
|
||||
];
|
||||
};
|
||||
|
||||
gh-dash = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
defaults = {
|
||||
preview = {
|
||||
open = true;
|
||||
width = 64;
|
||||
};
|
||||
};
|
||||
pager.diff = "delta";
|
||||
};
|
||||
settings = {
|
||||
git_protocol = "ssh";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
{...}: {
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
programs = {
|
||||
ssh = {
|
||||
enable = true;
|
||||
|
@ -15,7 +17,7 @@
|
|||
};
|
||||
};
|
||||
Fusion-USB = {
|
||||
host = "fusion-usb 172.16.0.1";
|
||||
host = "fusion-usb fusion 172.16.0.1";
|
||||
user = "root";
|
||||
hostname = "172.16.0.1";
|
||||
checkHostIP = false;
|
||||
|
@ -26,7 +28,7 @@
|
|||
};
|
||||
};
|
||||
Fusion-Wifi = {
|
||||
host = "fusion-wifi fusion 172.16.1.1";
|
||||
host = "fusion-wifi 172.16.1.1";
|
||||
user = "root";
|
||||
hostname = "172.16.1.1";
|
||||
checkHostIP = false;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{...}: {
|
||||
programs.zsh.initContent = ''
|
||||
{ ... }:
|
||||
{
|
||||
programs.zsh.initExtra = ''
|
||||
if [ -f $HOME/.nix-profile/etc/profile.d/nix.sh ];
|
||||
then
|
||||
source $HOME/.nix-profile/etc/profile.d/nix.sh
|
||||
|
@ -53,11 +54,8 @@
|
|||
local ssh_login="fusion"
|
||||
local update_file=''${1}
|
||||
|
||||
local fzf_preview='stat --printf "%n\nSize: %s bytes\nModified: %y" {}'
|
||||
|
||||
if [ -z ''${update_file} ]; then
|
||||
update_file=$(find build/tmp/deploy/images -name "*.swu" -type f \
|
||||
| fzf --select-1 --exit-0 --header "Select a update file" --preview=''${fzf_preview} --preview-window=top)
|
||||
update_file=$(find build/tmp/deploy/images -name "*.swu" -type f | fzf --select-1)
|
||||
fi
|
||||
|
||||
if [ -z ''${update_file} ]; then
|
||||
|
@ -99,7 +97,7 @@
|
|||
local wic_file=''${2}
|
||||
|
||||
if [ -z ''${bootloader_file} ]; then
|
||||
bootloader_file=$(find build/tmp/deploy/images -name "imx-boot-horsch-*" -type f \
|
||||
bootloader_file=$(find build/tmp/deploy/images -name "imx-boot-horsch-fusion-sd*" -type f \
|
||||
| fzf --select-1 --exit-0 --header "Select a bootloader file" --preview=''${fzf_preview} --preview-window=top)
|
||||
fi
|
||||
|
||||
|
@ -134,16 +132,5 @@
|
|||
--get \
|
||||
| jq | bat
|
||||
}
|
||||
|
||||
function hb-roots {
|
||||
curl --silent \
|
||||
--location "https://hawkbit-smartcan.horsch.com/rest/v1/softwaremodules" \
|
||||
--header "Content-Type: application/json" \
|
||||
--header "Authorization: Basic ''$hawkbitToken" \
|
||||
--data "q=type==rootfs-smartcan" \
|
||||
--data "sort=id:DESC" \
|
||||
--get \
|
||||
| jq | bat
|
||||
}
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
require("copilot").setup({
|
||||
copilot_model = "claude-4-sonnet"
|
||||
})
|
||||
|
||||
require("blink-copilot").setup({})
|
||||
|
||||
require("blink-cmp").setup({
|
||||
completion = {
|
||||
documentation = { auto_show = true, auto_show_delay_ms = 500 },
|
||||
ghost_text = { enabled = true },
|
||||
list = {
|
||||
selection = { preselect = false, auto_insert = true },
|
||||
},
|
||||
},
|
||||
keymap = {
|
||||
preset = "default",
|
||||
["<Tab>"] = { "select_next", "fallback" },
|
||||
["<S-Tab>"] = { "select_prev", "fallback" },
|
||||
["<CR>"] = { "accept", "fallback" },
|
||||
},
|
||||
signature = { enabled = true },
|
||||
sources = {
|
||||
default = { "copilot", "lsp", "buffer", "path", "cmdline" },
|
||||
|
||||
per_filetype = {
|
||||
codecompanion = { "codecompanion" }
|
||||
},
|
||||
|
||||
providers = {
|
||||
copilot = {
|
||||
name = "copilot",
|
||||
module = "blink-copilot",
|
||||
score_offset = 100,
|
||||
async = true,
|
||||
}
|
||||
}
|
||||
},
|
||||
})
|
|
@ -1,35 +0,0 @@
|
|||
local codecompanion = require("codecompanion")
|
||||
|
||||
vim.g.codecompanion_auto_tool_mode = true
|
||||
|
||||
codecompanion.setup({
|
||||
strategies = {
|
||||
chat = {
|
||||
adapter = "copilot",
|
||||
tools = {
|
||||
opts = {
|
||||
auto_submit_errors = true,
|
||||
auto_submit_success = true,
|
||||
requires_approval = false,
|
||||
}
|
||||
}
|
||||
},
|
||||
inline = {
|
||||
adapter = "copilot",
|
||||
},
|
||||
cmd = {
|
||||
adapter = "copilot",
|
||||
},
|
||||
},
|
||||
adapters = {
|
||||
copilot = function()
|
||||
return require("codecompanion.adapters").extend("copilot", {
|
||||
schema = {
|
||||
model = {
|
||||
default = "claude-sonnet-4",
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
})
|
|
@ -1,26 +1,6 @@
|
|||
local dap = require("dap")
|
||||
local dapui = require("dapui")
|
||||
|
||||
dap.adapters.lldb = {
|
||||
type = "executable",
|
||||
command = "lldb-dap",
|
||||
name = "lldb",
|
||||
}
|
||||
|
||||
dap.configurations.cpp = {
|
||||
{
|
||||
name = "Launch",
|
||||
type = "lldb",
|
||||
request = "launch",
|
||||
program = function()
|
||||
return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file")
|
||||
end,
|
||||
cwd = "${workspaceFolder}",
|
||||
stopOnEntry = false,
|
||||
args = {},
|
||||
},
|
||||
}
|
||||
|
||||
dapui.setup()
|
||||
|
||||
vim.fn.sign_define("DapBreakpoint", { text = "🔴", texthl = "", linehl = "", numhl = "" })
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
{ pkgs, theme, vimwikiPath, ... }:
|
||||
{
|
||||
pkgs,
|
||||
theme,
|
||||
vimwikiPath,
|
||||
...
|
||||
}: {
|
||||
# symlink for a stable path
|
||||
home.file.".vscode-extensions/vscode-lldb".source = pkgs.vscode-extensions.vadimcn.vscode-lldb;
|
||||
|
||||
programs = {
|
||||
neovim = {
|
||||
enable = true;
|
||||
|
@ -13,33 +12,37 @@
|
|||
# theme
|
||||
nvim-solarized-lua
|
||||
|
||||
# keep window layout when deleting buffers
|
||||
vim-bbye
|
||||
|
||||
# auto-close brackets, etc
|
||||
nvim-autopairs
|
||||
|
||||
# trailing whirespaces
|
||||
vim-better-whitespace
|
||||
|
||||
# better wildmenu
|
||||
wilder-nvim
|
||||
|
||||
# better quickfix
|
||||
# undo-tree
|
||||
undotree
|
||||
|
||||
# quickfix
|
||||
nvim-bqf
|
||||
|
||||
# ui
|
||||
dressing-nvim
|
||||
|
||||
# session handling
|
||||
project-nvim
|
||||
auto-session
|
||||
|
||||
# escape handling
|
||||
better-escape-nvim
|
||||
|
||||
nvim-treesitter.withAllGrammars
|
||||
nvim-treesitter-textobjects
|
||||
nvim-ts-context-commentstring
|
||||
markdown-preview-nvim # use({ "iamcco/markdown-preview.nvim", run = ":call mkdp#util#install()" })
|
||||
render-markdown-nvim
|
||||
toggleterm-nvim
|
||||
nvim-notify
|
||||
comment-nvim
|
||||
lualine-nvim
|
||||
tabline-nvim
|
||||
indent-blankline-nvim
|
||||
plenary-nvim
|
||||
vim-illuminate
|
||||
|
@ -52,11 +55,21 @@
|
|||
vim-flog
|
||||
git-blame-nvim
|
||||
nvim-web-devicons # used by diffview-nvim
|
||||
diffview-nvim
|
||||
|
||||
# snippets
|
||||
friendly-snippets
|
||||
luasnip
|
||||
|
||||
# auto-completion
|
||||
blink-cmp
|
||||
blink-copilot
|
||||
nvim-cmp
|
||||
cmp-nvim-lsp
|
||||
cmp-buffer
|
||||
cmp-path
|
||||
cmp-cmdline
|
||||
cmp-nvim-lua
|
||||
cmp_luasnip
|
||||
cmp-calc
|
||||
cmp-nvim-lsp-signature-help
|
||||
|
||||
# telescope
|
||||
telescope-nvim
|
||||
|
@ -67,15 +80,10 @@
|
|||
nvim-lspconfig
|
||||
lsp-status-nvim
|
||||
rustaceanvim
|
||||
lazydev-nvim
|
||||
neodev-nvim
|
||||
none-ls-nvim
|
||||
lsp_lines-nvim
|
||||
lspkind-nvim
|
||||
|
||||
# Copilot
|
||||
copilot-lua
|
||||
copilot-cmp
|
||||
codecompanion-nvim
|
||||
lsp-inlayhints-nvim
|
||||
|
||||
# debugging
|
||||
nvim-dap
|
||||
|
@ -83,12 +91,6 @@
|
|||
|
||||
# vim-wiki
|
||||
vimwiki
|
||||
|
||||
# firenvim
|
||||
firenvim
|
||||
|
||||
# tmux
|
||||
vim-tmux-navigator
|
||||
];
|
||||
|
||||
withNodeJs = true;
|
||||
|
@ -109,14 +111,12 @@
|
|||
texlab
|
||||
nixd
|
||||
nixpkgs-fmt
|
||||
pyright
|
||||
|
||||
(python3.withPackages (ps:
|
||||
with ps; [
|
||||
pep8
|
||||
autopep8
|
||||
python-lsp-server
|
||||
]))
|
||||
bitbake-language-server
|
||||
(python3.withPackages (ps: with ps; [
|
||||
pep8
|
||||
autopep8
|
||||
python-lsp-server
|
||||
]))
|
||||
|
||||
#clipboard
|
||||
xclip
|
||||
|
@ -137,18 +137,17 @@
|
|||
require("local_toggleterm")
|
||||
require("local_notify")
|
||||
require("local_comment")
|
||||
|
||||
if vim.g.started_by_firenvim ~= true then
|
||||
require("local_lualine")
|
||||
end
|
||||
|
||||
require("local_lualine")
|
||||
require("local_tabline")
|
||||
require("local_indent-blankline")
|
||||
require("local_gitsigns")
|
||||
require("local_blink-cmp")
|
||||
require("local_luasnip")
|
||||
require("local_nvim-cmp")
|
||||
require("local_telescope")
|
||||
|
||||
require("local_themes").setup("${theme}")
|
||||
|
||||
require("local_project-nvim")
|
||||
require("local_dap")
|
||||
require("local_illuminate")
|
||||
require("local_wilder")
|
||||
|
@ -158,26 +157,7 @@
|
|||
vim.g.gitblame_date_format = "%r"
|
||||
|
||||
require("nvim-autopairs").setup({})
|
||||
|
||||
require("local_firenvim")
|
||||
|
||||
require("local_codecompanion")
|
||||
|
||||
require("diffview").setup({
|
||||
view = {
|
||||
merge_tool = {
|
||||
layout = "diff4_mixed",
|
||||
disable_diagnostics = true,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
require("render-markdown").setup({
|
||||
file_types = { "markdown", "vimwiki", "copilot-chat" },
|
||||
})
|
||||
|
||||
vim.g.strip_whitespace_on_save = 1
|
||||
vim.g.strip_whitespace_confirm = 0
|
||||
require("neogen").setup({ snippet_engine = "luasnip" })
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
@ -192,17 +172,18 @@
|
|||
home.file.".config/nvim/lua/local_notify.lua".source = ./notify.lua;
|
||||
home.file.".config/nvim/lua/local_comment.lua".source = ./comment.lua;
|
||||
home.file.".config/nvim/lua/local_lualine.lua".source = ./lualine.lua;
|
||||
home.file.".config/nvim/lua/local_tabline.lua".source = ./tabline.lua;
|
||||
home.file.".config/nvim/lua/local_indent-blankline.lua".source = ./indent-blankline.lua;
|
||||
home.file.".config/nvim/lua/local_gitsigns.lua".source = ./gitsigns.lua;
|
||||
home.file.".config/nvim/lua/local_blink-cmp.lua".source = ./blink-cmp.lua;
|
||||
home.file.".config/nvim/lua/local_luasnip.lua".source = ./luasnip.lua;
|
||||
home.file.".config/nvim/lua/local_nvim-cmp.lua".source = ./nvim-cmp.lua;
|
||||
home.file.".config/nvim/lua/local_telescope.lua".source = ./telescope.lua;
|
||||
|
||||
home.file.".config/nvim/lua/local_themes.lua".source = ./themes.lua;
|
||||
home.file.".config/nvim/lua/local_vimwiki.lua".source = ./vimwiki.lua;
|
||||
|
||||
home.file.".config/nvim/lua/local_project-nvim.lua".source = ./project-nvim.lua;
|
||||
home.file.".config/nvim/lua/local_dap.lua".source = ./dap.lua;
|
||||
home.file.".config/nvim/lua/local_illuminate.lua".source = ./illuminate.lua;
|
||||
home.file.".config/nvim/lua/local_wilder.lua".source = ./wilder.lua;
|
||||
home.file.".config/nvim/lua/local_firenvim.lua".source = ./firenvim.lua;
|
||||
home.file.".config/nvim/lua/local_codecompanion.lua".source = ./codecompanion.lua;
|
||||
}
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
if vim.g.started_by_firenvim ~= true then
|
||||
return
|
||||
end
|
||||
|
||||
vim.g.firenvim_config = {
|
||||
globalSettings = { alt = "all" },
|
||||
localSettings = {
|
||||
[".*"] = {
|
||||
cmdline = "neovim",
|
||||
content = "text",
|
||||
priority = 0,
|
||||
selector = "textarea",
|
||||
takeover = "never"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
vim.api.nvim_create_autocmd('UIEnter', {
|
||||
callback = function()
|
||||
local client = vim.api.nvim_get_chan_info(vim.v.event.chan).client
|
||||
if client ~= nil and client.name == "Firenvim" then
|
||||
vim.o.laststatus = 0
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd({ 'TextChanged', 'TextChangedI' }, {
|
||||
callback = function()
|
||||
if vim.g.timer_started == true then
|
||||
return
|
||||
end
|
||||
vim.g.timer_started = true
|
||||
vim.fn.timer_start(500, function()
|
||||
vim.g.timer_started = false
|
||||
vim.cmd('silent write')
|
||||
end)
|
||||
end
|
||||
})
|
|
@ -12,19 +12,19 @@ nnoremap("<C-k>", ":wincmd k<CR>")
|
|||
nnoremap("<C-l>", ":wincmd l<CR>")
|
||||
|
||||
-- Switch buffers
|
||||
nnoremap("<C-PageDown>", ":bnext<CR>")
|
||||
nnoremap("<C-PageUp>", ":bprevious<CR>")
|
||||
nnoremap("<C-PageDown>", ":TablineBufferNext<CR>")
|
||||
nnoremap("<C-PageUp>", ":TablineBufferPrevious<CR>")
|
||||
|
||||
-- fugitive
|
||||
nnoremap("<leader>g", ":0Git<CR>")
|
||||
|
||||
-- vim-flog
|
||||
nnoremap("<leader>G", ":Flog -all -date=relative -open-cmd=new<CR>")
|
||||
nnoremap("<leader>F", ":Flog -path=% -date=relative -open-cmd=new<CR>")
|
||||
|
||||
-- telescope
|
||||
local telescope = require("telescope.builtin")
|
||||
local telescope_themes = require("telescope.themes")
|
||||
local telescope_projects = require("telescope").extensions.projects
|
||||
|
||||
local function map_telescope(key, telescope_function)
|
||||
vim.api.nvim_set_keymap("n", key, "", {
|
||||
|
@ -39,6 +39,7 @@ end
|
|||
map_telescope("<leader>ff", telescope.find_files)
|
||||
map_telescope("<leader>fb", telescope.buffers)
|
||||
map_telescope("<leader>fg", telescope.git_files)
|
||||
map_telescope("<leader>fp", telescope_projects.projects)
|
||||
map_telescope("<leader>fs", telescope.lsp_document_symbols)
|
||||
map_telescope("<leader>fS", telescope.lsp_dynamic_workspace_symbols)
|
||||
map_telescope("<C-f>", telescope.grep_string)
|
||||
|
@ -59,10 +60,10 @@ vim.api.nvim_create_autocmd("TermOpen", {
|
|||
})
|
||||
|
||||
-- buffer closing
|
||||
nnoremap("gq", ":Bdelete<CR>")
|
||||
nnoremap("gq", ":bdelete<CR>")
|
||||
|
||||
-- toggle search highlighting
|
||||
vim.cmd('nnoremap <expr> * v:hlsearch ? ":nohlsearch<cr>" : "*"')
|
||||
|
||||
-- open CodeCompanion chat window
|
||||
nnoremap("<leader>cc", ":CodeCompanionChat #buffer{watch} #lsp @full_stack_dev<CR>")
|
||||
-- insert-map jj/jk to escape
|
||||
require("better_escape").setup()
|
||||
|
|
|
@ -12,6 +12,8 @@ local on_attach = function(client, bufnr)
|
|||
})
|
||||
end
|
||||
|
||||
require("lsp-inlayhints").on_attach(client, bufnr)
|
||||
|
||||
local telescope = require("telescope.builtin")
|
||||
|
||||
nnoremap("gD", vim.lsp.buf.declaration)
|
||||
|
@ -39,6 +41,8 @@ local on_attach = function(client, bufnr)
|
|||
end
|
||||
end
|
||||
|
||||
require("lsp-inlayhints").setup({})
|
||||
|
||||
local lsp_status = require("lsp-status")
|
||||
lsp_status.config({
|
||||
current_function = false,
|
||||
|
@ -48,10 +52,21 @@ lsp_status.config({
|
|||
})
|
||||
lsp_status.register_progress()
|
||||
|
||||
require('lazydev').setup()
|
||||
-- setup lua language server for init.nvim and nvim plugin development
|
||||
require("neodev").setup({
|
||||
override = function(root_dir, options)
|
||||
if require("neodev.util").has_file(root_dir, "/etc/nixos") then
|
||||
options.enabled = true
|
||||
options.plugins = true
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities(lsp_status.capabilities)
|
||||
|
||||
local servers = {
|
||||
["bashls"] = {},
|
||||
["bitbake_language_server"] = {},
|
||||
["clangd"] = {},
|
||||
["cmake"] = {},
|
||||
["dockerls"] = {},
|
||||
|
@ -98,7 +113,6 @@ local servers = {
|
|||
}
|
||||
}
|
||||
},
|
||||
["pyright"] = {},
|
||||
["texlab"] = {},
|
||||
["yamlls"] = {
|
||||
yaml = {
|
||||
|
|
|
@ -3,13 +3,5 @@ require('lualine').setup({
|
|||
sections = {
|
||||
lualine_c = { { "filename", path = 1 }, "require('lsp-status').status()" }
|
||||
},
|
||||
tabline = {
|
||||
lualine_a = { 'buffers' },
|
||||
lualine_z = { 'tabs' }
|
||||
},
|
||||
extensions = {
|
||||
"fugitive",
|
||||
"fzf",
|
||||
"toggleterm"
|
||||
}
|
||||
extensions = { "toggleterm" }
|
||||
})
|
||||
|
|
1
neovim/luasnip.lua
Normal file
1
neovim/luasnip.lua
Normal file
|
@ -0,0 +1 @@
|
|||
require("luasnip.loaders.from_vscode").lazy_load()
|
87
neovim/nvim-cmp.lua
Normal file
87
neovim/nvim-cmp.lua
Normal file
|
@ -0,0 +1,87 @@
|
|||
local has_words_before = function()
|
||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
return col ~= 0 and
|
||||
vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(
|
||||
col, col):match("%s") == nil
|
||||
end
|
||||
|
||||
local cmp = require("cmp")
|
||||
local luasnip = require("luasnip")
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end
|
||||
},
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "nvim_lsp_signature_help" },
|
||||
{ name = "luasnip" },
|
||||
{ name = "path" },
|
||||
{ name = "buffer" },
|
||||
{ name = "nvim-lua" },
|
||||
{ name = "calc" },
|
||||
}),
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-Space>"] = cmp.mapping.complete({}),
|
||||
["<C-e>"] = cmp.mapping.abort(),
|
||||
["<CR>"] = cmp.mapping.confirm({ select = false }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
elseif has_words_before() then
|
||||
cmp.complete()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
}),
|
||||
experimental = { ghost_text = true },
|
||||
window = {
|
||||
completion = cmp.config.window.bordered(),
|
||||
documentation = cmp.config.window.bordered(),
|
||||
},
|
||||
formatting = {
|
||||
fields = { "menu", "abbr", "kind" },
|
||||
format = function(entry, item)
|
||||
local menu_icon = {
|
||||
nvim_lsp = "λ",
|
||||
luasnip = "⋗",
|
||||
buffer = "Ω",
|
||||
path = "🖿",
|
||||
}
|
||||
|
||||
item.menu = menu_icon[entry.source.name]
|
||||
return item
|
||||
end,
|
||||
},
|
||||
})
|
||||
|
||||
-- `/` cmdline setup.
|
||||
cmp.setup.cmdline("/", {
|
||||
sources = cmp.config.sources(
|
||||
{ name = "buffer" }
|
||||
)
|
||||
})
|
||||
|
||||
-- `:` cmdline setup.
|
||||
cmp.setup.cmdline(":", {
|
||||
sources = cmp.config.sources(
|
||||
{ name = "path" },
|
||||
{ name = "cmdline" }
|
||||
)
|
||||
})
|
|
@ -14,8 +14,8 @@ vim.opt.expandtab = true
|
|||
-- scroll offset
|
||||
vim.opt.scrolloff = 4
|
||||
|
||||
-- wrap lines
|
||||
vim.opt.wrap = true
|
||||
-- don't warp lines
|
||||
vim.opt.wrap = false
|
||||
|
||||
-- split to right/below
|
||||
vim.opt.splitright = true
|
||||
|
|
1
neovim/project-nvim.lua
Normal file
1
neovim/project-nvim.lua
Normal file
|
@ -0,0 +1 @@
|
|||
require('project_nvim').setup({})
|
1
neovim/tabline.lua
Normal file
1
neovim/tabline.lua
Normal file
|
@ -0,0 +1 @@
|
|||
require('tabline').setup({ enable = true, options = { show_bufnr = true, show_filename_only = true } })
|
|
@ -26,3 +26,4 @@ telescope.setup({
|
|||
|
||||
telescope.load_extension("fzf")
|
||||
telescope.load_extension("ui-select")
|
||||
telescope.load_extension("projects")
|
||||
|
|
11
private.nix
11
private.nix
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, user, lib, ... }:
|
||||
{ pkgs, user, ... }:
|
||||
|
||||
{
|
||||
home.username = user;
|
||||
|
@ -13,8 +13,7 @@
|
|||
thunderbird
|
||||
keepassxc
|
||||
light
|
||||
# element-desktop-wayland
|
||||
element-desktop
|
||||
element-desktop-wayland
|
||||
darktable
|
||||
kubectl
|
||||
kubectx
|
||||
|
@ -26,11 +25,6 @@
|
|||
evince
|
||||
inkscape
|
||||
chromium
|
||||
zoom-us
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
||||
"zoom"
|
||||
];
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
|
@ -40,6 +34,5 @@
|
|||
./kitty.nix
|
||||
./nextcloud.nix
|
||||
./sway
|
||||
./private/ssh.nix
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
programs = {
|
||||
ssh = {
|
||||
enable = true;
|
||||
matchBlocks = {
|
||||
tc-0x = {
|
||||
host = "tc-*";
|
||||
user = "root";
|
||||
};
|
||||
ed-0x = {
|
||||
host = "ed-*";
|
||||
user = "root";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,15 +1,13 @@
|
|||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
devenv
|
||||
difftastic
|
||||
dust
|
||||
htop
|
||||
jq
|
||||
nh
|
||||
sshfs
|
||||
unzip
|
||||
xclip
|
||||
llm
|
||||
];
|
||||
|
||||
imports = [
|
||||
|
@ -24,7 +22,6 @@
|
|||
./rsync.nix
|
||||
./shell_aliases.nix
|
||||
./starship.nix
|
||||
./tmux.nix
|
||||
./tree.nix
|
||||
./zoxide.nix
|
||||
./zsh.nix
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
programs = {
|
||||
direnv = {
|
||||
enable = true;
|
||||
silent = true;
|
||||
enableZshIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
gs = "git status";
|
||||
gd = "git diff";
|
||||
gf = "git fetch";
|
||||
gfg = "git fetch --no-recurse-submodules && git graph --all --max-count 32";
|
||||
gfp = "git fetch --prune";
|
||||
k = "kubectl";
|
||||
ww = "nvim -c VimwikiIndex";
|
||||
};
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
programs = {
|
||||
tmux = {
|
||||
enable = true;
|
||||
clock24 = true;
|
||||
keyMode = "vi";
|
||||
escapeTime = 0;
|
||||
plugins = with pkgs.tmuxPlugins; [
|
||||
tmux-colors-solarized
|
||||
vim-tmux-navigator
|
||||
{
|
||||
plugin = power-theme;
|
||||
extraConfig = ''
|
||||
set -g @tmux_power_theme "colour4"
|
||||
'';
|
||||
}
|
||||
];
|
||||
terminal = "xterm-256color";
|
||||
extraConfig = ''
|
||||
# Terminal overrides
|
||||
set-option -sa terminal-overrides ",xterm-256color:Tc"
|
||||
|
||||
# Reload tmux config to ensure theme is applied
|
||||
bind r source-file ~/.config/tmux/tmux.conf \; display-message "Config reloaded!"
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,13 +1,8 @@
|
|||
{ pkgs, theme, ... }:
|
||||
let
|
||||
zsh_autosuggest_highlight_style = if theme == "light" then "fg=180" else "fg=10";
|
||||
in
|
||||
{
|
||||
pkgs,
|
||||
theme,
|
||||
...
|
||||
}: let
|
||||
zsh_autosuggest_highlight_style =
|
||||
if theme == "light"
|
||||
then "fg=180"
|
||||
else "fg=10";
|
||||
in {
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
|
@ -18,16 +13,7 @@ in {
|
|||
highlight = zsh_autosuggest_highlight_style;
|
||||
};
|
||||
|
||||
initContent = ''
|
||||
# Auto-start tmux if conditions are met
|
||||
if [[ -z "$TMUX" && -z "$SSH_TTY" && $- == *i* ]]; then
|
||||
# Check if tmux is available and terminal supports it
|
||||
if command -v tmux >/dev/null 2>&1; then
|
||||
# Try to attach to existing session, or create new one
|
||||
exec tmux new-session -A -s default
|
||||
fi
|
||||
fi
|
||||
|
||||
initExtra = ''
|
||||
function set_win_title(){
|
||||
local TITLE=$(git config --get remote.origin.url || echo "$PWD")
|
||||
echo -ne "\033]0; $(basename "$TITLE") \007"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue