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";
|
||||
inputs.hyprland.follows = "hyprland";
|
||||
};
|
||||
nixos-search-api.url = "github:anotherhadi/nixos-search-api";
|
||||
};
|
||||
|
||||
outputs = inputs@{ nixpkgs, ... }: {
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
{
|
||||
programs.nixvim = {
|
||||
globals.mapleader = " ";
|
||||
diagnostics = {
|
||||
virtual_text = true;
|
||||
virtual_improved = { current_line = "only"; };
|
||||
};
|
||||
opts = {
|
||||
autoindent = true;
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
lsp-format.enable = true;
|
||||
lsp = {
|
||||
enable = true;
|
||||
inlayHints = true;
|
||||
servers = {
|
||||
bashls.enable = true;
|
||||
gopls.enable = true;
|
||||
@@ -16,6 +17,7 @@
|
||||
none-ls = {
|
||||
enable = true;
|
||||
sources = {
|
||||
completion = { luasnip.enable = true; };
|
||||
diagnostics = {
|
||||
golangci_lint.enable = true;
|
||||
statix.enable = true;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ config, ... }: {
|
||||
{ config, lib, pkgs, ... }: {
|
||||
programs.nixvim = {
|
||||
nixpkgs.config.allowUnfree = true; # For copilot
|
||||
highlightOverride = {
|
||||
@@ -6,7 +6,11 @@
|
||||
};
|
||||
plugins = {
|
||||
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;
|
||||
tmux-navigator.enable = true;
|
||||
todo-comments.enable = true;
|
||||
|
||||
@@ -17,28 +17,40 @@ in {
|
||||
};
|
||||
historySubstringSearch.enable = true;
|
||||
|
||||
initExtraFirst = ''
|
||||
bindkey -e
|
||||
${if fetch == "neofetch" then
|
||||
pkgs.neofetch + "/bin/neofetch"
|
||||
else if fetch == "nerdfetch" then
|
||||
"nerdfetch"
|
||||
else if fetch == "pfetch" then
|
||||
"echo; ${pkgs.pfetch}/bin/pfetch"
|
||||
else
|
||||
""}
|
||||
initExtraFirst =
|
||||
#bash
|
||||
''
|
||||
bindkey -e
|
||||
${if fetch == "neofetch" then
|
||||
pkgs.neofetch + "/bin/neofetch"
|
||||
else if fetch == "nerdfetch" then
|
||||
"nerdfetch"
|
||||
else if fetch == "pfetch" then
|
||||
"echo; ${pkgs.pfetch}/bin/pfetch"
|
||||
else
|
||||
""}
|
||||
|
||||
function sesh-sessions() {
|
||||
session=$(sesh list -t -c | fzf --height 70% --reverse)
|
||||
[[ -z "$session" ]] && return
|
||||
sesh connect $session
|
||||
}
|
||||
function sesh-sessions() {
|
||||
session=$(sesh list -t -c | fzf --height 70% --reverse)
|
||||
[[ -z "$session" ]] && return
|
||||
sesh connect $session
|
||||
}
|
||||
|
||||
zle -N sesh-sessions
|
||||
bindkey -M emacs '\es' sesh-sessions
|
||||
bindkey -M vicmd '\es' sesh-sessions
|
||||
bindkey -M viins '\es' sesh-sessions
|
||||
'';
|
||||
function chatgptlist(){
|
||||
for arg in "$@"; do
|
||||
echo "$arg:"
|
||||
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 = {
|
||||
ignoreDups = true;
|
||||
|
||||
@@ -51,7 +51,8 @@ let
|
||||
[[ $1 == "" ]] && ui
|
||||
|
||||
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
|
||||
sudo nixos-rebuild switch --upgrade --flake '${configDirectory}#${hostname}'
|
||||
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