przystosowanie konfiguracji pod siebie
This commit is contained in:
@@ -5,7 +5,9 @@
|
||||
kernelPackages = pkgs.linuxPackages_zen;
|
||||
kernelModules = [ "v4l2loopback" ];
|
||||
extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ];
|
||||
kernel.sysctl = { "vm.max_map_count" = 2147483642; };
|
||||
kernel.sysctl = {
|
||||
"vm.max_map_count" = 2147483642;
|
||||
};
|
||||
loader.systemd-boot.enable = true;
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
# Appimage Support
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
# Import the host-specific variables.nix
|
||||
vars = import ../../hosts/${host}/variables.nix;
|
||||
in
|
||||
{
|
||||
@@ -16,11 +15,9 @@ in
|
||||
./network.nix
|
||||
./nfs.nix
|
||||
./nh.nix
|
||||
#./quickshell.nix #Disabled for now not using it yet
|
||||
./packages.nix
|
||||
./printing.nix
|
||||
# Conditionally import the display manager module
|
||||
(if vars.displayManager == "tui" then ./greetd.nix else ./sddm.nix)
|
||||
./greetd.nix
|
||||
./security.nix
|
||||
./services.nix
|
||||
./steam.nix
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{ pkgs, ... }: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = [ pkgs.xdg-desktop-portal-hyprland ];
|
||||
@@ -7,24 +8,12 @@
|
||||
services = {
|
||||
flatpak = {
|
||||
enable = true;
|
||||
|
||||
# List the Flatpak applications you want to install
|
||||
# Use the official Flatpak application ID (e.g., from flathub.org)
|
||||
# Examples:
|
||||
packages = [
|
||||
#"com.github.tchx84.Flatseal" #Manage flatpak permissions - should always have this
|
||||
#"com.rtosta.zapzap" # WhatsApp client
|
||||
#"io.github.flattool.Warehouse" # Manage flatpaks, clean data, remove flatpaks and deps
|
||||
#"it.mijorus.gearlever" # Manage and support AppImages
|
||||
#"io.github.freedoom.Phase1" # Classic Doom FPS 1
|
||||
#"io.github.freedoom.Phase2" # Classic Doom FPS 2
|
||||
#"io.github.dvlv.boxbuddyrs" # Manage distroboxes
|
||||
#"de.schmidhuberj.tubefeeder" #watch YT videos
|
||||
|
||||
# Add other Flatpak IDs here, e.g., "org.mozilla.firefox"
|
||||
"org.vinegarhq.Sober"
|
||||
"io.github.flattool.Warehouse"
|
||||
"com.github.tchx84.Flatseal"
|
||||
];
|
||||
|
||||
# Optional: Automatically update Flatpaks when you run nixos-rebuild swit ch
|
||||
update.onActivation = true;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
fonts = {
|
||||
packages = with pkgs; [
|
||||
dejavu_fonts
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
{ pkgs
|
||||
, username
|
||||
, ...
|
||||
}: {
|
||||
{
|
||||
pkgs,
|
||||
username,
|
||||
...
|
||||
}:
|
||||
{
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
#vt = 3;
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
{ pkgs
|
||||
, host
|
||||
, options
|
||||
, ...
|
||||
{
|
||||
pkgs,
|
||||
host,
|
||||
options,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (import ../../hosts/${host}/variables.nix) hostId;
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
{ pkgs
|
||||
, username
|
||||
, ...
|
||||
}: {
|
||||
{
|
||||
pkgs,
|
||||
username,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
clean = {
|
||||
|
||||
@@ -6,13 +6,9 @@
|
||||
}:
|
||||
{
|
||||
programs = {
|
||||
neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
};
|
||||
firefox.enable = false; # Firefox is not installed by default
|
||||
nano.enable = true;
|
||||
hyprland = {
|
||||
enable = true; # set this so desktop file is created
|
||||
enable = true;
|
||||
withUWSM = false;
|
||||
};
|
||||
dconf.enable = true;
|
||||
@@ -33,9 +29,9 @@
|
||||
# Hyprland systeminfo QT (Optional)
|
||||
#inputs.hyprsysteminfo.packages.${pkgs.system}.default
|
||||
|
||||
discord
|
||||
amfora # Fancy Terminal Browser For Gemini Protocol
|
||||
appimage-run # Needed For AppImage Support
|
||||
librewolf # Brave Browser
|
||||
brightnessctl # For Screen Brightness Control
|
||||
cliphist # Clipboard manager using rofi menu
|
||||
cmatrix # Matrix Movie Effect In Terminal
|
||||
@@ -78,10 +74,33 @@
|
||||
usbutils # Good Tools For USB Devices
|
||||
uwsm # Universal Wayland Session Manager (optional must be enabled)
|
||||
v4l-utils # Used For Things Like OBS Virtual Camera
|
||||
waypaper # wallpaper changer
|
||||
waypaper # wallpaper changer
|
||||
warp-terminal # Terminal with AI support build in
|
||||
wget # Tool For Fetching Files With Links
|
||||
ytmdl # Tool For Downloading Audio From YouTube
|
||||
nextcloud-client
|
||||
plexamp
|
||||
bitwarden-desktop
|
||||
tutanota-desktop
|
||||
slack
|
||||
ungoogled-chromium
|
||||
anki-bin
|
||||
onlyoffice-bin
|
||||
freetube
|
||||
mattermost-desktop
|
||||
kdePackages.kdenlive
|
||||
wineWowPackages.waylandFull # wine64
|
||||
lutris
|
||||
space-cadet-pinball
|
||||
dex
|
||||
exercism
|
||||
tty-solitaire
|
||||
cmatrix
|
||||
cowsay
|
||||
sl
|
||||
fortune
|
||||
ookla-speedtest
|
||||
kronometer
|
||||
inputs.prismlauncher-cracked.packages.${system}.default
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
# SDDM is a display manager for X11 and Wayland
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
foreground = config.stylix.base16Scheme.base00;
|
||||
textColor = config.stylix.base16Scheme.base05;
|
||||
sddm-astronaut = pkgs.sddm-astronaut.override {
|
||||
embeddedTheme = "pixel_sakura";
|
||||
themeConfig =
|
||||
if lib.hasSuffix "sakura_static.png" config.stylix.image
|
||||
then {
|
||||
FormPosition = "left";
|
||||
Blur = "2.0";
|
||||
}
|
||||
else if lib.hasSuffix "studio.png" config.stylix.image
|
||||
then {
|
||||
Background = pkgs.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/anotherhadi/nixy-wallpapers/refs/heads/main/wallpapers/studio.gif";
|
||||
sha256 = "sha256-qySDskjmFYt+ncslpbz0BfXiWm4hmFf5GPWF2NlTVB8=";
|
||||
};
|
||||
HeaderTextColor = "#${textColor}";
|
||||
DateTextColor = "#${textColor}";
|
||||
TimeTextColor = "#${textColor}";
|
||||
LoginFieldTextColor = "#${textColor}";
|
||||
PasswordFieldTextColor = "#${textColor}";
|
||||
UserIconColor = "#${textColor}";
|
||||
PasswordIconColor = "#${textColor}";
|
||||
WarningColor = "#${textColor}";
|
||||
LoginButtonBackgroundColor = "#${foreground}";
|
||||
SystemButtonsIconsColor = "#${foreground}";
|
||||
SessionButtonTextColor = "#${textColor}";
|
||||
VirtualKeyboardButtonTextColor = "#${textColor}";
|
||||
DropdownBackgroundColor = "#${foreground}";
|
||||
HighlightBackgroundColor = "#${textColor}";
|
||||
}
|
||||
else {
|
||||
FormPosition = "left";
|
||||
Blur = "4.0";
|
||||
Background = "${toString config.stylix.image}";
|
||||
HeaderTextColor = "#${textColor}";
|
||||
DateTextColor = "#${textColor}";
|
||||
TimeTextColor = "#${textColor}";
|
||||
LoginFieldTextColor = "#${textColor}";
|
||||
PasswordFieldTextColor = "#${textColor}";
|
||||
UserIconColor = "#${textColor}";
|
||||
PasswordIconColor = "#${textColor}";
|
||||
WarningColor = "#${textColor}";
|
||||
LoginButtonBackgroundColor = "#${config.stylix.base16Scheme.base01}";
|
||||
SystemButtonsIconsColor = "#${textColor}";
|
||||
SessionButtonTextColor = "#${textColor}";
|
||||
VirtualKeyboardButtonTextColor = "#${textColor}";
|
||||
DropdownBackgroundColor = "#${config.stylix.base16Scheme.base01}";
|
||||
HighlightBackgroundColor = "#${textColor}";
|
||||
FormBackgroundColor = "#${config.stylix.base16Scheme.base01}";
|
||||
};
|
||||
};
|
||||
in {
|
||||
services.displayManager = {
|
||||
sddm = {
|
||||
package = pkgs.kdePackages.sddm;
|
||||
extraPackages = [sddm-astronaut];
|
||||
enable = true;
|
||||
wayland.enable = true;
|
||||
theme = "sddm-astronaut-theme";
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = [sddm-astronaut];
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
{ profile, ... }: {
|
||||
{ profile, ... }:
|
||||
{
|
||||
# Services to start
|
||||
services = {
|
||||
libinput.enable = true; # Input Handling
|
||||
@@ -8,7 +9,7 @@
|
||||
enable = true; # Enable SSH
|
||||
settings = {
|
||||
PermitRootLogin = "no"; # Prevent root from SSH login
|
||||
PasswordAuthentication = true; #Users can SSH using kb and password
|
||||
PasswordAuthentication = true; # Users can SSH using kb and password
|
||||
KbdInteractiveAuthentication = true;
|
||||
};
|
||||
ports = [ 22 ];
|
||||
@@ -18,10 +19,7 @@
|
||||
gnome.gnome-keyring.enable = true;
|
||||
|
||||
smartd = {
|
||||
enable =
|
||||
if profile == "vm"
|
||||
then false
|
||||
else true;
|
||||
enable = if profile == "vm" then false else true;
|
||||
autodetect = true;
|
||||
};
|
||||
pipewire = {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{ ... }: {
|
||||
{ ... }:
|
||||
{
|
||||
programs = {
|
||||
starship = {
|
||||
enable = false;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{ pkgs, ... }: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs = {
|
||||
steam = {
|
||||
enable = true;
|
||||
@@ -16,5 +17,7 @@
|
||||
"--expose-wayland"
|
||||
];
|
||||
};
|
||||
|
||||
gamemode.enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{ pkgs
|
||||
, host
|
||||
, ...
|
||||
{
|
||||
pkgs,
|
||||
host,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (import ../../hosts/${host}/variables.nix) stylixImage;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{ username, ... }: {
|
||||
{ username, ... }:
|
||||
{
|
||||
services.syncthing = {
|
||||
enable = false;
|
||||
user = "${username}";
|
||||
|
||||
@@ -30,8 +30,8 @@ in
|
||||
};
|
||||
environment.variables = {
|
||||
NIXOS_OZONE_WL = "1";
|
||||
ZANEYOS_VERSION = "2.4";
|
||||
ZANEYOS = "true";
|
||||
GARANDOS_VERSION = "1.0";
|
||||
GARANDOS = "true";
|
||||
};
|
||||
console.keyMap = "${consoleKeyMap}";
|
||||
system.stateVersion = "23.11"; # Do not change!
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
{ host
|
||||
, pkgs
|
||||
, ...
|
||||
{
|
||||
host,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (import ../../hosts/${host}/variables.nix) thunarEnable;
|
||||
in
|
||||
{
|
||||
programs = {
|
||||
thunar = {
|
||||
enable = thunarEnable;
|
||||
enable = true;
|
||||
plugins = with pkgs.xfce; [
|
||||
thunar-archive-plugin
|
||||
thunar-volman
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
{ pkgs
|
||||
, inputs
|
||||
, username
|
||||
, host
|
||||
, profile
|
||||
, ...
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
username,
|
||||
host,
|
||||
profile,
|
||||
system,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (import ../../hosts/${host}/variables.nix) gitUsername;
|
||||
@@ -13,8 +15,16 @@ in
|
||||
home-manager = {
|
||||
useUserPackages = true;
|
||||
useGlobalPkgs = false;
|
||||
backupFileExtension = "backup";
|
||||
extraSpecialArgs = { inherit inputs username host profile; };
|
||||
backupFileExtension = "backup-nixos";
|
||||
extraSpecialArgs = {
|
||||
inherit
|
||||
inputs
|
||||
username
|
||||
host
|
||||
profile
|
||||
system
|
||||
;
|
||||
};
|
||||
users.${username} = {
|
||||
imports = [ ./../home ];
|
||||
home = {
|
||||
@@ -30,15 +40,16 @@ in
|
||||
description = "${gitUsername}";
|
||||
extraGroups = [
|
||||
"adbusers"
|
||||
"docker" #access to docker as non-root
|
||||
"libvirtd" #Virt manager/QEMU access
|
||||
"docker" # access to docker as non-root
|
||||
"libvirtd" # Virt manager/QEMU access
|
||||
"lp"
|
||||
"networkmanager"
|
||||
"scanner"
|
||||
"wheel" #subdo access
|
||||
"vboxusers" #Virtual Box
|
||||
"wheel" # subdo access
|
||||
"vboxusers" # Virtual Box
|
||||
"gamemode"
|
||||
];
|
||||
shell = pkgs.zsh;
|
||||
shell = pkgs.bash;
|
||||
ignoreShellProgramCheck = true;
|
||||
};
|
||||
nix.settings.allowed-users = [ "${username}" ];
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{ pkgs, ... }: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# Only enable either docker or podman -- Not both
|
||||
virtualisation = {
|
||||
docker = {
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
{ lib
|
||||
, pkgs
|
||||
, config
|
||||
, ...
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{ ...
|
||||
{
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
{ lib
|
||||
, pkgs
|
||||
, config
|
||||
, ...
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
with lib;
|
||||
let
|
||||
cfg = config.drivers.intel;
|
||||
in
|
||||
{
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
{ lib
|
||||
, pkgs
|
||||
, config
|
||||
, ...
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{ lib
|
||||
, pkgs
|
||||
, config
|
||||
, ...
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
@@ -18,7 +18,7 @@ in
|
||||
# Modesetting is required.
|
||||
modesetting.enable = true;
|
||||
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
||||
powerManagement.enable = false;
|
||||
powerManagement.enable = true;
|
||||
# Fine-grained power management. Turns off GPU when not in use.
|
||||
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
||||
powerManagement.finegrained = false;
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
{ lib
|
||||
, pkgs
|
||||
, config
|
||||
, ...
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
{ lib
|
||||
, pkgs
|
||||
, config
|
||||
, ...
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
@@ -15,6 +16,6 @@ in
|
||||
config = mkIf cfg.enable {
|
||||
services.qemuGuest.enable = true;
|
||||
services.spice-vdagentd.enable = true;
|
||||
services.spice-webdavd.enable = false; #Causes navfs2 build failure invalid neon version 9-12-25
|
||||
};
|
||||
services.spice-webdavd.enable = false; # Causes navfs2 build failure invalid neon version 9-12-25
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
{ lib, ... }: {
|
||||
programs.alacritty =
|
||||
let
|
||||
font_family = lib.mkForce "Maple Mono NF";
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
settings = {
|
||||
font = {
|
||||
normal = {
|
||||
family = font_family;
|
||||
style = "Regular";
|
||||
};
|
||||
bold = {
|
||||
family = font_family;
|
||||
style = "Bold";
|
||||
};
|
||||
italic = {
|
||||
family = font_family;
|
||||
style = "Italic";
|
||||
};
|
||||
bold_italic = {
|
||||
family = font_family;
|
||||
style = "Bold Italic";
|
||||
};
|
||||
size = 15;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
115
modules/home/bash-aliases.nix
Normal file
115
modules/home/bash-aliases.nix
Normal file
@@ -0,0 +1,115 @@
|
||||
{ profile, ... }:
|
||||
{
|
||||
programs.bash = {
|
||||
shellAliases = {
|
||||
# NixOS aliases
|
||||
upd = "nh os switch --hostname ${profile}";
|
||||
upg = "nh os switch --hostname ${profile} --update";
|
||||
upd-bt = "nh os boot --hostname ${profile}";
|
||||
upd-ts = "nh os test --hostname ${profile}";
|
||||
upd-bd = "nh os build --hostname ${profile}";
|
||||
ncg = "nix-collect-garbage --delete-old && sudo nix-collect-garbage -d && sudo /run/current-system/bin/switch-to-configuration boot";
|
||||
|
||||
# Development aliases
|
||||
srvenv = "source .venv/bin/activate";
|
||||
"..srvenv" = "source ../.venv/bin/activate";
|
||||
pm = "uv run manage.py";
|
||||
bbr = "bun --bun run";
|
||||
mkgidf = "git add . --intent-to-add . && git diff > git-diff.txt";
|
||||
snano = "sudo nano";
|
||||
zed = "MANGOHUD=0 /home/garand_plg/.local/bin/zed";
|
||||
|
||||
# System aliases
|
||||
flush-codium = "sudo killall codium && sudo rm -rf ~/.config/VSCodium/Cache && sudo rm -rf ~/.config/VSCodium/CachedData";
|
||||
kys = "shutdown now";
|
||||
ookla = "speedtest";
|
||||
snala = "sudo nala";
|
||||
|
||||
# Navigation aliases
|
||||
"~" = "cd ~";
|
||||
".." = "cd ..";
|
||||
"..." = "cd ../..";
|
||||
"...." = "cd ../../..";
|
||||
"....." = "cd ../../../..";
|
||||
|
||||
# Modifies commands
|
||||
cat = "bat";
|
||||
cp = "cp -i";
|
||||
mv = "mv -i";
|
||||
rm = "trash -v";
|
||||
mkdir = "mkdir -p";
|
||||
ps = "ps auxf";
|
||||
ping = "ping -c 10";
|
||||
less = "less -R";
|
||||
cls = "clear";
|
||||
multitail = "multitail --no-repeat -c";
|
||||
freshclam = "sudo freshclam";
|
||||
|
||||
# Alias"s for multiple directory listing commands
|
||||
la = "eza -alh --icons"; # show hidden files
|
||||
ls = "eza -aF --icons --color=always"; # add colors and file type extensions
|
||||
lx = "eza -lh --icons --sort=extension"; # sort by extension
|
||||
lk = "eza -lh --icons --sort=size --reverse"; # sort by size
|
||||
lc = "eza -lh --icons --sort=changed"; # sort by change time
|
||||
lu = "eza -lh --icons --sort=accessed"; # sort by access time
|
||||
lr = "eza -lh --icons --recurse"; # recursive ls
|
||||
lt = "eza -lh --icons --sort=modified"; # sort by date
|
||||
lm = "eza -alh --icons | more"; # pipe through "more"
|
||||
lw = "eza -xh --icons"; # wide listing format
|
||||
ll = "eza -lh --icons"; # long listing format
|
||||
labc = "eza -lah --icons --sort=name"; # alphabetical sort
|
||||
lf = "eza -lh --icons | grep -v '^d'"; # files only (przybliżenie)
|
||||
ldir = "eza -lh --icons --only-dirs"; # directories only
|
||||
lla = "eza -alh --icons"; # List and Hidden Files
|
||||
las = "eza -a --icons"; # Hidden Files
|
||||
lls = "eza -lh --icons"; # List
|
||||
|
||||
# chmod commands
|
||||
mx = "chmod a+x";
|
||||
"000" = "chmod -R 000";
|
||||
"644" = "chmod -R 644";
|
||||
"666" = "chmod -R 666";
|
||||
"755" = "chmod -R 755";
|
||||
"777" = "chmod -R 777";
|
||||
|
||||
# Search command line history
|
||||
h = "history | grep ";
|
||||
|
||||
# Search running processes
|
||||
p = "ps aux | grep ";
|
||||
topcpu = "/bin/ps -eo pcpu,pid,user,args | sort -k 1 -r | head -10";
|
||||
|
||||
# Search files in the current folder
|
||||
f = "find . | grep ";
|
||||
|
||||
# Count all files (recursively) in the current folder
|
||||
countfiles = "for t in files links directories; do echo \`find . -type \${t:0:1} | wc -l\` \$t; done 2> /dev/null";
|
||||
|
||||
# Alias"s to show disk space and space used in a folder
|
||||
diskspace = "du -S | sort -n -r |more";
|
||||
folders = "du -h --max-depth=1";
|
||||
folderssort = "find . -maxdepth 1 -type d -print0 | xargs -0 du -sk | sort -rn";
|
||||
tree = "tree -CAhF --dirsfirst";
|
||||
treed = "tree -CAFd";
|
||||
mountedinfo = "df -hT";
|
||||
|
||||
# Show all logs in /var/log
|
||||
logs = "sudo find /var/log -type f -exec file {} \; | grep 'text' | cut -d' ' -f1 | sed -e's/:$//g' | grep -v '[0-9]$' | xargs tail -f";
|
||||
|
||||
# fix kitty ssh connection
|
||||
kssh = "kitty +kitten ssh";
|
||||
|
||||
docker-clean = "docker container prune -f ; docker image prune -f ; docker network prune -f ; docker volume prune -f";
|
||||
|
||||
# Remove a directory and all files
|
||||
rmd = "/bin/rm --recursive --force --verbose ";
|
||||
|
||||
# Fun aliases
|
||||
pasjans = "ttysolitaire -p 10 --no-background-color";
|
||||
fc = "fortune | cowsay";
|
||||
|
||||
# Network aliases
|
||||
ssh-server = "kssh garand_plg@192.168.1.156 -i ~/.ssh/hp-t640-homeserver";
|
||||
};
|
||||
};
|
||||
}
|
||||
146
modules/home/bash-functions.nix
Normal file
146
modules/home/bash-functions.nix
Normal file
@@ -0,0 +1,146 @@
|
||||
_: {
|
||||
programs.bash = {
|
||||
bashrcExtra = ''
|
||||
# Quick directory creation and navigation
|
||||
mkcd() {
|
||||
mkdir -p "$1" && cd "$1"
|
||||
}
|
||||
|
||||
# Extract various archive formats
|
||||
extract() {
|
||||
for archive in "$@"; do
|
||||
if [ -f "$archive" ]; then
|
||||
case "$archive" in
|
||||
*.tar.bz2) tar xvjf "$archive" ;;
|
||||
*.tar.gz) tar xvzf "$archive" ;;
|
||||
*.bz2) bunzip2 "$archive" ;;
|
||||
*.rar) unrar x "$archive" ;;
|
||||
*.gz) gunzip "$archive" ;;
|
||||
*.tar) tar xvf "$archive" ;;
|
||||
*.tbz2) tar xvjf "$archive" ;;
|
||||
*.tgz) tar xvzf "$archive" ;;
|
||||
*.zip) unzip "$archive" ;;
|
||||
*.Z) uncompress "$archive" ;;
|
||||
*.7z) 7z x "$archive" ;;
|
||||
*) echo "don't know how to extract '$archive'..." ;;
|
||||
esac
|
||||
else
|
||||
echo "'$archive' is not a valid file!"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# Find files quickly
|
||||
ff() {
|
||||
find . -name "*$1*" -type f
|
||||
}
|
||||
|
||||
# Find directories quickly
|
||||
fd() {
|
||||
find . -name "*$1*" -type d
|
||||
}
|
||||
|
||||
# IP address lookup
|
||||
alias whatismyip="whatsmyip"
|
||||
function whatsmyip () {
|
||||
# Internal IP Lookup.
|
||||
if command -v ip &> /dev/null; then
|
||||
echo -n "Internal IP: "
|
||||
ip addr show wlan0 | grep "inet " | awk '{print $2}' | cut -d/ -f1
|
||||
else
|
||||
echo -n "Internal IP: "
|
||||
ifconfig wlan0 | grep "inet " | awk '{print $2}'
|
||||
fi
|
||||
|
||||
# External IP Lookup
|
||||
echo -n "External IP: "
|
||||
curl -4 ifconfig.me
|
||||
}
|
||||
|
||||
# Searches for text in all files in the current folder
|
||||
ftext() {
|
||||
# -i case-insensitive
|
||||
# -I ignore binary files
|
||||
# -H causes filename to be printed
|
||||
# -r recursive search
|
||||
# -n causes line number to be printed
|
||||
# optional: -F treat search term as a literal, not a regular expression
|
||||
# optional: -l only print filenames and not the matching lines ex. grep -irl "$1" *
|
||||
grep -iIHrn --color=always "$1" . | less -r
|
||||
}
|
||||
|
||||
# Copy file with a progress bar
|
||||
cpp() {
|
||||
set -e
|
||||
strace -q -ewrite cp -- "$1" "$2" 2>&1 |
|
||||
awk '{
|
||||
count += $NF
|
||||
if (count % 10 == 0) {
|
||||
percent = count / total_size * 100
|
||||
printf "%3d%% [", percent
|
||||
for (i=0;i<=percent;i++)
|
||||
printf "="
|
||||
printf ">"
|
||||
for (i=percent;i<100;i++)
|
||||
printf " "
|
||||
printf "]\r"
|
||||
}
|
||||
}
|
||||
END { print "" }' total_size="$(stat -c '%s' "$1")" count=0
|
||||
}
|
||||
|
||||
# Copy and go to the directory
|
||||
cpg() {
|
||||
if [ -d "$2" ]; then
|
||||
cp "$1" "$2" && cd "$2"
|
||||
else
|
||||
cp "$1" "$2"
|
||||
fi
|
||||
}
|
||||
|
||||
# Move and go to the directory
|
||||
mvg() {
|
||||
if [ -d "$2" ]; then
|
||||
mv "$1" "$2" && cd "$2"
|
||||
else
|
||||
mv "$1" "$2"
|
||||
fi
|
||||
}
|
||||
|
||||
# Create and go to the directory
|
||||
mkdirg() {
|
||||
mkdir -p "$1"
|
||||
cd "$1"
|
||||
}
|
||||
|
||||
# Goes up a specified number of directories (i.e. up 4)
|
||||
up() {
|
||||
local d=""
|
||||
limit=$1
|
||||
for ((i = 1; i <= limit; i++)); do
|
||||
d=$d/..
|
||||
done
|
||||
d=$(echo $d | sed 's/^\///')
|
||||
if [ -z "$d" ]; then
|
||||
d=..
|
||||
fi
|
||||
cd $d
|
||||
}
|
||||
|
||||
# Automatically do an ls after each cd, z, or zoxide
|
||||
cd ()
|
||||
{
|
||||
if [ -n "$1" ]; then
|
||||
builtin cd "$@" && ls
|
||||
else
|
||||
builtin cd ~ && ls
|
||||
fi
|
||||
}
|
||||
|
||||
# Returns the last 2 fields of the working directory
|
||||
pwdtail() {
|
||||
pwd | awk -F/ '{nlast = NF -1;print $nlast"/"$NF}'
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -1,22 +1,9 @@
|
||||
{ profile, ... }: {
|
||||
_: {
|
||||
programs.bash = {
|
||||
enable = false;
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
initExtra = ''
|
||||
fastfetch
|
||||
if [ -f $HOME/.bashrc-personal ]; then
|
||||
source $HOME/.bashrc-personal
|
||||
fi
|
||||
'';
|
||||
shellAliases = {
|
||||
sv = "sudo nvim";
|
||||
fr = "nh os switch --hostname ${profile}";
|
||||
fu = "nh os switch --hostname ${profile} --update";
|
||||
zu = "sh <(curl -L https://gitlab.com/Zaney/zaneyos/-/releases/latest/download/install-zaneyos.sh)";
|
||||
ncg = "nix-collect-garbage --delete-old && sudo nix-collect-garbage -d && sudo /run/current-system/bin/switch-to-configuration boot";
|
||||
v = "nvim";
|
||||
cat = "bat";
|
||||
".." = "cd ..";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
{ pkgs, ... }: {
|
||||
home.packages = with pkgs; [ bash ];
|
||||
|
||||
home.file."./.bashrc-personal".text = ''
|
||||
|
||||
# This file allows you to define your own aliases, functions, etc
|
||||
# below are just some examples of what you can use this file for
|
||||
|
||||
#!/usr/bin/env bash
|
||||
# Set defaults
|
||||
#
|
||||
#export EDITOR="nvim"
|
||||
#export VISUAL="nvim"
|
||||
|
||||
#alias c="clear"
|
||||
#eval "$(zoxide init bash)"
|
||||
#eval "$(oh-my-posh init bash --config $HOME/.config/powerlevel10k_rainbow.omp.json)"
|
||||
|
||||
'';
|
||||
}
|
||||
@@ -1,7 +1,9 @@
|
||||
{ pkgs
|
||||
, lib
|
||||
, ...
|
||||
}: {
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.bat = {
|
||||
enable = true;
|
||||
config = {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{ ... }: {
|
||||
{ ... }:
|
||||
{
|
||||
programs.bottom = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{ pkgs, ... }: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.btop = {
|
||||
enable = true;
|
||||
package = pkgs.btop.override {
|
||||
@@ -6,7 +7,6 @@
|
||||
cudaSupport = true;
|
||||
};
|
||||
settings = {
|
||||
vim_keys = true;
|
||||
rounded_corners = true;
|
||||
proc_tree = true;
|
||||
show_gpu_info = "on";
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{ config, ... }: {
|
||||
{ config, ... }:
|
||||
{
|
||||
programs.cava = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
||||
@@ -1,21 +1,14 @@
|
||||
{ host, ... }:
|
||||
let
|
||||
inherit (import ../../hosts/${host}/variables.nix)
|
||||
alacrittyEnable
|
||||
ghosttyEnable
|
||||
tmuxEnable
|
||||
waybarChoice
|
||||
weztermEnable
|
||||
vscodeEnable
|
||||
helixEnable
|
||||
doomEmacsEnable
|
||||
;
|
||||
inherit (import ../../hosts/${host}/variables.nix) waybarChoice;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
waybarChoice
|
||||
./amfora.nix
|
||||
./bash.nix
|
||||
./bashrc-personal.nix
|
||||
./bash-aliases.nix
|
||||
./bash-functions.nix
|
||||
./bat.nix
|
||||
./btop.nix
|
||||
./bottom.nix
|
||||
@@ -31,40 +24,24 @@ in
|
||||
./hyprland
|
||||
./kitty.nix
|
||||
./lazygit.nix
|
||||
./librewolf.nix
|
||||
./obs-studio.nix
|
||||
./nvf.nix
|
||||
./obs-studio.nix
|
||||
./rofi
|
||||
./qt.nix
|
||||
./ssh.nix
|
||||
./scripts
|
||||
./scripts/gemini-cli.nix
|
||||
#./starship.nix
|
||||
#./starship-ddubs-1.nix
|
||||
./starship.nix
|
||||
./stylix.nix
|
||||
./swappy.nix
|
||||
./swaync.nix
|
||||
./tealdeer.nix
|
||||
./virtmanager.nix
|
||||
waybarChoice
|
||||
./wlogout
|
||||
./xdg.nix
|
||||
./yazi
|
||||
./zoxide.nix
|
||||
./zsh
|
||||
]
|
||||
++ (if helixEnable then [ ./evil-helix.nix ] else [ ])
|
||||
++ (if vscodeEnable then [ ./vscode.nix ] else [ ])
|
||||
++ (
|
||||
if doomEmacsEnable then
|
||||
[
|
||||
./editors/doom-emacs-install.nix
|
||||
./editors/doom-emacs.nix
|
||||
]
|
||||
else
|
||||
[ ]
|
||||
)
|
||||
++ (if weztermEnable then [ ./wezterm.nix ] else [ ])
|
||||
++ (if ghosttyEnable then [ ./ghostty.nix ] else [ ])
|
||||
++ (if tmuxEnable then [ ./tmux.nix ] else [ ])
|
||||
++ (if alacrittyEnable then [ ./alacritty.nix ] else [ ]);
|
||||
./vscode.nix
|
||||
# ./zed.nix
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
doom-icon = pkgs.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/jeetelongname/doom-banners/master/splashes/doom/doom-emacs-color2.svg";
|
||||
sha256 = "1xxi5ra1z8njsqaqiaq96wyn1sc967l42kvjzbji1zrjj8za6bgq";
|
||||
};
|
||||
in
|
||||
{
|
||||
# 1. Create a script to install Doom Emacs
|
||||
home.packages = [
|
||||
(pkgs.writeShellScriptBin "get-doom" ''
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
# --- Icons ---
|
||||
ICON_CHECK="✔"
|
||||
ICON_INFO="ℹ"
|
||||
ICON_ROCKET="🚀"
|
||||
|
||||
# --- Helper Functions ---
|
||||
print_status() {
|
||||
echo
|
||||
echo "--- $ICON_INFO $1 ---"
|
||||
}
|
||||
|
||||
print_success() {
|
||||
echo "--- $ICON_CHECK $1 ---"
|
||||
}
|
||||
|
||||
print_banner() {
|
||||
echo "==============================="
|
||||
echo " Doom Emacs Installer $ICON_ROCKET"
|
||||
echo "==============================="
|
||||
}
|
||||
|
||||
# --- Main Script ---
|
||||
print_banner
|
||||
EMACSDIR="$HOME/.emacs.d"
|
||||
|
||||
if [ -d "$EMACSDIR" ]; then
|
||||
print_success "Doom Emacs is already installed."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
print_status "Cloning Doom Emacs..."
|
||||
git clone --depth 1 https://github.com/doomemacs/doomemacs "$EMACSDIR"
|
||||
print_success "Doom Emacs cloned."
|
||||
|
||||
print_status "Running Doom install..."
|
||||
"$EMACSDIR/bin/doom" install
|
||||
print_success "Doom install complete."
|
||||
|
||||
print_status "Running doom sync..."
|
||||
"$EMACSDIR/bin/doom" sync
|
||||
print_success "Doom sync complete."
|
||||
|
||||
echo
|
||||
print_success "All done! Doom Emacs is ready to use."
|
||||
'')
|
||||
];
|
||||
|
||||
# 2. Add the bin directory to the PATH
|
||||
home.sessionPath = [
|
||||
"$HOME/.emacs.d/bin"
|
||||
];
|
||||
|
||||
# 3. Create a desktop file
|
||||
xdg.desktopEntries.doom-emacs = {
|
||||
name = "Doom Emacs";
|
||||
comment = "A configuration framework for GNU Emacs";
|
||||
exec = "emacs";
|
||||
icon = doom-icon;
|
||||
terminal = false;
|
||||
type = "Application";
|
||||
categories = [ "Development" "TextEditor" ];
|
||||
};
|
||||
}
|
||||
@@ -1,162 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
emacs-gtk
|
||||
git
|
||||
lazygit
|
||||
ripgrep
|
||||
libtool
|
||||
cmake
|
||||
pkg-config
|
||||
# Spell checking
|
||||
hunspell
|
||||
hunspellDicts.en_US
|
||||
hunspellDicts.en_AU
|
||||
hunspellDicts.es_ES
|
||||
# LSP servers
|
||||
clang-tools # C/C++ LSP
|
||||
nil # Nix LSP
|
||||
];
|
||||
|
||||
home.file.".doom.d/init.el".text = ''
|
||||
;;; init.el -*- lexical-binding: t; -*-
|
||||
|
||||
(doom!
|
||||
:completion
|
||||
(company +auto)
|
||||
(vertico +icons)
|
||||
|
||||
:ui
|
||||
doom
|
||||
doom-dashboard
|
||||
doom-quit
|
||||
hl-todo
|
||||
modeline
|
||||
nav-flash
|
||||
ophints
|
||||
(popup +defaults)
|
||||
(ligatures +extra)
|
||||
tabs
|
||||
treemacs
|
||||
vi-tilde-fringe
|
||||
window-select
|
||||
|
||||
:editor
|
||||
(evil +everywhere)
|
||||
file-templates
|
||||
fold
|
||||
multiple-cursors
|
||||
snippets
|
||||
word-wrap
|
||||
|
||||
:emacs
|
||||
(dired +icons)
|
||||
electric
|
||||
(ibuffer +icons)
|
||||
(undo +tree)
|
||||
vc
|
||||
|
||||
:term
|
||||
vterm
|
||||
|
||||
:checkers
|
||||
(syntax +flymake)
|
||||
(spell +flyspell)
|
||||
grammar
|
||||
|
||||
:tools
|
||||
(eval +overlay)
|
||||
(lookup +docsets)
|
||||
lsp
|
||||
(magit +forge)
|
||||
pdf
|
||||
tree-sitter
|
||||
|
||||
:lang
|
||||
bash
|
||||
(c +lsp)
|
||||
css
|
||||
docker
|
||||
html
|
||||
(json +lsp)
|
||||
markdown
|
||||
(nix +tree-sitter +lsp)
|
||||
toml
|
||||
yaml
|
||||
|
||||
:config
|
||||
(default +bindings +smartparens))
|
||||
'';
|
||||
|
||||
home.file.".doom.d/config.el".text = ''
|
||||
;;; config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(setq doom-theme 'doom-one)
|
||||
(setq display-line-numbers-type 'relative)
|
||||
(setq nerd-icons-font-family "JetBrainsMono Nerd Font")
|
||||
|
||||
;; Git configuration
|
||||
(after! magit
|
||||
;; Set default git editor to emacsclient
|
||||
(setq with-editor-emacsclient-executable "emacsclient")
|
||||
;; Show word-granularity differences within diff hunks
|
||||
(setq magit-diff-refine-hunk t)
|
||||
;; Auto-refresh magit buffers
|
||||
(setq magit-refresh-status-buffer t))
|
||||
|
||||
;; Lazygit integration
|
||||
(defun my/lazygit ()
|
||||
"Open lazygit in a terminal."
|
||||
(interactive)
|
||||
(if (fboundp 'vterm)
|
||||
(let ((default-directory (magit-toplevel)))
|
||||
(vterm "*lazygit*")
|
||||
(vterm-send-string "lazygit")
|
||||
(vterm-send-return))
|
||||
(async-shell-command "lazygit" "*lazygit*")))
|
||||
|
||||
;; LSP configuration
|
||||
(after! lsp-mode
|
||||
(setq lsp-signature-auto-activate t
|
||||
lsp-signature-render-documentation t
|
||||
lsp-completion-provider :company-capf
|
||||
lsp-idle-delay 0.1))
|
||||
|
||||
;; Nix LSP (nil) configuration
|
||||
(with-eval-after-load 'lsp-nix-nil
|
||||
(setq lsp-nix-nil-auto-eval-inputs t))
|
||||
|
||||
;; Company completion settings
|
||||
(after! company
|
||||
(setq company-idle-delay 0.2
|
||||
company-minimum-prefix-length 1
|
||||
company-tooltip-align-annotations t
|
||||
company-require-match 'never))
|
||||
|
||||
;; Spell checking configuration
|
||||
(after! ispell
|
||||
(setq ispell-program-name "hunspell")
|
||||
(setq ispell-local-dictionary "en_US")
|
||||
(setq ispell-local-dictionary-alist
|
||||
'(("en_US" "[[:alpha:]]" "[^[:alpha:]]" "[']" nil ("-d" "en_US") nil utf-8))))
|
||||
|
||||
;; Git keybindings
|
||||
(map! :leader
|
||||
(:prefix-map ("g" . "git")
|
||||
:desc "Magit status" "g" #'magit-status
|
||||
:desc "Magit dispatch" "d" #'magit-dispatch
|
||||
:desc "Magit file dispatch" "f" #'magit-file-dispatch
|
||||
:desc "Magit blame" "b" #'magit-blame-addition
|
||||
:desc "Git time machine" "t" #'git-timemachine-toggle
|
||||
:desc "Lazygit" "l" #'my/lazygit
|
||||
:desc "Git stage file" "s" #'magit-stage-file
|
||||
:desc "Git unstage file" "u" #'magit-unstage-file))
|
||||
'';
|
||||
|
||||
home.file.".doom.d/packages.el".text = ''
|
||||
;;; packages.el -*- lexical-binding: t; -*-
|
||||
|
||||
;; Git-related packages
|
||||
(package! git-timemachine)
|
||||
'';
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
{ ... }: {
|
||||
{ ... }:
|
||||
{
|
||||
home.file.".config/.emoji".text = ''
|
||||
😀 grinning face face smile happy joy :D grin
|
||||
😃 grinning face with big eyes face happy joy haha :D :) smile funny
|
||||
|
||||
@@ -1,89 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
enableEvilHelix = true; # Set to true to enable the configuration
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; (
|
||||
if enableEvilHelix
|
||||
then [
|
||||
evil-helix
|
||||
cmake-language-server
|
||||
jsonnet-language-server
|
||||
luaformatter
|
||||
lua-language-server
|
||||
marksman
|
||||
taplo
|
||||
nil
|
||||
jq-lsp
|
||||
vscode-langservers-extracted
|
||||
bash-language-server
|
||||
awk-language-server
|
||||
vscode-extensions.llvm-vs-code-extensions.vscode-clangd
|
||||
clang-tools
|
||||
docker-compose-language-service
|
||||
docker-compose
|
||||
docker-language-server
|
||||
typescript-language-server
|
||||
]
|
||||
else [ ]
|
||||
);
|
||||
|
||||
home.file.".config/helix/languages.toml".text =
|
||||
if enableEvilHelix
|
||||
then ''
|
||||
[language-server.nil]
|
||||
command = "nil"
|
||||
|
||||
[language-server.lua]
|
||||
command = "lua-language-server"
|
||||
|
||||
[language-server.json]
|
||||
command = "vscode-json-languageserver"
|
||||
|
||||
[language-server.markdown]
|
||||
command = "marksman"
|
||||
''
|
||||
else "";
|
||||
|
||||
home.file.".config/helix/config.toml".text =
|
||||
if enableEvilHelix
|
||||
then ''
|
||||
theme = "catppuccin_mocha"
|
||||
#theme = "ao"
|
||||
|
||||
[editor]
|
||||
evil = true
|
||||
end-of-line-diagnostics = "hint"
|
||||
auto-pairs = true
|
||||
mouse = true
|
||||
middle-click-paste = true
|
||||
shell = ["zsh", "-c"]
|
||||
line-number = "absolute"
|
||||
auto-completion = true
|
||||
path-completion = true
|
||||
auto-info = true
|
||||
color-modes = true
|
||||
popup-border = "all"
|
||||
clipboard-provider = "wayland"
|
||||
indent-heuristic = "hybrid"
|
||||
|
||||
[editor.statusline]
|
||||
left = ["mode", "spinner"]
|
||||
center = ["file-absolute-path", "total-line-numbers", "read-only-indicator", "file-modification-indicator"]
|
||||
right = ["diagnostics", "selections", "position", "file-encoding", "file-line-ending", "file-type"]
|
||||
separator = "│"
|
||||
mode.normal = "NORMAL"
|
||||
mode.insert = "INSERT"
|
||||
mode.select = "SELECT"
|
||||
|
||||
[editor.lsp]
|
||||
enable = true
|
||||
display-messages = true
|
||||
display-progress-messages = true
|
||||
|
||||
[editor.inline-diagnostics]
|
||||
cursor-line = "hint"
|
||||
other-lines = "hint"
|
||||
''
|
||||
else "";
|
||||
}
|
||||
@@ -4,8 +4,6 @@
|
||||
enable = true;
|
||||
icons = "auto";
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
enableFishIntegration = true;
|
||||
git = true;
|
||||
|
||||
extraOptions = [
|
||||
@@ -19,12 +17,4 @@
|
||||
"--hyperlink" # make paths clickable in some terminals
|
||||
];
|
||||
};
|
||||
# Aliases to make `ls`, `ll`, `la` use eza
|
||||
home.shellAliases = {
|
||||
ls = "eza";
|
||||
lt = "eza --tree --level=2";
|
||||
ll = "eza -lh --no-user --long";
|
||||
la = "eza -lah ";
|
||||
tree = "eza --tree ";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,3 +1,140 @@
|
||||
# {
|
||||
# programs.fastfetch = {
|
||||
# enable = true;
|
||||
|
||||
# settings = {
|
||||
# display = {
|
||||
# color = {
|
||||
# keys = "35";
|
||||
# output = "95";
|
||||
# };
|
||||
# separator = " ➜ ";
|
||||
# };
|
||||
|
||||
# logo = {
|
||||
# source = ./garandos.png;
|
||||
# type = "kitty-direct";
|
||||
# height = 10;
|
||||
# width = 20;
|
||||
# padding = {
|
||||
# top = 2;
|
||||
# left = 2;
|
||||
# };
|
||||
# };
|
||||
|
||||
# modules = [
|
||||
# "break"
|
||||
# {
|
||||
# type = "os";
|
||||
# key = "OS";
|
||||
# keyColor = "31";
|
||||
# }
|
||||
# {
|
||||
# type = "command";
|
||||
# key = " ├ GarandOS ";
|
||||
# keyColor = "31";
|
||||
# text = "echo v$" + "{GARANDOS_VERSION}";
|
||||
# }
|
||||
# {
|
||||
# type = "kernel";
|
||||
# key = " ├ ";
|
||||
# keyColor = "31";
|
||||
# }
|
||||
# {
|
||||
# type = "packages";
|
||||
# key = " ├ ";
|
||||
# keyColor = "31";
|
||||
# }
|
||||
# {
|
||||
# type = "shell";
|
||||
# key = " └ ";
|
||||
# keyColor = "31";
|
||||
# }
|
||||
# "break"
|
||||
# {
|
||||
# type = "wm";
|
||||
# key = "WM ";
|
||||
# keyColor = "32";
|
||||
# }
|
||||
# {
|
||||
# type = "wmtheme";
|
||||
# key = " ├ ";
|
||||
# keyColor = "32";
|
||||
# }
|
||||
# {
|
||||
# type = "icons";
|
||||
# key = " ├ ";
|
||||
# keyColor = "32";
|
||||
# }
|
||||
# {
|
||||
# type = "cursor";
|
||||
# key = " ├ ";
|
||||
# keyColor = "32";
|
||||
# }
|
||||
# {
|
||||
# type = "terminal";
|
||||
# key = " ├ ";
|
||||
# keyColor = "32";
|
||||
# }
|
||||
# {
|
||||
# type = "terminalfont";
|
||||
# key = " └ ";
|
||||
# keyColor = "32";
|
||||
# }
|
||||
# "break"
|
||||
# {
|
||||
# type = "host";
|
||||
# format = "{5} {1} Type {2}";
|
||||
# key = "PC ";
|
||||
# keyColor = "33";
|
||||
# }
|
||||
# {
|
||||
# type = "cpu";
|
||||
# format = "{1} ({3}) @ {7} GHz";
|
||||
# key = " ├ ";
|
||||
# keyColor = "33";
|
||||
# }
|
||||
# {
|
||||
# type = "gpu";
|
||||
# format = "{1} {2} @ {12} GHz";
|
||||
# key = " ├ ";
|
||||
# keyColor = "33";
|
||||
# }
|
||||
# {
|
||||
# type = "memory";
|
||||
# key = " ├ ";
|
||||
# keyColor = "33";
|
||||
# }
|
||||
# {
|
||||
# type = "disk";
|
||||
# key = " ├ ";
|
||||
# keyColor = "33";
|
||||
# }
|
||||
# {
|
||||
# type = "monitor";
|
||||
# key = " ├ ";
|
||||
# keyColor = "33";
|
||||
# }
|
||||
# {
|
||||
# type = "player";
|
||||
# key = " ├ ";
|
||||
# keyColor = "33";
|
||||
# }
|
||||
# {
|
||||
# type = "media";
|
||||
# key = " └ ";
|
||||
# keyColor = "33";
|
||||
# }
|
||||
# "break"
|
||||
# {
|
||||
# type = "uptime";
|
||||
# key = " Uptime ";
|
||||
# }
|
||||
# ];
|
||||
# };
|
||||
# };
|
||||
# }
|
||||
|
||||
{
|
||||
programs.fastfetch = {
|
||||
enable = true;
|
||||
@@ -6,130 +143,178 @@
|
||||
display = {
|
||||
color = {
|
||||
keys = "35";
|
||||
output = "95";
|
||||
output = "90";
|
||||
};
|
||||
separator = " ➜ ";
|
||||
};
|
||||
|
||||
logo = {
|
||||
source = ./nixos.png;
|
||||
source = ./garandos.png;
|
||||
type = "kitty-direct";
|
||||
height = 10;
|
||||
width = 20;
|
||||
height = 15;
|
||||
width = 30;
|
||||
padding = {
|
||||
top = 2;
|
||||
left = 2;
|
||||
top = 3;
|
||||
left = 3;
|
||||
};
|
||||
};
|
||||
|
||||
modules = [
|
||||
"break"
|
||||
{
|
||||
type = "os";
|
||||
key = "OS";
|
||||
keyColor = "31";
|
||||
type = "custom";
|
||||
format = "┌─────────────────────────────────Hardware────────────────────────────────┐";
|
||||
}
|
||||
{
|
||||
type = "command";
|
||||
key = " ├ ZaneyOS ";
|
||||
keyColor = "31";
|
||||
text = "echo v$" + "{ZANEYOS_VERSION}";
|
||||
}
|
||||
{
|
||||
type = "kernel";
|
||||
key = " ├ ";
|
||||
keyColor = "31";
|
||||
}
|
||||
{
|
||||
type = "packages";
|
||||
key = " ├ ";
|
||||
keyColor = "31";
|
||||
}
|
||||
{
|
||||
type = "shell";
|
||||
key = " └ ";
|
||||
keyColor = "31";
|
||||
}
|
||||
"break"
|
||||
{
|
||||
type = "wm";
|
||||
key = "WM ";
|
||||
keyColor = "32";
|
||||
}
|
||||
{
|
||||
type = "wmtheme";
|
||||
key = " ├ ";
|
||||
keyColor = "32";
|
||||
}
|
||||
{
|
||||
type = "icons";
|
||||
key = " ├ ";
|
||||
keyColor = "32";
|
||||
}
|
||||
{
|
||||
type = "cursor";
|
||||
key = " ├ ";
|
||||
keyColor = "32";
|
||||
}
|
||||
{
|
||||
type = "terminal";
|
||||
key = " ├ ";
|
||||
keyColor = "32";
|
||||
}
|
||||
{
|
||||
type = "terminalfont";
|
||||
key = " └ ";
|
||||
keyColor = "32";
|
||||
}
|
||||
"break"
|
||||
{
|
||||
type = "host";
|
||||
format = "{5} {1} Type {2}";
|
||||
key = "PC ";
|
||||
key = "│ PC";
|
||||
keyColor = "33";
|
||||
}
|
||||
{
|
||||
type = "cpu";
|
||||
format = "{1} ({3}) @ {7} GHz";
|
||||
key = " ├ ";
|
||||
key = "│ ├ ";
|
||||
keyColor = "33";
|
||||
}
|
||||
{
|
||||
type = "gpu";
|
||||
format = "{1} {2} @ {12} GHz";
|
||||
key = " ├ ";
|
||||
key = "│ ├ ";
|
||||
keyColor = "33";
|
||||
}
|
||||
{
|
||||
type = "memory";
|
||||
key = " ├ ";
|
||||
key = "│ ├ ";
|
||||
keyColor = "33";
|
||||
}
|
||||
{
|
||||
type = "swap";
|
||||
key = "│ ├ ";
|
||||
keyColor = "33";
|
||||
}
|
||||
{
|
||||
type = "disk";
|
||||
key = " ├ ";
|
||||
key = "│ ├ ";
|
||||
keyColor = "33";
|
||||
}
|
||||
{
|
||||
type = "monitor";
|
||||
key = " ├ ";
|
||||
key = "│ └ ";
|
||||
keyColor = "33";
|
||||
}
|
||||
{
|
||||
type = "player";
|
||||
key = " ├ ";
|
||||
keyColor = "33";
|
||||
}
|
||||
{
|
||||
type = "media";
|
||||
key = " └ ";
|
||||
keyColor = "33";
|
||||
type = "custom";
|
||||
format = "└──────────────────────────────────────────────────────────────────────────┘";
|
||||
}
|
||||
|
||||
"break"
|
||||
{
|
||||
type = "uptime";
|
||||
key = " Uptime ";
|
||||
type = "custom";
|
||||
format = "┌─────────────────────────────────Software─────────────────────────────────┐";
|
||||
}
|
||||
{
|
||||
type = "os";
|
||||
key = "│ OS";
|
||||
keyColor = "31";
|
||||
}
|
||||
{
|
||||
type = "command";
|
||||
key = "│ ├ ";
|
||||
keyColor = "31";
|
||||
text = "echo GarandOS v$" + "{GARANDOS_VERSION}";
|
||||
}
|
||||
{
|
||||
type = "kernel";
|
||||
key = "│ ├ ";
|
||||
keyColor = "31";
|
||||
}
|
||||
{
|
||||
type = "packages";
|
||||
key = "│ ├ ";
|
||||
keyColor = "31";
|
||||
}
|
||||
{
|
||||
type = "shell";
|
||||
key = "│ └ ";
|
||||
keyColor = "31";
|
||||
}
|
||||
{
|
||||
type = "wm";
|
||||
key = "│ WM";
|
||||
keyColor = "32";
|
||||
}
|
||||
{
|
||||
type = "wmtheme";
|
||||
key = "│ ├ ";
|
||||
keyColor = "32";
|
||||
}
|
||||
{
|
||||
type = "icons";
|
||||
key = "│ ├ ";
|
||||
keyColor = "32";
|
||||
}
|
||||
{
|
||||
type = "cursor";
|
||||
key = "│ ├ ";
|
||||
keyColor = "32";
|
||||
}
|
||||
{
|
||||
type = "terminal";
|
||||
key = "│ ├ ";
|
||||
keyColor = "32";
|
||||
}
|
||||
{
|
||||
type = "terminalfont";
|
||||
key = "│ └ ";
|
||||
keyColor = "32";
|
||||
}
|
||||
{
|
||||
type = "custom";
|
||||
format = "└──────────────────────────────────────────────────────────────────────────┘";
|
||||
}
|
||||
|
||||
"break"
|
||||
{
|
||||
type = "custom";
|
||||
format = "┌───────────────────────────────Age / Uptime───────────────────────────────┐";
|
||||
}
|
||||
{
|
||||
type = "command";
|
||||
key = "│ IN";
|
||||
text =
|
||||
#bash
|
||||
''
|
||||
birth_install=$(stat -c %W /)
|
||||
if [ "$birth_install" -gt 0 ]; then
|
||||
echo "Installed $(date -d @"$birth_install" +"%Y-%m-%d")"
|
||||
else
|
||||
echo "Installation date unknown"
|
||||
fi
|
||||
'';
|
||||
}
|
||||
{
|
||||
type = "command";
|
||||
key = "│ ├ ";
|
||||
text =
|
||||
#bash
|
||||
''
|
||||
birth_install=$(stat -c %W /)
|
||||
current=$(date +%s)
|
||||
delta=$((current - birth_install))
|
||||
delta_days=$((delta / 86400))
|
||||
echo $delta_days days
|
||||
'';
|
||||
}
|
||||
{
|
||||
type = "uptime";
|
||||
key = "│ └ ";
|
||||
}
|
||||
{
|
||||
type = "custom";
|
||||
format = "└──────────────────────────────────────────────────────────────────────────┘";
|
||||
}
|
||||
"break"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
BIN
modules/home/fastfetch/garandos.png
Normal file
BIN
modules/home/fastfetch/garandos.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 96 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 78 KiB |
@@ -1,7 +1,8 @@
|
||||
# Fzf is a general-purpose command-line fuzzy finder.
|
||||
{ config
|
||||
, lib
|
||||
, ...
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
accent = "#" + config.lib.stylix.colors.base0D;
|
||||
@@ -11,7 +12,7 @@ in
|
||||
{
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
enableBashIntegration = true;
|
||||
colors = lib.mkForce {
|
||||
"fg+" = accent;
|
||||
"bg+" = "-1";
|
||||
@@ -29,7 +30,7 @@ in
|
||||
"--prompt='/ '"
|
||||
"-i"
|
||||
"--no-bold"
|
||||
"--bind='enter:execute(nvim {})'"
|
||||
"--bind='enter:execute(nano {})'"
|
||||
"--preview='bat --style=numbers --color=always --line-range :500 {}'"
|
||||
"--preview-window=right:60%:wrap"
|
||||
];
|
||||
|
||||
@@ -1,100 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
# A recent issue 7/7/2025 w/ghostty causes it to hang or respond slowly
|
||||
# This is a workaround until a fix is released
|
||||
myGhostty = pkgs.ghostty.overrideAttrs (_: {
|
||||
preBuild = ''
|
||||
shopt -s globstar
|
||||
sed -i 's/^const xev = @import("xev");$/const xev = @import("xev").Epoll;/' **/*.zig
|
||||
shopt -u globstar
|
||||
'';
|
||||
});
|
||||
in
|
||||
{
|
||||
programs.ghostty = {
|
||||
enable = true;
|
||||
package = myGhostty; # to fix a but in current builds of ghostty
|
||||
#package = pkgs.ghostty;
|
||||
};
|
||||
home.file."./.config/ghostty/config".text = ''
|
||||
|
||||
#theme = Aura
|
||||
theme = Dracula
|
||||
#theme = Aardvark Blue
|
||||
#theme = GruvboxDarkHard
|
||||
adjust-cell-height = 10%
|
||||
window-theme = dark
|
||||
window-height = 32
|
||||
window-width = 110
|
||||
background-opacity = 0.95
|
||||
background-blur-radius = 60
|
||||
selection-background = #2d3f76
|
||||
selection-foreground = #c8d3f5
|
||||
cursor-style = bar
|
||||
mouse-hide-while-typing = true
|
||||
|
||||
# keybindings
|
||||
# Copy/Paste
|
||||
keybind = ctrl+shift+c=copy_to_clipboard
|
||||
keybind = ctrl+shift+v=paste_from_clipboard
|
||||
|
||||
keybind = alt+s>r=reload_config
|
||||
keybind = alt+s>x=close_surface
|
||||
|
||||
keybind = alt+s>n=new_window
|
||||
|
||||
# tabs
|
||||
keybind = alt+s>c=new_tab
|
||||
keybind = alt+s>shift+l=next_tab
|
||||
keybind = alt+s>shift+h=previous_tab
|
||||
keybind = alt+s>comma=move_tab:-1
|
||||
keybind = alt+s>period=move_tab:1
|
||||
|
||||
# quick tab switch
|
||||
keybind = alt+s>1=goto_tab:1
|
||||
keybind = alt+s>2=goto_tab:2
|
||||
keybind = alt+s>3=goto_tab:3
|
||||
keybind = alt+s>4=goto_tab:4
|
||||
keybind = alt+s>5=goto_tab:5
|
||||
keybind = alt+s>6=goto_tab:6
|
||||
keybind = alt+s>7=goto_tab:7
|
||||
keybind = alt+s>8=goto_tab:8
|
||||
keybind = alt+s>9=goto_tab:9
|
||||
|
||||
# split
|
||||
keybind = alt+s>\=new_split:right
|
||||
keybind = alt+s>-=new_split:down
|
||||
|
||||
keybind = alt+s>j=goto_split:bottom
|
||||
keybind = alt+s>k=goto_split:top
|
||||
keybind = alt+s>h=goto_split:left
|
||||
keybind = alt+s>l=goto_split:right
|
||||
|
||||
keybind = alt+s>z=toggle_split_zoom
|
||||
|
||||
keybind = alt+s>e=equalize_splits
|
||||
|
||||
# other
|
||||
#copy-on-select = clipboard
|
||||
|
||||
font-size = 12
|
||||
#font-family = JetBrainsMono Nerd Font Mono
|
||||
#font-family-bold = JetBrainsMono NFM Bold
|
||||
#font-family-bold-italic = JetBrainsMono NFM Bold Italic
|
||||
#font-family-italic = JetBrainsMono NFM Italic
|
||||
|
||||
font-family = BerkeleyMono Nerd Font
|
||||
#font-family = Iosevka Nerd Font
|
||||
# font-family = SFMono Nerd Font
|
||||
|
||||
title = "GhosTTY"
|
||||
|
||||
wait-after-command = false
|
||||
shell-integration = detect
|
||||
window-save-state = always
|
||||
gtk-single-instance = true
|
||||
unfocused-split-opacity = 0.5
|
||||
quick-terminal-position = center
|
||||
shell-integration-features = cursor,sudo
|
||||
'';
|
||||
}
|
||||
@@ -1,42 +1,46 @@
|
||||
{ config, ... }: {
|
||||
{ config, ... }:
|
||||
{
|
||||
programs.htop = {
|
||||
enable = true;
|
||||
settings =
|
||||
{
|
||||
color_scheme = 6;
|
||||
cpu_count_from_one = 0;
|
||||
delay = 15;
|
||||
fields = with config.lib.htop.fields; [
|
||||
PID
|
||||
USER
|
||||
PRIORITY
|
||||
NICE
|
||||
M_SIZE
|
||||
M_RESIDENT
|
||||
M_SHARE
|
||||
STATE
|
||||
PERCENT_CPU
|
||||
PERCENT_MEM
|
||||
TIME
|
||||
COMM
|
||||
];
|
||||
highlight_base_name = 1;
|
||||
highlight_megabytes = 1;
|
||||
highlight_threads = 1;
|
||||
}
|
||||
// (with config.lib.htop;
|
||||
settings = {
|
||||
color_scheme = 6;
|
||||
cpu_count_from_one = 0;
|
||||
delay = 15;
|
||||
fields = with config.lib.htop.fields; [
|
||||
PID
|
||||
USER
|
||||
PRIORITY
|
||||
NICE
|
||||
M_SIZE
|
||||
M_RESIDENT
|
||||
M_SHARE
|
||||
STATE
|
||||
PERCENT_CPU
|
||||
PERCENT_MEM
|
||||
TIME
|
||||
COMM
|
||||
];
|
||||
highlight_base_name = 1;
|
||||
highlight_megabytes = 1;
|
||||
highlight_threads = 1;
|
||||
}
|
||||
// (
|
||||
with config.lib.htop;
|
||||
leftMeters [
|
||||
(bar "AllCPUs2")
|
||||
(bar "Memory")
|
||||
(bar "Swap")
|
||||
(text "Zram")
|
||||
])
|
||||
// (with config.lib.htop;
|
||||
]
|
||||
)
|
||||
// (
|
||||
with config.lib.htop;
|
||||
rightMeters [
|
||||
(text "Tasks")
|
||||
(text "LoadAverage")
|
||||
(text "Uptime")
|
||||
(text "Systemd")
|
||||
]);
|
||||
]
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{ ... }: {
|
||||
{ ... }:
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
animations = {
|
||||
enabled = true;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{ ... }: {
|
||||
{ ... }:
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
# name "Dynamic"
|
||||
# credit https://github.com/mylinuxforwork/dotfiles
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{ ... }: {
|
||||
{ ... }:
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
# Name: END-4
|
||||
# Credit: END-4 project https://github.com/end-4/dots-hyprland
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{ ... }: {
|
||||
{ ... }:
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
# name "moving"
|
||||
# credit https://github.com/mylinuxforwork/dotfiles
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{ host, ... }:
|
||||
let
|
||||
inherit
|
||||
(import ../../../hosts/${host}/variables.nix)
|
||||
inherit (import ../../../hosts/${host}/variables.nix)
|
||||
browser
|
||||
terminal
|
||||
;
|
||||
@@ -17,7 +16,6 @@ in
|
||||
"$modifier ALT,W,exec,wallsetter"
|
||||
"$modifier SHIFT,N,exec,swaync-client -rs"
|
||||
"$modifier,W,exec,${browser}"
|
||||
"$modifier,Y,exec,kitty -e yazi"
|
||||
"$modifier,E,exec,emopicker9000"
|
||||
"$modifier,S,exec,screenshootin"
|
||||
"$modifier,D,exec,discord"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{ ... }: {
|
||||
{ ... }:
|
||||
{
|
||||
wayland.windowManager.hyprland = {
|
||||
settings = {
|
||||
env = [
|
||||
@@ -23,7 +24,7 @@
|
||||
#"AQ_DRM_DEVICES,/dev/dri/card0:/dev/dri/card1:/dev/card2"
|
||||
"GDK_SCALE,1"
|
||||
"QT_SCALE_FACTOR,1"
|
||||
"EDITOR,nvim"
|
||||
"EDITOR,nano"
|
||||
# Set terminal and xdg_terminal_emulator to kitty
|
||||
# To provent yazi from starting xterm when run from rofi menu
|
||||
# You can set to your preferred terminal if you you like
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{ host, ... }:
|
||||
let
|
||||
inherit
|
||||
(import ../../../hosts/${host}/variables.nix)
|
||||
inherit (import ../../../hosts/${host}/variables.nix)
|
||||
stylixImage
|
||||
;
|
||||
in
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 362 KiB |
@@ -1,11 +1,11 @@
|
||||
{ host
|
||||
, config
|
||||
, pkgs
|
||||
, ...
|
||||
{
|
||||
host,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit
|
||||
(import ../../../hosts/${host}/variables.nix)
|
||||
inherit (import ../../../hosts/${host}/variables.nix)
|
||||
extraMonitorSettings
|
||||
keyboardLayout
|
||||
stylixImage
|
||||
@@ -65,8 +65,8 @@ in
|
||||
};
|
||||
|
||||
gestures = {
|
||||
workspace_swipe = 1;
|
||||
workspace_swipe_fingers = 3;
|
||||
# workspace_swipe = 1;
|
||||
# workspace_swipe_fingers = 3;
|
||||
workspace_swipe_distance = 500;
|
||||
workspace_swipe_invert = 1;
|
||||
workspace_swipe_min_speed_to_force = 30;
|
||||
@@ -82,7 +82,8 @@ in
|
||||
gaps_out = 8;
|
||||
border_size = 2;
|
||||
resize_on_border = true;
|
||||
"col.active_border" = "rgb(${config.lib.stylix.colors.base08}) rgb(${config.lib.stylix.colors.base0C}) 45deg";
|
||||
"col.active_border" =
|
||||
"rgb(${config.lib.stylix.colors.base08}) rgb(${config.lib.stylix.colors.base0C}) 45deg";
|
||||
"col.inactive_border" = "rgb(${config.lib.stylix.colors.base01})";
|
||||
};
|
||||
|
||||
@@ -95,7 +96,7 @@ in
|
||||
disable_splash_rendering = true;
|
||||
enable_swallow = false;
|
||||
vfr = true; # Variable Frame Rate
|
||||
vrr = 2; #Variable Refresh Rate Might need to set to 0 for NVIDIA/AQ_DRM_DEVICES
|
||||
vrr = 2; # Variable Refresh Rate Might need to set to 0 for NVIDIA/AQ_DRM_DEVICES
|
||||
# Screen flashing to black momentarily or going black when app is fullscreen
|
||||
# Try setting vrr to 0
|
||||
|
||||
@@ -162,7 +163,9 @@ in
|
||||
extraConfig = "
|
||||
monitor=,preferred,auto,auto
|
||||
monitor=Virtual-1,1920x1080@60,auto,1
|
||||
${extraMonitorSettings}
|
||||
${
|
||||
extraMonitorSettings
|
||||
}
|
||||
# To enable blur on waybar uncomment the line below
|
||||
# Thanks to SchotjeChrisman
|
||||
#layerrule = blur,waybar
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{ username, ... }: {
|
||||
{ username, ... }:
|
||||
{
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{ pkgs, ... }: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [ pyprland ];
|
||||
|
||||
home.file.".config/hypr/pyprland.toml".text = ''
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
{host, ...}: let
|
||||
inherit
|
||||
(import ../../../hosts/${host}/variables.nix)
|
||||
{ host, ... }:
|
||||
let
|
||||
inherit (import ../../../hosts/${host}/variables.nix)
|
||||
extraMonitorSettings
|
||||
;
|
||||
in {
|
||||
in
|
||||
{
|
||||
wayland.windowManager.hyprland = {
|
||||
settings = {
|
||||
windowrule = [
|
||||
|
||||
@@ -1,229 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
######################################
|
||||
# Install script for zaneyos
|
||||
# Author: Don Williams
|
||||
# Date: June 27, 2005
|
||||
#######################################
|
||||
|
||||
# Define colors
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
# Define log file
|
||||
LOG_DIR="$(dirname "$0")"
|
||||
LOG_FILE="${LOG_DIR}/install_$(date +"%Y-%m-%d_%H-%M-%S").log"
|
||||
|
||||
mkdir -p "$LOG_DIR"
|
||||
exec > >(tee -a "$LOG_FILE") 2>&1
|
||||
|
||||
# Function to print a section header
|
||||
print_header() {
|
||||
echo -e "${GREEN}╔═══════════════════════════════════════════════════════════════════════╗${NC}"
|
||||
echo -e "${GREEN}║ ${1} ${NC}"
|
||||
echo -e "${GREEN}╚═══════════════════════════════════════════════════════════════════════╝${NC}"
|
||||
}
|
||||
|
||||
# Function to print an error message
|
||||
print_error() {
|
||||
echo -e "${RED}Error: ${1}${NC}"
|
||||
}
|
||||
|
||||
# Function to print a success banner
|
||||
print_success_banner() {
|
||||
echo -e "${GREEN}╔═══════════════════════════════════════════════════════════════════════╗${NC}"
|
||||
echo -e "${GREEN}║ zaneyos Installation Successful! ║${NC}"
|
||||
echo -e "${GREEN}║ ║${NC}"
|
||||
echo -e "${GREEN}║ Please reboot your system for changes to take full effect. ║${NC}"
|
||||
echo -e "${GREEN}║ ║${NC}"
|
||||
echo -e "${GREEN}╚═══════════════════════════════════════════════════════════════════════╝${NC}"
|
||||
}
|
||||
|
||||
# Function to print a failure banner
|
||||
print_failure_banner() {
|
||||
echo -e "${RED}╔═══════════════════════════════════════════════════════════════════════╗${NC}"
|
||||
echo -e "${RED}║ zaneyos Installation Failed! ║${NC}"
|
||||
echo -e "${RED}║ ║${NC}"
|
||||
echo -e "${RED}║ Please review the log file for details: ║${NC}"
|
||||
echo -e "${RED}║ ${LOG_FILE} ║${NC}"
|
||||
echo -e "${RED}║ ║${NC}"
|
||||
echo -e "${RED}╚═══════════════════════════════════════════════════════════════════════╝${NC}"
|
||||
}
|
||||
|
||||
print_header "Verifying System Requirements"
|
||||
|
||||
# Check for git
|
||||
if ! command -v git &> /dev/null; then
|
||||
print_error "Git is not installed."
|
||||
echo -e "Please install git and pciutils are installed, then re-run the install script."
|
||||
echo -e "Example: nix-shell -p git pciutils"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check for lspci (pciutils)
|
||||
if ! command -v lspci &> /dev/null; then
|
||||
print_error "pciutils is not installed."
|
||||
echo -e "Please install git and pciutils, then re-run the install script."
|
||||
echo -e "Example: nix-shell -p git pciutils"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -n "$(grep -i nixos < /etc/os-release)" ]; then
|
||||
echo -e "${GREEN}Verified this is NixOS.${NC}"
|
||||
else
|
||||
print_error "This is not NixOS or the distribution information is not available."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
print_header "Initial Setup"
|
||||
|
||||
echo -e "Default options are in brackets []"
|
||||
echo -e "Just press enter to select the default"
|
||||
sleep 2
|
||||
|
||||
print_header "Ensure In Home Directory"
|
||||
cd "$HOME" || exit 1
|
||||
echo -e "${GREEN}Current directory: $(pwd)${NC}"
|
||||
|
||||
print_header "Hostname Configuration"
|
||||
read -rp "Enter Your New Hostname: [ default ] " hostName
|
||||
if [ -z "$hostName" ]; then
|
||||
hostName="default"
|
||||
fi
|
||||
|
||||
print_header "GPU Profile Detection"
|
||||
|
||||
# Attempt automatic detection
|
||||
DETECTED_PROFILE=""
|
||||
|
||||
has_nvidia=false
|
||||
has_intel=false
|
||||
has_amd=false
|
||||
has_vm=false
|
||||
|
||||
if lspci | grep -qi 'vga\|3d'; then
|
||||
while read -r line; do
|
||||
if echo "$line" | grep -qi 'nvidia'; then
|
||||
has_nvidia=true
|
||||
elif echo "$line" | grep -qi 'amd'; then
|
||||
has_amd=true
|
||||
elif echo "$line" | grep -qi 'intel'; then
|
||||
has_intel=true
|
||||
elif echo "$line" | grep -qi 'virtio\|vmware'; then
|
||||
has_vm=true
|
||||
fi
|
||||
done < <(lspci | grep -i 'vga\|3d')
|
||||
|
||||
if $has_vm; then
|
||||
DETECTED_PROFILE="vm"
|
||||
elif $has_nvidia && $has_intel; then
|
||||
DETECTED_PROFILE="hybrid"
|
||||
elif $has_nvidia; then
|
||||
DETECTED_PROFILE="nvidia"
|
||||
elif $has_amd; then
|
||||
DETECTED_PROFILE="amd"
|
||||
elif $has_intel; then
|
||||
DETECTED_PROFILE="intel"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Handle detected profile or fall back to manual input
|
||||
if [ -n "$DETECTED_PROFILE" ]; then
|
||||
profile="$DETECTED_PROFILE"
|
||||
echo -e "${GREEN}Detected GPU profile: $profile${NC}"
|
||||
read -p "Correct? (Y/N): " -n 1 -r
|
||||
echo
|
||||
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
||||
echo -e "${RED}GPU profile not confirmed. Falling back to manual selection.${NC}"
|
||||
profile="" # Clear profile to force manual input
|
||||
fi
|
||||
fi
|
||||
|
||||
# If profile is still empty (either not detected or not confirmed), prompt manually
|
||||
if [ -z "$profile" ]; then
|
||||
echo -e "${RED}Automatic GPU detection failed or no specific profile found.${NC}"
|
||||
read -rp "Enter Your Hardware Profile (GPU)\nOptions:\n[ amd ]\nnvidia\nnvidia-laptop\nintel\nvm\nPlease type out your choice: " profile
|
||||
if [ -z "$profile" ]; then
|
||||
profile="amd"
|
||||
fi
|
||||
echo -e "${GREEN}Selected GPU profile: $profile${NC}"
|
||||
fi
|
||||
|
||||
print_header "Backup Existing zaneyos (if any)"
|
||||
|
||||
backupname=$(date +"%Y-%m-%d-%H-%M-%S")
|
||||
if [ -d "zaneyos" ]; then
|
||||
echo -e "${GREEN}zaneyos exists, backing up to .config/zaneyos-backups folder.${NC}"
|
||||
if [ -d ".config/zaneyos-backups" ]; then
|
||||
echo -e "${GREEN}Moving current version of zaneyos to backups folder.${NC}"
|
||||
mv "$HOME"/zaneyos .config/zaneyos-backups/"$backupname"
|
||||
sleep 1
|
||||
else
|
||||
echo -e "${GREEN}Creating the backups folder & moving zaneyos to it.${NC}"
|
||||
mkdir -p .config/zaneyos-backups
|
||||
mv "$HOME"/zaneyos .config/zaneyos-backups/"$backupname"
|
||||
sleep 1
|
||||
fi
|
||||
else
|
||||
echo -e "${GREEN}Thank you for choosing zaneyos.${NC}"
|
||||
echo -e "${GREEN}I hope you find your time here enjoyable!${NC}"
|
||||
fi
|
||||
|
||||
print_header "Cloning zaneyos Repository"
|
||||
git clone https://gitlab.com/dwilliam62/zaneyos.git --depth=1 ~/zaneyos
|
||||
cd ~/zaneyos || exit 1
|
||||
|
||||
print_header "Configuring Host and Profile"
|
||||
mkdir -p hosts/"$hostName"
|
||||
cp hosts/default/*.nix hosts/"$hostName"
|
||||
|
||||
installusername=$(echo $USER)
|
||||
git config --global user.name "$installusername"
|
||||
git config --global user.email "$installusername@gmail.com"
|
||||
git add .
|
||||
git config --global --unset-all user.name
|
||||
git config --global --unset-all user.email
|
||||
|
||||
sed -i "/^[[:space:]]*host[[:space:]]*=[[:space:]]*\"/ s/\"[^\"]*\"/\"$hostName\"/" ./flake.nix
|
||||
sed -i "/^[[:space:]]*profile[[:space:]]*=[[:space:]]*\"/ s/\"[^\"]*\"/\"$profile\"/" ./flake.nix
|
||||
|
||||
print_header "Keyboard Layout Configuration"
|
||||
read -rp "Enter your keyboard layout: [ us ] " keyboardLayout
|
||||
if [ -z "$keyboardLayout" ]; then
|
||||
keyboardLayout="us"
|
||||
fi
|
||||
sed -i "/^[[:space:]]*keyboardLayout[[:space:]]*=[[:space:]]*\"/ s/\"[^\"]*\"/\"$keyboardLayout\"/" ./hosts/$hostName/variables.nix
|
||||
|
||||
print_header "Console Keymap Configuration"
|
||||
read -rp "Enter your console keymap: [ us ] " consoleKeyMap
|
||||
if [ -z "$consoleKeyMap" ]; then
|
||||
consoleKeyMap="us"
|
||||
fi
|
||||
sed -i "/^[[:space:]]*consoleKeyMap[[:space:]]*=[[:space:]]*\"/ s/\"[^\"]*\"/\"$consoleKeyMap\"/" ./hosts/$hostName/variables.nix
|
||||
|
||||
print_header "Username Configuration"
|
||||
sed -i "/^[[:space:]]*username[[:space:]]*=[[:space:]]*\"/ s/\"[^\"]*\"/\"$installusername\"/" ./flake.nix
|
||||
|
||||
print_header "Generating Hardware Configuration -- Ignore ERROR: cannot access /bin"
|
||||
sudo nixos-generate-config --show-hardware-config > ./hosts/$hostName/hardware.nix
|
||||
|
||||
print_header "Setting Nix Configuration"
|
||||
NIX_CONFIG="experimental-features = nix-command flakes"
|
||||
|
||||
print_header "Initiating NixOS Build"
|
||||
read -p "Ready to run initial build? (Y/N): " -n 1 -r
|
||||
echo
|
||||
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
||||
echo -e "${RED}Build cancelled.${NC}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sudo nixos-rebuild boot --flake ~/zaneyos/#${profile}
|
||||
|
||||
# Check the exit status of the last command (nixos-rebuild)
|
||||
if [ $? -eq 0 ]; then
|
||||
print_success_banner
|
||||
else
|
||||
print_failure_banner
|
||||
fi
|
||||
@@ -1,4 +1,5 @@
|
||||
{ pkgs, ... }: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
package = pkgs.kitty;
|
||||
|
||||
@@ -18,7 +18,10 @@ in
|
||||
};
|
||||
gui = {
|
||||
theme = {
|
||||
activeBorderColor = [ accent "bold" ];
|
||||
activeBorderColor = [
|
||||
accent
|
||||
"bold"
|
||||
];
|
||||
inactiveBorderColor = [ muted ];
|
||||
};
|
||||
showListFooter = false;
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
system,
|
||||
host,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
programs = {
|
||||
librewolf = {
|
||||
enable = true;
|
||||
@@ -60,12 +61,12 @@
|
||||
force = true;
|
||||
engines = {
|
||||
"garand's-search" = {
|
||||
definedAliases = ["@g"];
|
||||
urls = [{template = "https://search.garandplg.com/search?q={searchTerms}";}];
|
||||
definedAliases = [ "@g" ];
|
||||
urls = [ { template = "https://search.garandplg.com/search?q={searchTerms}"; } ];
|
||||
suggestUrl = "https://search.garandplg.com/autocompleter?q={searchTerms}";
|
||||
};
|
||||
"youtube" = {
|
||||
definedAliases = ["@yt"];
|
||||
definedAliases = [ "@yt" ];
|
||||
urls = [
|
||||
{
|
||||
template = "https://www.youtube.com/results";
|
||||
@@ -79,7 +80,7 @@
|
||||
];
|
||||
};
|
||||
"wikipedia-pl" = {
|
||||
definedAliases = ["@w"];
|
||||
definedAliases = [ "@w" ];
|
||||
urls = [
|
||||
{
|
||||
template = "https://pl.wikipedia.org/w/index.php";
|
||||
@@ -93,7 +94,7 @@
|
||||
];
|
||||
};
|
||||
"stackoverflow" = {
|
||||
definedAliases = ["@so"];
|
||||
definedAliases = [ "@so" ];
|
||||
urls = [
|
||||
{
|
||||
template = "https://stackoverflow.com/search";
|
||||
@@ -107,7 +108,7 @@
|
||||
];
|
||||
};
|
||||
"nix-packages" = {
|
||||
definedAliases = ["@np"];
|
||||
definedAliases = [ "@np" ];
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
urls = [
|
||||
{
|
||||
@@ -122,7 +123,7 @@
|
||||
];
|
||||
};
|
||||
"nix-options" = {
|
||||
definedAliases = ["@no"];
|
||||
definedAliases = [ "@no" ];
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
urls = [
|
||||
{
|
||||
@@ -137,7 +138,7 @@
|
||||
];
|
||||
};
|
||||
"nix-wiki" = {
|
||||
definedAliases = ["@nw"];
|
||||
definedAliases = [ "@nw" ];
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
urls = [
|
||||
{
|
||||
@@ -152,7 +153,7 @@
|
||||
];
|
||||
};
|
||||
"home-manager-option" = {
|
||||
definedAliases = ["@hmo"];
|
||||
definedAliases = [ "@hmo" ];
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
urls = [
|
||||
{
|
||||
@@ -167,7 +168,7 @@
|
||||
];
|
||||
};
|
||||
"eneba" = {
|
||||
definedAliases = ["@en"];
|
||||
definedAliases = [ "@en" ];
|
||||
icon = "https://static.eneba.games/branding/v2/logoFull.svg";
|
||||
urls = [
|
||||
{
|
||||
@@ -182,7 +183,7 @@
|
||||
];
|
||||
};
|
||||
"kinguin" = {
|
||||
definedAliases = ["@ki"];
|
||||
definedAliases = [ "@ki" ];
|
||||
icon = "https://static.kinguin.net/media/images/other/kinguin-mobile-logo.svg";
|
||||
urls = [
|
||||
{
|
||||
@@ -197,7 +198,7 @@
|
||||
];
|
||||
};
|
||||
"instant-gaming" = {
|
||||
definedAliases = ["@ig"];
|
||||
definedAliases = [ "@ig" ];
|
||||
icon = "https://asset.brandfetch.io/idCbLj4uOg/idGS61T0FV.jpeg";
|
||||
urls = [
|
||||
{
|
||||
@@ -212,7 +213,7 @@
|
||||
];
|
||||
};
|
||||
"morele" = {
|
||||
definedAliases = ["@mo"];
|
||||
definedAliases = [ "@mo" ];
|
||||
icon = "https://www.morele.net/static/img/shop/logo/image-logo-morele.svg";
|
||||
urls = [
|
||||
{
|
||||
@@ -227,7 +228,7 @@
|
||||
];
|
||||
};
|
||||
"x-kom" = {
|
||||
definedAliases = ["@xk"];
|
||||
definedAliases = [ "@xk" ];
|
||||
icon = "https://assets.x-kom.pl/public-spa/xkom/75062cb4b48a8510.svg";
|
||||
urls = [
|
||||
{
|
||||
@@ -242,7 +243,7 @@
|
||||
];
|
||||
};
|
||||
"komputronik" = {
|
||||
definedAliases = ["@kp"];
|
||||
definedAliases = [ "@kp" ];
|
||||
icon = "https://front.komputronik.pl/front-static/komputronik.Ceqagame-a.svg";
|
||||
urls = [
|
||||
{
|
||||
@@ -257,7 +258,7 @@
|
||||
];
|
||||
};
|
||||
"allegro" = {
|
||||
definedAliases = ["@al"];
|
||||
definedAliases = [ "@al" ];
|
||||
icon = "";
|
||||
urls = [
|
||||
{
|
||||
@@ -1,268 +0,0 @@
|
||||
{ inputs
|
||||
, config
|
||||
, ...
|
||||
}: {
|
||||
imports = [ inputs.nvf.homeManagerModules.default ];
|
||||
|
||||
programs.nvf = {
|
||||
enable = true;
|
||||
|
||||
settings.vim = {
|
||||
lsp.enable = true;
|
||||
vimAlias = true;
|
||||
viAlias = true;
|
||||
withNodeJs = true;
|
||||
lineNumberMode = "relNumber";
|
||||
enableLuaLoader = true;
|
||||
preventJunkFiles = true;
|
||||
options = {
|
||||
tabstop = 4;
|
||||
shiftwidth = 2;
|
||||
wrap = false;
|
||||
};
|
||||
|
||||
clipboard = {
|
||||
enable = true;
|
||||
registers = "unnamedplus";
|
||||
providers = {
|
||||
wl-copy.enable = true;
|
||||
xsel.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
maps = {
|
||||
normal = {
|
||||
"<leader>e" = {
|
||||
action = "<CMD>Neotree toggle<CR>";
|
||||
silent = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
diagnostics = {
|
||||
enable = true;
|
||||
config = {
|
||||
virtual_lines.enable = true;
|
||||
underline = true;
|
||||
};
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
key = "jk";
|
||||
mode = [ "i" ];
|
||||
action = "<ESC>";
|
||||
desc = "Exit insert mode";
|
||||
}
|
||||
{
|
||||
key = "<leader>nh";
|
||||
mode = [ "n" ];
|
||||
action = ":nohl<CR>";
|
||||
desc = "Clear search highlights";
|
||||
}
|
||||
{
|
||||
key = "<leader>ff";
|
||||
mode = [ "n" ];
|
||||
action = "<cmd>Telescope find_files<cr>";
|
||||
desc = "Search files by name";
|
||||
}
|
||||
{
|
||||
key = "<leader>lg";
|
||||
mode = [ "n" ];
|
||||
action = "<cmd>Telescope live_grep<cr>";
|
||||
desc = "Search files by contents";
|
||||
}
|
||||
{
|
||||
key = "<leader>fe";
|
||||
mode = [ "n" ];
|
||||
action = "<cmd>Neotree toggle<cr>";
|
||||
desc = "File browser toggle";
|
||||
}
|
||||
{
|
||||
key = "<C-h>";
|
||||
mode = [ "i" ];
|
||||
action = "<Left>";
|
||||
desc = "Move left in insert mode";
|
||||
}
|
||||
{
|
||||
key = "<C-j>";
|
||||
mode = [ "i" ];
|
||||
action = "<Down>";
|
||||
desc = "Move down in insert mode";
|
||||
}
|
||||
{
|
||||
key = "<C-k>";
|
||||
mode = [ "i" ];
|
||||
action = "<Up>";
|
||||
desc = "Move up in insert mode";
|
||||
}
|
||||
{
|
||||
key = "<C-l>";
|
||||
mode = [ "i" ];
|
||||
action = "<Right>";
|
||||
desc = "Move right in insert mode";
|
||||
}
|
||||
];
|
||||
|
||||
telescope.enable = true;
|
||||
|
||||
spellcheck = {
|
||||
enable = true;
|
||||
languages = [ "en" ];
|
||||
programmingWordlist.enable = true;
|
||||
};
|
||||
|
||||
lsp = {
|
||||
formatOnSave = true;
|
||||
lspkind.enable = false;
|
||||
lightbulb.enable = false;
|
||||
lspsaga.enable = false;
|
||||
trouble.enable = true;
|
||||
lspSignature.enable = true;
|
||||
otter-nvim.enable = false;
|
||||
nvim-docs-view.enable = false;
|
||||
};
|
||||
|
||||
languages = {
|
||||
enableFormat = true;
|
||||
enableTreesitter = true;
|
||||
enableExtraDiagnostics = true;
|
||||
nix.enable = true;
|
||||
clang.enable = true;
|
||||
zig.enable = true;
|
||||
python.enable = true;
|
||||
markdown.enable = true;
|
||||
ts = {
|
||||
enable = true;
|
||||
lsp.enable = true;
|
||||
format.type = "prettierd";
|
||||
extensions.ts-error-translator.enable = true;
|
||||
};
|
||||
html.enable = true;
|
||||
lua.enable = true;
|
||||
css = {
|
||||
enable = true;
|
||||
format.type = "prettierd";
|
||||
};
|
||||
typst.enable = true;
|
||||
rust = {
|
||||
enable = true;
|
||||
crates.enable = true;
|
||||
};
|
||||
};
|
||||
visuals = {
|
||||
nvim-web-devicons.enable = true;
|
||||
nvim-cursorline.enable = true;
|
||||
cinnamon-nvim.enable = true;
|
||||
fidget-nvim.enable = true;
|
||||
highlight-undo.enable = true;
|
||||
indent-blankline.enable = true;
|
||||
rainbow-delimiters.enable = true;
|
||||
};
|
||||
|
||||
statusline.lualine = {
|
||||
enable = true;
|
||||
theme = "base16";
|
||||
};
|
||||
|
||||
autopairs.nvim-autopairs.enable = true;
|
||||
autocomplete.nvim-cmp.enable = true;
|
||||
snippets.luasnip.enable = true;
|
||||
tabline.nvimBufferline.enable = true;
|
||||
treesitter.context.enable = false;
|
||||
binds = {
|
||||
whichKey.enable = true;
|
||||
cheatsheet.enable = true;
|
||||
};
|
||||
git = {
|
||||
enable = true;
|
||||
gitsigns.enable = true;
|
||||
gitsigns.codeActions.enable = false;
|
||||
};
|
||||
projects.project-nvim.enable = true;
|
||||
dashboard.dashboard-nvim.enable = true;
|
||||
filetree.neo-tree.enable = true;
|
||||
notify = {
|
||||
nvim-notify.enable = true;
|
||||
nvim-notify.setupOpts.background_colour = "#${config.lib.stylix.colors.base01}";
|
||||
};
|
||||
utility = {
|
||||
preview.markdownPreview.enable = true;
|
||||
ccc.enable = false;
|
||||
vim-wakatime.enable = false;
|
||||
icon-picker.enable = true;
|
||||
surround.enable = true;
|
||||
diffview-nvim.enable = true;
|
||||
motion = {
|
||||
hop.enable = true;
|
||||
leap.enable = true;
|
||||
precognition.enable = false;
|
||||
};
|
||||
images = {
|
||||
image-nvim.enable = false;
|
||||
};
|
||||
};
|
||||
ui = {
|
||||
borders.enable = true;
|
||||
noice.enable = true;
|
||||
colorizer.enable = true;
|
||||
illuminate.enable = true;
|
||||
breadcrumbs = {
|
||||
enable = false;
|
||||
navbuddy.enable = false;
|
||||
};
|
||||
smartcolumn = {
|
||||
enable = true;
|
||||
};
|
||||
fastaction.enable = true;
|
||||
};
|
||||
|
||||
session = {
|
||||
nvim-session-manager.enable = false;
|
||||
};
|
||||
comments = {
|
||||
comment-nvim.enable = true;
|
||||
};
|
||||
|
||||
luaConfigPost = ''
|
||||
-- Nix LSP (nil) configuration for auto-eval-inputs
|
||||
local lspconfig = require('lspconfig')
|
||||
lspconfig.nil_ls.setup({
|
||||
settings = {
|
||||
['nil'] = {
|
||||
nix = {
|
||||
auto_eval_inputs = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- Auto-update programming wordlist on first startup
|
||||
vim.api.nvim_create_autocmd("VimEnter", {
|
||||
callback = function()
|
||||
-- Check if dirtytalk dict file exists
|
||||
local dict_path = vim.fn.stdpath('data') .. '/site/spell/programming.utf-8.add'
|
||||
if vim.fn.filereadable(dict_path) == 0 then
|
||||
-- Only run if file doesn't exist to avoid repeated downloads
|
||||
vim.schedule(function()
|
||||
vim.cmd('DirtytalkUpdate')
|
||||
end)
|
||||
end
|
||||
end,
|
||||
})
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
home.activation = {
|
||||
dirtytalkUpdate = ''
|
||||
# Create the spell directory if it doesn't exist
|
||||
mkdir -p "$HOME/.local/share/nvim/site/spell"
|
||||
|
||||
# Try to run DirtytalkUpdate in headless mode with better error handling
|
||||
if ! ${config.programs.nvf.finalPackage}/bin/nvim --headless -c "DirtytalkUpdate" -c "qa!" 2>/dev/null; then
|
||||
echo "Note: DirtytalkUpdate will run automatically on first Neovim startup"
|
||||
fi
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
{ pkgs, ... }: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.obs-studio = {
|
||||
enable = true;
|
||||
#enableVirtualCamera = true;
|
||||
plugins = with pkgs.obs-studio-plugins; [
|
||||
wlrobs
|
||||
obs-pipewire-audio-capture
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{ lib, ... }: {
|
||||
{ lib, ... }:
|
||||
{
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = lib.mkForce "qtct";
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{ ... }: {
|
||||
{ ... }:
|
||||
{
|
||||
home.file.".config/rofi/config-long.rasi".text = ''
|
||||
@import "~/.config/rofi/config.rasi"
|
||||
window {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{ ... }: {
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./config-long.nix
|
||||
./rofi.nix
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
{ pkgs
|
||||
, config
|
||||
, ...
|
||||
}: {
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs = {
|
||||
rofi = {
|
||||
enable = true;
|
||||
package = pkgs.rofi-wayland;
|
||||
package = pkgs.rofi;
|
||||
extraConfig = {
|
||||
modi = "drun,filebrowser,run";
|
||||
show-icons = true;
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
{ pkgs
|
||||
, username
|
||||
, profile
|
||||
, ...
|
||||
}: {
|
||||
{
|
||||
pkgs,
|
||||
username,
|
||||
profile,
|
||||
...
|
||||
}:
|
||||
{
|
||||
home.packages = [
|
||||
(import ./emopicker9000.nix { inherit pkgs; })
|
||||
(import ./hm-find.nix { inherit pkgs; })
|
||||
@@ -19,11 +21,5 @@
|
||||
inherit username;
|
||||
})
|
||||
(import ./web-search.nix { inherit pkgs; })
|
||||
(import ./zcli.nix {
|
||||
inherit pkgs profile;
|
||||
backupFiles = [
|
||||
".config/mimeapps.list.backup"
|
||||
];
|
||||
})
|
||||
];
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ pkgs.writeShellScriptBin "emopicker9000" ''
|
||||
fi
|
||||
|
||||
# Get user selection via wofi from emoji file.
|
||||
chosen=$(cat $HOME/.config/.emoji | ${pkgs.rofi-wayland}/bin/rofi -i -dmenu -config ~/.config/rofi/config-long.rasi | awk '{print $1}')
|
||||
chosen=$(cat $HOME/.config/.emoji | ${pkgs.rofi}/bin/rofi -i -dmenu -config ~/.config/rofi/config-long.rasi | awk '{print $1}')
|
||||
|
||||
# Exit if none chosen.
|
||||
[ -z "$chosen" ] && exit
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
let
|
||||
gemini-launcher = pkgs.writeShellScriptBin "gemini-launcher" ''
|
||||
#!${pkgs.bash}/bin/bash
|
||||
|
||||
|
||||
# Define the path to your API key file
|
||||
KEY_FILE="${config.home.homeDirectory}/gem.key"
|
||||
|
||||
@@ -32,6 +32,9 @@ in
|
||||
exec = "gemini-launcher";
|
||||
terminal = false;
|
||||
type = "Application";
|
||||
categories = [ "Development" "Utility" ];
|
||||
categories = [
|
||||
"Development"
|
||||
"Utility"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ pkgs.writeShellScriptBin "list-keybinds" ''
|
||||
|
||||
msg='☣️ NOTE ☣️: Clicking with Mouse or Pressing ENTER will have NO function'
|
||||
keybinds=$(cat ~/.config/hypr/hyprland.conf | grep -E '^bind')
|
||||
|
||||
|
||||
# replace #modifier with SUPER in the displayed keybinds for rofi
|
||||
display_keybinds=$(echo "$keybinds" | sed 's/\$modifier/SUPER/g')
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ pkgs.writeShellScriptBin "note" ''
|
||||
# XDG-compliant notes directory and file
|
||||
NOTES_DIR="$HOME/.local/share/notes"
|
||||
NOTES_FILE="$NOTES_DIR/notes.txt"
|
||||
|
||||
|
||||
# Create notes directory if it doesn't exist
|
||||
mkdir -p "$NOTES_DIR"
|
||||
|
||||
|
||||
@@ -25,10 +25,10 @@ pkgs.writeShellScriptBin "web-search" ''
|
||||
|
||||
main() {
|
||||
# Pass the list to rofi
|
||||
platform=$( (gen_list) | ${pkgs.rofi-wayland}/bin/rofi -dmenu -config ~/.config/rofi/config-long.rasi )
|
||||
platform=$( (gen_list) | ${pkgs.rofi}/bin/rofi -dmenu -config ~/.config/rofi/config-long.rasi )
|
||||
|
||||
if [[ -n "$platform" ]]; then
|
||||
query=$( (echo ) | ${pkgs.rofi-wayland}/bin/rofi -dmenu -config ~/.config/rofi/config-long.rasi )
|
||||
query=$( (echo ) | ${pkgs.rofi}/bin/rofi -dmenu -config ~/.config/rofi/config-long.rasi )
|
||||
|
||||
if [[ -n "$query" ]]; then
|
||||
url=''${URLS[$platform]}$query
|
||||
|
||||
@@ -1,700 +0,0 @@
|
||||
{ pkgs
|
||||
, profile
|
||||
, backupFiles ? [ ".config/mimeapps.list.backup" ]
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
backupFilesString = pkgs.lib.strings.concatStringsSep " " backupFiles;
|
||||
|
||||
# Create the get-doom script as a dependency
|
||||
get-doom-script = pkgs.writeShellScriptBin "get-doom" ''
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# --- Icons ---
|
||||
ICON_CHECK="✔"
|
||||
ICON_INFO="ℹ"
|
||||
ICON_ROCKET="🚀"
|
||||
|
||||
# --- Helper Functions ---
|
||||
print_status() {
|
||||
echo
|
||||
echo "--- $ICON_INFO $1 ---"
|
||||
}
|
||||
|
||||
print_success() {
|
||||
echo "--- $ICON_CHECK $1 ---"
|
||||
}
|
||||
|
||||
print_banner() {
|
||||
echo "==============================="
|
||||
echo " Doom Emacs Installer $ICON_ROCKET"
|
||||
echo "==============================="
|
||||
}
|
||||
|
||||
is_doom_installed() {
|
||||
local dir="$1"
|
||||
[[ -x "$dir/bin/doom" ]] && [[ -f "$dir/core/doom.el" ]]
|
||||
}
|
||||
|
||||
emacsdir_is_empty() {
|
||||
local dir="$1"
|
||||
[[ -d "$dir" ]] && [[ -z "$(ls -A "$dir" 2>/dev/null)" ]]
|
||||
}
|
||||
|
||||
# --- Main Script ---
|
||||
print_banner
|
||||
EMACSDIR="$HOME/.emacs.d"
|
||||
|
||||
if is_doom_installed "$EMACSDIR"; then
|
||||
print_success "Doom Emacs is already installed."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ -d "$EMACSDIR" ]]; then
|
||||
if emacsdir_is_empty "$EMACSDIR"; then
|
||||
print_status "Found empty $EMACSDIR; proceeding to install Doom Emacs into it..."
|
||||
else
|
||||
echo "Error: Found $EMACSDIR but it does not look like a Doom Emacs installation." >&2
|
||||
echo "Refusing to overwrite a non-empty directory. Move it away and re-run, e.g.:" >&2
|
||||
echo " mv \"$EMACSDIR\" \"$EMACSDIR.bak\"" >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
print_status "Cloning Doom Emacs..."
|
||||
${pkgs.git}/bin/git clone --depth 1 https://github.com/doomemacs/doomemacs "$EMACSDIR"
|
||||
print_success "Doom Emacs cloned."
|
||||
|
||||
print_status "Running Doom install..."
|
||||
"$EMACSDIR/bin/doom" install
|
||||
print_success "Doom install complete."
|
||||
|
||||
print_status "Running doom sync..."
|
||||
"$EMACSDIR/bin/doom" sync
|
||||
print_success "Doom sync complete."
|
||||
|
||||
echo
|
||||
print_success "All done! Doom Emacs is ready to use."
|
||||
'';
|
||||
in
|
||||
|
||||
pkgs.writeShellScriptBin "zcli" ''
|
||||
#!${pkgs.bash}/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
# --- Program info ---
|
||||
#
|
||||
# zcli - NixOS System Management CLI
|
||||
# ==================================
|
||||
#
|
||||
# Purpose: NixOS system management utility for ZaneyOS distribution
|
||||
# Author: Don Williams (ddubs) & Zaney
|
||||
# Start Date: June 7th, 2025
|
||||
# Version: 1.0.2
|
||||
#
|
||||
# Architecture:
|
||||
# - Nix-generated shell script using writeShellScriptBin
|
||||
# - Configuration via Nix parameters (profile, backupFiles)
|
||||
# - Uses 'nh' tool for NixOS operations, 'inxi' for diagnostics
|
||||
# - Git integration for host configuration versioning
|
||||
#
|
||||
# Helper Functions:
|
||||
# verify_hostname() - Validates current hostname against flake.nix host variable
|
||||
# Exits with error if mismatch or missing host directory
|
||||
# detect_gpu_profile() - Parses lspci output to identify GPU hardware
|
||||
# Returns: nvidia/nvidia-laptop/amd/intel/vm/empty
|
||||
# handle_backups() - Removes files listed in BACKUP_FILES array from $HOME
|
||||
# parse_nh_args() - Parses command-line arguments for nh operations
|
||||
# print_help() - Outputs command usage and available operations
|
||||
#
|
||||
# Command Functions:
|
||||
# cleanup - Interactive cleanup of old generations via 'nh clean'
|
||||
# diag - Generate system report using 'inxi --full'
|
||||
# list-gens - Display user/system generations via nix-env and nix profile
|
||||
# rebuild - NixOS rebuild using 'nh os switch'
|
||||
# rebuild-boot - NixOS rebuild for next boot using 'nh os boot'
|
||||
# trim - SSD optimization via 'sudo fstrim -v /'
|
||||
# update - Flake update + rebuild using 'nh os switch --update'
|
||||
# update-host - Modify flake.nix host/profile variables via sed
|
||||
# add-host - Add new host configuration
|
||||
# del-host - Delete host configuration
|
||||
# doom [sub] - Doom Emacs management (install/status/remove/update)
|
||||
#
|
||||
# Variables:
|
||||
# PROJECT - Base directory name (ddubsos/zaneyos)
|
||||
# PROFILE - Hardware profile from Nix parameter
|
||||
# BACKUP_FILES - Array of backup file paths to clean
|
||||
# FLAKE_NIX_PATH - Path to flake.nix for host/profile updates
|
||||
#
|
||||
|
||||
|
||||
# --- Configuration ---
|
||||
PROJECT="zaneyos" #ddubos or zaneyos
|
||||
PROFILE="${profile}"
|
||||
BACKUP_FILES_STR="${backupFilesString}"
|
||||
VERSION="1.0.2"
|
||||
FLAKE_NIX_PATH="$HOME/$PROJECT/flake.nix"
|
||||
|
||||
read -r -a BACKUP_FILES <<< "$BACKUP_FILES_STR"
|
||||
|
||||
# --- Helper Functions ---
|
||||
verify_hostname() {
|
||||
local current_hostname
|
||||
local flake_hostname
|
||||
|
||||
current_hostname="$(hostname)"
|
||||
|
||||
# Extract the host value from flake.nix
|
||||
if [ -f "$FLAKE_NIX_PATH" ]; then
|
||||
flake_hostname=$(${pkgs.gnugrep}/bin/grep -E '^[[:space:]]*host[[:space:]]*=' "$FLAKE_NIX_PATH" | ${pkgs.gnused}/bin/sed 's/.*=[[:space:]]*"\([^"]*\)".*/\1/')
|
||||
|
||||
if [ -z "$flake_hostname" ]; then
|
||||
echo "Error: Could not find 'host' variable in $FLAKE_NIX_PATH" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$current_hostname" != "$flake_hostname" ]; then
|
||||
echo "Error: Hostname mismatch!" >&2
|
||||
echo " Current hostname: '$current_hostname'" >&2
|
||||
echo " Flake.nix host: '$flake_hostname'" >&2
|
||||
echo "" >&2
|
||||
echo "Hint: Run 'zcli update-host' to automatically update flake.nix" >&2
|
||||
echo " or manually edit $FLAKE_NIX_PATH" >&2
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "Error: Flake.nix not found at $FLAKE_NIX_PATH" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Also check if host folder exists
|
||||
local folder="$HOME/$PROJECT/hosts/$current_hostname"
|
||||
if [ ! -d "$folder" ]; then
|
||||
echo "Error: Matching host not found in $PROJECT, Missing folder: $folder" >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
print_help() {
|
||||
echo "ZaneyOS CLI Utility -- version $VERSION"
|
||||
echo ""
|
||||
echo "Usage: zcli [command] [options]"
|
||||
echo ""
|
||||
echo "Commands:"
|
||||
echo " cleanup - Clean up old system generations. Can specify a number to keep."
|
||||
echo " diag - Create a system diagnostic report."
|
||||
echo " (Filename: homedir/diag.txt)"
|
||||
echo " list-gens - List user and system generations."
|
||||
echo " rebuild - Rebuild the NixOS system configuration."
|
||||
echo " rebuild-boot - Rebuild and set as boot default (activates on next restart)."
|
||||
echo " trim - Trim filesystems to improve SSD performance."
|
||||
echo " update - Update the flake and rebuild the system."
|
||||
echo " update-host - Auto set host and profile in flake.nix."
|
||||
echo " (Opt: zcli update-host [hostname] [profile])"
|
||||
echo ""
|
||||
echo "Options for rebuild, rebuild-boot, and update commands:"
|
||||
echo " --dry, -n - Show what would be done without doing it"
|
||||
echo " --ask, -a - Ask for confirmation before proceeding"
|
||||
echo " --cores N - Limit build to N cores (useful for VMs)"
|
||||
echo " --verbose, -v - Show verbose output"
|
||||
echo " --no-nom - Don't use nix-output-monitor"
|
||||
echo ""
|
||||
echo "Doom Emacs:"
|
||||
echo " doom install - Install Doom Emacs using get-doom script."
|
||||
echo " doom status - Check if Doom Emacs is installed."
|
||||
echo " doom remove - Remove Doom Emacs installation."
|
||||
echo " doom update - Update Doom Emacs (runs doom sync)."
|
||||
echo ""
|
||||
echo " help - Show this help message."
|
||||
}
|
||||
|
||||
handle_backups() {
|
||||
if [ ''${#BACKUP_FILES[@]} -eq 0 ]; then
|
||||
echo "No backup files configured to check."
|
||||
return
|
||||
fi
|
||||
|
||||
echo "Checking for backup files to remove..."
|
||||
for file_path in "''${BACKUP_FILES[@]}"; do
|
||||
full_path="$HOME/$file_path"
|
||||
if [ -f "$full_path" ]; then
|
||||
echo "Removing stale backup file: $full_path"
|
||||
rm "$full_path"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
detect_gpu_profile() {
|
||||
local detected_profile=""
|
||||
local has_nvidia=false
|
||||
local has_intel=false
|
||||
local has_amd=false
|
||||
local has_vm=false
|
||||
|
||||
if ${pkgs.pciutils}/bin/lspci &> /dev/null; then # Check if lspci is available
|
||||
if ${pkgs.pciutils}/bin/lspci | ${pkgs.gnugrep}/bin/grep -qi 'vga\|3d'; then
|
||||
while read -r line; do
|
||||
if echo "$line" | ${pkgs.gnugrep}/bin/grep -qi 'nvidia'; then
|
||||
has_nvidia=true
|
||||
elif echo "$line" | ${pkgs.gnugrep}/bin/grep -qi 'amd'; then
|
||||
has_amd=true
|
||||
elif echo "$line" | ${pkgs.gnugrep}/bin/grep -qi 'intel'; then
|
||||
has_intel=true
|
||||
elif echo "$line" | ${pkgs.gnugrep}/bin/grep -qi 'virtio\|vmware'; then
|
||||
has_vm=true
|
||||
fi
|
||||
done < <(${pkgs.pciutils}/bin/lspci | ${pkgs.gnugrep}/bin/grep -i 'vga\|3d')
|
||||
|
||||
if "$has_vm"; then
|
||||
detected_profile="vm"
|
||||
elif "$has_nvidia" && "$has_intel"; then
|
||||
detected_profile="nvidia-laptop"
|
||||
elif "$has_nvidia"; then
|
||||
detected_profile="nvidia"
|
||||
elif "$has_amd"; then
|
||||
detected_profile="amd"
|
||||
elif "$has_intel"; then
|
||||
detected_profile="intel"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "Warning: lspci command not found. Cannot auto-detect GPU profile." >&2
|
||||
fi
|
||||
echo "$detected_profile" # Return the detected profile
|
||||
}
|
||||
|
||||
# --- Helper function to parse additional arguments ---
|
||||
parse_nh_args() {
|
||||
local args_string=""
|
||||
local options_selected=()
|
||||
shift # Remove the main command (rebuild, rebuild-boot, update)
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case $1 in
|
||||
--dry|-n)
|
||||
args_string="$args_string --dry"
|
||||
options_selected+=("dry run mode (showing what would be done)")
|
||||
shift
|
||||
;;
|
||||
--ask|-a)
|
||||
args_string="$args_string --ask"
|
||||
options_selected+=("confirmation prompts enabled")
|
||||
shift
|
||||
;;
|
||||
--cores)
|
||||
if [[ -n $2 && $2 =~ ^[0-9]+$ ]]; then
|
||||
args_string="$args_string -- --cores $2"
|
||||
options_selected+=("limited to $2 CPU cores")
|
||||
shift 2
|
||||
else
|
||||
echo "Error: --cores requires a numeric argument" >&2
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
--verbose|-v)
|
||||
args_string="$args_string --verbose"
|
||||
options_selected+=("verbose output enabled")
|
||||
shift
|
||||
;;
|
||||
--no-nom)
|
||||
args_string="$args_string --no-nom"
|
||||
options_selected+=("nix-output-monitor disabled")
|
||||
shift
|
||||
;;
|
||||
--)
|
||||
shift
|
||||
args_string="$args_string -- $*"
|
||||
options_selected+=("additional arguments: $*")
|
||||
break
|
||||
;;
|
||||
-*)
|
||||
echo "Warning: Unknown flag '$1' - passing through to nh" >&2
|
||||
args_string="$args_string $1"
|
||||
options_selected+=("unknown flag '$1' passed through")
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "Error: Unexpected argument '$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Print friendly confirmation of selected options to stderr so it doesn't interfere with return value
|
||||
if [[ ''${#options_selected[@]} -gt 0 ]]; then
|
||||
echo "Options selected:" >&2
|
||||
for option in "''${options_selected[@]}"; do
|
||||
echo " ✓ $option" >&2
|
||||
done
|
||||
echo >&2
|
||||
fi
|
||||
|
||||
# Return only the args string
|
||||
echo "$args_string"
|
||||
}
|
||||
|
||||
# --- Main Logic ---
|
||||
if [ "$#" -eq 0 ]; then
|
||||
echo "Error: No command provided." >&2
|
||||
print_help
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
cleanup)
|
||||
echo "Warning! This will remove old generations of your system."
|
||||
read -p "How many generations to keep (default: all)? " keep_count
|
||||
|
||||
if [ -z "$keep_count" ]; then
|
||||
read -p "This will remove all but the current generation. Continue (y/N)? " -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
${pkgs.nh}/bin/nh clean all -v
|
||||
else
|
||||
echo "Cleanup cancelled."
|
||||
fi
|
||||
else
|
||||
read -p "This will keep the last $keep_count generations. Continue (y/N)? " -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
${pkgs.nh}/bin/nh clean all -k "$keep_count" -v
|
||||
else
|
||||
echo "Cleanup cancelled."
|
||||
fi
|
||||
fi
|
||||
|
||||
LOG_DIR="$HOME/zcli-cleanup-logs"
|
||||
mkdir -p "$LOG_DIR"
|
||||
LOG_FILE="$LOG_DIR/zcli-cleanup-$(${pkgs.coreutils}/bin/date +%Y-%m-%d_%H-%M-%S).log"
|
||||
echo "Cleaning up old log files..." >> "$LOG_FILE"
|
||||
${pkgs.findutils}/bin/find "$LOG_DIR" -type f -mtime +3 -name "*.log" -delete >> "$LOG_FILE" 2>&1
|
||||
echo "Cleanup process logged to $LOG_FILE"
|
||||
;;
|
||||
diag)
|
||||
echo "Generating system diagnostic report..."
|
||||
${pkgs.inxi}/bin/inxi --full > "$HOME/diag.txt"
|
||||
echo "Diagnostic report saved to $HOME/diag.txt"
|
||||
;;
|
||||
help)
|
||||
print_help
|
||||
;;
|
||||
list-gens)
|
||||
echo "--- User Generations ---"
|
||||
${pkgs.nix}/bin/nix-env --list-generations | ${pkgs.coreutils}/bin/cat || echo "Could not list user generations."
|
||||
echo ""
|
||||
echo "--- System Generations ---"
|
||||
${pkgs.nix}/bin/nix profile history --profile /nix/var/nix/profiles/system | ${pkgs.coreutils}/bin/cat || echo "Could not list system generations."
|
||||
;;
|
||||
rebuild)
|
||||
verify_hostname
|
||||
handle_backups
|
||||
|
||||
# Parse additional arguments
|
||||
extra_args=$(parse_nh_args "$@")
|
||||
|
||||
echo "Starting NixOS rebuild for host: $(${pkgs.nettools}/bin/hostname)"
|
||||
if eval "${pkgs.nh}/bin/nh os switch --hostname '$PROFILE' $extra_args"; then
|
||||
echo "Rebuild finished successfully"
|
||||
else
|
||||
echo "Rebuild Failed" >&2
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
rebuild-boot)
|
||||
verify_hostname
|
||||
handle_backups
|
||||
|
||||
# Parse additional arguments
|
||||
extra_args=$(parse_nh_args "$@")
|
||||
|
||||
echo "Starting NixOS rebuild (boot) for host: $(${pkgs.nettools}/bin/hostname)"
|
||||
echo "Note: Configuration will be activated on next reboot"
|
||||
if eval "${pkgs.nh}/bin/nh os boot --hostname '$PROFILE' $extra_args"; then
|
||||
echo "Rebuild-boot finished successfully"
|
||||
echo "New configuration set as boot default - restart to activate"
|
||||
else
|
||||
echo "Rebuild-boot Failed" >&2
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
trim)
|
||||
echo "Running 'sudo fstrim -v /' may take a few minutes and impact system performance."
|
||||
read -p "Enter (y/Y) to run now or enter to exit (y/N): " -n 1 -r
|
||||
echo # move to a new line
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
echo "Running fstrim..."
|
||||
sudo ${pkgs.util-linux}/bin/fstrim -v /
|
||||
echo "fstrim complete."
|
||||
else
|
||||
echo "Trim operation cancelled."
|
||||
fi
|
||||
;;
|
||||
update)
|
||||
verify_hostname
|
||||
handle_backups
|
||||
|
||||
# Parse additional arguments
|
||||
extra_args=$(parse_nh_args "$@")
|
||||
|
||||
echo "Updating flake and rebuilding system for host: $(${pkgs.nettools}/bin/hostname)"
|
||||
if eval "${pkgs.nh}/bin/nh os switch --hostname '$PROFILE' --update $extra_args"; then
|
||||
echo "Update and rebuild finished successfully"
|
||||
else
|
||||
echo "Update and rebuild Failed" >&2
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
update-host)
|
||||
target_hostname=""
|
||||
target_profile=""
|
||||
|
||||
if [ "$#" -eq 3 ]; then # zcli update-host <hostname> <profile>
|
||||
target_hostname="$2"
|
||||
target_profile="$3"
|
||||
elif [ "$#" -eq 1 ]; then # zcli update-host (auto-detect)
|
||||
echo "Attempting to auto-detect hostname and GPU profile..."
|
||||
target_hostname=$(${pkgs.nettools}/bin/hostname)
|
||||
target_profile=$(detect_gpu_profile)
|
||||
|
||||
if [ -z "$target_profile" ]; then
|
||||
echo "Error: Could not auto-detect a specific GPU profile. Please provide it manually." >&2
|
||||
echo "Usage: zcli update-host [hostname] [profile]" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "Auto-detected Hostname: $target_hostname"
|
||||
echo "Auto-detected Profile: $target_profile"
|
||||
else
|
||||
echo "Error: Invalid number of arguments for 'update-host'." >&2
|
||||
echo "Usage: zcli update-host [hostname] [profile]" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Updating $FLAKE_NIX_PATH..."
|
||||
|
||||
# Update host
|
||||
if ${pkgs.gnused}/bin/sed -i "s/^[[:space:]]*host[[:space:]]*=[[:space:]]*\".*\"/ host = \"$target_hostname\"/" "$FLAKE_NIX_PATH"; then
|
||||
echo "Successfully updated host to: $target_hostname"
|
||||
else
|
||||
echo "Error: Failed to update host in $FLAKE_NIX_PATH" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Update profile
|
||||
if ${pkgs.gnused}/bin/sed -i "s/^[[:space:]]*profile[[:space:]]*=[[:space:]]*\".*\"/ profile = \"$target_profile\"/" "$FLAKE_NIX_PATH"; then
|
||||
echo "Successfully updated profile to: $target_profile"
|
||||
else
|
||||
echo "Error: Failed to update profile in $FLAKE_NIX_PATH" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Flake.nix updated successfully!"
|
||||
;;
|
||||
add-host)
|
||||
hostname=""
|
||||
profile_arg=""
|
||||
|
||||
if [ "$#" -ge 2 ]; then
|
||||
hostname="$2"
|
||||
fi
|
||||
if [ "$#" -eq 3 ]; then
|
||||
profile_arg="$3"
|
||||
fi
|
||||
|
||||
if [ -z "$hostname" ]; then
|
||||
read -p "Enter the new hostname: " hostname
|
||||
fi
|
||||
|
||||
if [ -d "$HOME/$PROJECT/hosts/$hostname" ]; then
|
||||
echo "Error: Host '$hostname' already exists." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Copying default host configuration..."
|
||||
${pkgs.coreutils}/bin/cp -r "$HOME/$PROJECT/hosts/default" "$HOME/$PROJECT/hosts/$hostname"
|
||||
|
||||
detected_profile=""
|
||||
if [[ -n "$profile_arg" && "$profile_arg" =~ ^(intel|amd|nvidia|nvidia-hybrid|vm)$ ]]; then
|
||||
detected_profile="$profile_arg"
|
||||
else
|
||||
echo "Detecting GPU profile..."
|
||||
detected_profile=$(detect_gpu_profile)
|
||||
echo "Detected GPU profile: $detected_profile"
|
||||
read -p "Is this correct? (y/n) " -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Nn]$ ]]; then
|
||||
read -p "Enter the correct profile (intel, amd, nvidia, nvidia-hybrid, vm): " new_profile
|
||||
while [[ ! "$new_profile" =~ ^(intel|amd|nvidia|nvidia-hybrid|vm)$ ]]; do
|
||||
echo "Invalid profile. Please enter one of the following: intel, amd, nvidia, nvidia-hybrid, vm"
|
||||
read -p "Enter the correct profile: " new_profile
|
||||
done
|
||||
detected_profile=$new_profile
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Setting profile to '$detected_profile'..."
|
||||
${pkgs.gnused}/bin/sed -i "s/profile = .*/profile = \"$detected_profile\";/" "$HOME/$PROJECT/hosts/$hostname/default.nix"
|
||||
|
||||
read -p "Generate new hardware.nix? (y/n) " -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
echo "Generating hardware.nix..."
|
||||
sudo nixos-generate-config --show-hardware-config > "$HOME/$PROJECT/hosts/$hostname/hardware.nix"
|
||||
echo "hardware.nix generated."
|
||||
fi
|
||||
|
||||
echo "Adding new host to git..."
|
||||
${pkgs.git}/bin/git -C "$HOME/$PROJECT" add .
|
||||
echo "hostname: $hostname added"
|
||||
;;
|
||||
del-host)
|
||||
hostname=""
|
||||
if [ "$#" -eq 2 ]; then
|
||||
hostname="$2"
|
||||
else
|
||||
read -p "Enter the hostname to delete: " hostname
|
||||
fi
|
||||
|
||||
if [ ! -d "$HOME/$PROJECT/hosts/$hostname" ]; then
|
||||
echo "Error: Host '$hostname' does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
read -p "Are you sure you want to delete the host '$hostname'? (y/N) " -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
echo "Deleting host '$hostname'..."
|
||||
${pkgs.coreutils}/bin/rm -rf "$HOME/$PROJECT/hosts/$hostname"
|
||||
${pkgs.git}/bin/git -C "$HOME/$PROJECT" add .
|
||||
echo "hostname: $hostname removed"
|
||||
else
|
||||
echo "Deletion cancelled."
|
||||
fi
|
||||
;;
|
||||
doom)
|
||||
if [ "$#" -lt 2 ]; then
|
||||
echo "Error: doom command requires a subcommand." >&2
|
||||
echo "Usage: zcli doom [install|status|remove|update]" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Ensure we're acting on a valid host and we can locate variables.nix
|
||||
verify_hostname
|
||||
current_hostname="$(hostname)"
|
||||
host_vars_file="$HOME/$PROJECT/hosts/$current_hostname/variables.nix"
|
||||
|
||||
if [ ! -f "$host_vars_file" ]; then
|
||||
echo "Error: Host variables file not found: $host_vars_file" >&2
|
||||
echo "Please ensure your host folder exists and contains variables.nix." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
is_doom_enabled() {
|
||||
# Return 0 if doomEmacsEnable = true; appears (ignoring leading spaces)
|
||||
${pkgs.gnugrep}/bin/grep -Eq '^[[:space:]]*doomEmacsEnable[[:space:]]*=[[:space:]]*true[[:space:]]*;' "$host_vars_file"
|
||||
}
|
||||
|
||||
ensure_doom_enabled() {
|
||||
# If the variable is present but false, flip it; if missing, append it
|
||||
if ${pkgs.gnugrep}/bin/grep -Eq '^[[:space:]]*doomEmacsEnable[[:space:]]*=' "$host_vars_file"; then
|
||||
${pkgs.gnused}/bin/sed -i 's/^[[:space:]]*doomEmacsEnable[[:space:]]*=.*/ doomEmacsEnable = true;/' "$host_vars_file"
|
||||
else
|
||||
echo "" >> "$host_vars_file"
|
||||
echo " # Enabled by zcli doom on $(date)" >> "$host_vars_file"
|
||||
echo " doomEmacsEnable = true;" >> "$host_vars_file"
|
||||
fi
|
||||
}
|
||||
|
||||
doom_subcommand="$2"
|
||||
case "$doom_subcommand" in
|
||||
install)
|
||||
if ! is_doom_enabled; then
|
||||
echo "✗ Doom Emacs is disabled for host '$current_hostname' (doomEmacsEnable = false)." >&2
|
||||
echo "To enable, set doomEmacsEnable = true; in:" >&2
|
||||
echo " $host_vars_file" >&2
|
||||
echo "and rebuild your system before installing Doom." >&2
|
||||
echo
|
||||
read -p "Enable Doom for this host now and rebuild? (y/N) " -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
echo "Enabling Doom Emacs in $host_vars_file..."
|
||||
ensure_doom_enabled
|
||||
echo "Rebuilding system so user modules are applied..."
|
||||
if ${pkgs.nh}/bin/nh os switch --hostname "$PROFILE"; then
|
||||
echo "Rebuild complete. Proceeding with Doom installation."
|
||||
else
|
||||
echo "Error: Rebuild failed. Please fix the build and re-run 'zcli doom install'." >&2
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "Aborting. Please enable doomEmacsEnable and rebuild before installing." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
echo "Installing Doom Emacs..."
|
||||
${get-doom-script}/bin/get-doom
|
||||
;;
|
||||
status)
|
||||
if [ -x "$HOME/.emacs.d/bin/doom" ] && [ -f "$HOME/.emacs.d/core/doom.el" ]; then
|
||||
echo "✔ Doom Emacs appears installed at $HOME/.emacs.d"
|
||||
if [ -f "$HOME/.doom.d/init.el" ]; then
|
||||
echo " • User config found: $HOME/.doom.d/init.el"
|
||||
else
|
||||
echo " • Warning: User config (~/.doom.d) not found"
|
||||
fi
|
||||
echo "Version information:"
|
||||
"$HOME/.emacs.d/bin/doom" version 2>/dev/null || echo "Could not get version information"
|
||||
else
|
||||
if [ -d "$HOME/.emacs.d" ]; then
|
||||
if [ -z "$(ls -A "$HOME/.emacs.d" 2>/dev/null)" ]; then
|
||||
echo "✗ Found empty ~/.emacs.d (not a valid Doom installation)"
|
||||
else
|
||||
echo "✗ ~/.emacs.d exists but Doom was not detected"
|
||||
fi
|
||||
else
|
||||
echo "✗ Doom Emacs is not installed"
|
||||
fi
|
||||
echo "Run 'zcli doom install' to install it"
|
||||
fi
|
||||
;;
|
||||
remove)
|
||||
if [ ! -d "$HOME/.emacs.d" ]; then
|
||||
echo "Doom Emacs is not installed"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Warning: This will completely remove Doom Emacs and all your configuration!"
|
||||
read -p "Are you sure you want to continue? (y/N) " -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
echo "Removing Doom Emacs..."
|
||||
${pkgs.coreutils}/bin/rm -rf "$HOME/.emacs.d"
|
||||
echo "✔ Doom Emacs has been removed"
|
||||
else
|
||||
echo "Removal cancelled"
|
||||
fi
|
||||
;;
|
||||
update)
|
||||
if [ ! -x "$HOME/.emacs.d/bin/doom" ] || [ ! -f "$HOME/.emacs.d/core/doom.el" ]; then
|
||||
echo "Error: Doom Emacs is not installed correctly. Run 'zcli doom install' first." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Updating Doom Emacs..."
|
||||
"$HOME/.emacs.d/bin/doom" sync
|
||||
echo "✔ Doom Emacs update complete"
|
||||
;;
|
||||
*)
|
||||
echo "Error: Invalid doom subcommand '$doom_subcommand'" >&2
|
||||
echo "Usage: zcli doom [install|status|remove|update]" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo "Error: Invalid command '$1'" >&2
|
||||
print_help
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
''
|
||||
14
modules/home/ssh.nix
Normal file
14
modules/home/ssh.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
_: {
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
enableDefaultConfig = false;
|
||||
matchBlocks = {
|
||||
"hp-t640-homeserver" = {
|
||||
hostname = "192.168.1.156";
|
||||
user = "garand_plg";
|
||||
port = 22;
|
||||
identityFile = "~/.ssh/hp-t640-homeserver";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,60 +0,0 @@
|
||||
# starship is a minimal, fast, and extremely customizable prompt for any shell!
|
||||
{ config
|
||||
, lib
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
accent = "#${config.lib.stylix.colors.base0D}";
|
||||
background-alt = "#${config.lib.stylix.colors.base01}";
|
||||
in
|
||||
{
|
||||
programs.starship = {
|
||||
enable = false;
|
||||
settings = {
|
||||
add_newline = false;
|
||||
format = lib.concatStrings [
|
||||
"$nix_shell"
|
||||
"$hostname"
|
||||
"$directory"
|
||||
"$git_branch"
|
||||
"$git_state"
|
||||
"$git_status"
|
||||
"\n"
|
||||
"$character"
|
||||
];
|
||||
directory = { style = accent; };
|
||||
|
||||
character = {
|
||||
success_symbol = "[❯](${accent})";
|
||||
error_symbol = "[❯](red)";
|
||||
vimcmd_symbol = "[❮](cyan)";
|
||||
};
|
||||
|
||||
nix_shell = {
|
||||
format = "[$symbol]($style) ";
|
||||
symbol = "🐚";
|
||||
style = "";
|
||||
};
|
||||
|
||||
git_branch = {
|
||||
symbol = "[](${background-alt}) ";
|
||||
style = "fg:${accent} bg:${background-alt}";
|
||||
format = "on [$symbol$branch]($style)[](${background-alt}) ";
|
||||
};
|
||||
|
||||
git_status = {
|
||||
format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218)($ahead_behind$stashed)]($style)";
|
||||
style = "cyan";
|
||||
conflicted = "";
|
||||
renamed = "";
|
||||
deleted = "";
|
||||
stashed = "≡";
|
||||
};
|
||||
|
||||
git_state = {
|
||||
format = "([$state( $progress_current/$progress_total)]($style)) ";
|
||||
style = "bright-black";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,6 +1,72 @@
|
||||
{ pkgs, ... }: {
|
||||
# starship with python venv support
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
accent = "#${config.lib.stylix.colors.base0D}";
|
||||
background-alt = "#${config.lib.stylix.colors.base01}";
|
||||
in
|
||||
{
|
||||
programs.starship = {
|
||||
enable = false;
|
||||
package = pkgs.starship;
|
||||
enable = true;
|
||||
settings = {
|
||||
add_newline = false;
|
||||
format = lib.concatStrings [
|
||||
"$nix_shell"
|
||||
"$hostname"
|
||||
"$directory"
|
||||
"$git_branch"
|
||||
"$git_state"
|
||||
"$git_status"
|
||||
"$python"
|
||||
"\n"
|
||||
"$character"
|
||||
];
|
||||
|
||||
directory = {
|
||||
style = accent;
|
||||
};
|
||||
|
||||
character = {
|
||||
success_symbol = "[❯](${accent})";
|
||||
error_symbol = "[❯](red)";
|
||||
vimcmd_symbol = "[❮](cyan)";
|
||||
};
|
||||
|
||||
nix_shell = {
|
||||
format = "[$symbol]($style) ";
|
||||
symbol = " ";
|
||||
style = "";
|
||||
};
|
||||
|
||||
git_branch = {
|
||||
symbol = "[](${background-alt}) ";
|
||||
style = "fg:${accent} bg:${background-alt}";
|
||||
format = "on [$symbol$branch]($style)[](${background-alt}) ";
|
||||
};
|
||||
|
||||
git_status = {
|
||||
format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218)($ahead_behind$stashed)]($style)";
|
||||
style = "cyan";
|
||||
conflicted = "";
|
||||
renamed = "";
|
||||
deleted = "";
|
||||
stashed = "≡";
|
||||
};
|
||||
|
||||
git_state = {
|
||||
format = "([$state( $progress_current/$progress_total)]($style)) ";
|
||||
style = "bright-black";
|
||||
};
|
||||
|
||||
python = {
|
||||
format = " [$symbol($virtualenv)](${accent}) ";
|
||||
symbol = " ";
|
||||
pyenv_version_name = false;
|
||||
style = "fg:${accent}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
6
modules/home/steam.nix
Normal file
6
modules/home/steam.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
_: {
|
||||
home.file.".steam/steam/steam_dev.cfg".text = ''
|
||||
@nClientDownloadEnableHTTP2PlatformLinux 0
|
||||
@fDownloadRateImprovementToAddAnotherConnection 1.0
|
||||
'';
|
||||
}
|
||||
@@ -1,10 +1,13 @@
|
||||
_: {
|
||||
{ host, ... }:
|
||||
{
|
||||
stylix.targets = {
|
||||
librewolf.profileNames = [ "${host}" ];
|
||||
waybar.enable = false;
|
||||
rofi.enable = false;
|
||||
hyprland.enable = false;
|
||||
hyprlock.enable = false;
|
||||
ghostty.enable = false;
|
||||
vscode.enable = false;
|
||||
qt = {
|
||||
enable = true;
|
||||
platform = "qtct";
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{ username, ... }: {
|
||||
{ username, ... }:
|
||||
{
|
||||
home.file = {
|
||||
".config/swappy/config".text = ''
|
||||
[Default]
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{ config, ... }: {
|
||||
{ config, ... }:
|
||||
{
|
||||
services.swaync = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{ ... }: {
|
||||
{ ... }:
|
||||
{
|
||||
programs.tealdeer = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
||||
@@ -1,118 +0,0 @@
|
||||
# Tmux is a terminal multiplexer that allows you to run multiple terminal sessions in a single window.
|
||||
{ pkgs, ... }: {
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
mouse = true;
|
||||
shell = "${pkgs.zsh}/bin/zsh";
|
||||
prefix = "C-a";
|
||||
terminal = "kitty";
|
||||
keyMode = "vi";
|
||||
|
||||
extraConfig = ''
|
||||
set-option -g status-position top
|
||||
|
||||
#set -g default-terminal "screen-256color"
|
||||
set-option -g history-limit 5000
|
||||
unbind %
|
||||
unbind '"'
|
||||
|
||||
bind-key h select-pane -L
|
||||
bind-key j select-pane -D
|
||||
bind-key k select-pane -U
|
||||
bind-key l select-pane -R
|
||||
|
||||
set -gq allow-passthrough on
|
||||
bind-key x kill-pane # skip "kill-pane 1? (y/n)" prompt
|
||||
|
||||
bind-key -n C-Tab next-window
|
||||
bind-key -n C-S-Tab previous-window
|
||||
bind-key -n M-Tab new-window
|
||||
|
||||
|
||||
# Start windows and panes index at 1, not 0.
|
||||
set -g base-index 1
|
||||
setw -g pane-base-index 1
|
||||
|
||||
|
||||
bind-key "|" split-window -h -c "#{pane_current_path}"
|
||||
bind-key "\\" split-window -fh -c "#{pane_current_path}"
|
||||
|
||||
bind-key "-" split-window -v -c "#{pane_current_path}"
|
||||
bind-key "_" split-window -fv -c "#{pane_current_path}"
|
||||
|
||||
bind -r C-j resize-pane -D 15
|
||||
bind -r C-k resize-pane -U 15
|
||||
bind -r C-h resize-pane -L 15
|
||||
bind -r C-l resize-pane -R 15
|
||||
|
||||
# 'c' to new window
|
||||
bind-key c new-window
|
||||
|
||||
# 'n' next window
|
||||
bind-key n next-window
|
||||
|
||||
# 'p' next previous
|
||||
bind-key n previous-window
|
||||
|
||||
unbind r
|
||||
bind r source-file ~/.config/tmux/tmux.conf
|
||||
|
||||
bind -r m resize-pane -Z
|
||||
|
||||
bind-key t clock-mode
|
||||
bind-key q display-panes
|
||||
bind-key u refresh-client
|
||||
bind-key o select-pane -t :.+
|
||||
|
||||
|
||||
##### Display Popups #####
|
||||
|
||||
bind C-y display-popup \
|
||||
-d "#{pane_current_path}" \
|
||||
-w 80% \
|
||||
-h 80% \
|
||||
-E "lazygit"
|
||||
bind C-n display-popup -E 'bash -i -c "read -p \"Session name: \" name; tmux new-session -d -s \$name && tmux switch-client -t \$name"'
|
||||
bind C-j display-popup -E "tmux list-sessions | sed -E 's/:.*$//' | grep -v \"^$(tmux display-message -p '#S')\$\" | fzf --reverse | xargs tmux switch-client -t"
|
||||
#bind C-p display-popup -E "ipython"
|
||||
#bind C-f display-popup \
|
||||
# -w 80% \
|
||||
# -h 80% \
|
||||
# -E 'rmpc'
|
||||
bind C-r display-popup \
|
||||
-d "#{pane_current_path}" \
|
||||
-w 90% \
|
||||
-h 90% \
|
||||
-E "yazi"
|
||||
bind C-z display-popup \
|
||||
-w 90% \
|
||||
-h 90% \
|
||||
-E 'nvim ~/ddubsos/flake.nix'
|
||||
#bind C-g display-popup -E "bash -i ~/.tmux/scripts/chat-popup.sh"
|
||||
bind C-t display-popup \
|
||||
-d "#{pane_current_path}" \
|
||||
-w 75% \
|
||||
-h 75% \
|
||||
-E "zsh"
|
||||
|
||||
##### Display Menu #####
|
||||
|
||||
bind d display-menu -T "#[align=centre]Dotfiles" -x C -y C \
|
||||
"ZaneyOS flake.nix" f "display-popup -E 'nvim ~/garandos/flake.nix'" \
|
||||
"ZaneyOS packages" p "display-popup -E 'nvim ~/garandos/modules/core/packages.nix'" \
|
||||
"ZaneyOS keybinds" k "display-popup -E 'nvim ~/garandos/modules/home/hyprland/binds.nix'" \
|
||||
"ZaneyOS env variables" e "display-popup -E 'nvim ~/garandos/modules/home/hyprland/env.nix'" \
|
||||
"ZaneyOS windowrules" w "display-popup -E 'nvim ~/garandos/modules/home/hyprland/windowrules.nix'" \
|
||||
"Exit" q ""
|
||||
|
||||
|
||||
|
||||
'';
|
||||
|
||||
plugins = with pkgs; [
|
||||
tmuxPlugins.vim-tmux-navigator
|
||||
tmuxPlugins.sensible
|
||||
tmuxPlugins.tokyo-night-tmux
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
{ pkgs, lib, ... }: {
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
programs.vscode = {
|
||||
@@ -6,33 +7,430 @@
|
||||
package = pkgs.vscodium;
|
||||
profiles = {
|
||||
default = {
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
bbenoist.nix
|
||||
jeff-hykin.better-nix-syntax
|
||||
ms-vscode.cpptools-extension-pack
|
||||
mads-hartmann.bash-ide-vscode
|
||||
tamasfe.even-better-toml
|
||||
zainchen.json
|
||||
shd101wyy.markdown-preview-enhanced
|
||||
extensions =
|
||||
with pkgs.vscode-extensions;
|
||||
[
|
||||
batisteo.vscode-django
|
||||
bradlc.vscode-tailwindcss
|
||||
christian-kohler.npm-intellisense
|
||||
christian-kohler.path-intellisense
|
||||
continue.continue
|
||||
davidanson.vscode-markdownlint
|
||||
dbaeumer.vscode-eslint
|
||||
donjayamanne.githistory
|
||||
esbenp.prettier-vscode
|
||||
ethansk.restore-terminals
|
||||
formulahendry.auto-close-tag
|
||||
formulahendry.auto-rename-tag
|
||||
gruntfuggly.todo-tree
|
||||
jnoortheen.nix-ide
|
||||
mechatroner.rainbow-csv
|
||||
ms-azuretools.vscode-docker
|
||||
njpwerner.autodocstring
|
||||
octref.vetur
|
||||
oderwat.indent-rainbow
|
||||
shd101wyy.markdown-preview-enhanced
|
||||
streetsidesoftware.code-spell-checker
|
||||
supermaven.supermaven
|
||||
tomoki1207.pdf
|
||||
visualstudioexptteam.intellicode-api-usage-examples
|
||||
visualstudioexptteam.vscodeintellicode
|
||||
vscode-icons-team.vscode-icons
|
||||
vue.volar
|
||||
wholroyd.jinja
|
||||
yoavbls.pretty-ts-errors
|
||||
tamasfe.even-better-toml
|
||||
ms-ceintl.vscode-language-pack-pl
|
||||
rust-lang.rust-analyzer
|
||||
fill-labs.dependi
|
||||
usernamehw.errorlens
|
||||
bierner.docs-view
|
||||
stkb.rewrap
|
||||
ms-vscode.live-server
|
||||
vadimcn.vscode-lldb
|
||||
batisteo.vscode-django
|
||||
vitaliymaz.vscode-svg-previewer
|
||||
]
|
||||
++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
|
||||
{
|
||||
name = "goto-alias";
|
||||
publisher = "antfu";
|
||||
version = "0.2.1";
|
||||
hash = "sha256-BJBJVG/zW2BW6K0UqQ4EE12VVIxW3g+z5CecZXRPIrM=";
|
||||
}
|
||||
{
|
||||
name = "vite";
|
||||
publisher = "antfu";
|
||||
version = "0.2.5";
|
||||
hash = "sha256-F3uaqoaLXLE7M8OPzNIIUSraTBeRMwtjxrbgQyMIyZE=";
|
||||
}
|
||||
{
|
||||
name = "django-html";
|
||||
publisher = "bibhasdn";
|
||||
version = "1.3.0";
|
||||
hash = "sha256-7xVJVcjmwl6917lqkTa0KFwMLkAvHkNT2wVML14gVCk=";
|
||||
}
|
||||
{
|
||||
name = "one-dark-pro-monokai-darker";
|
||||
publisher = "eserozvataf";
|
||||
version = "1.1.0";
|
||||
hash = "sha256-jUjBiy0CD7jw2WBMvM3h8bEC2ySEuj7532dC3v9lpyI=";
|
||||
}
|
||||
{
|
||||
name = "bootstrap-intellisense";
|
||||
publisher = "hossaini";
|
||||
version = "3.0.2";
|
||||
hash = "sha256-stZfbh42HncdRzFZ9ShumZ9Tuery9RF9c8rk3TD3P2g=";
|
||||
}
|
||||
{
|
||||
name = "tab-indent-space-align";
|
||||
publisher = "j-zeppenfeld";
|
||||
version = "0.0.3";
|
||||
hash = "sha256-+WEdYJOVWW7YumfzLkvZmrnpUiC85oLsG1BKMwL1NHc=";
|
||||
}
|
||||
{
|
||||
name = "bun-lockb";
|
||||
publisher = "jaaxxx";
|
||||
version = "0.0.7";
|
||||
hash = "sha256-CkdH/luVTFycRn4Td6ovFnEQep+tVEIXsyUjhfJwfN4=";
|
||||
}
|
||||
{
|
||||
name = "search-node-modules";
|
||||
publisher = "jasonnutter";
|
||||
version = "1.3.0";
|
||||
hash = "sha256-X2CkCVF46McnXDlASlRHKixlAzR+hU4ys8A8JsbpfYI=";
|
||||
}
|
||||
{
|
||||
name = "polacode-2019";
|
||||
publisher = "jeff-hykin";
|
||||
version = "0.6.1";
|
||||
hash = "sha256-SbfsD28gaVHAmJskUuc1Q8kA47jrVa3OO5Ur7ULk3jI=";
|
||||
}
|
||||
{
|
||||
name = "vsc-python-indent";
|
||||
publisher = "kevinrose";
|
||||
version = "1.21.0";
|
||||
hash = "sha256-SvJhVG8sofzV0PebZG4IIORX3AcfmErDQ00tRF9fk/4=";
|
||||
}
|
||||
{
|
||||
name = "json-to-ts";
|
||||
publisher = "mariusalchimavicius";
|
||||
version = "1.8.0";
|
||||
hash = "sha256-WoSycVtUAkVXv7BDuh+jFbnaU1IdVLvVjOYuIuUp79M=";
|
||||
}
|
||||
{
|
||||
name = "inline-fold-new";
|
||||
publisher = "ctf0";
|
||||
version = "0.0.2";
|
||||
hash = "sha256-DpXTBYN1Ohh3ZvvpUtas0G99fZcimsp1NL7mpIC07yk=";
|
||||
}
|
||||
{
|
||||
name = "mdc";
|
||||
publisher = "nuxt";
|
||||
version = "0.3.1";
|
||||
hash = "sha256-YJ+7gzDjA8kzxBwGLpEmfx0erJdgAntWc2OrK2zp9DM=";
|
||||
}
|
||||
{
|
||||
name = "nuxtr-vscode";
|
||||
publisher = "nuxtr";
|
||||
version = "0.2.16";
|
||||
hash = "sha256-DVoq8zdlJ2ch8PCG34f1PRkILym9XdclUHQ9s2B5OME=";
|
||||
}
|
||||
{
|
||||
name = "bun-vscode";
|
||||
publisher = "oven";
|
||||
version = "0.0.28";
|
||||
hash = "sha256-WlGqqKbfrV0gqCCdVo/UFF+Gnxhq0TNJ4LuHwFaFYXA=";
|
||||
}
|
||||
{
|
||||
name = "csv-to-table";
|
||||
publisher = "phplasma";
|
||||
version = "1.4.1";
|
||||
hash = "sha256-npe7cQ4lAZr8HCyQSJmVsCDUJcOhGhL6y1QtUtqUY50=";
|
||||
}
|
||||
{
|
||||
name = "nuxt-snippets";
|
||||
publisher = "praburangki";
|
||||
version = "1.8.0";
|
||||
hash = "sha256-qrWrrDO/Ie/mdygw18C0mrPzNQzZLsd+fapUyTVhc14=";
|
||||
}
|
||||
{
|
||||
name = "bash-debug";
|
||||
publisher = "rogalmic";
|
||||
version = "0.3.9";
|
||||
hash = "sha256-f8FUZCvz/PonqQP9RCNbyQLZPnN5Oce0Eezm/hD19Fg=";
|
||||
}
|
||||
{
|
||||
name = "vs-code-prettier-eslint";
|
||||
publisher = "rvest";
|
||||
version = "6.0.0";
|
||||
hash = "sha256-PogNeKhIlcGxUKrW5gHvFhNluUelWDGHCdg5K+xGXJY=";
|
||||
}
|
||||
{
|
||||
name = "vscode-preview-docs";
|
||||
publisher = "selemondev";
|
||||
version = "0.1.7";
|
||||
hash = "sha256-Q9bEIb2m6cqHtdVjOaNivfYvbc5/VVdabM2NVTwBOFA=";
|
||||
}
|
||||
{
|
||||
name = "autoimport";
|
||||
publisher = "steoates";
|
||||
version = "1.5.4";
|
||||
hash = "sha256-7iIwJJsoNbtTopc+BQ+195aSCLqdNAaGtMoxShyhBWY=";
|
||||
}
|
||||
{
|
||||
name = "code-spell-checker-polish";
|
||||
publisher = "streetsidesoftware";
|
||||
version = "2.1.3";
|
||||
hash = "sha256-MZeTvK9dO4Kj6hK+afJPWGmnKBtlLrrnoqtUd5s2te0=";
|
||||
}
|
||||
{
|
||||
name = "vscode-pets";
|
||||
publisher = "tonybaloney";
|
||||
version = "1.30.0";
|
||||
hash = "sha256-RxOA6xQ29JuB0NzEqMDkF9W1U+AsvgAOzGbtIUw0WyM=";
|
||||
}
|
||||
{
|
||||
name = "explorer";
|
||||
publisher = "vitest";
|
||||
version = "1.17.0";
|
||||
hash = "sha256-7OePMFsWIyrPkAW/+SRiOoowluLMEszEjWmBsW0LPpc=";
|
||||
}
|
||||
{
|
||||
name = "prettify-json";
|
||||
publisher = "mohsen1";
|
||||
version = "0.0.3";
|
||||
hash = "sha256-lvds+lFDzt1s6RikhrnAKJipRHU+Dk85ZO49d1sA8uo=";
|
||||
}
|
||||
{
|
||||
name = "uv-toolkit";
|
||||
publisher = "the0807";
|
||||
version = "0.0.2";
|
||||
hash = "sha256-OXHUwynWm4RqJYjcv5qXt5DyjFDxtNjZFNpnd22gUgg=";
|
||||
}
|
||||
{
|
||||
name = "kylin-python";
|
||||
publisher = "kylinideteam";
|
||||
version = "0.4.2";
|
||||
hash = "sha256-LhOsIvECrxLCnRjUVffS4G4fFsdP70iP/twoNoto354=";
|
||||
}
|
||||
{
|
||||
name = "rust-flash-snippets";
|
||||
publisher = "lorenzopirro";
|
||||
version = "3.1.1";
|
||||
hash = "sha256-L8x/OqbrsKDmyphzV3CDpoZ27rTnPS0U1YGv9KakW+U=";
|
||||
}
|
||||
{
|
||||
name = "rustowl-vscode";
|
||||
publisher = "cordx56";
|
||||
version = "0.3.4";
|
||||
hash = "sha256-sM4CxQfdtDkZg5B7gxw66k7ZpIfHQFORIukHRpg0+S8=";
|
||||
}
|
||||
{
|
||||
name = "vscode-coverage-gutters";
|
||||
publisher = "ryanluker";
|
||||
version = "2.13.0";
|
||||
hash = "sha256-qgPKGikqNIeZkKfd0P0keAdxRl9XNzvEJKQy58eaUZk=";
|
||||
}
|
||||
{
|
||||
name = "vscode-change-case";
|
||||
publisher = "hjdarnel";
|
||||
version = "1.4.0";
|
||||
hash = "sha256-6LS4MrG16054DQkPmr7BQJeekpEtcL2NtRe0Ckfq2w4=";
|
||||
}
|
||||
{
|
||||
name = "vscode-bevy-inspector";
|
||||
publisher = "splo";
|
||||
version = "0.3.0";
|
||||
hash = "sha256-f0FAgQ0wm3FYPz5qpMHWHnTf3un0xw+5gcyBG7PYM2E=";
|
||||
}
|
||||
];
|
||||
userSettings = {
|
||||
"editor.foldingImportsByDefault" = true;
|
||||
"editor.fontFamily" = "FiraCode Nerd Font";
|
||||
"editor.formatOnPaste" = true;
|
||||
"editor.formatOnSave" = true;
|
||||
"editor.guides.bracketPairs" = false;
|
||||
"editor.guides.indentation" = false;
|
||||
"editor.inlayHints.enabled" = "off";
|
||||
"editor.inlineSuggest.showToolbar" = "always";
|
||||
"editor.largeFileOptimizations" = false;
|
||||
"editor.minimap.enabled" = false;
|
||||
"editor.quickSuggestions" = {
|
||||
"strings" = "on";
|
||||
};
|
||||
"editor.suggestFontSize" = 16;
|
||||
"editor.suggestLineHeight" = 30;
|
||||
"editor.tabSize" = 2;
|
||||
"editor.unicodeHighlight.ambiguousCharacters" = false;
|
||||
"editor.unicodeHighlight.invisibleCharacters" = false;
|
||||
"editor.wordWrap" = "off";
|
||||
# Workbench settings
|
||||
"workbench.colorCustomizations" = {
|
||||
"editor.lineHighlightBackground" = "#1073cf2d";
|
||||
"editor.lineHighlightBorder" = "#9fced11f";
|
||||
};
|
||||
"workbench.colorTheme" = "One Dark Pro Monokai Darker";
|
||||
"workbench.iconTheme" = "vscode-icons";
|
||||
"workbench.startupEditor" = "none";
|
||||
# Terminal settings
|
||||
"terminal.integrated.fontFamily" = "FiraCode Nerd Fonts Mono";
|
||||
# Git settings
|
||||
"git.confirmSync" = false;
|
||||
"git.enableSmartCommit" = true;
|
||||
# Explorer settings
|
||||
"explorer.confirmDelete" = false;
|
||||
"explorer.confirmDragAndDrop" = false;
|
||||
# Diff editor settings
|
||||
"diffEditor.ignoreTrimWhitespace" = false;
|
||||
"diffEditor.wordWrap" = "off";
|
||||
# Zen mode settings
|
||||
"zenMode.centerLayout" = false;
|
||||
"zenMode.hideActivityBar" = false;
|
||||
"zenMode.hideLineNumbers" = false;
|
||||
# Language specific settings
|
||||
"[typescript]" = {
|
||||
"editor.defaultFormatter" = "esbenp.prettier-vscode";
|
||||
};
|
||||
"[vue]" = {
|
||||
"editor.defaultFormatter" = "esbenp.prettier-vscode";
|
||||
};
|
||||
"[jsonc]" = {
|
||||
"editor.defaultFormatter" = "vscode.json-language-features";
|
||||
};
|
||||
"[json]" = {
|
||||
"editor.defaultFormatter" = "vscode.json-language-features";
|
||||
};
|
||||
"[python]" = {
|
||||
"editor.tabSize" = 4;
|
||||
};
|
||||
# File associations
|
||||
"files.associations" = {
|
||||
"*.html" = "html";
|
||||
"*.txt" = "plaintext";
|
||||
};
|
||||
# JavaScript/TypeScript settings
|
||||
"javascript.updateImportsOnFileMove.enabled" = "always";
|
||||
"typescript.updateImportsOnFileMove.enabled" = "always";
|
||||
# Python settings
|
||||
"python.linting.pylintEnabled" = false;
|
||||
"python.linting.flake8Enabled" = true;
|
||||
"python.linting.flake8Args" = [
|
||||
"--line-width=119"
|
||||
"--ignore=T000;E501;E265;E266;N802;D;Q;W504"
|
||||
"--exclude=migrations;mocks"
|
||||
];
|
||||
"python.linting.enabled" = true;
|
||||
"python.formatting.provider" = "yapf";
|
||||
"python.formatting.yapfArgs" = [
|
||||
"--style={based_on_style = pep8; column_limit = 119; dedent_closing_brackets = true; split_before_first_argument = true; coalesce_brackets = false; split_before_dict_set_generator = false; allow_split_before_dict_value = false; split_all_comma_separated_values = false; split_before_arithmetic_operator = false; split_before_logical_operator = false; split_before_named_assigns = false}"
|
||||
];
|
||||
"python.languageServer" = "Jedi";
|
||||
"python.jediMemoryLimit" = 1024;
|
||||
"python.jedi.hover.enable" = true;
|
||||
"python.jedi.hover.detailed" = false;
|
||||
"python.jedi.hover.signature" = true;
|
||||
"python.analysis.completeFunctionParens" = true;
|
||||
"editor.hover.enabled" = true;
|
||||
# Vue settings
|
||||
"vue.codeActions.enabled" = false;
|
||||
"vue.format.script.initialIndent" = true;
|
||||
"vue.format.style.initialIndent" = true;
|
||||
"vue.splitEditors.icon" = true;
|
||||
"vue.splitEditors.layout.left" = [
|
||||
"script"
|
||||
"scriptSetup"
|
||||
];
|
||||
"vue.splitEditors.layout.right" = [
|
||||
"template"
|
||||
"customBlocks"
|
||||
"style"
|
||||
];
|
||||
"vetur.ignoreProjectWarning" = true;
|
||||
"vetur.languageFeatures.codeActions" = false;
|
||||
"vetur.useWorkspaceDependencies" = true;
|
||||
"prettier.vueIndentScriptAndStyle" = true;
|
||||
# // Nuxt settings
|
||||
"nuxtr.defaultPackageManager" = "Bun";
|
||||
"nuxtr.monorepoMode.DirectoryName" = "";
|
||||
"nuxtr.openItemsAfterCreation" = true;
|
||||
"nuxtr.piniaFiles.defaultTemplate" = "setup";
|
||||
"nuxtr.vueFiles.firstTag" = "script";
|
||||
"nuxtr.vueFiles.style.defaultLanguage" = "postcss";
|
||||
# CSS/Tailwind settings
|
||||
"tailwindCSS.emmetCompletions" = true;
|
||||
# Syntax highlighting and appearance
|
||||
"indentRainbow.colorOnWhiteSpaceOnly" = true;
|
||||
"indentRainbow.indicatorStyle" = "light";
|
||||
"indentRainbow.lightIndicatorStyleLineWidth" = 4;
|
||||
# Spelling and language
|
||||
"cSpell.language" = "en;pl";
|
||||
"cSpell.userWords" = [
|
||||
"garand"
|
||||
"Garand's"
|
||||
"garandplg"
|
||||
"garands"
|
||||
"lockb"
|
||||
"Shadcn"
|
||||
"Vite"
|
||||
];
|
||||
# Navigation and intellisense
|
||||
"editor.gotoLocation.multipleDefinitions" = "goto";
|
||||
"path-intellisense.extensionOnImport" = true;
|
||||
# Markdown settings
|
||||
"markdown-preview-enhanced.previewTheme" = "one-dark.css";
|
||||
# Extension specific settings
|
||||
"supermaven.allowGitignore" = true;
|
||||
"supermaven.enable" = {
|
||||
"*" = true;
|
||||
};
|
||||
"continue.enableTabAutocomplete" = false;
|
||||
"continue.showInlineTip" = false;
|
||||
"continue.telemetryEnabled" = false;
|
||||
"hediet.vscode-drawio.resizeImages" = null;
|
||||
"todo-tree.highlights.useColourScheme" = true;
|
||||
"vite.autoStart" = false;
|
||||
# Security and trust
|
||||
"security.workspace.trust.untrustedFiles" = "open";
|
||||
# Remote development
|
||||
"remote.autoForwardPortsSource" = "hybrid";
|
||||
"[plaintext]" = {
|
||||
"editor.unicodeHighlight.ambiguousCharacters" = false;
|
||||
"editor.unicodeHighlight.invisibleCharacters" = false;
|
||||
};
|
||||
"python.diagnostics.sourceMapsEnabled" = true;
|
||||
"vsintellicode.modify.editor.suggestSelection" = "automaticallyOverrodeDefaultValue";
|
||||
"githubLocalActions.workflowsDirectory" = ".gitea/workflows";
|
||||
"errorLens.excludeBySource" = [
|
||||
"cSpell"
|
||||
];
|
||||
};
|
||||
keybindings = [
|
||||
{
|
||||
"key" = "tab";
|
||||
"command" = "-editor.emmet.action.expandAbbreviation";
|
||||
"when" =
|
||||
"config.emmet.triggerExpansionOnTab && editorTextFocus && !editorReadonly && !editorTabMovesFocus";
|
||||
}
|
||||
{
|
||||
"key" = "tab";
|
||||
"command" = "-editor.action.inlineSuggest.jump";
|
||||
"when" =
|
||||
"inlineEditIsVisible && tabShouldJumpToInlineEdit && !editorHoverFocused && !editorTabMovesFocus && !suggestWidgetVisible";
|
||||
}
|
||||
{
|
||||
"key" = "tab";
|
||||
"command" = "-Alignment Preserving Indent";
|
||||
"when" =
|
||||
"editorTextFocus && !editorReadOnly && !editorTabMovesFocus && !inSnippetMode && !suggestWidgetVisible && config.editor.tabCompletion != 'on'";
|
||||
}
|
||||
{
|
||||
"key" = "tab";
|
||||
"command" = "-Alignment Preserving Indent";
|
||||
"when" =
|
||||
"editorTextFocus && !editorReadOnly && !editorTabMovesFocus && !hasOtherSuggestions && !inSnippetMode && !suggestWidgetVisible && config.editor.tabCompletion == 'on'";
|
||||
}
|
||||
];
|
||||
# userSettings = {
|
||||
# "chat.editor.fontFamily" = "JetBrains Mono";
|
||||
# "chat.editor.fontSize" = 20.0;
|
||||
# "debug.console.fontFamily" = "JetBrains Mono";
|
||||
# "debug.console.fontSize" = 20.0;
|
||||
# "editor.fontFamily" = "JetBrains Mono";
|
||||
# "editor.fontSize" = 20.0;
|
||||
# "editor.inlayHints.fontFamily" = "JetBrains Mono";
|
||||
# "editor.inlineSuggest.fontFamily" = "JetBrains Mono";
|
||||
# "editor.minimap.sectionHeaderFontSize" = 12.857142857142858;
|
||||
# "markdown.preview.fontFamily" = "Montserrat";
|
||||
# "markdown.preview.fontSize" = 20.0;
|
||||
# "scm.inputFontFamily" = "JetBrains Mono";
|
||||
# "scm.inputFontSize" = 18.571428571428573;
|
||||
# "screencastMode.fontSize" = 80.0;
|
||||
# "terminal.integrated.fontSize" = 20.0;
|
||||
# "workbench.colorTheme" = "One Dark Pro Monokai Darker";
|
||||
# };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
{ pkgs
|
||||
, lib
|
||||
, host
|
||||
, config
|
||||
, ...
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
host,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
betterTransition = "all 0.3s cubic-bezier(.55,-0.68,.48,1.682)";
|
||||
inherit (import ../../../hosts/${host}/variables.nix) clock24h;
|
||||
in
|
||||
with lib; {
|
||||
with lib;
|
||||
{
|
||||
# Configure & Theme Waybar
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
@@ -46,10 +48,7 @@ with lib; {
|
||||
on-scroll-down = "hyprctl dispatch workspace e-1";
|
||||
};
|
||||
"clock" = {
|
||||
format =
|
||||
if clock24h == true
|
||||
then '' {:L%H:%M}''
|
||||
else '' {:L%I:%M %p}'';
|
||||
format = if clock24h == true then '' {:L%H:%M}'' else '' {:L%I:%M %p}'';
|
||||
tooltip = true;
|
||||
tooltip-format = "<big>{:%A, %d.%B %Y }</big>\n<tt><small>{calendar}</small></tt>";
|
||||
};
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
{ pkgs
|
||||
, config
|
||||
, lib
|
||||
, ...
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
terminal = "kitty";
|
||||
@@ -20,7 +21,8 @@ let
|
||||
base0E = "D2A6FF";
|
||||
base0F = "E6B673";
|
||||
in
|
||||
with lib; {
|
||||
with lib;
|
||||
{
|
||||
# Configure & Theme Waybar
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
@@ -30,9 +32,20 @@ with lib; {
|
||||
layer = "top";
|
||||
position = "top";
|
||||
|
||||
modules-left = [ "custom/startmenu" "tray" "hyprland/window" ];
|
||||
modules-left = [
|
||||
"custom/startmenu"
|
||||
"tray"
|
||||
"hyprland/window"
|
||||
];
|
||||
modules-center = [ "hyprland/workspaces" ];
|
||||
modules-right = [ "idle_inhibitor" "custom/notification" "pulseaudio" "battery" "clock" "custom/exit" ];
|
||||
modules-right = [
|
||||
"idle_inhibitor"
|
||||
"custom/notification"
|
||||
"pulseaudio"
|
||||
"battery"
|
||||
"clock"
|
||||
"custom/exit"
|
||||
];
|
||||
|
||||
"hyprland/workspaces" = {
|
||||
format = "{name}";
|
||||
@@ -46,9 +59,7 @@ with lib; {
|
||||
};
|
||||
"clock" = {
|
||||
format = '' {:%H:%M}'';
|
||||
/*
|
||||
''{: %I:%M %p}'';
|
||||
*/
|
||||
# ''{: %I:%M %p}'';
|
||||
tooltip = true;
|
||||
tooltip-format = "<big>{:%A, %d.%B %Y }</big><tt><small>{calendar}</small></tt>";
|
||||
};
|
||||
@@ -71,11 +82,17 @@ with lib; {
|
||||
"disk" = {
|
||||
format = " {free}";
|
||||
tooltip = true;
|
||||
# Not working with zaneyos window open then closes
|
||||
# Not working with garandos window open then closes
|
||||
#on-click = "${terminal} -e sh -c df -h ; read";
|
||||
};
|
||||
"network" = {
|
||||
format-icons = [ "" "" "" "" "" ];
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
format-ethernet = " {bandwidthDownBits}";
|
||||
format-wifi = " {bandwidthDownBits}";
|
||||
format-disconnected = "";
|
||||
@@ -99,7 +116,11 @@ with lib; {
|
||||
phone = "";
|
||||
portable = "";
|
||||
car = "";
|
||||
default = [ "" "" "" ];
|
||||
default = [
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
on-click = "pavucontrol";
|
||||
};
|
||||
@@ -149,7 +170,18 @@ with lib; {
|
||||
format = "{icon} {capacity}%";
|
||||
format-charging = " {capacity}%";
|
||||
format-plugged = " {capacity}%";
|
||||
format-icons = [ "" "" "" "" "" "" "" "" "" "" ];
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
on-click = "";
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
{ pkgs
|
||||
, lib
|
||||
, host
|
||||
, config
|
||||
, ...
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
host,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
betterTransition = "all 0.3s cubic-bezier(.55,-0.68,.48,1.682)";
|
||||
inherit (import ../../../hosts/${host}/variables.nix) clock24h;
|
||||
in
|
||||
with lib; {
|
||||
with lib;
|
||||
{
|
||||
# Configure & Theme Waybar
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
@@ -46,10 +48,7 @@ with lib; {
|
||||
on-scroll-down = "hyprctl dispatch workspace e-1";
|
||||
};
|
||||
"clock" = {
|
||||
format =
|
||||
if clock24h == true
|
||||
then '' {:L%H:%M}''
|
||||
else '' {:L%I:%M %p}'';
|
||||
format = if clock24h == true then '' {:L%H:%M}'' else '' {:L%I:%M %p}'';
|
||||
tooltip = true;
|
||||
tooltip-format = "<big>{:%A, %d.%B %Y }</big>\n<tt><small>{calendar}</small></tt>";
|
||||
};
|
||||
|
||||
@@ -2,17 +2,30 @@
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [waybar];
|
||||
}:
|
||||
{
|
||||
home.packages = with pkgs; [ waybar ];
|
||||
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = "top";
|
||||
"modules-left" = ["hyprland/workspaces" "temperature" "hyprland/window"];
|
||||
"modules-center" = ["custom/spacer"];
|
||||
"modules-right" = ["tray" "cpu" "memory" "idle_inhibitor" "clock" "pulseaudio" "bluetooth"];
|
||||
"modules-left" = [
|
||||
"hyprland/workspaces"
|
||||
"temperature"
|
||||
"hyprland/window"
|
||||
];
|
||||
"modules-center" = [ "custom/spacer" ];
|
||||
"modules-right" = [
|
||||
"tray"
|
||||
"cpu"
|
||||
"memory"
|
||||
"idle_inhibitor"
|
||||
"clock"
|
||||
"pulseaudio"
|
||||
"bluetooth"
|
||||
];
|
||||
"hyprland/window" = {
|
||||
format = "{title}";
|
||||
"max-length" = 333;
|
||||
@@ -103,7 +116,11 @@
|
||||
headphone = "";
|
||||
phone = "";
|
||||
portable = "";
|
||||
default = ["" "" ""];
|
||||
default = [
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
"on-click-left" = "pavucontrol";
|
||||
input = true;
|
||||
@@ -149,7 +166,7 @@
|
||||
"tooltip-format" = "{title}";
|
||||
"on-click" = "activate";
|
||||
"on-click-middle" = "close";
|
||||
"ignore-list" = ["Alacritty"];
|
||||
"ignore-list" = [ "Alacritty" ];
|
||||
"app_ids-mapping" = {
|
||||
firefoxdeveloperedition = "firefox-developer-edition";
|
||||
};
|
||||
@@ -477,4 +494,3 @@
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -2,17 +2,28 @@
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [waybar];
|
||||
}:
|
||||
{
|
||||
home.packages = with pkgs; [ waybar ];
|
||||
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = "top";
|
||||
"modules-left" = ["hyprland/workspaces" "hyprland/window"];
|
||||
"modules-center" = ["clock"];
|
||||
"modules-right" = ["tray" "cpu" "memory" "idle_inhibitor" "pulseaudio" "bluetooth"];
|
||||
"modules-left" = [
|
||||
"hyprland/workspaces"
|
||||
"hyprland/window"
|
||||
];
|
||||
"modules-center" = [ "clock" ];
|
||||
"modules-right" = [
|
||||
"tray"
|
||||
"cpu"
|
||||
"memory"
|
||||
"idle_inhibitor"
|
||||
"pulseaudio"
|
||||
"bluetooth"
|
||||
];
|
||||
"hyprland/window" = {
|
||||
format = "{title}";
|
||||
"max-length" = 333;
|
||||
@@ -103,7 +114,11 @@
|
||||
headphone = "";
|
||||
phone = "";
|
||||
portable = "";
|
||||
default = ["" "" ""];
|
||||
default = [
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
"on-click-left" = "pavucontrol";
|
||||
input = true;
|
||||
@@ -149,7 +164,7 @@
|
||||
"tooltip-format" = "{title}";
|
||||
"on-click" = "activate";
|
||||
"on-click-middle" = "close";
|
||||
"ignore-list" = ["Alacritty"];
|
||||
"ignore-list" = [ "Alacritty" ];
|
||||
"app_ids-mapping" = {
|
||||
firefoxdeveloperedition = "firefox-developer-edition";
|
||||
};
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
{ pkgs
|
||||
, config
|
||||
, lib
|
||||
, ...
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
terminal = "kitty";
|
||||
@@ -20,7 +21,8 @@ let
|
||||
base0E = "D2A6FF";
|
||||
base0F = "E6B673";
|
||||
in
|
||||
with lib; {
|
||||
with lib;
|
||||
{
|
||||
# Configure & Theme Waybar
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
@@ -30,9 +32,26 @@ with lib; {
|
||||
layer = "top";
|
||||
position = "top";
|
||||
|
||||
modules-center = [ "network" "pulseaudio" "cpu" "hyprland/workspaces" "memory" "disk" "clock" ]; # Eterna: [ "hyprland/window" ]
|
||||
modules-left = [ "custom/startmenu" "hyprland/window" ]; # Eternal: [ "hyprland/workspaces" "cpu" "memory" "network" ]
|
||||
modules-right = [ "tray" "idle_inhibitor" "custom/notification" "battery" "custom/exit" ]; # Eternal: [ "idle_inhibitor" "pulseaudio" "clock" "custom/notification" "tray" ]
|
||||
modules-center = [
|
||||
"network"
|
||||
"pulseaudio"
|
||||
"cpu"
|
||||
"hyprland/workspaces"
|
||||
"memory"
|
||||
"disk"
|
||||
"clock"
|
||||
]; # Eterna: [ "hyprland/window" ]
|
||||
modules-left = [
|
||||
"custom/startmenu"
|
||||
"hyprland/window"
|
||||
]; # Eternal: [ "hyprland/workspaces" "cpu" "memory" "network" ]
|
||||
modules-right = [
|
||||
"tray"
|
||||
"idle_inhibitor"
|
||||
"custom/notification"
|
||||
"battery"
|
||||
"custom/exit"
|
||||
]; # Eternal: [ "idle_inhibitor" "pulseaudio" "clock" "custom/notification" "tray" ]
|
||||
|
||||
"hyprland/workspaces" = {
|
||||
format = "{name}";
|
||||
@@ -46,9 +65,7 @@ with lib; {
|
||||
};
|
||||
"clock" = {
|
||||
format = '' {:%H:%M}'';
|
||||
/*
|
||||
''{: %I:%M %p}'';
|
||||
*/
|
||||
# ''{: %I:%M %p}'';
|
||||
tooltip = true;
|
||||
tooltip-format = "<big>{:%A, %d.%B %Y }</big><tt><small>{calendar}</small></tt>";
|
||||
};
|
||||
@@ -71,11 +88,17 @@ with lib; {
|
||||
"disk" = {
|
||||
format = " {free}";
|
||||
tooltip = true;
|
||||
# Not working with zaneyos window open then closes
|
||||
# Not working with garandos window open then closes
|
||||
#on-click = "${terminal} -e sh -c df -h ; read";
|
||||
};
|
||||
"network" = {
|
||||
format-icons = [ "" "" "" "" "" ];
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
format-ethernet = " {bandwidthDownBits}";
|
||||
format-wifi = " {bandwidthDownBits}";
|
||||
format-disconnected = "";
|
||||
@@ -99,7 +122,11 @@ with lib; {
|
||||
phone = "";
|
||||
portable = "";
|
||||
car = "";
|
||||
default = [ "" "" "" ];
|
||||
default = [
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
on-click = "pavucontrol";
|
||||
};
|
||||
@@ -149,7 +176,18 @@ with lib; {
|
||||
format = "{icon} {capacity}%";
|
||||
format-charging = " {capacity}%";
|
||||
format-plugged = " {capacity}%";
|
||||
format-icons = [ "" "" "" "" "" "" "" "" "" "" ];
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
on-click = "";
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
{ pkgs
|
||||
, lib
|
||||
, host
|
||||
, config
|
||||
, ...
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
host,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
betterTransition = "all 0.3s cubic-bezier(.55,-0.68,.48,1.682)";
|
||||
inherit (import ../../../hosts/${host}/variables.nix) clock24h;
|
||||
in
|
||||
with lib; {
|
||||
with lib;
|
||||
{
|
||||
# Configure & Theme Waybar
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
@@ -58,10 +60,7 @@ with lib; {
|
||||
format = " {temperatureC}°C ";
|
||||
};
|
||||
"clock" = {
|
||||
format =
|
||||
if clock24h == true
|
||||
then '' {:L%H:%M}''
|
||||
else '' {:L%I:%M %p}'';
|
||||
format = if clock24h == true then '' {:L%H:%M}'' else '' {:L%I:%M %p}'';
|
||||
tooltip = true;
|
||||
tooltip-format = "<big>{:%A, %d.%B %Y }</big>\n<tt><small>{calendar}</small></tt>";
|
||||
};
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
{ pkgs
|
||||
, lib
|
||||
, host
|
||||
, config
|
||||
, ...
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
host,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (import ../../../hosts/${host}/variables.nix) clock24h;
|
||||
in
|
||||
with lib; {
|
||||
with lib;
|
||||
{
|
||||
# Configure & Theme Waybar
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
@@ -52,10 +54,7 @@ with lib; {
|
||||
on-scroll-down = "hyprctl dispatch workspace e-1";
|
||||
};
|
||||
"clock" = {
|
||||
format =
|
||||
if clock24h == true
|
||||
then '' {:L%H:%M}''
|
||||
else '' {:L%I:%M %p}'';
|
||||
format = if clock24h == true then '' {:L%H:%M}'' else '' {:L%I:%M %p}'';
|
||||
tooltip = true;
|
||||
tooltip-format = "<big>{:%A, %d.%B %Y }</big>\n<tt><small>{calendar}</small></tt>";
|
||||
};
|
||||
|
||||
@@ -1,82 +0,0 @@
|
||||
{ pkgs, ... }: {
|
||||
programs.wezterm = {
|
||||
enable = true;
|
||||
package = pkgs.wezterm;
|
||||
};
|
||||
home.file."./.config/wezterm/wezterm.lua".text = ''
|
||||
-- Config from Drew @justaguylinux small mods
|
||||
|
||||
local wezterm = require("wezterm")
|
||||
|
||||
local config = wezterm.config_builder()
|
||||
|
||||
config.enable_wayland = false
|
||||
|
||||
-- General appearance and visuals
|
||||
config.colors = {
|
||||
tab_bar = {
|
||||
background = "#00141d", -- col_gray1, your main DWM bar background
|
||||
|
||||
active_tab = {
|
||||
bg_color = "#80bfff", -- col_gray2 (selected tab in bright blue)
|
||||
fg_color = "#00141d", -- contrast text on active tab
|
||||
},
|
||||
|
||||
inactive_tab = {
|
||||
bg_color = "#1a1a1a", -- col_gray4 (dark background for inactive tabs)
|
||||
fg_color = "#FFFFFF", -- col_gray3 (white text on inactive tabs)
|
||||
},
|
||||
|
||||
new_tab = {
|
||||
bg_color = "#1a1a1a", -- same as inactive
|
||||
fg_color = "#4fc3f7", -- col_barbie (for the "+" button)
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
config.window_background_opacity = 0.90
|
||||
config.color_scheme = "nightfox"
|
||||
config.font_size = 12
|
||||
config.font = wezterm.font("FiraCode", { weight = "Regular", italic = false })
|
||||
|
||||
config.window_padding = {
|
||||
left = 10,
|
||||
right = 10,
|
||||
top = 10,
|
||||
bottom = 10,
|
||||
}
|
||||
|
||||
config.use_fancy_tab_bar = true
|
||||
config.window_frame = {
|
||||
-- font = wezterm.font({ family = "FiraCode Nerd Font Mono", weight = "Regular" }),
|
||||
font = wezterm.font({ family = "JetBrainsMono Nerd Font Mono", weight = "Regular" }),
|
||||
}
|
||||
|
||||
config.default_cursor_style = "BlinkingUnderline"
|
||||
config.cursor_blink_rate = 500
|
||||
config.term = "xterm-256color"
|
||||
config.max_fps = 144
|
||||
config.animation_fps = 30
|
||||
|
||||
-- Keybindings using ALT for tabs & splits
|
||||
config.keys = {
|
||||
-- Tab management
|
||||
{ key = "t", mods = "ALT", action = wezterm.action.SpawnTab("CurrentPaneDomain") },
|
||||
{ key = "w", mods = "ALT", action = wezterm.action.CloseCurrentTab({ confirm = false }) },
|
||||
{ key = "n", mods = "ALT", action = wezterm.action.ActivateTabRelative(1) },
|
||||
{ key = "p", mods = "ALT", action = wezterm.action.ActivateTabRelative(-1) },
|
||||
|
||||
-- Pane management
|
||||
{ key = "v", mods = "ALT", action = wezterm.action.SplitVertical({ domain = "CurrentPaneDomain" }) },
|
||||
{ key = "h", mods = "ALT", action = wezterm.action.SplitHorizontal({ domain = "CurrentPaneDomain" }) },
|
||||
{ key = "q", mods = "ALT", action = wezterm.action.CloseCurrentPane({ confirm = false }) },
|
||||
|
||||
-- Pane navigation (move between panes with ALT + Arrows)
|
||||
{ key = "LeftArrow", mods = "ALT", action = wezterm.action.ActivatePaneDirection("Left") },
|
||||
{ key = "RightArrow", mods = "ALT", action = wezterm.action.ActivatePaneDirection("Right") },
|
||||
{ key = "UpArrow", mods = "ALT", action = wezterm.action.ActivatePaneDirection("Up") },
|
||||
{ key = "DownArrow", mods = "ALT", action = wezterm.action.ActivatePaneDirection("Down") },
|
||||
}
|
||||
return config
|
||||
'';
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
{ pkgs, ... }: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
xdg = {
|
||||
enable = true;
|
||||
mime.enable = true;
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
settings = import ./yazi.nix;
|
||||
keymap = import ./keymap.nix;
|
||||
theme = import ./theme.nix;
|
||||
in
|
||||
{
|
||||
programs.yazi = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
enableBashIntegration = true;
|
||||
enableFishIntegration = true;
|
||||
shellWrapperName = "yy";
|
||||
settings = settings;
|
||||
keymap = keymap;
|
||||
theme = theme;
|
||||
plugins = {
|
||||
lazygit = pkgs.yaziPlugins.lazygit;
|
||||
full-border = pkgs.yaziPlugins.full-border;
|
||||
git = pkgs.yaziPlugins.git;
|
||||
smart-enter = pkgs.yaziPlugins.smart-enter;
|
||||
};
|
||||
|
||||
initLua = ''
|
||||
require("full-border"):setup()
|
||||
require("git"):setup()
|
||||
require("smart-enter"):setup {
|
||||
open_multi = true,
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,389 +0,0 @@
|
||||
{
|
||||
settings = {
|
||||
manager = {
|
||||
ratio = [ 1 4 3 ];
|
||||
sort_by = "alphabetical";
|
||||
sort_sensitive = false;
|
||||
sort_reverse = false;
|
||||
sort_dir_first = true;
|
||||
sort_translit = false;
|
||||
linemode = "none";
|
||||
show_hidden = false;
|
||||
show_symlink = true;
|
||||
scrolloff = 5;
|
||||
mouse_events = [ "click" "scroll" ];
|
||||
title_format = "Yazi: {cwd}";
|
||||
};
|
||||
preview = {
|
||||
wrap = "no";
|
||||
tab_size = 2;
|
||||
max_width = 600;
|
||||
max_height = 900;
|
||||
cache_dir = "";
|
||||
image_delay = 30;
|
||||
image_filter = "triangle";
|
||||
image_quality = 75;
|
||||
sixel_fraction = 15;
|
||||
ueberzug_scale = 1;
|
||||
ueberzug_offset = [ 0 0 0 0 ];
|
||||
};
|
||||
opener = {
|
||||
edit = [
|
||||
{
|
||||
run = ''${"EDITOR:-vi"} "$@"'';
|
||||
desc = "$EDITOR";
|
||||
block = true;
|
||||
for = "unix";
|
||||
}
|
||||
{
|
||||
run = "code %*";
|
||||
orphan = true;
|
||||
desc = "code";
|
||||
for = "windows";
|
||||
}
|
||||
{
|
||||
run = "code -w %*";
|
||||
block = true;
|
||||
desc = "code (block)";
|
||||
for = "windows";
|
||||
}
|
||||
];
|
||||
open = [
|
||||
{
|
||||
run = ''xdg-open "$1"'';
|
||||
desc = "Open";
|
||||
for = "linux";
|
||||
}
|
||||
{
|
||||
run = ''open "$@"'';
|
||||
desc = "Open";
|
||||
for = "macos";
|
||||
}
|
||||
{
|
||||
run = ''start "" "%1"'';
|
||||
orphan = true;
|
||||
desc = "Open";
|
||||
for = "windows";
|
||||
}
|
||||
{
|
||||
run = ''termux-open "$1"'';
|
||||
desc = "Open";
|
||||
for = "android";
|
||||
}
|
||||
];
|
||||
reveal = [
|
||||
{
|
||||
run = ''xdg-open "$(dirname "$1")"'';
|
||||
desc = "Reveal";
|
||||
for = "linux";
|
||||
}
|
||||
{
|
||||
run = ''open -R "$1"'';
|
||||
desc = "Reveal";
|
||||
for = "macos";
|
||||
}
|
||||
{
|
||||
run = ''explorer /select,"%1"'';
|
||||
orphan = true;
|
||||
desc = "Reveal";
|
||||
for = "windows";
|
||||
}
|
||||
{
|
||||
run = ''termux-open "$(dirname "$1")"'';
|
||||
desc = "Reveal";
|
||||
for = "android";
|
||||
}
|
||||
{
|
||||
run = ''exiftool "$1"; echo "Press enter to exit"; read _'';
|
||||
block = true;
|
||||
desc = "Show EXIF";
|
||||
for = "unix";
|
||||
}
|
||||
];
|
||||
extract = [
|
||||
{
|
||||
run = ''ya pub extract --list "$@"'';
|
||||
desc = "Extract here";
|
||||
for = "unix";
|
||||
}
|
||||
{
|
||||
run = "ya pub extract --list %*";
|
||||
desc = "Extract here";
|
||||
for = "windows";
|
||||
}
|
||||
];
|
||||
play = [
|
||||
{
|
||||
run = ''mpv --force-window "$@"'';
|
||||
orphan = true;
|
||||
for = "unix";
|
||||
}
|
||||
{
|
||||
run = "mpv --force-window %*";
|
||||
orphan = true;
|
||||
for = "windows";
|
||||
}
|
||||
{
|
||||
run = ''mediainfo "$1"; echo "Press enter to exit"; read _'';
|
||||
block = true;
|
||||
desc = "Show media info";
|
||||
for = "unix";
|
||||
}
|
||||
];
|
||||
};
|
||||
open = {
|
||||
rules = [
|
||||
{
|
||||
name = "*/";
|
||||
use = [ "edit" "open" "reveal" ];
|
||||
}
|
||||
{
|
||||
mime = "text/*";
|
||||
use = [ "edit" "reveal" ];
|
||||
}
|
||||
{
|
||||
mime = "image/*";
|
||||
use = [ "open" "reveal" ];
|
||||
}
|
||||
{
|
||||
mime = "{audio,video}/*";
|
||||
use = [ "play" "reveal" ];
|
||||
}
|
||||
{
|
||||
mime =
|
||||
"application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}";
|
||||
use = [ "extract" "reveal" ];
|
||||
}
|
||||
{
|
||||
mime = "application/{json,ndjson}";
|
||||
use = [ "edit" "reveal" ];
|
||||
}
|
||||
{
|
||||
mime = "*/javascript";
|
||||
use = [ "edit" "reveal" ];
|
||||
}
|
||||
{
|
||||
mime = "inode/empty";
|
||||
use = [ "edit" "reveal" ];
|
||||
}
|
||||
{
|
||||
name = "*";
|
||||
use = [ "open" "reveal" ];
|
||||
}
|
||||
];
|
||||
};
|
||||
tasks = {
|
||||
micro_workers = 10;
|
||||
macro_workers = 10;
|
||||
bizarre_retry = 3;
|
||||
image_alloc = 536870912;
|
||||
image_bound = [ 0 0 ];
|
||||
suppress_preload = false;
|
||||
};
|
||||
plugin = {
|
||||
fetchers = [{
|
||||
id = "mime";
|
||||
name = "*";
|
||||
run = "mime";
|
||||
prio = "high";
|
||||
}];
|
||||
spotters = [
|
||||
{
|
||||
name = "*/";
|
||||
run = "folder";
|
||||
}
|
||||
{
|
||||
mime = "text/*";
|
||||
run = "code";
|
||||
}
|
||||
{
|
||||
mime = "application/{mbox,javascript,wine-extension-ini}";
|
||||
run = "code";
|
||||
}
|
||||
{
|
||||
mime = "image/{avif,hei?,jxl,svg+xml}";
|
||||
run = "magick";
|
||||
}
|
||||
{
|
||||
mime = "image/*";
|
||||
run = "image";
|
||||
}
|
||||
{
|
||||
mime = "video/*";
|
||||
run = "video";
|
||||
}
|
||||
{
|
||||
name = "*";
|
||||
run = "file";
|
||||
}
|
||||
];
|
||||
preloaders = [
|
||||
{
|
||||
mime = "image/{avif,hei?,jxl,svg+xml}";
|
||||
run = "magick";
|
||||
}
|
||||
{
|
||||
mime = "image/*";
|
||||
run = "image";
|
||||
}
|
||||
{
|
||||
mime = "video/*";
|
||||
run = "video";
|
||||
}
|
||||
{
|
||||
mime = "application/pdf";
|
||||
run = "pdf";
|
||||
}
|
||||
{
|
||||
mime = "font/*";
|
||||
run = "font";
|
||||
}
|
||||
{
|
||||
mime = "application/ms-opentype";
|
||||
run = "font";
|
||||
}
|
||||
];
|
||||
previewers = [
|
||||
{
|
||||
name = "*/";
|
||||
run = "folder";
|
||||
sync = true;
|
||||
}
|
||||
{
|
||||
mime = "text/*";
|
||||
run = "code";
|
||||
}
|
||||
{
|
||||
mime = "application/{mbox,javascript,wine-extension-ini}";
|
||||
run = "code";
|
||||
}
|
||||
{
|
||||
mime = "application/{json,ndjson}";
|
||||
run = "json";
|
||||
}
|
||||
{
|
||||
mime = "image/{avif,hei?,jxl,svg+xml}";
|
||||
run = "magick";
|
||||
}
|
||||
{
|
||||
mime = "image/*";
|
||||
run = "image";
|
||||
}
|
||||
{
|
||||
mime = "video/*";
|
||||
run = "video";
|
||||
}
|
||||
{
|
||||
mime = "application/pdf";
|
||||
run = "pdf";
|
||||
}
|
||||
{
|
||||
mime =
|
||||
"application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}";
|
||||
run = "archive";
|
||||
}
|
||||
{
|
||||
mime =
|
||||
"application/{debian*-package,redhat-package-manager,rpm,android.package-archive}";
|
||||
run = "archive";
|
||||
}
|
||||
{
|
||||
name = "*.{AppImage,appimage}";
|
||||
run = "archive";
|
||||
}
|
||||
{
|
||||
mime = "application/{iso9660-image,qemu-disk,ms-wim,apple-diskimage}";
|
||||
run = "archive";
|
||||
}
|
||||
{
|
||||
mime = "application/virtualbox-{vhd,vhdx}";
|
||||
run = "archive";
|
||||
}
|
||||
{
|
||||
name = "*.{img,fat,ext,ext2,ext3,ext4,squashfs,ntfs,hfs,hfsx}";
|
||||
run = "archive";
|
||||
}
|
||||
{
|
||||
mime = "font/*";
|
||||
run = "font";
|
||||
}
|
||||
{
|
||||
mime = "application/ms-opentype";
|
||||
run = "font";
|
||||
}
|
||||
{
|
||||
mime = "inode/empty";
|
||||
run = "empty";
|
||||
}
|
||||
{
|
||||
name = "*";
|
||||
run = "file";
|
||||
}
|
||||
];
|
||||
prepend_fetchers = [
|
||||
{
|
||||
id = "git";
|
||||
name = "*";
|
||||
run = "git";
|
||||
}
|
||||
{
|
||||
id = "git";
|
||||
name = "*/";
|
||||
run = "git";
|
||||
}
|
||||
];
|
||||
};
|
||||
input = {
|
||||
cursor_blink = false;
|
||||
cd_title = "Change directory:";
|
||||
cd_origin = "top-center";
|
||||
cd_offset = [ 0 2 50 3 ];
|
||||
create_title = [ "Create:" "Create (dir):" ];
|
||||
create_origin = "top-center";
|
||||
create_offset = [ 0 2 50 3 ];
|
||||
rename_title = "Rename:";
|
||||
rename_origin = "hovered";
|
||||
rename_offset = [ 0 1 50 3 ];
|
||||
filter_title = "Filter:";
|
||||
filter_origin = "top-center";
|
||||
filter_offset = [ 0 2 50 3 ];
|
||||
find_title = [ "Find next:" "Find previous:" ];
|
||||
find_origin = "top-center";
|
||||
find_offset = [ 0 2 50 3 ];
|
||||
search_title = "Search via {n}:";
|
||||
search_origin = "top-center";
|
||||
search_offset = [ 0 2 50 3 ];
|
||||
shell_title = [ "Shell:" "Shell (block):" ];
|
||||
shell_origin = "top-center";
|
||||
shell_offset = [ 0 2 50 3 ];
|
||||
};
|
||||
confirm = {
|
||||
trash_title = "Trash {n} selected file{s}?";
|
||||
trash_origin = "center";
|
||||
trash_offset = [ 0 0 70 20 ];
|
||||
delete_title = "Permanently delete {n} selected file{s}?";
|
||||
delete_origin = "center";
|
||||
delete_offset = [ 0 0 70 20 ];
|
||||
overwrite_title = "Overwrite file?";
|
||||
overwrite_content = "Will overwrite the following file:";
|
||||
overwrite_origin = "center";
|
||||
overwrite_offset = [ 0 0 50 15 ];
|
||||
quit_title = "Quit?";
|
||||
quit_content =
|
||||
"The following tasks are still running, are you sure you want to quit?";
|
||||
quit_origin = "center";
|
||||
quit_offset = [ 0 0 50 15 ];
|
||||
};
|
||||
pick = {
|
||||
open_title = "Open with:";
|
||||
open_origin = "hovered";
|
||||
open_offset = [ 0 1 50 7 ];
|
||||
};
|
||||
which = {
|
||||
sort_by = "none";
|
||||
sort_sensitive = false;
|
||||
sort_reverse = false;
|
||||
sort_translit = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
124
modules/home/zed.nix
Normal file
124
modules/home/zed.nix
Normal file
@@ -0,0 +1,124 @@
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
programs.zed-editor = {
|
||||
enable = true;
|
||||
|
||||
extensions = [
|
||||
"nix"
|
||||
"one-dark-pro-monokai-darker"
|
||||
"toml"
|
||||
"superhtml"
|
||||
"dockerfile"
|
||||
"docker-compose"
|
||||
"vue"
|
||||
"vscode-icons"
|
||||
];
|
||||
|
||||
userSettings = {
|
||||
assistant = {
|
||||
enabled = true;
|
||||
version = "2";
|
||||
default_open_ai_model = null;
|
||||
### PROVIDER OPTIONS
|
||||
### zed.dev models { claude-3-5-sonnet-latest } requires github connected
|
||||
### anthropic models { claude-3-5-sonnet-latest claude-3-haiku-latest claude-3-opus-latest } requires API_KEY
|
||||
### copilot_chat models { gpt-4o gpt-4 gpt-3.5-turbo o1-preview } requires github connected
|
||||
default_model = {
|
||||
provider = "zed.dev";
|
||||
model = "claude-3-5-sonnet-latest";
|
||||
};
|
||||
|
||||
# inline_alternatives = [
|
||||
# {
|
||||
# provider = "copilot_chat";
|
||||
# model = "gpt-3.5-turbo";
|
||||
# }
|
||||
# ];
|
||||
};
|
||||
|
||||
node = {
|
||||
path = lib.getExe pkgs.nodejs;
|
||||
npm_path = lib.getExe' pkgs.nodejs "npm";
|
||||
};
|
||||
|
||||
hour_format = "hour24";
|
||||
auto_update = false;
|
||||
terminal = {
|
||||
alternate_scroll = "off";
|
||||
blinking = "off";
|
||||
copy_on_select = false;
|
||||
dock = "bottom";
|
||||
detect_venv = {
|
||||
on = {
|
||||
directories = [
|
||||
".env"
|
||||
"env"
|
||||
".venv"
|
||||
"venv"
|
||||
];
|
||||
activate_script = "default";
|
||||
};
|
||||
};
|
||||
# env = {
|
||||
# TERM = "alacritty";
|
||||
# };
|
||||
font_family = "FiraCode Nerd Font";
|
||||
font_features = null;
|
||||
font_size = null;
|
||||
line_height = "comfortable";
|
||||
option_as_meta = false;
|
||||
button = false;
|
||||
shell = "system";
|
||||
#{
|
||||
# program = "zsh";
|
||||
#};
|
||||
toolbar = {
|
||||
title = true;
|
||||
};
|
||||
working_directory = "current_project_directory";
|
||||
};
|
||||
|
||||
# lsp = {
|
||||
# rust-analyzer = {
|
||||
# binary = {
|
||||
# path = lib.getExe pkgs.rust-analyzer;
|
||||
# path_lookup = true;
|
||||
# };
|
||||
# };
|
||||
# nix = {
|
||||
# binary = {
|
||||
# path_lookup = true;
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
|
||||
languages = {
|
||||
"HTML" = {
|
||||
"language_servers" = [
|
||||
"vscode-html-language-server"
|
||||
"superhtml"
|
||||
];
|
||||
"formatter" = {
|
||||
"language_server" = {
|
||||
"name" = "superhtml";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
vim_mode = false;
|
||||
load_direnv = "shell_hook";
|
||||
base_keymap = "VSCode";
|
||||
theme = {
|
||||
mode = "system";
|
||||
light = "One Dark Pro Monokai Darker Theme";
|
||||
dark = "One Dark Pro Monokai Darker Theme";
|
||||
};
|
||||
show_whitespaces = "all";
|
||||
ui_font_size = 16;
|
||||
buffer_font_size = 16;
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user