mirror of
https://github.com/elwrcl/copnix.git
synced 2026-10-31 14:28:02 +03:00
great refactor 2
This commit is contained in:
12 files changed
+428
-176
No files matched your search
@@ -0,0 +1,7 @@
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./ghostty
|
||||
./shell
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{ inputs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
inputs.nixcord.homeModules.nixcord
|
||||
];
|
||||
|
||||
programs.nixcord = {
|
||||
enable = true;
|
||||
legcord = {
|
||||
enable = true;
|
||||
settings = {
|
||||
channel = "stable";
|
||||
tray = "dynamic";
|
||||
minimizeToTray = true;
|
||||
mods = [ "shelter" ];
|
||||
doneSetup = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
{ pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
isDarwin = pkgs.stdenv.isDarwin;
|
||||
|
||||
linuxKeybinds = [
|
||||
"alt+r=reload_config"
|
||||
"alt+q=close_surface"
|
||||
|
||||
"ctrl+space=new_tab"
|
||||
"ctrl+page_down=next_tab"
|
||||
"ctrl+page_up=previous_tab"
|
||||
"alt+comma=move_tab:-1"
|
||||
"alt+period=move_tab:1"
|
||||
|
||||
"alt+1=goto_tab:1"
|
||||
"alt+2=goto_tab:2"
|
||||
"alt+3=goto_tab:3"
|
||||
"alt+4=goto_tab:4"
|
||||
"alt+5=goto_tab:5"
|
||||
"alt+6=goto_tab:6"
|
||||
"alt+7=goto_tab:7"
|
||||
"alt+8=goto_tab:8"
|
||||
"alt+9=goto_tab:9"
|
||||
|
||||
"ctrl+shift+backslash=new_split:right"
|
||||
"ctrl+shift+minus=new_split:down"
|
||||
|
||||
"alt+h=goto_split:left"
|
||||
"alt+j=goto_split:bottom"
|
||||
"alt+k=goto_split:top"
|
||||
"alt+l=goto_split:right"
|
||||
|
||||
"ctrl+shift+z=toggle_split_zoom"
|
||||
"ctrl+shift+e=equalize_splits"
|
||||
];
|
||||
|
||||
darwinKeybinds = [
|
||||
"cmd+s>r=reload_config"
|
||||
"cmd+s>x=close_surface"
|
||||
"cmd+s>n=new_window"
|
||||
|
||||
"cmd+s>c=new_tab"
|
||||
"cmd+s>shift+l=next_tab"
|
||||
"cmd+s>shift+h=previous_tab"
|
||||
"cmd+s>comma=move_tab:-1"
|
||||
"cmd+s>period=move_tab:1"
|
||||
|
||||
"cmd+s>1=goto_tab:1"
|
||||
"cmd+s>2=goto_tab:2"
|
||||
"cmd+s>3=goto_tab:3"
|
||||
"cmd+s>4=goto_tab:4"
|
||||
"cmd+s>5=goto_tab:5"
|
||||
"cmd+s>6=goto_tab:6"
|
||||
"cmd+s>7=goto_tab:7"
|
||||
"cmd+s>8=goto_tab:8"
|
||||
"cmd+s>9=goto_tab:9"
|
||||
|
||||
"cmd+s>\\=new_split:right"
|
||||
"cmd+s>-=new_split:down"
|
||||
"cmd+s>h=goto_split:left"
|
||||
"cmd+s>j=goto_split:bottom"
|
||||
"cmd+s>k=goto_split:top"
|
||||
"cmd+s>l=goto_split:right"
|
||||
"cmd+s>z=toggle_split_zoom"
|
||||
"cmd+s>e=equalize_splits"
|
||||
];
|
||||
in
|
||||
{
|
||||
programs.ghostty = {
|
||||
enable = true;
|
||||
installBatSyntax = true;
|
||||
enableZshIntegration = true;
|
||||
|
||||
settings = {
|
||||
font-family = "JetBrainsMono Nerd Font";
|
||||
font-size = 11;
|
||||
|
||||
window-padding-x = 10;
|
||||
window-padding-y = 10;
|
||||
window-padding-balance = true;
|
||||
window-save-state = "always";
|
||||
|
||||
mouse-hide-while-typing = true;
|
||||
mouse-scroll-multiplier = 2;
|
||||
shell-integration-features = "no-cursor,sudo,no-title";
|
||||
|
||||
palette = [
|
||||
"0=#090E13"
|
||||
"1=#c4746e"
|
||||
"2=#8a9a7b"
|
||||
"3=#c4b28a"
|
||||
"4=#8ba4b0"
|
||||
"5=#a292a3"
|
||||
"6=#8ea4a2"
|
||||
"7=#a4a7a4"
|
||||
"8=#5C6066"
|
||||
"9=#e46876"
|
||||
"10=#87a987"
|
||||
"11=#e6c384"
|
||||
"12=#7fb4ca"
|
||||
"13=#938aa9"
|
||||
"14=#7aa89f"
|
||||
"15=#c5c9c7"
|
||||
];
|
||||
|
||||
background = "#090E13";
|
||||
foreground = "#c5c9c7";
|
||||
cursor-color = "#c5c9c7";
|
||||
cursor-text = "#9cdef2";
|
||||
selection-background = "#22262D";
|
||||
selection-foreground = "#c5c9c7";
|
||||
cursor-style = "block";
|
||||
cursor-style-blink = true;
|
||||
adjust-cell-height = "35%";
|
||||
background-opacity = 0.96;
|
||||
|
||||
keybind = linuxKeybinds ++ lib.optionals isDarwin darwinKeybinds;
|
||||
}
|
||||
// lib.optionalAttrs isDarwin {
|
||||
macos-titlebar-style = "transparent";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./nu.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
programs.nushell = {
|
||||
enable = true;
|
||||
|
||||
shellAliases = {
|
||||
ls = "eza --icons --group-directories-first";
|
||||
ll = "eza -lah --icons --group-directories-first";
|
||||
la = "eza -a --icons --group-directories-first";
|
||||
lt = "eza --tree --level=2 --icons";
|
||||
cat = "bat";
|
||||
df = "df -h";
|
||||
du = "du -h";
|
||||
free = "free -h";
|
||||
rm = "trash-put";
|
||||
sysinfo = "fastfetch";
|
||||
monitor = "sudo btop";
|
||||
ports = "sudo ss -tulpn";
|
||||
myip = "curl ifconfig.me";
|
||||
gs = "git status";
|
||||
ga = "git add";
|
||||
gp = "git push";
|
||||
gl = "git log --oneline --graph --decorate";
|
||||
".." = "cd ..";
|
||||
"..." = "cd ../..";
|
||||
"...." = "cd ../../..";
|
||||
};
|
||||
|
||||
environmentVariables = {
|
||||
MESA_SHADER_CACHE_MAX_SIZE = "2G";
|
||||
MESA_SHADER_CACHE_DIR = "/tmp/mesa_shader_cache";
|
||||
};
|
||||
|
||||
extraEnv = ''
|
||||
$env.PATH = ($env.PATH | prepend $"($env.HOME)/.local/bin")
|
||||
'';
|
||||
|
||||
extraConfig = ''
|
||||
$env.config.show_banner = false
|
||||
def gc [msg: string] { git commit -m $msg }
|
||||
def rebuild [] {
|
||||
git -C ~/copland add -A
|
||||
git -C ~/copland commit -m "update"
|
||||
nh os switch
|
||||
}
|
||||
|
||||
def rebuild-dry [] { nh os switch --dry }
|
||||
def rebuild-cop [] {
|
||||
nix flake update --flake ~/copland
|
||||
git -C ~/copland add -A
|
||||
git -C ~/copland commit -m $"flake update (date now | format date '%Y-%m-%d')"
|
||||
nh os switch
|
||||
}
|
||||
def extract [file: string] {
|
||||
let ext = ($file | path parse | get extension)
|
||||
match $ext {
|
||||
"gz" => { tar xzf $file },
|
||||
"bz2" => { tar xjf $file },
|
||||
"tar" => { tar xf $file },
|
||||
"zip" => { unzip $file },
|
||||
"7z" => { 7z x $file },
|
||||
"rar" => { unrar e $file },
|
||||
_ => { print $"'($file)' can't be extracted" }
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user