This commit is contained in:
cswimr 2025-03-06 18:42:06 -06:00
parent 58800c1a05
commit 1d5712d898
Signed by: cswimr
GPG key ID: 0EC431A8DA8F8087
24 changed files with 253 additions and 278 deletions

View file

@ -2,7 +2,7 @@
{
environment.variables = rec {
EDITOR = "nvim";
VISUAL = "neovide";
VISUAL = "nvim";
# XDG settings
XDG_CACHE_HOME = "$HOME/.cache";

View file

@ -52,6 +52,8 @@
jdk21
];
})
# (pkgs.callPackage ../packages/ftb-app.nix { inherit pkgs; })
(pkgs.callPackage ../packages/svc.nix { inherit pkgs; })
lunar-client
stablePkgs.heroic
dolphin-emu
@ -60,6 +62,7 @@
winetricks
#(pkgs.callPackage ../packages/lucem.nix { inherit pkgs; })
vinegar # Roblox Studio, use Sober in ./flatpak.nix for the Roblox Player
starsector
celeste64
];

View file

@ -11,6 +11,7 @@ let
catppuccin-konsole
plasma-browser-integration
plasma-sdk
kdenlive
];
packages = with pkgs; [
neovim-qt
@ -22,10 +23,13 @@ let
ytmdesktop
ktailctl
wl-clipboard
blockbench
jetbrains.idea-community-bin
# we install xdg-desktop-portal-gtk so GTK theming works in KDE Plasma
xdg-desktop-portal-gtk
libnotify
hoppscotch
vlc
];
in
{
@ -56,7 +60,7 @@ in
programs.ssh = {
enableAskPassword = true;
askPassword = pkgs.lib.mkForce "${pkgs.ksshaskpass.out}/bin/ksshaskpass";
askPassword = pkgs.lib.mkForce "${pkgs.kdePackages.ksshaskpass.out}/bin/ksshaskpass";
};
environment.variables = {
SSH_ASKPASS_REQUIRE = "prefer";

16
nixos/lazygit.nix Normal file
View file

@ -0,0 +1,16 @@
{
programs.lazygit = {
enable = true;
settings = {
gui = {
nerdFontsVersion = "3";
};
services = {
"c.csw.im" = "gitea:c.csw.im";
"git.sleeping.town" = "gitea:git.sleeping.town";
"www.coastalcommits.com" = "gitea:c.csw.im";
"codeberg.org" = "gitea:codeberg.org";
};
};
};
}

View file

@ -3,7 +3,6 @@
imports = [
./keymaps.nix
./settings.nix
./neovide.nix
./plugins/autoclose.nix
./plugins/cmp.nix
@ -21,6 +20,7 @@
./plugins/neo-tree.nix
./plugins/profile.nix
./plugins/rooter.nix
./plugins/remote-nvim.nix
./plugins/snacks.nix
./plugins/surround.nix
./plugins/telescope.nix

View file

@ -1,16 +0,0 @@
{
programs.nixvim = {
extraConfigLua = # lua
''
if vim.g.neovide then
vim.keymap.set('v', '<C-S-c>', '"+y') -- Copy
vim.keymap.set('n', '<C-S-v>', '"+P') -- Paste normal mode
vim.keymap.set('v', '<C-S-v>', '"+P') -- Paste visual mode
vim.keymap.set('c', '<C-S-v>', '<C-R>+') -- Paste command mode
vim.keymap.set('i', '<C-S-v>', '<ESC>l"+Pli') -- Paste insert mode
vim.o.mousemoveevent = true -- only enable when using neovide, because it sucks in terminal for some reason
end
'';
};
}

View file

@ -9,6 +9,10 @@
name = "copilot";
group_index = 2;
}
{
name = "luasnip";
group_index = 2;
}
{
name = "nvim_lsp";
group_index = 2;

View file

@ -50,6 +50,7 @@
yaml = prettier;
json = prettier;
jsonc = prettier;
json5 = prettier;
svelte = prettier;
html = prettier;
css = prettier;

View file

@ -3,6 +3,9 @@
plugins.neo-tree = {
enable = true;
enableGitStatus = true;
filesystem = {
hijackNetrwBehavior = "disabled";
};
sources = [
"filesystem"
"git_status"

View file

@ -0,0 +1,46 @@
{ lib, pkgs, ... }:
{
virtualisation.docker = {
enable = true;
};
programs.nixvim = {
extraPackages = with pkgs; [
devpod
openssh
];
plugins = {
remote-nvim = {
enable = true;
settings = {
ssh_config = {
ssh_binary = "${lib.getExe' pkgs.openssh "ssh"}";
scp_binary = "${lib.getExe' pkgs.openssh "scp"}";
};
devpod = {
binary = "${lib.getExe pkgs.devpod}";
docker_binary = "${lib.getExe pkgs.docker}";
};
remote = {
copy_dirs = {
data = {
base = {
__raw = "vim.fn.stdpath (\"data\")";
};
compression = {
additional_opts = [
"--exclude-vcs"
];
enabled = true;
};
dirs = [
"lazy"
];
};
};
};
};
};
};
};
}

View file

@ -55,6 +55,7 @@
javascript
json
jsonc
java
lua
python
regex

View file

@ -87,6 +87,7 @@
''
InitPath = debug.getinfo(1, "S").source:sub(2)
print("Neovim init file location: " .. InitPath)
vim.o.exrc = true
'';
extraConfigVim = ''
set number " enable number lines

View file

@ -40,7 +40,6 @@ let
pciutils
usbutils
nil
lazygit
lazydocker
bat
nixfmt-rfc-style
@ -61,10 +60,6 @@ let
nix-search
gh
cloc
python311
python311Packages.python-lsp-server
python311Packages.rich
];
flakePackages = with inputs; [
compose2nix.packages.${system}.default

View file

@ -66,7 +66,31 @@
echo "Running command: $@"
command "$@"
export $var_name="$old_value"
}
}
_publish() {
# check the git project root for common lockfiles and run respective publish commands, i.e. bun.lock, bun.lockb, uv.lock
local lockfile=$(git rev-parse --show-toplevel)/$(ls $(git rev-parse --show-toplevel) | grep -E "bun.lock|bun.lockb|uv.lock")
if [[ -f "$lockfile" ]]; then
local lockfile_name=$(basename "$lockfile")
case "$lockfile_name" in
"bun.lock"|"bun.lockb")
_set_secret_and_run /run/secrets/npm NPM_CONFIG_TOKEN bun publish --access public
;;
"uv.lock")
uv build
_set_secret_and_run /run/secrets/pypi UV_PUBLISH_TOKEN uv publish
;;
*)
echo "No publish command found for $lockfile_name"
return 1
;;
esac
else
echo "No lockfile found in the git project root."
return 1
fi
}
if (( $+commands[kitten] )); then
@ -114,7 +138,7 @@
sudo = "sudo ";
bun = "_set_secret_and_run /run/secrets/npm NPM_CONFIG_TOKEN bun";
bunx = "_set_secret_and_run /run/secrets/npm NPM_CONFIG_TOKEN bunx";
publish = "_set_secret_and_run /run/secrets/npm NPM_CONFIG_TOKEN bun publish --access public";
publish = "_publish";
s = "sudo";
};

View file

@ -12,6 +12,10 @@
owner = user;
path = "/home/${user}/.secrets/codeberg";
};
"pypi" = {
owner = user;
path = "/home/${user}/.secrets/pypi";
};
"npm" = {
owner = user;
path = "/home/${user}/.secrets/npm";