mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-04-02 11:12:09 +02:00
Merge branch 'main' of github.com:anotherhadi/nixy
This commit is contained in:
@@ -34,6 +34,7 @@
|
|||||||
url = "github:KZDKM/Hyprspace";
|
url = "github:KZDKM/Hyprspace";
|
||||||
inputs.hyprland.follows = "hyprland";
|
inputs.hyprland.follows = "hyprland";
|
||||||
};
|
};
|
||||||
|
nixos-search-api.url = "github:anotherhadi/nixos-search-api";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs@{ nixpkgs, ... }: {
|
outputs = inputs@{ nixpkgs, ... }: {
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
{
|
{
|
||||||
programs.nixvim = {
|
programs.nixvim = {
|
||||||
globals.mapleader = " ";
|
globals.mapleader = " ";
|
||||||
|
diagnostics = {
|
||||||
|
virtual_text = true;
|
||||||
|
virtual_improved = { current_line = "only"; };
|
||||||
|
};
|
||||||
opts = {
|
opts = {
|
||||||
autoindent = true;
|
autoindent = true;
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
lsp-format.enable = true;
|
lsp-format.enable = true;
|
||||||
lsp = {
|
lsp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
inlayHints = true;
|
||||||
servers = {
|
servers = {
|
||||||
bashls.enable = true;
|
bashls.enable = true;
|
||||||
gopls.enable = true;
|
gopls.enable = true;
|
||||||
@@ -16,6 +17,7 @@
|
|||||||
none-ls = {
|
none-ls = {
|
||||||
enable = true;
|
enable = true;
|
||||||
sources = {
|
sources = {
|
||||||
|
completion = { luasnip.enable = true; };
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
golangci_lint.enable = true;
|
golangci_lint.enable = true;
|
||||||
statix.enable = true;
|
statix.enable = true;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ config, ... }: {
|
{ config, lib, pkgs, ... }: {
|
||||||
programs.nixvim = {
|
programs.nixvim = {
|
||||||
nixpkgs.config.allowUnfree = true; # For copilot
|
nixpkgs.config.allowUnfree = true; # For copilot
|
||||||
highlightOverride = {
|
highlightOverride = {
|
||||||
@@ -6,7 +6,11 @@
|
|||||||
};
|
};
|
||||||
plugins = {
|
plugins = {
|
||||||
bufferline.enable = true;
|
bufferline.enable = true;
|
||||||
# copilot-vim.enable = true;
|
copilot-vim = {
|
||||||
|
enable = true;
|
||||||
|
# FIXME: Temp issue solving
|
||||||
|
settings.node_command = lib.getExe pkgs.nodejs_20;
|
||||||
|
};
|
||||||
flash.enable = true;
|
flash.enable = true;
|
||||||
tmux-navigator.enable = true;
|
tmux-navigator.enable = true;
|
||||||
todo-comments.enable = true;
|
todo-comments.enable = true;
|
||||||
|
|||||||
@@ -17,28 +17,40 @@ in {
|
|||||||
};
|
};
|
||||||
historySubstringSearch.enable = true;
|
historySubstringSearch.enable = true;
|
||||||
|
|
||||||
initExtraFirst = ''
|
initExtraFirst =
|
||||||
bindkey -e
|
#bash
|
||||||
${if fetch == "neofetch" then
|
''
|
||||||
pkgs.neofetch + "/bin/neofetch"
|
bindkey -e
|
||||||
else if fetch == "nerdfetch" then
|
${if fetch == "neofetch" then
|
||||||
"nerdfetch"
|
pkgs.neofetch + "/bin/neofetch"
|
||||||
else if fetch == "pfetch" then
|
else if fetch == "nerdfetch" then
|
||||||
"echo; ${pkgs.pfetch}/bin/pfetch"
|
"nerdfetch"
|
||||||
else
|
else if fetch == "pfetch" then
|
||||||
""}
|
"echo; ${pkgs.pfetch}/bin/pfetch"
|
||||||
|
else
|
||||||
|
""}
|
||||||
|
|
||||||
function sesh-sessions() {
|
function sesh-sessions() {
|
||||||
session=$(sesh list -t -c | fzf --height 70% --reverse)
|
session=$(sesh list -t -c | fzf --height 70% --reverse)
|
||||||
[[ -z "$session" ]] && return
|
[[ -z "$session" ]] && return
|
||||||
sesh connect $session
|
sesh connect $session
|
||||||
}
|
}
|
||||||
|
|
||||||
zle -N sesh-sessions
|
function chatgptlist(){
|
||||||
bindkey -M emacs '\es' sesh-sessions
|
for arg in "$@"; do
|
||||||
bindkey -M vicmd '\es' sesh-sessions
|
echo "$arg:"
|
||||||
bindkey -M viins '\es' sesh-sessions
|
echo "\`\`\`"
|
||||||
'';
|
cat "$arg"
|
||||||
|
echo "\`\`\`"
|
||||||
|
echo
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
zle -N sesh-sessions
|
||||||
|
bindkey -M emacs '\es' sesh-sessions
|
||||||
|
bindkey -M vicmd '\es' sesh-sessions
|
||||||
|
bindkey -M viins '\es' sesh-sessions
|
||||||
|
'';
|
||||||
|
|
||||||
history = {
|
history = {
|
||||||
ignoreDups = true;
|
ignoreDups = true;
|
||||||
|
|||||||
@@ -51,7 +51,8 @@ let
|
|||||||
[[ $1 == "" ]] && ui
|
[[ $1 == "" ]] && ui
|
||||||
|
|
||||||
if [[ $1 == "rebuild" ]];then
|
if [[ $1 == "rebuild" ]];then
|
||||||
git add . && sudo nixos-rebuild switch --flake ${configDirectory}#${hostname}
|
cd ${configDirectory} && git add .
|
||||||
|
sudo nixos-rebuild switch --flake ${configDirectory}#${hostname}
|
||||||
elif [[ $1 == "upgrade" ]];then
|
elif [[ $1 == "upgrade" ]];then
|
||||||
sudo nixos-rebuild switch --upgrade --flake '${configDirectory}#${hostname}'
|
sudo nixos-rebuild switch --upgrade --flake '${configDirectory}#${hostname}'
|
||||||
elif [[ $1 == "update" ]];then
|
elif [[ $1 == "update" ]];then
|
||||||
|
|||||||
19
server-modules/nixos-search-api.nix
Normal file
19
server-modules/nixos-search-api.nix
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{ inputs, config, ... }:
|
||||||
|
let domain = "nixos-search-api.hadi.diy";
|
||||||
|
in {
|
||||||
|
imports = [ inputs.nixos-search-api.nixosModules.nixos-search-api ];
|
||||||
|
|
||||||
|
services.nixos-search-api = {
|
||||||
|
enable = true;
|
||||||
|
port = 8089;
|
||||||
|
};
|
||||||
|
|
||||||
|
nginx.virtualHosts."${domain}" = {
|
||||||
|
useACMEHost = "hadi.diy";
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass =
|
||||||
|
"http://127.0.0.1:${toString config.services.nixos-search-api.port}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user