From 16ae89045854dc506c72f6253a2e9384cf247452 Mon Sep 17 00:00:00 2001 From: stitchy Date: Sun, 31 Mar 2024 10:10:47 +0000 Subject: [PATCH 001/132] Update framework config --- config/hypr/hyprpaper.conf | 12 +++---- flake.lock | 17 +++++++++ flake.nix | 15 ++++---- hosts/default.nix | 17 ++++++++- hosts/lappy/default.nix | 70 ++++++++++++++++++-------------------- 5 files changed, 80 insertions(+), 51 deletions(-) diff --git a/config/hypr/hyprpaper.conf b/config/hypr/hyprpaper.conf index e07a445..c98267c 100644 --- a/config/hypr/hyprpaper.conf +++ b/config/hypr/hyprpaper.conf @@ -1,10 +1,10 @@ -preload = ~/.config/wallpapers/wallpaper.png +preload = ~/.config/wallpapers/current_wallpaper.png -wallpaper = eDP-1,~/.config/wallpapers/wallpaper.png -wallpaper = DP-1,~/.config/wallpapers/wallpaper.png -wallpaper = DP-2,~/.config/wallpapers/wallpaper.png -wallpaper = DP-3,~/.config/wallpapers/wallpaper.png -wallpaper = DP-4,~/.config/wallpapers/wallpaper.png +wallpaper = eDP-1,~/.config/wallpapers/current_wallpaper.png +wallpaper = DP-1,~/.config/wallpapers/current_wallpaper.png +wallpaper = DP-2,~/.config/wallpapers/current_wallpaper.png +wallpaper = DP-3,~/.config/wallpapers/current_wallpaper.png +wallpaper = DP-4,~/.config/wallpapers/current_wallpaper.png splash=false ipc = off diff --git a/flake.lock b/flake.lock index 5e2a4bb..111e20f 100644 --- a/flake.lock +++ b/flake.lock @@ -68,6 +68,22 @@ "type": "github" } }, + "nixos-hardware": { + "locked": { + "lastModified": 1711352745, + "narHash": "sha256-luvqik+i3HTvCbXQZgB6uggvEcxI9uae0nmrgtXJ17U=", + "owner": "Nixos", + "repo": "nixos-hardware", + "rev": "9a763a7acc4cfbb8603bb0231fec3eda864f81c0", + "type": "github" + }, + "original": { + "owner": "Nixos", + "ref": "master", + "repo": "nixos-hardware", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1710272261, @@ -123,6 +139,7 @@ "inputs": { "home-manager": "home-manager", "mobile-nixos": "mobile-nixos", + "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", "osu-nixos": "osu-nixos" } diff --git a/flake.nix b/flake.nix index d0b592b..36cee01 100644 --- a/flake.nix +++ b/flake.nix @@ -4,6 +4,7 @@ outputs = inputs@{ nixpkgs, + nixos-hardware, home-manager, osu-nixos, ... @@ -32,6 +33,7 @@ system = "x86_64-linux"; specialArgs = { inherit inputs; }; modules = [ + nixos-hardware.nixosModules.framework-12th-gen-intel ./packages/default.nix ./hosts/lappy/default.nix @@ -68,17 +70,16 @@ }; inputs = { - mobile-nixos = { - url = "github:nixos/mobile-nixos"; - flake = false; - }; - nixpkgs = { - url = "github:NixOS/nixpkgs/nixos-unstable"; - }; home-manager = { url = "github:nix-community/home-manager/master"; inputs.nixpkgs.follows = "nixpkgs"; }; + mobile-nixos = { + url = "github:nixos/mobile-nixos"; + flake = false; + }; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + nixos-hardware.url = "github:Nixos/nixos-hardware/master"; osu-nixos.url = "github:Asqiir/osu-nixos"; }; } diff --git a/hosts/default.nix b/hosts/default.nix index 62d4c4c..d738e3a 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -24,7 +24,22 @@ in security.sudo.wheelNeedsPassword = false; security.rtkit.enable = true; - services.xserver.displayManager.lightdm.enable = false; + services = { + resolved = { + enable = true; + dnsovertls = "opportunistic"; + fallbackDns = [ + "2620:fe::10#dns10.quad9.net" + "2620:fe::fe:10#dns10.quad9.net" + "9.9.9.10#dns10.quad9.net" + "149.112.112.10#dns10.quad9.net" + ]; + extraConfig = '' + DNS=2620:fe::10#dns10.quad9.net 2620:fe::fe:10#dns10.quad9.net 9.9.9.10#dns10.quad9.net 149.112.112.10#dns10.quad9.net + ''; + }; + xserver.displayManager.lightdm.enable = false; + }; # Wireguard stuff, to-do make better networking.firewall = { diff --git a/hosts/lappy/default.nix b/hosts/lappy/default.nix index e0bee12..00b4beb 100644 --- a/hosts/lappy/default.nix +++ b/hosts/lappy/default.nix @@ -12,23 +12,8 @@ artPkgs.enable = true; }; - system.nixos.tags = [ "Nya_Beginnings" ]; - services.logind.powerKey = "ignore"; services.logind.powerKeyLongPress = "poweroff"; - services.resolved = { - enable = true; - dnsovertls = "opportunistic"; - fallbackDns = [ - "2620:fe::10#dns10.quad9.net" - "2620:fe::fe:10#dns10.quad9.net" - "9.9.9.10#dns10.quad9.net" - "149.112.112.10#dns10.quad9.net" - ]; - extraConfig = '' - DNS=2620:fe::10#dns10.quad9.net 2620:fe::fe:10#dns10.quad9.net 9.9.9.10#dns10.quad9.net 149.112.112.10#dns10.quad9.net - ''; - }; networking = { hostName = "lappy"; networkmanager.enable = true; @@ -36,53 +21,64 @@ time.timeZone = "America/Lost_Angeles"; boot.kernelParams = [ - #"intel_pstate=no_hwp" - "kernel.yama.ptrace_scope=0" - #"mem_sleep_default=deep" - "acpi_osi=\"!Windows 2020\"" - "module_blacklist=hid_sensor_hub" + #"i915.enable_guc=7" "intel_iommu=on" "iommu=pt" - "nvme.noacpi=1" - #"i915.enable_guc=7" + "kernel.yama.ptrace_scope=0" ]; virtualisation.libvirtd.enable = true; hardware.bluetooth.enable = true; + hardware.bluetooth.settings.General.Experimental = true; hardware.opengl = { enable = true; driSupport = true; driSupport32Bit = true; - extraPackages = with pkgs; [ - intel-compute-runtime - intel-media-driver - ]; + extraPackages = lib.attrVals [ + "intel-compute-runtime" + "intel-media-driver" + ] pkgs; }; - systemd.extraConfig = - "AllowedCPUs=8-15" - ; + systemd.extraConfig = "AllowedCPUs=8-15"; services.tlp = { enable = true; settings = { - TLP_DEFAULT_MODE = "BAT"; - TLP_PERSISTENT_DEFAULT = 1; - - CPU_SCALING_GOVERNOR_ON_BAT = "schedutil"; CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; - + CPU_HWP_DYN_BOOST_ON_BAT = false; + CPU_SCALING_GOVERNOR_ON_BAT = "schedutil"; CPU_MIN_PERF_ON_AC = 0; CPU_MAX_PERF_ON_AC = 100; CPU_MIN_PERF_ON_BAT = 0; CPU_MAX_PERF_ON_BAT = 50; - #Optional helps save long term battery health - START_CHARGE_THRESH_BAT0 = 40; # 40 and bellow it starts to charge - STOP_CHARGE_THRESH_BAT0 = 90; # 80 and above it stops charging + INTEL_GPU_MAX_FREQ_ON_BAT = 800; + INTEL_GPU_BOOST_FREQ_ON_BAT = 1000; + NMI_WATCHDOG = false; + PCIE_ASPM_ON_AC = "default"; + PCIE_ASPM_ON_BAT = "powersupersave"; + PLATFORM_PROFILE_ON_BAT = "low-power"; + RUNTIME_PM_ON_BAT = true; + WOL_DISABLE = true; + SCHED_POWERSAVE_ON_BAT = true; + + USB_AUTOSUSPEND = true; + USB_AUTOSUSPEND_DISABLE_ON_SHUTDOWN = true; + USB_EXCLUDE_AUDIO = true; + USB_EXCLUDE_BTUSB = false; + USB_EXCLUDE_PHONE = false; + USB_EXCLUDE_PRINTER = true; + + TLP_DEFAULT_MODE = "BAT"; + TLP_PERSISTENT_DEFAULT = 1; + + #Optional helps save long term battery health + START_CHARGE_THRESH_BAT0 = 40; # 40 and bellow it starts to charge + STOP_CHARGE_THRESH_BAT0 = 90; # 80 and above it stops charging }; }; From 8d69eb76d63ae30e6eaaf5bd0bd7f18fa6b0f39b Mon Sep 17 00:00:00 2001 From: stitchy Date: Fri, 5 Apr 2024 02:21:55 -0700 Subject: [PATCH 002/132] better way of doing this --- hosts/malachite/default.nix | 97 ++++++++++++++++++++----------------- 1 file changed, 53 insertions(+), 44 deletions(-) diff --git a/hosts/malachite/default.nix b/hosts/malachite/default.nix index 08a6ceb..14f6574 100644 --- a/hosts/malachite/default.nix +++ b/hosts/malachite/default.nix @@ -1,65 +1,74 @@ -{ config, pkgs, ... }: +{ config, pkgs, lib, ... }: let - passthrough = pkgs.writeShellScript "pasthrough.sh" '' - GUEST_NAME="$1" - HOOK_NAME="$2" - STATE_NAME="$3" + passthrough = pkgs.writeShellApplication { + name = "pasthrough.sh"; + runtimeInputs = lib.attrVals [ "coreutils" "kmod" "libvirtd" "procps" ] pkgs; + text = '' + GUEST_NAME="$1" + HOOK_NAME="$2" + STATE_NAME="$3" - set -e - set -x - - # For the windows 10 VM - if [[ "$GUEST_NAME" == "win10" ]]; then + echo 19>/home/stitchynyan/startlogfile + BASH_XTRACEFD=19 + set -x - # Prepare hook - if [[ "$HOOK_NAME/$STATE_NAME" == "prepare/begin" ]]; then + # For the windows 10 VM + if [[ "$GUEST_NAME" == "win10" ]]; then - # Remove Hyprland - ${pkgs.busybox}/bin/pkill Hyprland + # Prepare hook + if [[ "$HOOK_NAME/$STATE_NAME" == "prepare/begin" ]]; then - # Unbind VTconsoles - ${pkgs.busybox}/bin/echo 0 > /sys/class/vtconsole/vtcon0/bind - ${pkgs.busybox}/bin/echo 0 > /sys/class/vtconsole/vtcon1/bind + # Remove Hyprland + pkill Hyprland - # Unbind EFI-Framebuffer - ${pkgs.busybox}/bin/echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind + # Unbind VTconsoles + echo 0 > /sys/class/vtconsole/vtcon0/bind + echo 0 > /sys/class/vtconsole/vtcon1/bind - # Unload Modules - ${pkgs.busybox}/bin/modprobe -r nvidia_drm nvidia_modeset nvidia_uvm nvidia + # Unbind EFI-Framebuffer + echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind - # Unbind the GPU from display driver - ${pkgs.libvirt}/bin/virsh nodedev-detach pci_0000_01_00_0 - ${pkgs.libvirt}/bin/virsh nodedev-detach pci_0000_01_00_1 + # We love race conditions + sleep 2 - # Load VFIO Kernel Module - ${pkgs.busybox}/bin/modprobe vfio_pci + # Unload Modules + modprobe -r nvidia_drm nvidia_modeset nvidia_uvm nvidia - elif [[ "$HOOK_NAME/$STATE_NAME" == "release/end" ]]; then + # Unbind the GPU from display driver + virsh nodedev-detach pci_0000_01_00_0 + virsh nodedev-detach pci_0000_01_00_1 - # Re-Bind GPU to Nvidia Driver (replace the pci addresses with yours) - ${pkgs.libvirt}/bin/virsh nodedev-reattach pci_0000_01_00_0 - ${pkgs.libvirt}/bin/virsh nodedev-reattach pci_0000_01_00_1 + # Load VFIO Kernel Module + modprobe vfio_pci - ${pkgs.busybox}/bin/modprobe -r vfio-pci + sleep 2 - #bind efi - ${pkgs.busybox}/bin/echo "efi-framebuffer.0" > /sys/bus/platform/drivers/efi-framebuffer/bind + elif [[ "$HOOK_NAME/$STATE_NAME" == "release/end" ]]; then - # Reload nvidia modules - ${pkgs.busybox}/bin/modprobe nvidia_drm - ${pkgs.busybox}/bin/modprobe nvidia_modeset - ${pkgs.busybox}/bin/modprobe nvidia_uvm - ${pkgs.busybox}/bin/modprobe nvidia + # Re-Bind GPU to Nvidia Driver (replace the pci addresses with yours) + virsh nodedev-reattach pci_0000_01_00_0 + virsh nodedev-reattach pci_0000_01_00_1 - # Rebind VT consoles - ${pkgs.busybox}/bin/echo 1 > /sys/class/vtconsole/vtcon0/bind - ${pkgs.busybox}/bin/echo 1 > /sys/class/vtconsole/vtcon1/bind + modprobe -r vfio-pci + + #bind efi + echo "efi-framebuffer.0" > /sys/bus/platform/drivers/efi-framebuffer/bind + + # Reload nvidia modules + modprobe nvidia_drm + modprobe nvidia_modeset + modprobe nvidia_uvm + modprobe nvidia + + # Rebind VT consoles + echo 1 > /sys/class/vtconsole/vtcon0/bind + bin/echo 1 > /sys/class/vtconsole/vtcon1/bind + + fi fi - fi - - ''; + ''; in { imports = [ From 101d47fa29c42951cddedc12a4c04ebc50488e2d Mon Sep 17 00:00:00 2001 From: stitchy Date: Fri, 5 Apr 2024 02:23:27 -0700 Subject: [PATCH 003/132] moar malachite fixes --- hosts/malachite/default.nix | 12 +++++++++++- hosts/malachite/hardware-configuration.nix | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/hosts/malachite/default.nix b/hosts/malachite/default.nix index 14f6574..b546972 100644 --- a/hosts/malachite/default.nix +++ b/hosts/malachite/default.nix @@ -2,7 +2,7 @@ let passthrough = pkgs.writeShellApplication { name = "pasthrough.sh"; - runtimeInputs = lib.attrVals [ "coreutils" "kmod" "libvirtd" "procps" ] pkgs; + runtimeInputs = lib.attrVals [ "coreutils" "kmod" "libvirt" "procps" ] pkgs; text = '' GUEST_NAME="$1" HOOK_NAME="$2" @@ -69,6 +69,7 @@ let fi ''; + }; in { imports = [ @@ -88,6 +89,15 @@ in { steam-hardware.enable = true; }; + networking.networkmanager.enable = true; + services.syncthing = { + enable = true; + user = "stitchynyan"; + openDefaultPorts = true; + databaseDir = "/home/stitchynyan/.local/share/syncthing"; + dataDir = "/home/stitchynyan"; + }; + networking.hostName = "malachite"; time.timeZone = "America/Los_Angeles"; diff --git a/hosts/malachite/hardware-configuration.nix b/hosts/malachite/hardware-configuration.nix index da77e9a..1cbe4bc 100644 --- a/hosts/malachite/hardware-configuration.nix +++ b/hosts/malachite/hardware-configuration.nix @@ -7,7 +7,7 @@ boot.initrd.availableKernelModules = [ "vmd" "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; + boot.kernelModules = [ "kvm-intel" "vfio-pci" ]; boot.extraModulePackages = [ ]; boot.kernelParams = [ From 40a8d3b711306f2102fab323101a8b795db18310 Mon Sep 17 00:00:00 2001 From: stitchy Date: Sun, 31 Mar 2024 08:40:08 +0000 Subject: [PATCH 004/132] scarab init --- flake.nix | 11 +++++++ hosts/scarab/default.nix | 64 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 hosts/scarab/default.nix diff --git a/flake.nix b/flake.nix index 36cee01..8235e59 100644 --- a/flake.nix +++ b/flake.nix @@ -29,6 +29,17 @@ } ]; }; + scarab = nixpkgs.lib.nixosSystem { + system = "aarch64-linux"; + modules = [ + { _module.args = { inherit inputs; }; } + (import "${inputs.mobile-nixos}/lib/configuration.nix" { + device = "oneplus-enchilada"; + }) + ./packages/default.nix + ./hosts/scarab/default.nix + ]; + }; lappy = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { inherit inputs; }; diff --git a/hosts/scarab/default.nix b/hosts/scarab/default.nix new file mode 100644 index 0000000..f63b472 --- /dev/null +++ b/hosts/scarab/default.nix @@ -0,0 +1,64 @@ +{ config, lib, pkgs, ... }: +let + + defaultUserName = "nixos"; + +in +{ + imports = [ ../default.nix ]; + + users.users."${defaultUserName}" = { + isNormalUser = true; + password = "1234"; + extraGroups = [ + "dialout" + "feedbackd" + "networkmanager" + "video" + "wheel" + ]; + }; + + mobile = { + beautification = { + silentBoot = lib.mkDefault true; + splash = lib.mkDefault true; + }; + boot.stage-1 = { + kernel.useStrictKernelConfig = true; + networking.enable = true; + }; + }; + + services.openssh.enable = true; + #services.pipewire = { + # enable = true; + # pulse.enable = true; + #}; + services.xserver.desktopManager.phosh = { + enable = true; + user = defaultUserName; + group = "users"; + }; + + #services.xserver.desktopManager.plasma5 = { + # enable = true; + # mobile.enable = true; + #}; + + programs.firefox.enable = true; + programs.calls.enable = true; + + hardware = { + bluetooth.enable = true; + sensor.iio.enable = true; + }; + + networking.networkmanager.unmanaged = [ "rndis0" "usb0" ]; + + nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ + "oneplus-sdm845-firmware" + "oneplus-sdm845-firmware-xz" + ]; + system.stateVersion = "23.11"; +} From 9a4993661ba4d2c5b1a8513c8903707e8b513d0c Mon Sep 17 00:00:00 2001 From: stitchy Date: Mon, 1 Apr 2024 21:09:20 +0000 Subject: [PATCH 005/132] change this for better bat --- hosts/lappy/default.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/hosts/lappy/default.nix b/hosts/lappy/default.nix index 00b4beb..123528c 100644 --- a/hosts/lappy/default.nix +++ b/hosts/lappy/default.nix @@ -20,6 +20,14 @@ }; time.timeZone = "America/Lost_Angeles"; + services.syncthing = { + enable = true; + user = "stitchynyan"; + openDefaultPorts = true; + databaseDir = "/home/stitchynyan/.local/share/syncthing"; + dataDir = "/home/stitchynyan"; + }; + boot.kernelParams = [ #"i915.enable_guc=7" "intel_iommu=on" @@ -67,11 +75,6 @@ SCHED_POWERSAVE_ON_BAT = true; USB_AUTOSUSPEND = true; - USB_AUTOSUSPEND_DISABLE_ON_SHUTDOWN = true; - USB_EXCLUDE_AUDIO = true; - USB_EXCLUDE_BTUSB = false; - USB_EXCLUDE_PHONE = false; - USB_EXCLUDE_PRINTER = true; TLP_DEFAULT_MODE = "BAT"; TLP_PERSISTENT_DEFAULT = 1; From 0a8c6eb54e771602ea1b394cae5220fa392ead88 Mon Sep 17 00:00:00 2001 From: stitchy Date: Fri, 19 Apr 2024 21:09:00 +0000 Subject: [PATCH 006/132] tweaks for arduino plus bat --- hosts/lappy/default.nix | 2 +- users/stitchynyan/default.nix | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hosts/lappy/default.nix b/hosts/lappy/default.nix index 123528c..1a30eab 100644 --- a/hosts/lappy/default.nix +++ b/hosts/lappy/default.nix @@ -70,7 +70,7 @@ PCIE_ASPM_ON_AC = "default"; PCIE_ASPM_ON_BAT = "powersupersave"; PLATFORM_PROFILE_ON_BAT = "low-power"; - RUNTIME_PM_ON_BAT = true; + RUNTIME_PM_ON_BAT = "auto"; WOL_DISABLE = true; SCHED_POWERSAVE_ON_BAT = true; diff --git a/users/stitchynyan/default.nix b/users/stitchynyan/default.nix index b5a819c..f85557b 100644 --- a/users/stitchynyan/default.nix +++ b/users/stitchynyan/default.nix @@ -25,7 +25,7 @@ services = { avahi = { - enable = true; + enable = config.stitchyconf.form == "pc"; nssmdns4 = true; openFirewall = true; }; @@ -48,7 +48,7 @@ shell = pkgs.zsh; home = "/home/stitchynyan"; description = "Personal user"; - extraGroups = [ "wheel" "networkmanager" "kvm" "libvirtd" "audio" ]; + extraGroups = [ "wheel" "networkmanager" "kvm" "libvirtd" "audio" "dialout" ]; initialHashedPassword = "$y$j9T$rvySCWHYE4AO4A9J0Vf20.$x5hpBNsOWovQFtNfFUIt17OAH5MJFwFBGjxbaEIagJ3"; }; } From aea964c7459e29b8323500a40da3258f65b566c7 Mon Sep 17 00:00:00 2001 From: stitchy Date: Sat, 20 Apr 2024 09:07:01 +0000 Subject: [PATCH 007/132] flake update and fstrim --- flake.lock | 24 ++++++++++++------------ hosts/default.nix | 1 + 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/flake.lock b/flake.lock index 111e20f..9220a36 100644 --- a/flake.lock +++ b/flake.lock @@ -38,11 +38,11 @@ ] }, "locked": { - "lastModified": 1710349883, - "narHash": "sha256-bjbdS2mC76xNJwt1d/uZa+JdHR8CCyYbF4Ey/NgOJus=", + "lastModified": 1713547570, + "narHash": "sha256-i8tNz47Lfsq5QWFLyE3rIm0gs2UUvXXAxfWTC24e370=", "owner": "nix-community", "repo": "home-manager", - "rev": "2f0db7d418e781354d8a3c50e611e3b1cd413087", + "rev": "7c61e400a99f33cdff3118c1e4032bcb049e1a30", "type": "github" }, "original": { @@ -55,11 +55,11 @@ "mobile-nixos": { "flake": false, "locked": { - "lastModified": 1710655727, - "narHash": "sha256-TOJraNC9vW2gP/ov1RBD+J61pUEJm4q7481Iu6G4ieo=", + "lastModified": 1713034591, + "narHash": "sha256-zEtSq4e1hsf5nPoTzsx+cvHTusQxFdyDpD3mOa360A0=", "owner": "nixos", "repo": "mobile-nixos", - "rev": "8c59592e8d44c1b30be3fa4e6df7938fa9672be3", + "rev": "5455e4455b231218f6198b39383a0ad4c1d6638e", "type": "github" }, "original": { @@ -70,11 +70,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1711352745, - "narHash": "sha256-luvqik+i3HTvCbXQZgB6uggvEcxI9uae0nmrgtXJ17U=", + "lastModified": 1713521961, + "narHash": "sha256-EwR8wW9AqJhSIY+0oxWRybUZ32BVKuZ9bjlRh8SJvQ8=", "owner": "Nixos", "repo": "nixos-hardware", - "rev": "9a763a7acc4cfbb8603bb0231fec3eda864f81c0", + "rev": "5d48925b815fd202781bfae8fb6f45c07112fdb2", "type": "github" }, "original": { @@ -86,11 +86,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1710272261, - "narHash": "sha256-g0bDwXFmTE7uGDOs9HcJsfLFhH7fOsASbAuOzDC+fhQ=", + "lastModified": 1713297878, + "narHash": "sha256-hOkzkhLT59wR8VaMbh1ESjtZLbGi+XNaBN6h49SPqEc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "0ad13a6833440b8e238947e47bea7f11071dc2b2", + "rev": "66adc1e47f8784803f2deb6cacd5e07264ec2d5c", "type": "github" }, "original": { diff --git a/hosts/default.nix b/hosts/default.nix index d738e3a..84d0a96 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -25,6 +25,7 @@ in security.sudo.wheelNeedsPassword = false; security.rtkit.enable = true; services = { + fstrim.enable = true; resolved = { enable = true; dnsovertls = "opportunistic"; From 97a6ae026e332ce02953f3d3fade51b80131615e Mon Sep 17 00:00:00 2001 From: stitchy Date: Fri, 3 May 2024 04:47:19 +0000 Subject: [PATCH 008/132] get test user on gemini 'server' --- flake.nix | 2 ++ users/cirno/default.nix | 29 +++++++++++++++++++++++++++++ users/cirno/home.nix | 15 +++++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 users/cirno/default.nix create mode 100644 users/cirno/home.nix diff --git a/flake.nix b/flake.nix index 8235e59..cc51ece 100644 --- a/flake.nix +++ b/flake.nix @@ -67,6 +67,7 @@ ./packages/default.nix ./hosts/gemini/default.nix ./users/nyadmin/default.nix + ./users/cirno/default.nix home-manager.nixosModules.home-manager { @@ -74,6 +75,7 @@ home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.users.nyadmin = import ./users/nyadmin/home.nix; + home-manager.users.cirno = import ./users/cirno/home.nix; } ]; }; diff --git a/users/cirno/default.nix b/users/cirno/default.nix new file mode 100644 index 0000000..4870a94 --- /dev/null +++ b/users/cirno/default.nix @@ -0,0 +1,29 @@ +{ config, pkgs, lib, ... }: + +{ + + + config = { + + programs = { + firefox.enable = true; + }; + + services = { + displayManager.sddm = { + enable = true; + wayland.enable = true; + }; + desktopManager.plasma6.enable = true; + }; + + users.users.cirno = { + isNormalUser = true; + shell = pkgs.zsh; + home = "/home/cirno"; + description = "user for guests/cirno people"; + extraGroups = [ "" ]; + initialHashedPassword = "$6$2f8vjQbdKyEBqPRT$FrZBZfzpJGqNqLlCyb7CzRNm0wuZwfRI7Qj/dUQlbtLixyJK5Im9AJT7GXmP5StfhZxSbH/wW8nDGPQm98NXV0"; + }; + }; +} diff --git a/users/cirno/home.nix b/users/cirno/home.nix new file mode 100644 index 0000000..2b43031 --- /dev/null +++ b/users/cirno/home.nix @@ -0,0 +1,15 @@ +{ config, + nixosConfig, + pkgs, + lib, + inputs, + home-manager, + ... }: + let + + in + { + + home.stateVersion = "24.05"; + home.homeDirectory = "/home/cirno"; + } From a6c4098a5c3b70578d56d82f731db38c84b243f3 Mon Sep 17 00:00:00 2001 From: stitchy Date: Fri, 3 May 2024 09:29:43 +0000 Subject: [PATCH 009/132] revert "scarab init" accidentally pushed to master This reverts commit 40a8d3b711306f2102fab323101a8b795db18310. --- flake.nix | 11 ------- hosts/scarab/default.nix | 64 ---------------------------------------- 2 files changed, 75 deletions(-) delete mode 100644 hosts/scarab/default.nix diff --git a/flake.nix b/flake.nix index cc51ece..527b9f2 100644 --- a/flake.nix +++ b/flake.nix @@ -29,17 +29,6 @@ } ]; }; - scarab = nixpkgs.lib.nixosSystem { - system = "aarch64-linux"; - modules = [ - { _module.args = { inherit inputs; }; } - (import "${inputs.mobile-nixos}/lib/configuration.nix" { - device = "oneplus-enchilada"; - }) - ./packages/default.nix - ./hosts/scarab/default.nix - ]; - }; lappy = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { inherit inputs; }; diff --git a/hosts/scarab/default.nix b/hosts/scarab/default.nix deleted file mode 100644 index f63b472..0000000 --- a/hosts/scarab/default.nix +++ /dev/null @@ -1,64 +0,0 @@ -{ config, lib, pkgs, ... }: -let - - defaultUserName = "nixos"; - -in -{ - imports = [ ../default.nix ]; - - users.users."${defaultUserName}" = { - isNormalUser = true; - password = "1234"; - extraGroups = [ - "dialout" - "feedbackd" - "networkmanager" - "video" - "wheel" - ]; - }; - - mobile = { - beautification = { - silentBoot = lib.mkDefault true; - splash = lib.mkDefault true; - }; - boot.stage-1 = { - kernel.useStrictKernelConfig = true; - networking.enable = true; - }; - }; - - services.openssh.enable = true; - #services.pipewire = { - # enable = true; - # pulse.enable = true; - #}; - services.xserver.desktopManager.phosh = { - enable = true; - user = defaultUserName; - group = "users"; - }; - - #services.xserver.desktopManager.plasma5 = { - # enable = true; - # mobile.enable = true; - #}; - - programs.firefox.enable = true; - programs.calls.enable = true; - - hardware = { - bluetooth.enable = true; - sensor.iio.enable = true; - }; - - networking.networkmanager.unmanaged = [ "rndis0" "usb0" ]; - - nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ - "oneplus-sdm845-firmware" - "oneplus-sdm845-firmware-xz" - ]; - system.stateVersion = "23.11"; -} From 230958bd8fa4bab5a1f0fd8aa998774aaee57bb2 Mon Sep 17 00:00:00 2001 From: stitchy Date: Fri, 3 May 2024 09:39:40 +0000 Subject: [PATCH 010/132] add zip/unzipper --- packages/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/default.nix b/packages/default.nix index ffe07f9..73e35f0 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -62,6 +62,7 @@ in "glib" "gnumake" "gnupg" + "p7zip" "pinentry" "neofetch" "wget" From 67de9c5169d3121ffc45b829342c25abb53742c9 Mon Sep 17 00:00:00 2001 From: stitchy Date: Sat, 4 May 2024 04:50:48 -0700 Subject: [PATCH 011/132] squash merge niftion --- users/cirno/default.nix | 15 ++++++++++----- users/stitchynyan/default.nix | 18 +++++++++--------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/users/cirno/default.nix b/users/cirno/default.nix index 4870a94..856b707 100644 --- a/users/cirno/default.nix +++ b/users/cirno/default.nix @@ -10,20 +10,25 @@ }; services = { + desktopManager.plasma6.enable = true; displayManager.sddm = { enable = true; wayland.enable = true; + } + pipewire = { + alsa.enable = true; + enable = true; + pulse.enable = true; }; - desktopManager.plasma6.enable = true; }; users.users.cirno = { + description = "user for guests/cirno people"; + extraGroups = [ "audio" ]; + home = "/home/cirno"; + initialHashedPassword = "$6$2f8vjQbdKyEBqPRT$FrZBZfzpJGqNqLlCyb7CzRNm0wuZwfRI7Qj/dUQlbtLixyJK5Im9AJT7GXmP5StfhZxSbH/wW8nDGPQm98NXV0"; isNormalUser = true; shell = pkgs.zsh; - home = "/home/cirno"; - description = "user for guests/cirno people"; - extraGroups = [ "" ]; - initialHashedPassword = "$6$2f8vjQbdKyEBqPRT$FrZBZfzpJGqNqLlCyb7CzRNm0wuZwfRI7Qj/dUQlbtLixyJK5Im9AJT7GXmP5StfhZxSbH/wW8nDGPQm98NXV0"; }; }; } diff --git a/users/stitchynyan/default.nix b/users/stitchynyan/default.nix index f85557b..c91b878 100644 --- a/users/stitchynyan/default.nix +++ b/users/stitchynyan/default.nix @@ -4,13 +4,13 @@ imports = [ ../default.nix ]; nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem ( lib.getName pkg) [ + "cudatoolkit" + "nvidia-settings" + "nvidia-x11" "osu-lazer" "steam" "steam-original" "steam-run" - "nvidia-x11" - "nvidia-settings" - "cudatoolkit" ]; programs = { @@ -23,6 +23,8 @@ }; }; + security.pam.services.swaylock = {}; + services = { avahi = { enable = config.stitchyconf.form == "pc"; @@ -32,23 +34,21 @@ blueman.enable = true; gnome.gnome-keyring.enable = true; pipewire = { + alsa.enable = true; enable = true; pulse.enable = true; - alsa.enable = true; }; printing.enable = true; usbmuxd.enable = true; xserver.enable = true; }; - security.pam.services.swaylock = {}; - users.users.stitchynyan = { - isNormalUser = true; - shell = pkgs.zsh; - home = "/home/stitchynyan"; description = "Personal user"; extraGroups = [ "wheel" "networkmanager" "kvm" "libvirtd" "audio" "dialout" ]; + home = "/home/stitchynyan"; initialHashedPassword = "$y$j9T$rvySCWHYE4AO4A9J0Vf20.$x5hpBNsOWovQFtNfFUIt17OAH5MJFwFBGjxbaEIagJ3"; + isNormalUser = true; + shell = pkgs.zsh; }; } From b27b33d13edbb606a98f290e196c489f3a31231b Mon Sep 17 00:00:00 2001 From: stitchy Date: Sun, 5 May 2024 12:36:31 +0000 Subject: [PATCH 012/132] waaaaaaa --- users/cirno/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/users/cirno/default.nix b/users/cirno/default.nix index 856b707..45001a8 100644 --- a/users/cirno/default.nix +++ b/users/cirno/default.nix @@ -14,7 +14,7 @@ displayManager.sddm = { enable = true; wayland.enable = true; - } + }; pipewire = { alsa.enable = true; enable = true; From fa4867484538af4ab27de7392c5104f52d36e950 Mon Sep 17 00:00:00 2001 From: stitchy Date: Wed, 5 Jun 2024 05:46:08 -0700 Subject: [PATCH 013/132] virtualization plus wifif --- hosts/malachite/default.nix | 14 ++++++++------ hosts/malachite/hardware-configuration.nix | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/hosts/malachite/default.nix b/hosts/malachite/default.nix index b546972..43bd499 100644 --- a/hosts/malachite/default.nix +++ b/hosts/malachite/default.nix @@ -1,15 +1,13 @@ { config, pkgs, lib, ... }: let passthrough = pkgs.writeShellApplication { - name = "pasthrough.sh"; + name = "passthrough.sh"; runtimeInputs = lib.attrVals [ "coreutils" "kmod" "libvirt" "procps" ] pkgs; text = '' GUEST_NAME="$1" HOOK_NAME="$2" STATE_NAME="$3" - echo 19>/home/stitchynyan/startlogfile - BASH_XTRACEFD=19 set -x # For the windows 10 VM @@ -19,7 +17,7 @@ let if [[ "$HOOK_NAME/$STATE_NAME" == "prepare/begin" ]]; then # Remove Hyprland - pkill Hyprland + #pkill Hyprland # Unbind VTconsoles echo 0 > /sys/class/vtconsole/vtcon0/bind @@ -77,15 +75,19 @@ in { ../default.nix ]; virtualisation.libvirtd.hooks.qemu = { - passthrough = "${passthrough}"; + passthrough = "${passthrough}/bin/passthrough.sh"; }; stitchyconf = { artPkgs.enable = true; }; - virtualisation.libvirtd.enable = true; + virtualisation.libvirtd = { + enable = true; + onBoot = "ignore"; + }; hardware = { + opentabletdriver.enable = true; steam-hardware.enable = true; }; diff --git a/hosts/malachite/hardware-configuration.nix b/hosts/malachite/hardware-configuration.nix index 1cbe4bc..5589da3 100644 --- a/hosts/malachite/hardware-configuration.nix +++ b/hosts/malachite/hardware-configuration.nix @@ -8,7 +8,7 @@ boot.initrd.availableKernelModules = [ "vmd" "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" "vfio-pci" ]; - boot.extraModulePackages = [ ]; + boot.extraModulePackages = lib.attrVals [ "rtl8812au" ] config.boot.kernelPackages; boot.kernelParams = [ "loglevel=3" From f7199197c653044a12836ecec3a5ca6b266bd8d1 Mon Sep 17 00:00:00 2001 From: stitchy Date: Tue, 18 Jun 2024 00:23:44 -0700 Subject: [PATCH 014/132] remove novideo --- hosts/default.nix | 1 + hosts/malachite/hardware-configuration.nix | 11 +++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hosts/default.nix b/hosts/default.nix index 84d0a96..dbec4a3 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -22,6 +22,7 @@ in }; }; + programs.appimage.binfmt = true; security.sudo.wheelNeedsPassword = false; security.rtkit.enable = true; services = { diff --git a/hosts/malachite/hardware-configuration.nix b/hosts/malachite/hardware-configuration.nix index 5589da3..1842319 100644 --- a/hosts/malachite/hardware-configuration.nix +++ b/hosts/malachite/hardware-configuration.nix @@ -76,24 +76,23 @@ swapDevices = [ ]; - services.xserver.videoDrivers = ["nvidia"]; services.xserver.displayManager.lightdm.enable = false; services.monado = { enable = true; defaultRuntime = true; }; + systemd.user.services.monado.environment = { + STEAMVR_LH_ENABLE = "1"; + XRT_COMPOSITOR_COMPUTE = "1"; + }; + hardware = { opengl = { enable = true; driSupport = true; driSupport32Bit = true; }; - nvidia = { - modesetting.enable = true; - powerManagement.enable = true; - package = config.boot.kernelPackages.nvidiaPackages.beta; - }; }; networking.useDHCP = lib.mkDefault true; From f44ccff64f2442e233ffa4fb3438e540b49fd9a6 Mon Sep 17 00:00:00 2001 From: stitchy Date: Sat, 13 Jul 2024 07:52:09 +0000 Subject: [PATCH 015/132] many small changes --- config/hypr/binds.conf | 2 +- config/hypr/exec-start.conf | 1 - config/hypr/hyprland.conf | 4 ---- config/zshrc | 2 -- packages/default.nix | 5 +++-- users/stitchynyan/default.nix | 9 ++++++++- 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/config/hypr/binds.conf b/config/hypr/binds.conf index ecc2103..742efaf 100644 --- a/config/hypr/binds.conf +++ b/config/hypr/binds.conf @@ -22,7 +22,7 @@ bindl=,switch:Lid Switch,exec,swaylock --effect-greyscale # Games -bind=ALTSHIFT,T,exec,gamescope -w 1280 -h 960 -F fsr -f -r 60 wine "/home/flyingstitchman/Documents/Games/Touhou 15 - Legacy of Lunatic Kingdom/th15.exe" +bind=ALTSHIFT,T,exec,gamescope -w 1280 -h 960 -f -r 60 wine "/home/flyingstitchman/Documents/Games/Touhou 15 - Legacy of Lunatic Kingdom/th15.exe" bind=ALTSHIFT,O,exec,osu-lazer bind=ALTSHIFT,C,exec,"/home/flyingstitchman/Documents/Games/Celeste/Celeste" bind=ALTSHIFT,S,exec,"/home/flyingstitchman/Documents/Games/Stardew Valley/StardewValley" diff --git a/config/hypr/exec-start.conf b/config/hypr/exec-start.conf index a21e8a1..deb3872 100644 --- a/config/hypr/exec-start.conf +++ b/config/hypr/exec-start.conf @@ -3,7 +3,6 @@ exec-once=eww open bar exec-once=swayidle exec-once=hyprpaper -exec-once=systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP exec-once=dbus-daemon --session --address=unix:path=$XDG_RUNTIME_DIR/bus exec-once=dunst exec-once=${XDG_CONFIG_HOME:-~/.config}/dunst/scripts/low-battery.sh diff --git a/config/hypr/hyprland.conf b/config/hypr/hyprland.conf index 600fc5f..fe44023 100755 --- a/config/hypr/hyprland.conf +++ b/config/hypr/hyprland.conf @@ -86,10 +86,6 @@ dwindle { preserve_split=true } -master { - new_is_master=true -} - misc { layers_hog_keyboard_focus=true vfr=1 diff --git a/config/zshrc b/config/zshrc index e15d2a8..268730a 100755 --- a/config/zshrc +++ b/config/zshrc @@ -111,8 +111,6 @@ export WINEPREFIX="$XDG_DATA_HOME"/wineprefixes/default export DOTNET_CLI_HOME="$XDG_CONFIG_HOME"/dotnet export RUSTUP_HOME="$XDG_DATA_HOME"/rustup export CARGO_HOME="$XDG_DATA_HOME"/cargo -# Nvidia moment -export WLR_NO_HARDWARE_CURSORS=1 alias dosbox="dosbox -conf "$XDG_CONFIG_HOME"/dosbox/dosbox.conf " diff --git a/packages/default.nix b/packages/default.nix index 73e35f0..da87046 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -27,12 +27,13 @@ let "libnotify" "networkmanager-openvpn" # temporary home manager things + "img2pdf" "inotify-tools" "eww" "jq" - "texliveFull" "pandoc" - "img2pdf" + #"texliveFull" + "typst" "socat" "libimobiledevice" "ifuse" diff --git a/users/stitchynyan/default.nix b/users/stitchynyan/default.nix index c91b878..6ccc920 100644 --- a/users/stitchynyan/default.nix +++ b/users/stitchynyan/default.nix @@ -45,10 +45,17 @@ users.users.stitchynyan = { description = "Personal user"; - extraGroups = [ "wheel" "networkmanager" "kvm" "libvirtd" "audio" "dialout" ]; + extraGroups = [ "audio" "dialout" "docker" "kvm" "libvirtd" "networkmanager" "wheel" ]; home = "/home/stitchynyan"; initialHashedPassword = "$y$j9T$rvySCWHYE4AO4A9J0Vf20.$x5hpBNsOWovQFtNfFUIt17OAH5MJFwFBGjxbaEIagJ3"; isNormalUser = true; shell = pkgs.zsh; }; + + i18n.inputMethod = { + enabled = "fcitx5"; + fcitx5.addons = [ + pkgs.fcitx5-mozc + ]; + }; } From 00cb1bbe74a2cac5dacb45ca804a06820e83d5e1 Mon Sep 17 00:00:00 2001 From: stitchy Date: Tue, 30 Jul 2024 14:25:55 +0000 Subject: [PATCH 016/132] Fixing fonts, gpg-agent, clipboard, and other misc --- config/hypr/exec-start.conf | 2 +- config/hypr/portal.sh | 8 -------- config/zshrc | 1 - hosts/lappy/default.nix | 6 +++--- packages/default.nix | 17 +++++++++++++++++ users/stitchynyan/default.nix | 3 ++- users/stitchynyan/home.nix | 19 ++++++++++++++++++- 7 files changed, 41 insertions(+), 15 deletions(-) delete mode 100755 config/hypr/portal.sh diff --git a/config/hypr/exec-start.conf b/config/hypr/exec-start.conf index deb3872..8d88c82 100644 --- a/config/hypr/exec-start.conf +++ b/config/hypr/exec-start.conf @@ -9,4 +9,4 @@ exec-once=${XDG_CONFIG_HOME:-~/.config}/dunst/scripts/low-battery.sh exec-once=fcitx5 #exec-once=~/.config/hypr/portal.sh exec-once=systemctl --user import-environment DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP -exec-once=wl-paste -p --watch wl-copy -pc +exec-once=wl-paste -t text --watch clipman store --no-persist diff --git a/config/hypr/portal.sh b/config/hypr/portal.sh deleted file mode 100755 index 8f692bf..0000000 --- a/config/hypr/portal.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -sleep 1 -killall xdg-desktop-portal-hyprland -killall xdg-desktop-portal-wlr -killall xdg-desktop-portal -/usr/lib/xdg-desktop-portal-hyprland & -sleep 2 -/usr/lib/xdg-desktop-portal & diff --git a/config/zshrc b/config/zshrc index 268730a..08c0894 100755 --- a/config/zshrc +++ b/config/zshrc @@ -96,7 +96,6 @@ export QT_QPA_PLATFORMTHEME=qt5ct #export GDK_DEBUG=1 export MBSYNCRC=${XDG_CONFIG_HOME:-~/.config}/mbsync/config export PASSWORD_STORE_DIR=${XDG_CONFIG_HOME:-~/.config}/password_store -export GNUPGHOME=${XDG_DATA_HOME-~/.config}/gnupg export NOTMUCH_CONFIG=${XDG_CONFIG_HOME-~/.config}/notmuch/config export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority export KDEHOME="$XDG_CONFIG_HOME"/kde diff --git a/hosts/lappy/default.nix b/hosts/lappy/default.nix index 1a30eab..90012f2 100644 --- a/hosts/lappy/default.nix +++ b/hosts/lappy/default.nix @@ -35,13 +35,13 @@ "kernel.yama.ptrace_scope=0" ]; + virtualisation.docker.enable = true; virtualisation.libvirtd.enable = true; hardware.bluetooth.enable = true; hardware.bluetooth.settings.General.Experimental = true; - hardware.opengl = { + hardware.graphics = { enable = true; - driSupport = true; - driSupport32Bit = true; + enable32Bit= true; extraPackages = lib.attrVals [ "intel-compute-runtime" "intel-media-driver" diff --git a/packages/default.nix b/packages/default.nix index da87046..6c9563c 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -19,6 +19,7 @@ let "dracula-theme" "wl-clipboard" "brightnessctl" + "clipman" "powertop" "easyeffects" "mutt-wizard" @@ -66,6 +67,7 @@ in "p7zip" "pinentry" "neofetch" + "unzip" "wget" "zoxide" ] pkgs) @@ -123,5 +125,20 @@ in "nerdfonts" "ipafont" ] pkgs; + + fonts.fontconfig.defaultFonts = { + monospace = [ + "Noto Sans Mono" + "IPAGothic" + ]; + sansSerif = [ + "Noto Sans" + "IPAPGothic" + ]; + serif = [ + "Noto Serif" + "IPAPMincho" + ]; + }; }; } diff --git a/users/stitchynyan/default.nix b/users/stitchynyan/default.nix index 6ccc920..7dacc17 100644 --- a/users/stitchynyan/default.nix +++ b/users/stitchynyan/default.nix @@ -53,7 +53,8 @@ }; i18n.inputMethod = { - enabled = "fcitx5"; + enable = true; + type = "fcitx5"; fcitx5.addons = [ pkgs.fcitx5-mozc ]; diff --git a/users/stitchynyan/home.nix b/users/stitchynyan/home.nix index 9424baa..f639964 100644 --- a/users/stitchynyan/home.nix +++ b/users/stitchynyan/home.nix @@ -54,7 +54,7 @@ in #steamvr? procps usbutils - (python311.withPackages (lib.attrVals ["sympy" "matplotlib"])) + (python311.withPackages (lib.attrVals [ "matplotlib" "python-lsp-server" "sympy"])) (octaveFull.withPackages (lib.attrVals ["symbolic"])) ] ++ (lib.optionals (nixosConfig.stitchyconf.form == "handheld") handheldPkgs) @@ -118,6 +118,23 @@ in }; }; + programs.gpg = { + homedir = "${config.xdg.dataHome}/gnupg"; + }; + + services = { + gpg-agent = { + enable = true; + enableSshSupport = true; + defaultCacheTtl = 34560000; + maxCacheTtl = 34560000; + extraConfig = '' + allow-preset-passphrase + pinentry-program /run/current-system/sw/bin/pinentry + ''; + }; + }; + systemd.user.timers = { mailsync = { Unit.Description = "Syncs email"; From 54e9588487e06f47f998dfdbc54714a1fab1a9b0 Mon Sep 17 00:00:00 2001 From: stitchy Date: Tue, 30 Jul 2024 14:41:54 +0000 Subject: [PATCH 017/132] huzza, cursor issue has been fixedgit add --patch users/stitchynyan/home.nixgit add --patch users/stitchynyan/home.nix --- users/stitchynyan/home.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/users/stitchynyan/home.nix b/users/stitchynyan/home.nix index f639964..076884e 100644 --- a/users/stitchynyan/home.nix +++ b/users/stitchynyan/home.nix @@ -147,10 +147,10 @@ in }; home.pointerCursor = { - name = "phinger-cursors"; + name = "phinger-cursors-dark"; package = pkgs.phinger-cursors; gtk.enable = true; - size = 64; + size = 24; }; # Read the Docs before change From 34f8e2640ff17b9377abbffbf6afc6bca3694cf4 Mon Sep 17 00:00:00 2001 From: stitchy Date: Thu, 1 Aug 2024 09:44:24 +0000 Subject: [PATCH 018/132] nyadministrator --- config/eww/scripts/get-active-workspace | 2 +- config/zshrc | 1 + users/nyadmin/default.nix | 2 +- users/stitchynyan/default.nix | 4 ++++ users/stitchynyan/home.nix | 1 + 5 files changed, 8 insertions(+), 2 deletions(-) diff --git a/config/eww/scripts/get-active-workspace b/config/eww/scripts/get-active-workspace index 7bb8fe3..6f7fc6b 100755 --- a/config/eww/scripts/get-active-workspace +++ b/config/eww/scripts/get-active-workspace @@ -2,5 +2,5 @@ hyprctl monitors -j | jq '.[] | select(.focused) | .activeWorkspace.id' -socat -u UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | +socat -u UNIX-CONNECT:/run/user/1000/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | stdbuf -o0 awk -F '>>|,' -e '/^workspace>>/ {print $2}' -e '/^focusedmon>>/ {print $3}' diff --git a/config/zshrc b/config/zshrc index 08c0894..3348032 100755 --- a/config/zshrc +++ b/config/zshrc @@ -100,6 +100,7 @@ export NOTMUCH_CONFIG=${XDG_CONFIG_HOME-~/.config}/notmuch/config export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority export KDEHOME="$XDG_CONFIG_HOME"/kde export GRADLE_USER_HOME="$XDG_DATA_HOME"/gradle +export GNUPGHOME=${XDG_DATA_HOME-~/.config}/gnupg export GPG_TTY=$(tty) export SDL_VIDEODRIVER=wayland export GOPATH="$XDG_DATA_HOME" diff --git a/users/nyadmin/default.nix b/users/nyadmin/default.nix index b9d96ca..3057e1a 100644 --- a/users/nyadmin/default.nix +++ b/users/nyadmin/default.nix @@ -6,7 +6,7 @@ isNormalUser = true; shell = pkgs.zsh; home = "/home/nyadmin"; - description = "Administrator~"; + description = "nyadministrator~"; extraGroups = [ "wheel" "kvm" "libvirt" "docker" ]; initialHashedPassword = "$y$j9T$XguIcj/AVXsWW/MxSYAGh0$TivGAa0z8KNCli2mKTd24vtqimpadNzqMFwfbeh0p30"; openssh.authorizedKeys.keys = [ diff --git a/users/stitchynyan/default.nix b/users/stitchynyan/default.nix index 7dacc17..4864b00 100644 --- a/users/stitchynyan/default.nix +++ b/users/stitchynyan/default.nix @@ -13,6 +13,10 @@ "steam-run" ]; + hardware = { + opentabletdriver.enable = true; + }; + programs = { firefox.enable = true; hyprland.enable = true; diff --git a/users/stitchynyan/home.nix b/users/stitchynyan/home.nix index 076884e..8a90b2a 100644 --- a/users/stitchynyan/home.nix +++ b/users/stitchynyan/home.nix @@ -125,6 +125,7 @@ in services = { gpg-agent = { enable = true; + enableScDaemon = false; enableSshSupport = true; defaultCacheTtl = 34560000; maxCacheTtl = 34560000; From 3c6cc3e1d25601c33e101638bef322981c92c1ca Mon Sep 17 00:00:00 2001 From: stitchy Date: Thu, 8 Aug 2024 04:49:22 -0700 Subject: [PATCH 019/132] virtualization improvements --- hosts/malachite/default.nix | 54 +++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/hosts/malachite/default.nix b/hosts/malachite/default.nix index 43bd499..d264bf7 100644 --- a/hosts/malachite/default.nix +++ b/hosts/malachite/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: +{ config, nixpkgs-xr, pkgs, lib, ... }: let passthrough = pkgs.writeShellApplication { name = "passthrough.sh"; @@ -24,43 +24,42 @@ let echo 0 > /sys/class/vtconsole/vtcon1/bind # Unbind EFI-Framebuffer - echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind + #echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind + + # Unbind the GPU from display driver + virsh nodedev-detach pci_0000_03_00_0 + virsh nodedev-detach pci_0000_03_00_1 + virsh nodedev-detach pci_0000_03_00_2 + + # Unload Modules + modprobe -r amdgpu # We love race conditions sleep 2 - # Unload Modules - modprobe -r nvidia_drm nvidia_modeset nvidia_uvm nvidia - - # Unbind the GPU from display driver - virsh nodedev-detach pci_0000_01_00_0 - virsh nodedev-detach pci_0000_01_00_1 - # Load VFIO Kernel Module - modprobe vfio_pci - - sleep 2 + modprobe vfio vfio_pci vfio_iommu_type1 elif [[ "$HOOK_NAME/$STATE_NAME" == "release/end" ]]; then - # Re-Bind GPU to Nvidia Driver (replace the pci addresses with yours) - virsh nodedev-reattach pci_0000_01_00_0 - virsh nodedev-reattach pci_0000_01_00_1 + modprobe -r vfio_iommu_type1 vfio_pci vfio - modprobe -r vfio-pci - - #bind efi - echo "efi-framebuffer.0" > /sys/bus/platform/drivers/efi-framebuffer/bind - - # Reload nvidia modules - modprobe nvidia_drm - modprobe nvidia_modeset - modprobe nvidia_uvm - modprobe nvidia + # Re-Bind GPU to Host + virsh nodedev-reattach pci_0000_03_00_0 + virsh nodedev-reattach pci_0000_03_00_1 + virsh nodedev-reattach pci_0000_03_00_2 # Rebind VT consoles echo 1 > /sys/class/vtconsole/vtcon0/bind - bin/echo 1 > /sys/class/vtconsole/vtcon1/bind + echo 1 > /sys/class/vtconsole/vtcon1/bind + + sleep 2 + + # Bind Framebuffer + #echo "efi-framebuffer.0" > /sys/bus/platform/drivers/efi-framebuffer/bind + + # Reload Modules + modprobe amdgpu fi @@ -99,6 +98,9 @@ in { databaseDir = "/home/stitchynyan/.local/share/syncthing"; dataDir = "/home/stitchynyan"; }; + + environment.systemPackages = [ + pkgs.wlx-overlay-s ]; networking.hostName = "malachite"; From 9ec7fb3c67052d0cf68e95b9f0741225c7ae4083 Mon Sep 17 00:00:00 2001 From: stitchy Date: Thu, 8 Aug 2024 04:52:13 -0700 Subject: [PATCH 020/132] other misc malachite fixes --- config/hypr/hyprpaper.conf | 1 + flake.nix | 3 +++ hosts/malachite/hardware-configuration.nix | 5 ++--- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/config/hypr/hyprpaper.conf b/config/hypr/hyprpaper.conf index c98267c..82129a6 100644 --- a/config/hypr/hyprpaper.conf +++ b/config/hypr/hyprpaper.conf @@ -6,5 +6,6 @@ wallpaper = DP-1,~/.config/wallpapers/current_wallpaper.png wallpaper = DP-2,~/.config/wallpapers/current_wallpaper.png wallpaper = DP-3,~/.config/wallpapers/current_wallpaper.png wallpaper = DP-4,~/.config/wallpapers/current_wallpaper.png +wallpaper = HDMI-A-1,~/.config/wallpapers/current_wallpaper.png splash=false ipc = off diff --git a/flake.nix b/flake.nix index 527b9f2..becf67f 100644 --- a/flake.nix +++ b/flake.nix @@ -4,6 +4,7 @@ outputs = inputs@{ nixpkgs, + nixpkgs-xr, nixos-hardware, home-manager, osu-nixos, @@ -19,6 +20,7 @@ ./packages/default.nix ./hosts/malachite/default.nix ./users/stitchynyan/default.nix + nixpkgs-xr.nixosModules.nixpkgs-xr home-manager.nixosModules.home-manager { @@ -81,6 +83,7 @@ flake = false; }; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + nixpkgs-xr.url = "github:nix-community/nixpkgs-xr"; nixos-hardware.url = "github:Nixos/nixos-hardware/master"; osu-nixos.url = "github:Asqiir/osu-nixos"; }; diff --git a/hosts/malachite/hardware-configuration.nix b/hosts/malachite/hardware-configuration.nix index 1842319..8f0d845 100644 --- a/hosts/malachite/hardware-configuration.nix +++ b/hosts/malachite/hardware-configuration.nix @@ -88,10 +88,9 @@ }; hardware = { - opengl = { + graphics = { enable = true; - driSupport = true; - driSupport32Bit = true; + enable32Bit = true; }; }; From 3aeda379d55dcbb8e6e319250ba856be1841c1a8 Mon Sep 17 00:00:00 2001 From: stitchy Date: Thu, 12 Sep 2024 06:15:18 +0000 Subject: [PATCH 021/132] Move Nix Store --- hosts/lappy/hardware-configuration.nix | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/hosts/lappy/hardware-configuration.nix b/hosts/lappy/hardware-configuration.nix index ea2f74b..e377b09 100644 --- a/hosts/lappy/hardware-configuration.nix +++ b/hosts/lappy/hardware-configuration.nix @@ -10,17 +10,23 @@ boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { device = "/dev/disk/by-uuid/d626409d-8166-45c2-a168-09dfab31b8a4"; + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/d626409d-8166-45c2-a168-09dfab31b8a4"; fsType = "btrfs"; - options = [ "subvol=@nix-root" ]; + options = [ "compress=zstd" "subvol=@nix-root" ]; }; - - fileSystems."/home" = - { device = "/dev/disk/by-uuid/d626409d-8166-45c2-a168-09dfab31b8a4"; + "/home" = { + device = "/dev/disk/by-uuid/d626409d-8166-45c2-a168-09dfab31b8a4"; fsType = "btrfs"; - options = [ "subvol=@home" ]; + options = [ "compress=zstd" "subvol=@home" ]; }; + "/nix" = { + device = "/dev/disk/by-uuid/d626409d-8166-45c2-a168-09dfab31b8a4"; + fsType = "btrfs"; + options = [ "compress=zstd" "subvol=@nix-store" "noatime"]; + }; + }; boot.initrd.luks.devices."luksdev".device = "/dev/disk/by-uuid/100a5596-671b-48ba-a1d1-0723559baf87"; From e1aa67dbb2852a585b3910dae034c2c368a46c35 Mon Sep 17 00:00:00 2001 From: stitchy Date: Fri, 1 Nov 2024 18:47:35 +0000 Subject: [PATCH 022/132] I really should commit more --- config/eww/eww.yuck | 4 ++++ config/zshrc | 15 ++++++++++++++- flake.nix | 4 ++-- hosts/default.nix | 18 ++++++++++++++++++ hosts/lappy/default.nix | 7 +++++-- users/stitchynyan/default.nix | 21 ++++++++++++++------- users/stitchynyan/home.nix | 12 ++++++++++-- 7 files changed, 67 insertions(+), 14 deletions(-) diff --git a/config/eww/eww.yuck b/config/eww/eww.yuck index c49aa32..f4f5305 100644 --- a/config/eww/eww.yuck +++ b/config/eww/eww.yuck @@ -70,6 +70,9 @@ (defwidget power [] (box :class "power" :valign "end" "⏻")) +(defwidget tray [] + (systray :orientation "v" :icon-size 20)) + (defwidget bar [] (centerbox :orientation "vertical" :halign "center" @@ -81,6 +84,7 @@ (mic) (volume) (battery) + (tray) (power)))) diff --git a/config/zshrc b/config/zshrc index 3348032..3b8f8e0 100755 --- a/config/zshrc +++ b/config/zshrc @@ -7,7 +7,6 @@ unsetopt autocd beep notify unsetopt PROMPT_SP bindkey -v # End of lines configured by zsh-newuser-install - export XDG_CONFIG_HOME="$HOME/.config" export XDG_CACHE_HOME="$HOME/.cache" export XDG_DATA_HOME="$HOME/.local/share" @@ -30,6 +29,7 @@ alias imv="imv -b aa77bb" alias find="fd" alias tree="eza --tree" alias icat="kitty +kitten icat" +alias qsus="NIXPKGS_ALLOW_UNFREE=1 nix-shell -p quartus-prime-lite -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/fe7ab74a86d78ba00d144aa7a8da8c71a200c563.tar.gz" # Automatically get new programs for autocompletion @@ -37,6 +37,19 @@ zshcache_time="$(date +%s%N)" autoload -Uz add-zsh-hook +function osc7-pwd() { + emulate -L zsh # also sets localoptions for us + setopt extendedglob + local LC_ALL=C + printf '\e]2;%s%s\e\' ${PWD//(#m)([^@-Za-z&-;_~])/%${(l:2::0:)$(([##16]#MATCH))}} +} + +function chpwd-osc7-pwd() { + (( ZSH_SUBSHELL )) || osc7-pwd +} +add-zsh-hook -Uz chpwd chpwd-osc7-pwd + + rehash_precmd() { if [[ -a /var/cache/zsh/pacman ]]; then local paccache_time="$(date -r /var/cache/zsh/pacman +%s%N)" diff --git a/flake.nix b/flake.nix index becf67f..b83de7c 100644 --- a/flake.nix +++ b/flake.nix @@ -6,8 +6,8 @@ nixpkgs, nixpkgs-xr, nixos-hardware, + nixpkgs-quartus, home-manager, - osu-nixos, ... } : { @@ -85,6 +85,6 @@ nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs-xr.url = "github:nix-community/nixpkgs-xr"; nixos-hardware.url = "github:Nixos/nixos-hardware/master"; - osu-nixos.url = "github:Asqiir/osu-nixos"; + nixpkgs-quartus.url = "github:nixos/nixpkgs/nixos-22.05"; }; } diff --git a/hosts/default.nix b/hosts/default.nix index dbec4a3..508f4eb 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -66,6 +66,24 @@ in allowedUDPPorts = [ 22000 ]; }; + services.udev.packages = [ + (pkgs.writeTextFile { + + name = "alterra-udev"; + destination = "/etc/udev/rules.d/92-alterra.rules"; + text = '' + # USB-Blaster + SUBSYSTEM=="usb", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6001", MODE="0666" + SUBSYSTEM=="usb", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6002", MODE="0666" + + SUBSYSTEM=="usb", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6003", MODE="0666" + + # USB-Blaster II + SUBSYSTEM=="usb", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6010", MODE="0666" + SUBSYSTEM=="usb", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6810", MODE="0666" + ''; + })]; + environment.etc.hosts.mode = "0644"; nix.settings.experimental-features = [ "nix-command" "flakes" ]; }; diff --git a/hosts/lappy/default.nix b/hosts/lappy/default.nix index 90012f2..4143226 100644 --- a/hosts/lappy/default.nix +++ b/hosts/lappy/default.nix @@ -35,8 +35,11 @@ "kernel.yama.ptrace_scope=0" ]; - virtualisation.docker.enable = true; - virtualisation.libvirtd.enable = true; + virtualisation = { + docker.enable = true; + libvirtd.enable = true; + waydroid.enable = true; + }; hardware.bluetooth.enable = true; hardware.bluetooth.settings.General.Experimental = true; hardware.graphics = { diff --git a/users/stitchynyan/default.nix b/users/stitchynyan/default.nix index 4864b00..fd714db 100644 --- a/users/stitchynyan/default.nix +++ b/users/stitchynyan/default.nix @@ -12,6 +12,9 @@ "steam-original" "steam-run" ]; + nixpkgs.config.permittedInsecurePackages = [ + "olm-3.2.16" + ]; hardware = { opentabletdriver.enable = true; @@ -49,18 +52,22 @@ users.users.stitchynyan = { description = "Personal user"; - extraGroups = [ "audio" "dialout" "docker" "kvm" "libvirtd" "networkmanager" "wheel" ]; + extraGroups = [ "audio" "dialout" "docker" "kvm" "libvirtd" "networkmanager" "wireshark" "wheel" ]; home = "/home/stitchynyan"; initialHashedPassword = "$y$j9T$rvySCWHYE4AO4A9J0Vf20.$x5hpBNsOWovQFtNfFUIt17OAH5MJFwFBGjxbaEIagJ3"; isNormalUser = true; shell = pkgs.zsh; }; - i18n.inputMethod = { - enable = true; - type = "fcitx5"; - fcitx5.addons = [ - pkgs.fcitx5-mozc - ]; + i18n = { + defaultLocale = "ja_JP.UTF-8"; + inputMethod = { + enable = true; + type = "fcitx5"; + fcitx5.addons = with pkgs; [ + fcitx5-mozc + fcitx5-nord + ]; + }; }; } diff --git a/users/stitchynyan/home.nix b/users/stitchynyan/home.nix index 8a90b2a..2e418db 100644 --- a/users/stitchynyan/home.nix +++ b/users/stitchynyan/home.nix @@ -11,7 +11,10 @@ let ] pkgs; pcPkgs = lib.attrVals [ "activitywatch" + "awatcher" + "anki" "dunst" + "foliate" "foot" "grim" "imv" @@ -24,21 +27,25 @@ let "lynx" "mpv" "msmtp" - "mupdf" "neomutt" "networkmanagerapplet" "nheko" "notmuch" "okular" + "osu-lazer" "pavucontrol" "pass" "playerctl" "prismlauncher" + "pstree" "qt5ct" "qt6ct" + "qbittorrent" "slurp" "swaylock-effects" + "tofi" "wofi" + "zathura" ] pkgs ++ [ pkgs.hunspellDicts.en_US ]; in { @@ -54,8 +61,9 @@ in #steamvr? procps usbutils + yt-dlp (python311.withPackages (lib.attrVals [ "matplotlib" "python-lsp-server" "sympy"])) - (octaveFull.withPackages (lib.attrVals ["symbolic"])) + #(octaveFull.withPackages (lib.attrVals ["symbolic"])) ] ++ (lib.optionals (nixosConfig.stitchyconf.form == "handheld") handheldPkgs) ++ (lib.optionals (nixosConfig.stitchyconf.form == "pc") pcPkgs); From d73ecb1bdbe1bcbde1d5ef6af20bf06edfdbc207 Mon Sep 17 00:00:00 2001 From: stitchy Date: Sun, 3 Nov 2024 12:23:54 +0000 Subject: [PATCH 023/132] Major NVIM refactor (ty fire :3) --- config/hypr/hyprland.conf | 1 + config/nvim/init.vim | 175 +++++----------------------------- config/nvim/lua/options.lua | 39 ++++++++ config/nvim/nvim.lua | 147 ++++++++++++++++++++++++++++ config/zshrc | 17 +++- packages/default.nix | 58 +++++++---- users/stitchynyan/default.nix | 6 +- users/stitchynyan/home.nix | 13 ++- 8 files changed, 274 insertions(+), 182 deletions(-) create mode 100644 config/nvim/lua/options.lua create mode 100644 config/nvim/nvim.lua diff --git a/config/hypr/hyprland.conf b/config/hypr/hyprland.conf index fe44023..c1da5a1 100755 --- a/config/hypr/hyprland.conf +++ b/config/hypr/hyprland.conf @@ -88,6 +88,7 @@ dwindle { misc { layers_hog_keyboard_focus=true + middle_click_paste=true vfr=1 vrr=on disable_hyprland_logo=true diff --git a/config/nvim/init.vim b/config/nvim/init.vim index a215cae..338c415 100755 --- a/config/nvim/init.vim +++ b/config/nvim/init.vim @@ -1,155 +1,28 @@ -" (Neo)vim Configuration -" By Flying_Stitchman -" 4 Jan 2022 +" (Neo)vim Configuration +" By Flying_Stitchman 4 Jan 2022 - " Basic Configuration - -syntax on -set spell -set hlsearch -set ignorecase -set number relativenumber -set noswapfile +" Move this to the keymap file at some point later inoremap jk xnoremap gy "+y -let mapleader = "`" +let mapleader = " " +" fast move +noremap J 6j +noremap K 6k +noremap H BufferLineCyclePrev +noremap L BufferLineCycleNext +" Moving between windows +noremap h +noremap j +noremap k +noremap l +" fix it +noremap gh K +noremap M J +tnoremap -" Good indents " -set tabstop=2 -set shiftwidth=2 -set expandtab - - " Make Lines Wrap Properly -set linebreak -set wrap - " True Color Support -if has('nvim') - set t_8f=[38;2;%lu;%lu;%lum - set t_8b=[48;2;%lu;%lu;%lum - set termguicolors -endif -"colorscheme cwcolors - - - " Highlight Trailing Spaces -let c_space_errors=1 - -set noincsearch - - " Plugs -"call plug#begin() -"Plug 'neovim/nvim-lspconfig' -"Plug 'jackguo380/vim-lsp-cxx-highlight' -"Plug 'folke/tokyonight.nvim', { 'branch': 'main' } -"Plug 'tribela/vim-transparent' -"Plug 'hrsh7th/nvim-cmp' -"Plug 'hrsh7th/cmp-nvim-lsp' -"Plug 'saadparwaiz1/cmp_luasnip' -"Plug 'L3MON4D3/LuaSnip' -"call plug#end() - -let g:airline#extensions#wordcount#filetypes = '\vasciidoc|help|mail|markdown|markdown.pandoc|org|rst|tex|text' -set laststatus=2 " enables vim-airline. - - - - " C Syntax highlighting -lua << EOF -require'lspconfig'.rust_analyzer.setup{} -require'lspconfig'.texlab.setup{} -require'lspconfig'.svls.setup{} -require'lspconfig'.pylsp.setup{ - settings = { - pylsp = { - plugins = { - pycodestyle = { - ignore = {'W391'}, - maxLineLength = 100 - }, - pylint = { - enabled = false - }, - pyflakes = { - enabled = true - } - } - } - } -} -require'lspconfig'.ccls.setup{ - init_options = { - highlight = { - lsRanges = true; - } - } - } - - --- Add additional capabilities supported by nvim-cmp -local capabilities = require("cmp_nvim_lsp").default_capabilities() - -local lspconfig = require('lspconfig') - --- Enable some language servers with the additional completion capabilities offered by nvim-cmp -local servers = { 'clangd', 'rust_analyzer', 'tsserver' } -for _, lsp in ipairs(servers) do - lspconfig[lsp].setup { - -- on_attach = my_custom_on_attach, - capabilities = capabilities, - } -end - --- luasnip setup -local luasnip = require 'luasnip' - --- nvim-cmp setup -local cmp = require 'cmp' -cmp.setup { - snippet = { - expand = function(args) - luasnip.lsp_expand(args.body) - end, - }, - mapping = cmp.mapping.preset.insert({ - [''] = cmp.mapping.scroll_docs(-4), -- Up - [''] = cmp.mapping.scroll_docs(4), -- Down - -- C-b (back) C-f (forward) for snippet placeholder navigation. - [''] = cmp.mapping.complete(), - [''] = cmp.mapping.confirm { - behavior = cmp.ConfirmBehavior.Replace, - select = true, - }, - [''] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_next_item() - elseif luasnip.expand_or_jumpable() then - luasnip.expand_or_jump() - else - fallback() - end - end, { 'i', 's' }), - [''] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_prev_item() - elseif luasnip.jumpable(-1) then - luasnip.jump(-1) - else - fallback() - end - end, { 'i', 's' }), - }), - sources = { - { name = 'nvim_lsp' }, - { name = 'luasnip' }, - }, -} - -EOF - - - - - " Color Themes -colorscheme tokyonight -hi Comment guifg=#e69dc5 -hi Linenr guifg=#a672f3 +" nvim builtin option config +luafile /etc/nixos/config/nvim/lua/options.lua +" nvim keymapping +luafile /etc/nixos/config/nvim/lua/keymap.lua +" Main Config stuffs +luafile /etc/nixos/config/nvim/nvim.lua diff --git a/config/nvim/lua/options.lua b/config/nvim/lua/options.lua new file mode 100644 index 0000000..b4775ce --- /dev/null +++ b/config/nvim/lua/options.lua @@ -0,0 +1,39 @@ +-- Options File + +local opt = vim.opt + +-- Basic Options I like +opt.hlsearch = true +opt.ignorecase = true +opt.relativenumber = true +opt.spell = true +opt.swapfile = false +opt.syntax = "on" + +-- Had this disabled before might not like +opt.incsearch = true + +-- 24-bit color +opt.termguicolors = true + +-- Good indents +opt.tabstop = 2 +opt.shiftwidth = 2 +opt.expandtab = true + +-- Show trailing whitespace but fancy +opt.list = true +opt.listchars = { + tab = "→ ", + trail = "╳", + nbsp = "⎵", +} + +-- Make Lines Wrap Properly +opt.linebreak = true +opt.wrap = true + +-- Colors +vim.cmd("colorscheme tokyonight") +vim.cmd("hi Comment guifg=#e69dc5") +vim.cmd("hi Linenr guifg=#a672f3") diff --git a/config/nvim/nvim.lua b/config/nvim/nvim.lua new file mode 100644 index 0000000..6337283 --- /dev/null +++ b/config/nvim/nvim.lua @@ -0,0 +1,147 @@ +-- This will need some refactoring as it is mostly a +-- copy and paste from the previous single-file .vim config + +require'lspconfig'.rust_analyzer.setup{} +require'lspconfig'.texlab.setup{} +require'lspconfig'.svls.setup{} +require'lspconfig'.pylsp.setup{ + settings = { + pylsp = { + plugins = { + pycodestyle = { + ignore = {'W391'}, + maxLineLength = 100 + }, + pylint = { + enabled = false + }, + pyflakes = { + enabled = true + } + } + } + } +} +require'lspconfig'.ccls.setup{ + init_options = { + highlight = { + lsRanges = true; + } + } + } + + +-- Add additional capabilities supported by nvim-cmp +local capabilities = require("cmp_nvim_lsp").default_capabilities() + +local lspconfig = require('lspconfig') + +-- Enable some language servers with the additional completion capabilities offered by nvim-cmp +local servers = { 'clangd', 'rust_analyzer', 'ts_ls', 'typst_lsp', 'vhdl_ls' } +for _, lsp in ipairs(servers) do + lspconfig[lsp].setup { + -- on_attach = my_custom_on_attach, + capabilities = capabilities, + } +end + +-- luasnip setup +local luasnip = require 'luasnip' + +-- nvim-cmp setup +local cmp = require 'cmp' +cmp.setup { + snippet = { + expand = function(args) + luasnip.lsp_expand(args.body) + end, + }, + mapping = cmp.mapping.preset.insert({ + [''] = cmp.mapping.scroll_docs(-4), -- Up + [''] = cmp.mapping.scroll_docs(4), -- Down + -- C-b (back) C-f (forward) for snippet placeholder navigation. + [''] = cmp.mapping.complete(), + [''] = cmp.mapping.confirm { + behavior = cmp.ConfirmBehavior.Replace, + select = true, + }, + [''] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_next_item() + elseif luasnip.expand_or_jumpable() then + luasnip.expand_or_jump() + else + fallback() + end + end, { 'i', 's' }), + [''] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_prev_item() + elseif luasnip.jumpable(-1) then + luasnip.jump(-1) + else + fallback() + end + end, { 'i', 's' }), + }), + sources = { + { name = 'nvim_lsp' }, + { name = 'luasnip' }, + }, +} + +--[[ + u.-*'M'*-.u + x` _____ `x + o` _| ___| `o +, | |___ , +3 |_ | E +' | _ | ' + o, |_| |_| ,o + x". ."x + n"--.W.--"n + Kiloroy Was Here +]] +package.path = package.path .. ";/etc/nixos/config/nvim" + +-- Funky plugins +require("bufferline").setup({ options = { + always_show_bufferline = true, + show_buffer_close_icons = false, + separator_style = "slope", + style_preset = { + require("bufferline").style_preset.no_italic, + }, + offsets = { + { + filetype = "neo-tree", + text = "File Explorer", + highlight = "Directory", + text_align = "left", + }, + }, +},}) +require("ibl").setup() +require("gitsigns").setup() +require("which-key").setup({ global = false }) +require("telescope").setup() +require("neo-tree").setup() +require("spaceman").setup({ + workspaces = { + "/etc/nixos", + { "config", "/etc/nixos/config/" }, + { "home", "~/" }, + }, + directories = { + "~/Documents/Classes", + "~/Documents/Repos", + }, + use_default_keymaps = true, + hooks = { + before_move = "Neotree close", + } +}) + +vim.keymap.set("n", "e", function() + require("neo-tree.command").execute({ action = "show", position = "right", toggle = true, dir = vim.loop.cwd() }) +end, { desc = "Open Neotree", remap = true }) diff --git a/config/zshrc b/config/zshrc index 3b8f8e0..47489dc 100755 --- a/config/zshrc +++ b/config/zshrc @@ -17,6 +17,10 @@ alias kon="ncmpcpp -b ~/.config/ncmpcpp/bindings" alias myip="curl ifconfig.me" alias ghidra="_JAVA_AWT_WM_NONREPARENTING=1 ghidra" alias ls='eza' +alias l='ls -l' +alias la='ls -la' +alias ll='ls -l' +alias lla='ls -la' alias v="nvim" # Launch neovim with 'v' alias mountUSB="mount /home/flyingstitchman/ExternalDrive" # Automagically mount and unmount my flashdrive alias umountUSB="umount /home/flyingstitchman/ExternalDrive" @@ -31,6 +35,15 @@ alias tree="eza --tree" alias icat="kitty +kitten icat" alias qsus="NIXPKGS_ALLOW_UNFREE=1 nix-shell -p quartus-prime-lite -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/fe7ab74a86d78ba00d144aa7a8da8c71a200c563.tar.gz" +# thanks fire :3 +alias c='clear' +alias lg='lazygit' +# Future fire, this is for a meme. +nya() { + args=$(echo $@ | sed 's/nya/git/g') + git $args 2>&1 >/dev/null | sed 's/git/nya/g' | sed 's/GIT/NYA/g' | sed 's/Git/Nya/g' +} + # Automatically get new programs for autocompletion zshcache_time="$(date +%s%N)" @@ -97,9 +110,7 @@ export EDITOR=nvim #export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) export PATH="${PATH}:/home/flyingstitchman/.cargo/bin" -# Ibus -GTK_IM_MODULE=fcitx -QT_IM_MODULE=fcitx +# Fcitx for Xwayland XMODIFIERS=@im=fcitx # Clean Up diff --git a/packages/default.nix b/packages/default.nix index 6c9563c..b163a34 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -15,33 +15,40 @@ let "megapixels" ] pkgs; pcPkgs = lib.attrVals [ - #osu-lazer - "dracula-theme" - "wl-clipboard" "brightnessctl" "clipman" - "powertop" - "easyeffects" - "mutt-wizard" - "gamescope" "cyrus-sasl-xoauth2" + "dracula-theme" + "easyeffects" + "gamescope" "libnotify" - "networkmanager-openvpn" + "mutt-wizard" + "powertop" + "wl-clipboard" # temporary home manager things + "eww" + "ifuse" "img2pdf" "inotify-tools" - "eww" "jq" - "pandoc" - #"texliveFull" - "typst" - "socat" "libimobiledevice" - "ifuse" - ] pkgs ++ [ inputs.osu-nixos pkgs.wineWowPackages.stableFull ]; + "socat" + "typst" + ] pkgs ++ [ pkgs.wineWowPackages.stableFull ]; serverPkgs = lib.attrVals [ #"package" ] pkgs; + + spaceman-nvim = pkgs.vimUtils.buildVimPlugin { + name = "spaceman-nvim"; + src = pkgs.fetchFromGitHub { + owner = "FireIsGood"; + repo = "spaceman.nvim"; + rev = "7910d202073bcc5f567481426f771b3737451dd9"; + hash = "sha256-VvKce2uiFzv0TjoJfEX461p9tY9aE237Xr1q/Lw3Utw="; + }; + }; + in { options = { @@ -64,11 +71,14 @@ in "glib" "gnumake" "gnupg" + "neofetch" "p7zip" "pinentry" - "neofetch" + "typst-lsp" "unzip" + "vhdl-ls" "wget" + "zip" "zoxide" ] pkgs) ++ (lib.optionals config.stitchyconf.artPkgs.enable artPkgs) @@ -87,14 +97,22 @@ in customRC = builtins.readFile ../config/nvim/init.vim; packages.myVimPackage = with pkgs.vimPlugins; { start = [ - nvim-lspconfig - nvim-cmp + bufferline-nvim cmp-nvim-lsp - luasnip cmp_luasnip + gitsigns-nvim + indent-blankline-nvim + lazy-nvim + luasnip + neo-tree-nvim + nvim-cmp + nvim-lspconfig + spaceman-nvim + telescope-nvim tokyonight-nvim - vim-lsp-cxx-highlight typst-vim + vim-lsp-cxx-highlight + which-key-nvim ]; }; }; diff --git a/users/stitchynyan/default.nix b/users/stitchynyan/default.nix index fd714db..1a66d83 100644 --- a/users/stitchynyan/default.nix +++ b/users/stitchynyan/default.nix @@ -8,9 +8,12 @@ "nvidia-settings" "nvidia-x11" "osu-lazer" + "quartus-prime-lite" + "quartus-prime-lite-unwrapped" "steam" "steam-original" "steam-run" + "steam-unwrapped" ]; nixpkgs.config.permittedInsecurePackages = [ "olm-3.2.16" @@ -23,11 +26,12 @@ programs = { firefox.enable = true; hyprland.enable = true; - openvpn3.enable = true; + kdeconnect.enable = true; steam = { enable = true; remotePlay.openFirewall = true; }; + wireshark.enable = true; }; security.pam.services.swaylock = {}; diff --git a/users/stitchynyan/home.nix b/users/stitchynyan/home.nix index 2e418db..721a06d 100644 --- a/users/stitchynyan/home.nix +++ b/users/stitchynyan/home.nix @@ -11,17 +11,18 @@ let ] pkgs; pcPkgs = lib.attrVals [ "activitywatch" - "awatcher" "anki" + "awatcher" "dunst" "foliate" "foot" "grim" + "hunspell" + "hyprpaper" "imv" "isync" "kitty" - "hunspell" - "hyprpaper" + "lazygit" "libreoffice" "librewolf" "lynx" @@ -33,14 +34,13 @@ let "notmuch" "okular" "osu-lazer" - "pavucontrol" "pass" + "pavucontrol" "playerctl" "prismlauncher" "pstree" - "qt5ct" - "qt6ct" "qbittorrent" + "qt6ct" "slurp" "swaylock-effects" "tofi" @@ -63,7 +63,6 @@ in usbutils yt-dlp (python311.withPackages (lib.attrVals [ "matplotlib" "python-lsp-server" "sympy"])) - #(octaveFull.withPackages (lib.attrVals ["symbolic"])) ] ++ (lib.optionals (nixosConfig.stitchyconf.form == "handheld") handheldPkgs) ++ (lib.optionals (nixosConfig.stitchyconf.form == "pc") pcPkgs); From c4e46d0a2878a6c6eb365f5c32b6347eb2d66fca Mon Sep 17 00:00:00 2001 From: stitchy Date: Sun, 3 Nov 2024 12:25:23 +0000 Subject: [PATCH 024/132] flake update --- flake.lock | 94 +++++++++++++----------------------------------------- 1 file changed, 22 insertions(+), 72 deletions(-) diff --git a/flake.lock b/flake.lock index 9220a36..a3611e4 100644 --- a/flake.lock +++ b/flake.lock @@ -1,36 +1,5 @@ { "nodes": { - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1627913399, - "narHash": "sha256-hY8g6H2KFL8ownSiFeMOjwPC8P0ueXpCVEbxgda3pko=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "12c64ca55c1014cdc1b16ed5a804aa8576601ff2", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-utils": { - "locked": { - "lastModified": 1623875721, - "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "home-manager": { "inputs": { "nixpkgs": [ @@ -38,11 +7,11 @@ ] }, "locked": { - "lastModified": 1713547570, - "narHash": "sha256-i8tNz47Lfsq5QWFLyE3rIm0gs2UUvXXAxfWTC24e370=", + "lastModified": 1730450782, + "narHash": "sha256-0AfApF8aexgB6o34qqLW2cCX4LaWJajBVdU6ddiWZBM=", "owner": "nix-community", "repo": "home-manager", - "rev": "7c61e400a99f33cdff3118c1e4032bcb049e1a30", + "rev": "8ca921e5a806b5b6171add542defe7bdac79d189", "type": "github" }, "original": { @@ -55,11 +24,11 @@ "mobile-nixos": { "flake": false, "locked": { - "lastModified": 1713034591, - "narHash": "sha256-zEtSq4e1hsf5nPoTzsx+cvHTusQxFdyDpD3mOa360A0=", + "lastModified": 1730307383, + "narHash": "sha256-EJYo2VPXVMGQbY+bI4Xav14fXXioBt3KICtXNI6i76o=", "owner": "nixos", "repo": "mobile-nixos", - "rev": "5455e4455b231218f6198b39383a0ad4c1d6638e", + "rev": "0516be85630befa2c1e8042ac873342ce186b2f6", "type": "github" }, "original": { @@ -70,11 +39,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1713521961, - "narHash": "sha256-EwR8wW9AqJhSIY+0oxWRybUZ32BVKuZ9bjlRh8SJvQ8=", + "lastModified": 1730368399, + "narHash": "sha256-F8vJtG389i9fp3k2/UDYHMed3PLCJYfxCqwiVP7b9ig=", "owner": "Nixos", "repo": "nixos-hardware", - "rev": "5d48925b815fd202781bfae8fb6f45c07112fdb2", + "rev": "da14839ac5f38ee6adbdb4e6db09b5eef6d6ccdc", "type": "github" }, "original": { @@ -86,62 +55,43 @@ }, "nixpkgs": { "locked": { - "lastModified": 1713297878, - "narHash": "sha256-hOkzkhLT59wR8VaMbh1ESjtZLbGi+XNaBN6h49SPqEc=", - "owner": "NixOS", + "lastModified": 1730200266, + "narHash": "sha256-l253w0XMT8nWHGXuXqyiIC/bMvh1VRszGXgdpQlfhvU=", + "owner": "Nixos", "repo": "nixpkgs", - "rev": "66adc1e47f8784803f2deb6cacd5e07264ec2d5c", + "rev": "807e9154dcb16384b1b765ebe9cd2bba2ac287fd", "type": "github" }, "original": { - "owner": "NixOS", + "owner": "Nixos", "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } }, - "nixpkgs_2": { + "nixpkgs-quartus": { "locked": { - "lastModified": 1628148846, - "narHash": "sha256-V8aZJBROfNDk40cvFjKUnOnL7sF+BYwCQUUpLP8y4uE=", - "owner": "NixOS", + "lastModified": 1685573264, + "narHash": "sha256-Zffu01pONhs/pqH07cjlF10NnMDLok8ix5Uk4rhOnZQ=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "9a8eb5a464f373e79d19d0ed2e53e0d31f78fe92", + "rev": "380be19fbd2d9079f677978361792cb25e8a3635", "type": "github" }, "original": { - "owner": "NixOS", + "owner": "nixos", + "ref": "nixos-22.05", "repo": "nixpkgs", "type": "github" } }, - "osu-nixos": { - "inputs": { - "flake-compat": "flake-compat", - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs_2" - }, - "locked": { - "lastModified": 1695759061, - "narHash": "sha256-s9OYi0tzWSjFUaGLnLg08tTm8OEu1uZqGTtKmIRwHic=", - "owner": "Asqiir", - "repo": "osu-nixos", - "rev": "4e0096e1eee74383b9350962d8bff094648a7968", - "type": "github" - }, - "original": { - "owner": "Asqiir", - "repo": "osu-nixos", - "type": "github" - } - }, "root": { "inputs": { "home-manager": "home-manager", "mobile-nixos": "mobile-nixos", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", - "osu-nixos": "osu-nixos" + "nixpkgs-quartus": "nixpkgs-quartus" } } }, From 53ef1f28c68d191e934e95c7d9622300cf490315 Mon Sep 17 00:00:00 2001 From: stitchy Date: Sun, 3 Nov 2024 11:11:06 -0800 Subject: [PATCH 025/132] VFIO fixes and malachite things --- config/eww/eww.yuck | 1 - hosts/malachite/default.nix | 15 +++++++++++++++ hosts/malachite/hardware-configuration.nix | 18 +++++++++--------- 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/config/eww/eww.yuck b/config/eww/eww.yuck index f4f5305..59dfbc4 100644 --- a/config/eww/eww.yuck +++ b/config/eww/eww.yuck @@ -92,7 +92,6 @@ :monitor 0 :geometry (geometry :x "4px" :y "1%" - :width "2.5%" :height "98%" :anchor "left center") :stacking "fg" diff --git a/hosts/malachite/default.nix b/hosts/malachite/default.nix index d264bf7..8e7052e 100644 --- a/hosts/malachite/default.nix +++ b/hosts/malachite/default.nix @@ -40,6 +40,14 @@ let # Load VFIO Kernel Module modprobe vfio vfio_pci vfio_iommu_type1 + # Performance Governer + for file in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do echo "performance" > "$file"; done + + # Isolating CPU + systemctl set-property --runtime -- user.slice AllowedCPUs=16-19 + systemctl set-property --runtime -- system.slice AllowedCPUs=16-19 + systemctl set-property --runtime -- init.scope AllowedCPUs=16-19 + elif [[ "$HOOK_NAME/$STATE_NAME" == "release/end" ]]; then modprobe -r vfio_iommu_type1 vfio_pci vfio @@ -61,6 +69,13 @@ let # Reload Modules modprobe amdgpu + # Back to On-Demand Scheduler + for file in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do echo "ondemand" > "$file"; done + + systemctl set-property --runtime -- user.slice AllowedCPUs=0-19 + systemctl set-property --runtime -- system.slice AllowedCPUs=0-19 + systemctl set-property --runtime -- init.scope AllowedCPUs=0-19 + fi fi diff --git a/hosts/malachite/hardware-configuration.nix b/hosts/malachite/hardware-configuration.nix index 8f0d845..c95853a 100644 --- a/hosts/malachite/hardware-configuration.nix +++ b/hosts/malachite/hardware-configuration.nix @@ -20,22 +20,22 @@ "/" = { device = "/dev/disk/by-uuid/8e30bb30-eacf-4d7d-bcec-c2b39982de13"; fsType = "btrfs"; - options = [ "subvol=nix" ]; + options = [ "subvol=nix" "compress=zstd" ]; }; "/home" = { device = "/dev/disk/by-uuid/8e30bb30-eacf-4d7d-bcec-c2b39982de13"; fsType = "btrfs"; - options = [ "subvol=homes/stitchymain" ]; + options = [ "subvol=homes/stitchymain" "compress=zstd" ]; }; "/nix/store" = { device = "/dev/disk/by-uuid/8e30bb30-eacf-4d7d-bcec-c2b39982de13"; fsType = "btrfs"; - options = [ "subvol=store" ]; + options = [ "subvol=store" "noatime" "compress=zstd" ]; }; "/persist" = { device = "/dev/disk/by-uuid/8e30bb30-eacf-4d7d-bcec-c2b39982de13"; fsType = "btrfs"; - options = [ "subvol=@persist" ]; + options = [ "subvol=@persist" "compress=zstd" ]; }; "/boot" = { device = "/dev/disk/by-uuid/CB12-5062"; @@ -44,27 +44,27 @@ "/home/stitchynyan/Music" = { device = "/dev/disk/by-uuid/feb8239f-5d09-4184-8e46-52185beaa040"; fsType = "btrfs"; - options = [ "subvol=music/stitchtunes" "x-systemd.automount" ]; + options = [ "subvol=music/stitchtunes" "compress=zstd" "x-systemd.automount" ]; }; "/home/stitchynyan/Pictures" = { device = "/dev/disk/by-uuid/feb8239f-5d09-4184-8e46-52185beaa040"; fsType = "btrfs"; - options = [ "subvol=pictures/stitchpics" "x-systemd.automount" ]; + options = [ "subvol=pictures/stitchpics" "compress=zstd" "x-systemd.automount" ]; }; "/home/stitchynyan/Programs/Steam" = { device = "/dev/disk/by-uuid/feb8239f-5d09-4184-8e46-52185beaa040"; fsType = "btrfs"; - options = [ "subvol=games/stitchgames" "x-systemd.automount" ]; + options = [ "subvol=games/stitchgames" "compress=zstd" "x-systemd.automount" ]; }; "/home/stitchynyan/Videos" = { device = "/dev/disk/by-uuid/feb8239f-5d09-4184-8e46-52185beaa040"; fsType = "btrfs"; - options = [ "subvol=videos/stitchshows" "x-systemd.automount" ]; + options = [ "subvol=videos/stitchshows" "compress=zstd" "x-systemd.automount" ]; }; "/home/stitchynyan/VirtualMachines" = { device = "/dev/disk/by-uuid/feb8239f-5d09-4184-8e46-52185beaa040"; fsType = "btrfs"; - options = [ "subvol=virtualmachines/stitchvms" "x-systemd.automount" ]; + options = [ "subvol=virtualmachines/stitchvms" "compress=zstd" "x-systemd.automount" ]; }; }; From 7545885942c71110bc0ead066bcec3b1ebd41fb3 Mon Sep 17 00:00:00 2001 From: stitchy Date: Fri, 8 Nov 2024 00:07:26 +0000 Subject: [PATCH 026/132] Finish NVIM refactor --- config/hypr/exec-start.conf | 12 +++--- config/nvim/init.vim | 19 --------- config/nvim/lua/keymap.lua | 82 +++++++++++++++++++++++++++++++++++++ config/nvim/lua/options.lua | 8 +++- config/nvim/nvim.lua | 16 +++++--- packages/default.nix | 2 + 6 files changed, 108 insertions(+), 31 deletions(-) create mode 100644 config/nvim/lua/keymap.lua diff --git a/config/hypr/exec-start.conf b/config/hypr/exec-start.conf index 8d88c82..12ebae0 100644 --- a/config/hypr/exec-start.conf +++ b/config/hypr/exec-start.conf @@ -1,12 +1,14 @@ # Executable Startup File for Hyprland #exec-once=uclampset -M 10 waybar -exec-once=eww open bar -exec-once=swayidle -exec-once=hyprpaper +exec-once=${XDG_CONFIG_HOME:-~/.config}/dunst/scripts/low-battery.sh +exec-once=aw-server +exec-once=awatcher exec-once=dbus-daemon --session --address=unix:path=$XDG_RUNTIME_DIR/bus exec-once=dunst -exec-once=${XDG_CONFIG_HOME:-~/.config}/dunst/scripts/low-battery.sh +exec-once=eww open bar exec-once=fcitx5 -#exec-once=~/.config/hypr/portal.sh +exec-once=foot -s +exec-once=hyprpaper +exec-once=swayidle exec-once=systemctl --user import-environment DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP exec-once=wl-paste -t text --watch clipman store --no-persist diff --git a/config/nvim/init.vim b/config/nvim/init.vim index 338c415..90b1f5e 100755 --- a/config/nvim/init.vim +++ b/config/nvim/init.vim @@ -1,25 +1,6 @@ " (Neo)vim Configuration " By Flying_Stitchman 4 Jan 2022 -" Move this to the keymap file at some point later -inoremap jk -xnoremap gy "+y -let mapleader = " " -" fast move -noremap J 6j -noremap K 6k -noremap H BufferLineCyclePrev -noremap L BufferLineCycleNext -" Moving between windows -noremap h -noremap j -noremap k -noremap l -" fix it -noremap gh K -noremap M J -tnoremap - " nvim builtin option config luafile /etc/nixos/config/nvim/lua/options.lua " nvim keymapping diff --git a/config/nvim/lua/keymap.lua b/config/nvim/lua/keymap.lua new file mode 100644 index 0000000..d397bdd --- /dev/null +++ b/config/nvim/lua/keymap.lua @@ -0,0 +1,82 @@ +-- Keymap File +local map = vim.keymap.set + +-- jk exit from insert mode +map("i", "jk", "noh", { silent = true }) + +---- +-- Movements +---- + +-- More powerful J and K (use 6j/6k) +-- Via Pseudometa (https://nanotipsforvim.prose.sh/motion-setup--hjkl-as-amplified-hjkl) +map({ "n", "x" }, "", "6j") +map({ "n", "x" }, "", "6k") + +-- And fix the keys to other ones +map({ "n", "x" }, "M", "J", { desc = "Merge" }) -- Replace the join command +map("n", "gh", vim.lsp.buf.hover, { desc = "Hover" }) -- Code action hover + + +-- Move to window using the hjkl keys +map("n", "", "h", { desc = "Go to left window", remap = true }) +map("n", "", "j", { desc = "Go to lower window", remap = true }) +map("n", "", "k", { desc = "Go to upper window", remap = true }) +map("n", "", "l", { desc = "Go to right window", remap = true }) + +-- Move between buffers +map("n", "", "BufferLineCyclePrev", { desc = "Move buffer left", silent = true }) +map("n", "", "BufferLineCycleNext", { desc = "Move buffer right", silent = true }) +map("n", "<", "BufferLineMovePrev", { desc = "Move buffer left", silent = true }) +map("n", ">", "BufferLineMoveNext", { desc = "Move buffer right", silent = true }) + +-- ToggleTerm Bindings +map("n", "a", "ToggleTerm name=main", { desc = "Floating Terminal", silent = true }) + +---- +-- Cool Macros +---- + +-- Quit All +map("n", "qq", "qa", { desc = "Quit all" }) + +-- Copy and paste from system clipboard +map({ "n", "x" }, "y", '"+y', { desc = "Yank to system clipboard", silent = true }) +map({ "n", "x" }, "p", '"+p', { desc = "Paste after from system clipboard", silent = true }) +map({ "n", "x" }, "P", '"+P', { desc = "Paste before from system clipboard", silent = true }) + +-- Neotree +map("n", "e", function() + require("neo-tree.command").execute({ action = "show", position = "right", toggle = true, dir = vim.loop.cwd() }) +end, { desc = "Open Neotree", remap = true }) + +---- +-- Fixes +---- + +-- Proper Wrap Navigation +map({ "n", "x" }, "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true }) +map({ "n", "x" }, "", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true }) +map({ "n", "x" }, "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true }) +map({ "n", "x" }, "", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true }) + +-- Auto Re-highlight After Indent +map("v", "<", "", ">gv") + +-- Saner Movement of nN +map("n", "n", "'Nn'[v:searchforward].'zv'.'zz'", { expr = true, desc = "Next search result" }) +map("x", "n", "'Nn'[v:searchforward].'zz'", { expr = true, desc = "Next search result" }) +map("o", "n", "'Nn'[v:searchforward].'zz'", { expr = true, desc = "Next search result" }) +map("n", "N", "'nN'[v:searchforward].'zv'.'zz'", { expr = true, desc = "Prev search result" }) +map("x", "N", "'nN'[v:searchforward].'zz'", { expr = true, desc = "Prev search result" }) +map("o", "N", "'nN'[v:searchforward].'zz'", { expr = true, desc = "Prev search result" }) + +-- Terminal Mappings +map("t", "", "", { desc = "Enter Normal Mode" }) +map("t", "", "wincmd h", { desc = "Go to left window" }) +map("t", "", "wincmd j", { desc = "Go to lower window" }) +map("t", "", "wincmd k", { desc = "Go to upper window" }) +map("t", "", "wincmd l", { desc = "Go to right window" }) +map("t", "", "close", { desc = "Hide Terminal" }) +map("t", "", "close", { desc = "which_key_ignore" }) diff --git a/config/nvim/lua/options.lua b/config/nvim/lua/options.lua index b4775ce..1029b8e 100644 --- a/config/nvim/lua/options.lua +++ b/config/nvim/lua/options.lua @@ -2,13 +2,19 @@ local opt = vim.opt +-- Leader key +vim.g.mapleader = " " +vim.g.maplocalleader = "\\" + -- Basic Options I like opt.hlsearch = true opt.ignorecase = true opt.relativenumber = true +opt.number = true opt.spell = true opt.swapfile = false opt.syntax = "on" +opt.scrolloff = 15 -- Had this disabled before might not like opt.incsearch = true @@ -18,7 +24,7 @@ opt.termguicolors = true -- Good indents opt.tabstop = 2 -opt.shiftwidth = 2 +opt.shiftwidth = 0 -- Use tabstop opt.expandtab = true -- Show trailing whitespace but fancy diff --git a/config/nvim/nvim.lua b/config/nvim/nvim.lua index 6337283..1cccdac 100644 --- a/config/nvim/nvim.lua +++ b/config/nvim/nvim.lua @@ -121,11 +121,18 @@ require("bufferline").setup({ options = { }, }, },}) -require("ibl").setup() require("gitsigns").setup() -require("which-key").setup({ global = false }) -require("telescope").setup() +require("ibl").setup() +require("mini.comment").setup() require("neo-tree").setup() +require("telescope").setup() +require("toggleterm").setup{ + direction = 'float', + float_opts = { + border = 'curved', + }, +} +require("which-key").setup({ global = false }) require("spaceman").setup({ workspaces = { "/etc/nixos", @@ -142,6 +149,3 @@ require("spaceman").setup({ } }) -vim.keymap.set("n", "e", function() - require("neo-tree.command").execute({ action = "show", position = "right", toggle = true, dir = vim.loop.cwd() }) -end, { desc = "Open Neotree", remap = true }) diff --git a/packages/default.nix b/packages/default.nix index b163a34..18d8eed 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -104,11 +104,13 @@ in indent-blankline-nvim lazy-nvim luasnip + mini-nvim neo-tree-nvim nvim-cmp nvim-lspconfig spaceman-nvim telescope-nvim + toggleterm-nvim tokyonight-nvim typst-vim vim-lsp-cxx-highlight From 4d66a5e231350ae84bdb3208bc67ae4b0af3b162 Mon Sep 17 00:00:00 2001 From: stitchy Date: Wed, 27 Nov 2024 10:41:47 +0000 Subject: [PATCH 027/132] Fix: Whitespaces begone or something --- Readme.md | 2 +- config/eww/eww.yuck | 14 ++--- config/hypr/binds.conf | 4 +- config/hypr/hyprland.conf | 12 ++-- config/nvim/lua/keymap.lua | 72 +++++++++++++++++++++- config/swaylock/config | 2 +- config/zshrc | 2 +- flake.nix | 4 +- hosts/lappy/default.nix | 4 +- hosts/malachite/default.nix | 4 +- hosts/malachite/hardware-configuration.nix | 2 +- 11 files changed, 94 insertions(+), 28 deletions(-) diff --git a/Readme.md b/Readme.md index ceac8c2..8ce20b8 100644 --- a/Readme.md +++ b/Readme.md @@ -1,6 +1,6 @@ ### Dotfiles for Me - Migrating to Nix -Heavy wip, not ready for use. +Heavy wip, not ready for use. Will eventually manage my servers and computers. diff --git a/config/eww/eww.yuck b/config/eww/eww.yuck index 59dfbc4..00158fc 100644 --- a/config/eww/eww.yuck +++ b/config/eww/eww.yuck @@ -1,4 +1,4 @@ -;;;; (defpoll time :interval "1s" 'date +%s') +;;;; (defpoll time :interval "1s" 'date +%s') (defwidget clock [] (box :orientation "vertical" @@ -22,12 +22,12 @@ )))))) -(defwidget circle [val prog sty char] +(defwidget circle [val prog sty char] (box :halign "center" :orientation "vertical" :valign "end" - (circular-progress :value prog - :start-at 10 + (circular-progress :value prog + :start-at 10 :clockwise false :thickness 3 :width 30 @@ -38,14 +38,14 @@ (box :class "circle" :style sty char))) (defwidget battery [] - (circle :prog {EWW_BATTERY.BAT1.capacity * (77778 /100000)} + (circle :prog {EWW_BATTERY.BAT1.capacity * (77778 /100000)} :sty "color: ${EWW_BATTERY.BAT1.status == 'Charging' ? '#1a1': EWW_BATTERY.BAT1.capacity < 20 ? '#a11': '#cac'};" :val {EWW_BATTERY.BAT1.capacity} :char "󱐋")) (deflisten vol "cat ~/.cache/eww/vol && inotifywait -q -m -e close_write ~/.cache/eww/vol | while read -r filename event; do cat ~/.cache/eww/vol; done") -(defwidget volume [] +(defwidget volume [] (circle :prog {vol * 7/10} :sty "font-size: 12; margin-right: 2px;" :val {vol + 1 - 1} @@ -79,7 +79,7 @@ :space-evenly false (_workspaces) (clock) - (box :orientation "vertical" :spacing -25 :valign "end" + (box :orientation "vertical" :spacing -25 :valign "end" (brightness) (mic) (volume) diff --git a/config/hypr/binds.conf b/config/hypr/binds.conf index 742efaf..fc0c916 100644 --- a/config/hypr/binds.conf +++ b/config/hypr/binds.conf @@ -3,14 +3,14 @@ # Main Bindings # # Foot, you done goofed -bind=ALT,RETURN,exec,foot +bind=ALT,RETURN,exec,footclient #bind=ALT,RETURN,exec,kitty bind=ALT,Q,killactive, bind=SUPER,M,exec,hyprctl dispatch exit 0 bind=ALT,E,exec,dolphin bind=ALT,V,togglefloating, -bindr=ALTSHIFT,RETURN,exec,pkill wofi || wofi -S drun --allow-images +bindr=ALTSHIFT,RETURN,exec,pkill wofi || wofi -S drun --allow-images bind=ALTSHIFT,F,fullscreen,1 bind=ALTSHIFT,M,fullscreen,0 bind=,Print,exec,grim -g "$(slurp)" -t jpeg - | wl-copy diff --git a/config/hypr/hyprland.conf b/config/hypr/hyprland.conf index c1da5a1..33459c4 100755 --- a/config/hypr/hyprland.conf +++ b/config/hypr/hyprland.conf @@ -26,7 +26,7 @@ input { sensitivity=.4 accel_profile=adaptive - touchpad { + touchpad { natural_scroll=false disable_while_typing=false } @@ -58,11 +58,11 @@ decoration { shadow_range=15 shadow_render_power=2 shadow_ignore_window=1 - col.shadow=0xdb331153 + col.shadow=0xdb331153 col.shadow_inactive=0x99333333 shadow_offset=3 2 - - # Other + + # Other rounding=15 inactive_opacity=.8 fullscreen_opacity=1 multiplier @@ -70,7 +70,7 @@ decoration { animations { enabled=true - + bezier = myBezier, 0.05, 0.9, 0.1, 1.05 animation = windows, 1, 7, myBezier @@ -78,7 +78,7 @@ animations { animation = border, 1, 10, default animation = borderangle, 1, 8, default animation = fade, 1, 7, default - animation = workspaces, 1, 6, default + animation = workspaces, 1, 6, default } dwindle { diff --git a/config/nvim/lua/keymap.lua b/config/nvim/lua/keymap.lua index d397bdd..7bf310c 100644 --- a/config/nvim/lua/keymap.lua +++ b/config/nvim/lua/keymap.lua @@ -17,13 +17,13 @@ map({ "n", "x" }, "", "6k") map({ "n", "x" }, "M", "J", { desc = "Merge" }) -- Replace the join command map("n", "gh", vim.lsp.buf.hover, { desc = "Hover" }) -- Code action hover - + -- Move to window using the hjkl keys map("n", "", "h", { desc = "Go to left window", remap = true }) map("n", "", "j", { desc = "Go to lower window", remap = true }) map("n", "", "k", { desc = "Go to upper window", remap = true }) map("n", "", "l", { desc = "Go to right window", remap = true }) - + -- Move between buffers map("n", "", "BufferLineCyclePrev", { desc = "Move buffer left", silent = true }) map("n", "", "BufferLineCycleNext", { desc = "Move buffer right", silent = true }) @@ -50,6 +50,72 @@ map("n", "e", function() require("neo-tree.command").execute({ action = "show", position = "right", toggle = true, dir = vim.loop.cwd() }) end, { desc = "Open Neotree", remap = true }) + +-- Conform Formatting +map({ "n", "v" }, "mp", function() + require("conform").format({ + lsp_fallback = true, + async = false, + timeout_ms = 500, + }) +end, { desc = "Format file or range (in visual mode)" }) + +-- diagnostic +---@param next "f"|"b" +---@param severity "ERROR"|"WARN"? +local diagnostic_goto = function(next, severity) + local go = (next == "f") and vim.diagnostic.goto_next or vim.diagnostic.goto_prev + local severity_index = severity and vim.diagnostic.severity[severity] or nil + return function() + go({ severity = severity_index }) + end +end +map("n", "cd", vim.diagnostic.open_float, { desc = "Line Diagnostics" }) +map("n", "]d", diagnostic_goto("f"), { desc = "Next Diagnostic" }) +map("n", "[d", diagnostic_goto("b"), { desc = "Prev Diagnostic" }) +map("n", "]e", diagnostic_goto("f", "ERROR"), { desc = "Next Error" }) +map("n", "[e", diagnostic_goto("b", "ERROR"), { desc = "Prev Error" }) +map("n", "]w", diagnostic_goto("f", "WARN"), { desc = "Next Warning" }) +map("n", "[w", diagnostic_goto("b", "WARN"), { desc = "Prev Warning" }) + +---- +-- Plugins +---- + +-- Telescope (fuzzy finder) +local function telescope_git_fallback() + vim.fn.system("git rev-parse --is-inside-work-tree") + local is_git_repo = vim.v.shell_error == 0 + + if is_git_repo then + require("telescope.builtin").git_files() + else + require("telescope.builtin").find_files() + end +end +local function telescope_files() + require("telescope.builtin").find_files({ cwd = vim.uv.cwd() }) +end +local function telescope_oldfiles() + require("telescope.builtin").oldfiles({ cwd = vim.uv.cwd() }) +end +local function telescope_live_grep() + vim.fn.system("git rev-parse --is-inside-work-tree") + local is_git_repo = vim.v.shell_error == 0 + local git_root = vim.fn.fnamemodify(vim.fn.finddir(".git", ".;"), ":h") + + require("telescope.builtin").live_grep({ + cwd = is_git_repo and git_root or vim.uv.cwd(), + }) +end +map("n", "", telescope_git_fallback, { desc = "Find files (git/fallback, cwd)" }) +map("n", "ff", telescope_files, { desc = "Find files (cwd)" }) +map("n", "fo", telescope_oldfiles, { desc = "Find files (cwd)" }) +map("n", "/", telescope_live_grep, { desc = "Live grep (cwd)" }) +map("n", ",", require("telescope.builtin").buffers, { desc = "Find buffers" }) +map("n", "\"", require("telescope.builtin").registers, { desc = "Find registers" }) + + ---- -- Fixes ---- @@ -80,3 +146,5 @@ map("t", "", "wincmd k", { desc = "Go to upper window" }) map("t", "", "wincmd l", { desc = "Go to right window" }) map("t", "", "close", { desc = "Hide Terminal" }) map("t", "", "close", { desc = "which_key_ignore" }) + + diff --git a/config/swaylock/config b/config/swaylock/config index 2016e3e..113fb7b 100644 --- a/config/swaylock/config +++ b/config/swaylock/config @@ -12,4 +12,4 @@ inside-color 00000088 separator-color 00000000 fade-in=0.2 datestr="%a, %b %e %Y" -greyscale +greyscale diff --git a/config/zshrc b/config/zshrc index 47489dc..0595102 100755 --- a/config/zshrc +++ b/config/zshrc @@ -102,7 +102,7 @@ compinit # End of lines added by compinstall eval "$(zoxide init zsh)" - + # Default Programs export EDITOR=nvim diff --git a/flake.nix b/flake.nix index b83de7c..310483f 100644 --- a/flake.nix +++ b/flake.nix @@ -1,8 +1,6 @@ { description = "System Configuration Flake"; - - - outputs = inputs@{ + outputs = inputs@{ nixpkgs, nixpkgs-xr, nixos-hardware, diff --git a/hosts/lappy/default.nix b/hosts/lappy/default.nix index 4143226..4c49ef7 100644 --- a/hosts/lappy/default.nix +++ b/hosts/lappy/default.nix @@ -15,8 +15,8 @@ services.logind.powerKey = "ignore"; services.logind.powerKeyLongPress = "poweroff"; networking = { - hostName = "lappy"; - networkmanager.enable = true; + hostName = "lappy"; + networkmanager.enable = true; }; time.timeZone = "America/Lost_Angeles"; diff --git a/hosts/malachite/default.nix b/hosts/malachite/default.nix index 8e7052e..020f10f 100644 --- a/hosts/malachite/default.nix +++ b/hosts/malachite/default.nix @@ -1,6 +1,6 @@ { config, nixpkgs-xr, pkgs, lib, ... }: let - passthrough = pkgs.writeShellApplication { + passthrough = pkgs.writeShellApplication { name = "passthrough.sh"; runtimeInputs = lib.attrVals [ "coreutils" "kmod" "libvirt" "procps" ] pkgs; text = '' @@ -116,7 +116,7 @@ in { environment.systemPackages = [ pkgs.wlx-overlay-s ]; - + networking.hostName = "malachite"; time.timeZone = "America/Los_Angeles"; diff --git a/hosts/malachite/hardware-configuration.nix b/hosts/malachite/hardware-configuration.nix index c95853a..b9202b5 100644 --- a/hosts/malachite/hardware-configuration.nix +++ b/hosts/malachite/hardware-configuration.nix @@ -87,7 +87,7 @@ XRT_COMPOSITOR_COMPUTE = "1"; }; - hardware = { + hardware = { graphics = { enable = true; enable32Bit = true; From 3ec1ba5f9b1129e377c1222f78a798eb89a63ea8 Mon Sep 17 00:00:00 2001 From: stitchy Date: Wed, 27 Nov 2024 10:46:06 +0000 Subject: [PATCH 028/132] NVIM: Added Code formatting for python --- config/nvim/lua/keymap.lua | 3 +++ config/nvim/nvim.lua | 27 ++++++++++++++++++--------- packages/default.nix | 6 ++++++ users/stitchynyan/home.nix | 3 ++- 4 files changed, 29 insertions(+), 10 deletions(-) diff --git a/config/nvim/lua/keymap.lua b/config/nvim/lua/keymap.lua index 7bf310c..1a5f7ae 100644 --- a/config/nvim/lua/keymap.lua +++ b/config/nvim/lua/keymap.lua @@ -3,6 +3,7 @@ local map = vim.keymap.set -- jk exit from insert mode map("i", "jk", "noh", { silent = true }) +map({"n", "x"}, "", "noh", { silent = true }) ---- -- Movements @@ -33,6 +34,8 @@ map("n", ">", "BufferLineMoveNext", { desc = "Move buffer right -- ToggleTerm Bindings map("n", "a", "ToggleTerm name=main", { desc = "Floating Terminal", silent = true }) +-- Undotree +map('n', 'fu', vim.cmd.UndotreeToggle) ---- -- Cool Macros ---- diff --git a/config/nvim/nvim.lua b/config/nvim/nvim.lua index 1cccdac..41b7d88 100644 --- a/config/nvim/nvim.lua +++ b/config/nvim/nvim.lua @@ -6,18 +6,18 @@ require'lspconfig'.texlab.setup{} require'lspconfig'.svls.setup{} require'lspconfig'.pylsp.setup{ settings = { + formatCommand = {"black"}, pylsp = { plugins = { - pycodestyle = { - ignore = {'W391'}, - maxLineLength = 100 + jedai_completion = { + fuzzy = true }, - pylint = { - enabled = false - }, - pyflakes = { - enabled = true - } + pyflakes = { + enabled = true + }, + pylsp_mypy = { + enabled = true + } } } } @@ -105,6 +105,15 @@ cmp.setup { package.path = package.path .. ";/etc/nixos/config/nvim" -- Funky plugins +require("conform").setup({ + formatters_by_ft = { + python = { "isort", "black" }, + }, + format_on_save = { + timeout_ms = 500, + lsp_format = "fallback", + }, +}) require("bufferline").setup({ options = { always_show_bufferline = true, show_buffer_close_icons = false, diff --git a/packages/default.nix b/packages/default.nix index 18d8eed..74bd04d 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -64,13 +64,17 @@ in config = { environment.systemPackages = (lib.attrVals [ + "black" "btop" + "ccls" "eza" "fd" + "fzf" "git" "glib" "gnumake" "gnupg" + "mypy" "neofetch" "p7zip" "pinentry" @@ -97,6 +101,7 @@ in customRC = builtins.readFile ../config/nvim/init.vim; packages.myVimPackage = with pkgs.vimPlugins; { start = [ + conform-nvim bufferline-nvim cmp-nvim-lsp cmp_luasnip @@ -113,6 +118,7 @@ in toggleterm-nvim tokyonight-nvim typst-vim + undotree vim-lsp-cxx-highlight which-key-nvim ]; diff --git a/users/stitchynyan/home.nix b/users/stitchynyan/home.nix index 721a06d..b30008d 100644 --- a/users/stitchynyan/home.nix +++ b/users/stitchynyan/home.nix @@ -60,9 +60,10 @@ in kicad #steamvr? procps + ripgrep usbutils yt-dlp - (python311.withPackages (lib.attrVals [ "matplotlib" "python-lsp-server" "sympy"])) + (python3.withPackages (lib.attrVals [ "matplotlib" "pyflakes" "python-lsp-server" "sympy"])) ] ++ (lib.optionals (nixosConfig.stitchyconf.form == "handheld") handheldPkgs) ++ (lib.optionals (nixosConfig.stitchyconf.form == "pc") pcPkgs); From 78de4620177cbc0ce6c9873ddba24dd9f2eb4c49 Mon Sep 17 00:00:00 2001 From: stitchy Date: Wed, 27 Nov 2024 10:47:32 +0000 Subject: [PATCH 029/132] Fix: More Whitespace --- config/dunst/scripts/volumeNotify.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/dunst/scripts/volumeNotify.sh b/config/dunst/scripts/volumeNotify.sh index 5145125..6cc9b0d 100755 --- a/config/dunst/scripts/volumeNotify.sh +++ b/config/dunst/scripts/volumeNotify.sh @@ -11,10 +11,10 @@ if [[ "$mute" == "" ]]; then # Change the volume $(wpctl set-volume @DEFAULT_AUDIO_SINK@ $@) - # Query Pipewire and Parse Volume as an Int + # Query Pipewire and Parse Volume as an Int volume="$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print $2}')" vol=${volume//.} - + # Send the notification $(dunstify -h int:value:"$vol" Volume: $vol -h string:x-dunst-stack-tag:volume) $(echo $vol > ${XDG_CACHE_HOME:-~/.cache}/eww/vol) From 8b19a173fe763310a9bea0ffaebb37b2582387b4 Mon Sep 17 00:00:00 2001 From: stitchy Date: Wed, 27 Nov 2024 10:48:05 +0000 Subject: [PATCH 030/132] Nix: Flake Update --- flake.lock | 102 +++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 87 insertions(+), 15 deletions(-) diff --git a/flake.lock b/flake.lock index a3611e4..fa59f1c 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,40 @@ { "nodes": { + "flake-compat": { + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "revCount": 57, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "nixpkgs-xr", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1730504689, + "narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "506278e768c2a08bec68eb62932193e341f55c90", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -7,11 +42,11 @@ ] }, "locked": { - "lastModified": 1730450782, - "narHash": "sha256-0AfApF8aexgB6o34qqLW2cCX4LaWJajBVdU6ddiWZBM=", + "lastModified": 1730837930, + "narHash": "sha256-0kZL4m+bKBJUBQse0HanewWO0g8hDdCvBhudzxgehqc=", "owner": "nix-community", "repo": "home-manager", - "rev": "8ca921e5a806b5b6171add542defe7bdac79d189", + "rev": "2f607e07f3ac7e53541120536708e824acccfaa8", "type": "github" }, "original": { @@ -24,11 +59,11 @@ "mobile-nixos": { "flake": false, "locked": { - "lastModified": 1730307383, - "narHash": "sha256-EJYo2VPXVMGQbY+bI4Xav14fXXioBt3KICtXNI6i76o=", + "lastModified": 1730912712, + "narHash": "sha256-T5A9I6Tfh9zrv9sRWfu/ZKN6VkE670YQ6bjC5sbpTzk=", "owner": "nixos", "repo": "mobile-nixos", - "rev": "0516be85630befa2c1e8042ac873342ce186b2f6", + "rev": "2268e358ed407d9c0a4499ae767d105eeaeec586", "type": "github" }, "original": { @@ -39,11 +74,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1730368399, - "narHash": "sha256-F8vJtG389i9fp3k2/UDYHMed3PLCJYfxCqwiVP7b9ig=", + "lastModified": 1730919458, + "narHash": "sha256-yMO0T0QJlmT/x4HEyvrCyigGrdYfIXX3e5gWqB64wLg=", "owner": "Nixos", "repo": "nixos-hardware", - "rev": "da14839ac5f38ee6adbdb4e6db09b5eef6d6ccdc", + "rev": "e1cc1f6483393634aee94514186d21a4871e78d7", "type": "github" }, "original": { @@ -55,15 +90,15 @@ }, "nixpkgs": { "locked": { - "lastModified": 1730200266, - "narHash": "sha256-l253w0XMT8nWHGXuXqyiIC/bMvh1VRszGXgdpQlfhvU=", - "owner": "Nixos", + "lastModified": 1730785428, + "narHash": "sha256-Zwl8YgTVJTEum+L+0zVAWvXAGbWAuXHax3KzuejaDyo=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "807e9154dcb16384b1b765ebe9cd2bba2ac287fd", + "rev": "4aa36568d413aca0ea84a1684d2d46f55dbabad7", "type": "github" }, "original": { - "owner": "Nixos", + "owner": "NixOS", "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" @@ -85,13 +120,50 @@ "type": "github" } }, + "nixpkgs-xr": { + "inputs": { + "flake-compat": "flake-compat", + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1730942067, + "narHash": "sha256-F+MvnvRlRcL8BktdqOK6LRoVhyFX/jzWfcm0mPbJNeY=", + "owner": "nix-community", + "repo": "nixpkgs-xr", + "rev": "87d61362cb82ed15d54dd56b24944f3404646c72", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs-xr", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1730785428, + "narHash": "sha256-Zwl8YgTVJTEum+L+0zVAWvXAGbWAuXHax3KzuejaDyo=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "4aa36568d413aca0ea84a1684d2d46f55dbabad7", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { "home-manager": "home-manager", "mobile-nixos": "mobile-nixos", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", - "nixpkgs-quartus": "nixpkgs-quartus" + "nixpkgs-quartus": "nixpkgs-quartus", + "nixpkgs-xr": "nixpkgs-xr" } } }, From c7b07f2130ba067049506d8cfc5a5138a35c3e4f Mon Sep 17 00:00:00 2001 From: stitchy Date: Wed, 27 Nov 2024 10:50:50 +0000 Subject: [PATCH 031/132] Git: Create gitignore --- .gitignore | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..36f34b8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +temp/ +result +*.png +*.jpg +*.bak From 4cd16133e91944ceff73a94ccdd6099d7d9d7a0d Mon Sep 17 00:00:00 2001 From: stitchy Date: Wed, 27 Nov 2024 11:13:57 +0000 Subject: [PATCH 032/132] Hypr: Refactor Binds --- config/hypr/binds.conf | 35 +++++++++++++++++++++-------------- config/hypr/windowrules.conf | 7 +++++-- 2 files changed, 26 insertions(+), 16 deletions(-) diff --git a/config/hypr/binds.conf b/config/hypr/binds.conf index fc0c916..9195640 100644 --- a/config/hypr/binds.conf +++ b/config/hypr/binds.conf @@ -1,32 +1,39 @@ # Binding Config File for Hyprland # Main Bindings -# -# Foot, you done goofed -bind=ALT,RETURN,exec,footclient -#bind=ALT,RETURN,exec,kitty -bind=ALT,Q,killactive, -bind=SUPER,M,exec,hyprctl dispatch exit 0 +# Programs +bind=ALT,B,exec,swaylock bind=ALT,E,exec,dolphin -bind=ALT,V,togglefloating, +bind=ALT,F,exec,${XDG_CONFIG_HOME:-~/.config}/hypr/plumbing.sh +bind=ALT,G,exec,${XDG_CONFIG_HOME:-~/.config}/hypr/plumbing.sh clip +bind=ALT,RETURN,exec,footclient bindr=ALTSHIFT,RETURN,exec,pkill wofi || wofi -S drun --allow-images + + +# Basic Actions +bind=ALT,Q,killactive, +bind=ALT,V,togglefloating, bind=ALTSHIFT,F,fullscreen,1 bind=ALTSHIFT,M,fullscreen,0 -bind=,Print,exec,grim -g "$(slurp)" -t jpeg - | wl-copy -bind=SHIFT,Print,exec,grim -g "$(slurp)" -t jpeg Downloads/screenshot.jpeg +bind=SUPER,M,exec,hyprctl dispatch exit 0 + +# Screenshots +bind=,Print,exec,slurp | grim -t jpeg -g - - | wl-copy +bind=SHIFT,Print,exec,slurp | grim -t jpeg -g - Downloads/screenshot.jpeg +bind=SHIFTSUPER,Print,exec,hyprctl -j activewindow | jq -r '"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"' | grim -t jpeg -g - - | wl-copy +bind=SUPER,Print,exec,hyprctl -j activewindow | jq -r '"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"' | grim -g - Downloads/screenshot.jpeg # trigger when the switch is toggled bindl=,switch:Lid Switch,exec,swaylock --effect-greyscale - # Games -bind=ALTSHIFT,T,exec,gamescope -w 1280 -h 960 -f -r 60 wine "/home/flyingstitchman/Documents/Games/Touhou 15 - Legacy of Lunatic Kingdom/th15.exe" -bind=ALTSHIFT,O,exec,osu-lazer bind=ALTSHIFT,C,exec,"/home/flyingstitchman/Documents/Games/Celeste/Celeste" -bind=ALTSHIFT,S,exec,"/home/flyingstitchman/Documents/Games/Stardew Valley/StardewValley" +bind=ALTSHIFT,O,exec,osu-lazer bind=ALTSHIFT,R,exec,"/home/flyingstitchman/Documents/Games/factorio/bin/x64/factorio" +bind=ALTSHIFT,S,exec,"/home/flyingstitchman/Documents/Games/Stardew Valley/StardewValley" +bind=ALTSHIFT,T,exec,gamescope -w 1280 -h 960 -f -r 60 wine "/home/flyingstitchman/Documents/Games/Touhou 15 - Legacy of Lunatic Kingdom/th15.exe" # Window Moving @@ -35,7 +42,7 @@ bindm=SUPER,mouse:273,resizewindow # Quick Bindings bindle=,XF86MonBrightnessDown,exec,brightnessctl -d intel_backlight set 1%- -bindle=,XF86MonBrightnessUp,exec,brightnessctl -d intel_backlight set +1% +bindle=,XF86MonBrightnessUp,exec,brightnessctl -d intel_backlight set +1% bindle=,XF86AudioRaiseVolume,exec,${XDG_CONFIG_HOME:-~/.config}/dunst/scripts/volumeNotify.sh 1%+ bindle=,XF86AudioLowerVolume,exec,${XDG_CONFIG_HOME:-~/.config}/dunst/scripts/volumeNotify.sh 1%- diff --git a/config/hypr/windowrules.conf b/config/hypr/windowrules.conf index cbefe83..ee7fa91 100644 --- a/config/hypr/windowrules.conf +++ b/config/hypr/windowrules.conf @@ -1,10 +1,13 @@ # Window Rule Config File -# WLogout Configuration -# Might move to separate file cause screen resolutions whack +# Application Fixes +# Foot Fullscreen Transparency Fix +windowrulev2 = syncfullscreen 0, class:(foot), title:(foot) windowrule=nofocus,ibus,^(Ibus-ui-gtk3)$ +# WLogout Configuration +# Might move to separate file cause screen resolutions whack windowrule=move 720 222,wlogout windowrule=size 2000 1000,wlogout windowrule=tile,xyz From 33f4d22664b0639d36b346cd94d1ebaf3543615e Mon Sep 17 00:00:00 2001 From: stitchy Date: Thu, 28 Nov 2024 10:06:31 +0000 Subject: [PATCH 033/132] eww: refactor and add calendar widget --- config/eww/eww.yuck | 94 +++++++++++++++++++++++++++++---------------- 1 file changed, 61 insertions(+), 33 deletions(-) diff --git a/config/eww/eww.yuck b/config/eww/eww.yuck index 00158fc..d9db5e7 100644 --- a/config/eww/eww.yuck +++ b/config/eww/eww.yuck @@ -1,13 +1,11 @@ -;;;; (defpoll time :interval "1s" 'date +%s') +;; VARIABLE DEFINITIONS -(defwidget clock [] - (box :orientation "vertical" - :halign "center" - :valign "end" - (box :class "clock" {formattime(EWW_TIME, "%H")}) - (box :class "clock" {formattime(EWW_TIME, "%M")}) - )) +;; Audio +(deflisten vol "cat ~/.cache/eww/vol && inotifywait -q -m -e close_write ~/.cache/eww/vol | while read -r filename event; do cat ~/.cache/eww/vol; done") +(defpoll micvol :interval "1m" "wpctl get-volume @DEFAULT_AUDIO_SOURCE@ | awk '{print $2}'") + +;; Workspace Stuff (deflisten workspaces :initial "[]" "bash ~/.config/eww/scripts/get-workspaces") (deflisten current_workspace :initial "..." "bash ~/.config/eww/scripts/get-active-workspace") (deflisten urgent_workspace :initial "..." "bash ~/.config/eww/scripts/get-urgent-workspaces") @@ -21,6 +19,21 @@ (label :text "${workspace.id}") )))))) +;; Screen +(deflisten backlight "brightnessctl g && inotifywait -q -m -e modify /sys/class/backlight/intel_backlight/actual_brightness | while read -r filename event; do cat /sys/class/backlight/intel_backlight/actual_brightness; done") + + +;; Widgets + +(defwidget clock [] + (eventbox + :onhover "eww open cal" + (box :orientation "vertical" + :halign "center" + :valign "end" + (box :class "clock" {formattime(EWW_TIME, "%H")}) + (box :class "clock" {formattime(EWW_TIME, "%M")}) + ))) (defwidget circle [val prog sty char] (box :halign "center" @@ -43,24 +56,18 @@ :val {EWW_BATTERY.BAT1.capacity} :char "󱐋")) -(deflisten vol "cat ~/.cache/eww/vol && inotifywait -q -m -e close_write ~/.cache/eww/vol | while read -r filename event; do cat ~/.cache/eww/vol; done") - (defwidget volume [] (circle :prog {vol * 7/10} :sty "font-size: 12; margin-right: 2px;" :val {vol + 1 - 1} :char "")) -(defpoll micvol :interval "1m" "wpctl get-volume @DEFAULT_AUDIO_SOURCE@ | awk '{print $2}'") - (defwidget mic [] (circle :prog {micvol * 70} :sty "margin-left: 1px;" :val {micvol *100} :char "󰍬")) -(deflisten backlight "brightnessctl g && inotifywait -q -m -e modify /sys/class/backlight/intel_backlight/actual_brightness | while read -r filename event; do cat /sys/class/backlight/intel_backlight/actual_brightness; done") - (defwidget brightness [] (circle :prog {(backlight / 960) * 7/10} :sty "font-size: 12; margin-right: 3px;" @@ -73,28 +80,49 @@ (defwidget tray [] (systray :orientation "v" :icon-size 20)) + +;; Upper Level Widgets + + (defwidget bar [] (centerbox :orientation "vertical" - :halign "center" - :space-evenly false - (_workspaces) - (clock) - (box :orientation "vertical" :spacing -25 :valign "end" - (brightness) - (mic) - (volume) - (battery) - (tray) - (power)))) + :halign "center" + :space-evenly false + (_workspaces) + (clock) + (box :orientation "vertical" :spacing -25 :valign "end" + (brightness) + (mic) + (volume) + (battery) + (tray) + (power)))) +(defwidget cal [] + (eventbox + :onhoverlost "eww close cal" + (calendar))) + + +;; Windows (defwindow bar - :monitor 0 - :geometry (geometry :x "4px" - :y "1%" - :height "98%" - :anchor "left center") - :stacking "fg" - :exclusive true - :class "bar" + :monitor 0 + :geometry (geometry :x "4px" + :y "1%" + :height "98%" + :anchor "left center") + :stacking "fg" + :exclusive true + :class "bar" (bar)) + +(defwindow cal + :monitor 0 + :geometry (geometry :x "1%" + :y "5%" + :anchor "left center") + :stacking "fg" + :exclusive false + :class "bar" + (cal)) From 0e60d4acac40be90c803fd3a452af0a418e4ae87 Mon Sep 17 00:00:00 2001 From: stitchy Date: Thu, 28 Nov 2024 10:29:01 +0000 Subject: [PATCH 034/132] eww: brightness scroll --- config/eww/eww.yuck | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/config/eww/eww.yuck b/config/eww/eww.yuck index d9db5e7..b603679 100644 --- a/config/eww/eww.yuck +++ b/config/eww/eww.yuck @@ -69,10 +69,12 @@ :char "󰍬")) (defwidget brightness [] - (circle :prog {(backlight / 960) * 7/10} - :sty "font-size: 12; margin-right: 3px;" - :val {round( backlight / 960, 0) - 1} - :char "󰃠")) + (eventbox + :onscroll "if [ {} == 'up' ]; then brightnessctl -d intel_backlight set 1%+; else brightnessctl -d intel_backlight set 1%-; fi" + (circle :prog {(backlight / 960) * 7/10} + :sty "font-size: 12; margin-right: 3px;" + :val {round( backlight / 960, 0) - 1} + :char "󰃠"))) (defwidget power [] (box :class "power" :valign "end" "⏻")) From d249ab216f6bd55ea3551cf9d2ec54a46b05079a Mon Sep 17 00:00:00 2001 From: stitchy Date: Fri, 29 Nov 2024 09:59:24 +0000 Subject: [PATCH 035/132] eww: remove whitespace from scss --- config/eww/eww.scss | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/config/eww/eww.scss b/config/eww/eww.scss index f528699..ea1c6fd 100644 --- a/config/eww/eww.scss +++ b/config/eww/eww.scss @@ -19,12 +19,12 @@ border-style: solid; border-color: #cac; margin: 2px; - + &.empty { } - &.occupied{ + &.occupied{ } &.current { @@ -45,6 +45,9 @@ border-radius: 15px; } +.cal { + padding: 5px; +} .clock { background-color: #536; From a90cb37e695aef44792e606f4c2ab629aaa8198a Mon Sep 17 00:00:00 2001 From: stitchy Date: Fri, 29 Nov 2024 10:03:29 +0000 Subject: [PATCH 036/132] eww: Add interactibles for vol, mic, and brightness --- config/eww/eww.yuck | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/config/eww/eww.yuck b/config/eww/eww.yuck index b603679..d204b71 100644 --- a/config/eww/eww.yuck +++ b/config/eww/eww.yuck @@ -57,16 +57,22 @@ :char "󱐋")) (defwidget volume [] - (circle :prog {vol * 7/10} - :sty "font-size: 12; margin-right: 2px;" - :val {vol + 1 - 1} - :char "")) + (eventbox + :onclick "hyprctl dispatch exec 'pavucontrol -t 3'" + :onscroll "if [ {} == 'up' ]; then /etc/nixos/config/dunst/scripts/volumeNotify.sh 1%+; else /etc/nixos/config/dunst/scripts/volumeNotify.sh 1%-; fi" + (circle :prog {vol * 7/10} + :sty "font-size: 12; margin-right: 2px;" + :val {vol + 1 - 1} + :char ""))) (defwidget mic [] - (circle :prog {micvol * 70} - :sty "margin-left: 1px;" - :val {micvol *100} - :char "󰍬")) + (eventbox + :onclick "hyprctl dispatch exec 'pavucontrol -t 4'" + :onscroll "if [ {} == 'up' ]; then wpctl set-volume -l 1 @DEFAULT_SOURCE@ 1%+; else wpctl set-volume @DEFAULT_SOURCE@ 1%-; fi" + (circle :prog {micvol * 70} + :sty "margin-left: 1px;" + :val {micvol *100} + :char "󰍬"))) (defwidget brightness [] (eventbox @@ -101,9 +107,11 @@ (power)))) (defwidget cal [] - (eventbox - :onhoverlost "eww close cal" - (calendar))) + (box + :class "cal" + (eventbox + :onhoverlost "eww close cal" + (calendar)))) ;; Windows From 7f89cb0a37118b547cdb51f0800cfb7062e922ea Mon Sep 17 00:00:00 2001 From: stitchy Date: Sun, 1 Dec 2024 23:50:45 +0000 Subject: [PATCH 037/132] hypr: Add default monitor rule --- config/hypr/monitors.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/hypr/monitors.conf b/config/hypr/monitors.conf index 335946e..bf2698a 100644 --- a/config/hypr/monitors.conf +++ b/config/hypr/monitors.conf @@ -17,3 +17,6 @@ workspace=eDP-1,1 #monitor=DP-2,preferred,auto,1 #monitor=DP-3,preferred,auto,1 #monitor=DP-4,preferred,auto,1 + +# Auto Monitor Rule +monitor = , preferred, auto, 1 From 230ef0165bb56d3b03fd7d2cfc1dddbb94575f5d Mon Sep 17 00:00:00 2001 From: stitchy Date: Mon, 2 Dec 2024 07:30:51 +0000 Subject: [PATCH 038/132] eww: fix cal for large screen On Malachite, the calendar window was floating too far from the edge, which should be fixed by this. Additionally, this removes unecessary geometries from the cal and bar windows --- config/eww/eww.yuck | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/config/eww/eww.yuck b/config/eww/eww.yuck index d204b71..7870b16 100644 --- a/config/eww/eww.yuck +++ b/config/eww/eww.yuck @@ -119,7 +119,6 @@ (defwindow bar :monitor 0 :geometry (geometry :x "4px" - :y "1%" :height "98%" :anchor "left center") :stacking "fg" @@ -129,8 +128,7 @@ (defwindow cal :monitor 0 - :geometry (geometry :x "1%" - :y "5%" + :geometry (geometry :x "4px" :anchor "left center") :stacking "fg" :exclusive false From 57132cc6024e69d464199acbcc7daca88c4bc4de Mon Sep 17 00:00:00 2001 From: stitchy Date: Tue, 3 Dec 2024 11:22:39 +0000 Subject: [PATCH 039/132] hypr: add neovim binding When ALT+Enter v is too much letters to type --- config/hypr/binds.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/config/hypr/binds.conf b/config/hypr/binds.conf index 9195640..df5c062 100644 --- a/config/hypr/binds.conf +++ b/config/hypr/binds.conf @@ -3,6 +3,7 @@ # Main Bindings # Programs +bind=ALT,A,exec,footclient nvim bind=ALT,B,exec,swaylock bind=ALT,E,exec,dolphin bind=ALT,F,exec,${XDG_CONFIG_HOME:-~/.config}/hypr/plumbing.sh From 1fd1838d3fb499375ebff6b90c97d3a6088b00ad Mon Sep 17 00:00:00 2001 From: stitchy Date: Thu, 5 Dec 2024 09:57:31 +0000 Subject: [PATCH 040/132] nvim: remove ccls in favor of clang Removes CCLS nvim configuration and exchanges the ccls package for clang-tools --- config/nvim/nvim.lua | 10 +--------- packages/default.nix | 2 +- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/config/nvim/nvim.lua b/config/nvim/nvim.lua index 41b7d88..5d79bf5 100644 --- a/config/nvim/nvim.lua +++ b/config/nvim/nvim.lua @@ -22,14 +22,6 @@ require'lspconfig'.pylsp.setup{ } } } -require'lspconfig'.ccls.setup{ - init_options = { - highlight = { - lsRanges = true; - } - } - } - -- Add additional capabilities supported by nvim-cmp local capabilities = require("cmp_nvim_lsp").default_capabilities() @@ -102,7 +94,6 @@ cmp.setup { n"--.W.--"n Kiloroy Was Here ]] -package.path = package.path .. ";/etc/nixos/config/nvim" -- Funky plugins require("conform").setup({ @@ -151,6 +142,7 @@ require("spaceman").setup({ directories = { "~/Documents/Classes", "~/Documents/Repos", + "~/Documents/Repos/ExtremeHeatTransfer", }, use_default_keymaps = true, hooks = { diff --git a/packages/default.nix b/packages/default.nix index 74bd04d..f584ad8 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -66,7 +66,7 @@ in environment.systemPackages = (lib.attrVals [ "black" "btop" - "ccls" + "clang-tools" "eza" "fd" "fzf" From e2ddc10b223eceb180113a9fceb7fc9c44e08471 Mon Sep 17 00:00:00 2001 From: stitchy Date: Thu, 5 Dec 2024 09:58:22 +0000 Subject: [PATCH 041/132] hypr: remove redundant monitor configs --- config/hypr/monitors.conf | 4 ---- 1 file changed, 4 deletions(-) diff --git a/config/hypr/monitors.conf b/config/hypr/monitors.conf index bf2698a..214142c 100644 --- a/config/hypr/monitors.conf +++ b/config/hypr/monitors.conf @@ -13,10 +13,6 @@ monitor=eDP-1,2256x1504@60,0x0,1.5 #monitor=DP-2,1024x786,2256x0,1 workspace=eDP-1,1 -#monitor=DP-1,preferred,auto,1 -#monitor=DP-2,preferred,auto,1 -#monitor=DP-3,preferred,auto,1 -#monitor=DP-4,preferred,auto,1 # Auto Monitor Rule monitor = , preferred, auto, 1 From a1c38f605d4b980d03ca6f8aefc101c0aef9db04 Mon Sep 17 00:00:00 2001 From: stitchy Date: Fri, 6 Dec 2024 09:29:10 +0000 Subject: [PATCH 042/132] foot: init --- config/foot/foot.ini | 19 +++++++++++++++++++ users/stitchynyan/home.nix | 4 ++++ 2 files changed, 23 insertions(+) create mode 100644 config/foot/foot.ini diff --git a/config/foot/foot.ini b/config/foot/foot.ini new file mode 100644 index 0000000..7f62971 --- /dev/null +++ b/config/foot/foot.ini @@ -0,0 +1,19 @@ +# -*- conf -*- + +font=monospace:size=10 + +[colors] + alpha = .65 + foreground=dcdccc + background=393052 + +[cursor] + color=111111 dcdccc + +[key-bindings] + spawn-terminal=Control+Shift+n + +# Fixes the SHIFT+ENTER escape sequence from showing +# Git Issue: https://codeberg.org/dnkl/foot/issues/1358 +[text-bindings] + \x0d = Control+Return Shift+Return Control+Shift+Return diff --git a/users/stitchynyan/home.nix b/users/stitchynyan/home.nix index b30008d..19d7638 100644 --- a/users/stitchynyan/home.nix +++ b/users/stitchynyan/home.nix @@ -94,6 +94,10 @@ in source = config.lib.file.mkOutOfStoreSymlink "/etc/nixos/config/eww"; recursive = true; }; + "foot" = { + source = config.lib.file.mkOutOfStoreSymlink "/etc/nixos/config/foot"; + recursive = true; + }; "hypr" = { source = config.lib.file.mkOutOfStoreSymlink "/etc/nixos/config/hypr"; recursive = true; From 2d5b5cb37d248dbe541f97a959c9e33d8666274b Mon Sep 17 00:00:00 2001 From: stitchy Date: Sun, 8 Dec 2024 09:51:19 +0000 Subject: [PATCH 043/132] nvim: switch undotree for telescope-undo-nvim Undotree did not have live updates like I wanted, so I have switched to the telescope one which does. --- config/nvim/lua/keymap.lua | 2 +- packages/default.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/nvim/lua/keymap.lua b/config/nvim/lua/keymap.lua index 1a5f7ae..6336d20 100644 --- a/config/nvim/lua/keymap.lua +++ b/config/nvim/lua/keymap.lua @@ -35,7 +35,7 @@ map("n", ">", "BufferLineMoveNext", { desc = "Move buffer right map("n", "a", "ToggleTerm name=main", { desc = "Floating Terminal", silent = true }) -- Undotree -map('n', 'fu', vim.cmd.UndotreeToggle) +map("n", "fu", "Telescope undo") ---- -- Cool Macros ---- diff --git a/packages/default.nix b/packages/default.nix index f584ad8..7711682 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -115,10 +115,10 @@ in nvim-lspconfig spaceman-nvim telescope-nvim + telescope-undo-nvim toggleterm-nvim tokyonight-nvim typst-vim - undotree vim-lsp-cxx-highlight which-key-nvim ]; From 53dbae8493563f5831800a71bd30362029cad460 Mon Sep 17 00:00:00 2001 From: stitchy Date: Mon, 9 Dec 2024 10:10:05 +0000 Subject: [PATCH 044/132] nvim: init treesiter-nvim I wanted fancy markdown rendering in nvim and that needed a treesitter lsp, so this adds treesitter and the markdown lsp. --- config/nvim/nvim.lua | 8 ++++++++ packages/default.nix | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/config/nvim/nvim.lua b/config/nvim/nvim.lua index 5d79bf5..60bb39d 100644 --- a/config/nvim/nvim.lua +++ b/config/nvim/nvim.lua @@ -22,6 +22,14 @@ require'lspconfig'.pylsp.setup{ } } } +require'nvim-treesitter.configs'.setup { + ensure_installed = { }, + auto_install = false, + highlight = { + enable = true, + additional_vim_regex_highlighting = false, + }, +} -- Add additional capabilities supported by nvim-cmp local capabilities = require("cmp_nvim_lsp").default_capabilities() diff --git a/packages/default.nix b/packages/default.nix index 7711682..67c5ba2 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -113,6 +113,11 @@ in neo-tree-nvim nvim-cmp nvim-lspconfig + (nvim-treesitter.withPlugins ( + plugins: with plugins; [ + markdown + ] + )) spaceman-nvim telescope-nvim telescope-undo-nvim From 75b6e32ce23c37239964ee2e247b3c2ff7d94b8c Mon Sep 17 00:00:00 2001 From: stitchy Date: Mon, 9 Dec 2024 10:10:41 +0000 Subject: [PATCH 045/132] nvim: add render-markdown-nvim Fancy text go brrrrrrrrrr~ --- config/nvim/nvim.lua | 2 ++ packages/default.nix | 1 + 2 files changed, 3 insertions(+) diff --git a/config/nvim/nvim.lua b/config/nvim/nvim.lua index 60bb39d..c2a7c36 100644 --- a/config/nvim/nvim.lua +++ b/config/nvim/nvim.lua @@ -132,7 +132,9 @@ require("bufferline").setup({ options = { require("gitsigns").setup() require("ibl").setup() require("mini.comment").setup() +require("mini.icons").setup() require("neo-tree").setup() +require("render-markdown").setup() require("telescope").setup() require("toggleterm").setup{ direction = 'float', diff --git a/packages/default.nix b/packages/default.nix index 67c5ba2..76c4ba5 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -118,6 +118,7 @@ in markdown ] )) + render-markdown-nvim spaceman-nvim telescope-nvim telescope-undo-nvim From 095e9f29faac238be8abc69b2bcfc79e1bb83e03 Mon Sep 17 00:00:00 2001 From: stitchy Date: Mon, 9 Dec 2024 13:09:29 +0000 Subject: [PATCH 046/132] nvim: add nvim-web-devicons icons go brr --- config/nvim/nvim.lua | 1 + packages/default.nix | 1 + 2 files changed, 2 insertions(+) diff --git a/config/nvim/nvim.lua b/config/nvim/nvim.lua index c2a7c36..ae8f96f 100644 --- a/config/nvim/nvim.lua +++ b/config/nvim/nvim.lua @@ -134,6 +134,7 @@ require("ibl").setup() require("mini.comment").setup() require("mini.icons").setup() require("neo-tree").setup() +require("nvim-web-devicons").setup() require("render-markdown").setup() require("telescope").setup() require("toggleterm").setup{ diff --git a/packages/default.nix b/packages/default.nix index 76c4ba5..c33d969 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -118,6 +118,7 @@ in markdown ] )) + nvim-web-devicons render-markdown-nvim spaceman-nvim telescope-nvim From d9e21b23bdd47aabf13cd48ed867c5c453072a3a Mon Sep 17 00:00:00 2001 From: stitchy Date: Mon, 9 Dec 2024 15:42:35 -0800 Subject: [PATCH 047/132] foot: fix shift+space in neovim terminal lazygit Problem: In neovimg when using a terminal (like toggleterm) and trying to press shift+space in an curses type application like lazygit, it will print an escape sequence instead of printing the space key. This textbinding remaps it so it will now print space instead. Has minor implications for escape sequences and stuff. --- config/foot/foot.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/config/foot/foot.ini b/config/foot/foot.ini index 7f62971..6eca261 100644 --- a/config/foot/foot.ini +++ b/config/foot/foot.ini @@ -17,3 +17,4 @@ font=monospace:size=10 # Git Issue: https://codeberg.org/dnkl/foot/issues/1358 [text-bindings] \x0d = Control+Return Shift+Return Control+Shift+Return + \x20 = Shift+space From c75f696013f815b4ad26d04f437d528e369b3157 Mon Sep 17 00:00:00 2001 From: stitchy Date: Tue, 10 Dec 2024 13:32:56 +0000 Subject: [PATCH 048/132] nvim: add prettier formating to conform for html and css --- config/nvim/nvim.lua | 4 +++- packages/default.nix | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/config/nvim/nvim.lua b/config/nvim/nvim.lua index ae8f96f..a2aa1ff 100644 --- a/config/nvim/nvim.lua +++ b/config/nvim/nvim.lua @@ -106,7 +106,9 @@ cmp.setup { -- Funky plugins require("conform").setup({ formatters_by_ft = { - python = { "isort", "black" }, + css = { "prettier", }, + html = { "prettier", }, + python = { "black" }, }, format_on_save = { timeout_ms = 500, diff --git a/packages/default.nix b/packages/default.nix index c33d969..7e470ce 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -88,7 +88,8 @@ in ++ (lib.optionals config.stitchyconf.artPkgs.enable artPkgs) ++ (lib.optionals (config.stitchyconf.form == "pc") pcPkgs) ++ (lib.optionals (config.stitchyconf.form == "handheld") handheldPkgs) - ++ (lib.optionals (config.stitchyconf.form == "server") serverPkgs); + ++ (lib.optionals (config.stitchyconf.form == "server") serverPkgs) + ++ [ pkgs.nodePackages.prettier ]; # To-do figure out how to section these off programs = { From eb73cf9c03534aa65ed9a6cc2eb73d37cc943b5c Mon Sep 17 00:00:00 2001 From: stitchy Date: Mon, 16 Dec 2024 01:25:50 +0000 Subject: [PATCH 049/132] chore: flake update --- flake.lock | 98 ++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 66 insertions(+), 32 deletions(-) diff --git a/flake.lock b/flake.lock index fa59f1c..a5b91fb 100644 --- a/flake.lock +++ b/flake.lock @@ -14,24 +14,21 @@ "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" } }, - "flake-parts": { + "flake-utils": { "inputs": { - "nixpkgs-lib": [ - "nixpkgs-xr", - "nixpkgs" - ] + "systems": "systems" }, "locked": { - "lastModified": 1730504689, - "narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "506278e768c2a08bec68eb62932193e341f55c90", + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "type": "github" }, "original": { - "owner": "hercules-ci", - "repo": "flake-parts", + "owner": "numtide", + "repo": "flake-utils", "type": "github" } }, @@ -42,11 +39,11 @@ ] }, "locked": { - "lastModified": 1730837930, - "narHash": "sha256-0kZL4m+bKBJUBQse0HanewWO0g8hDdCvBhudzxgehqc=", + "lastModified": 1734093295, + "narHash": "sha256-hSwgGpcZtdDsk1dnzA0xj5cNaHgN9A99hRF/mxMtwS4=", "owner": "nix-community", "repo": "home-manager", - "rev": "2f607e07f3ac7e53541120536708e824acccfaa8", + "rev": "66c5d8b62818ec4c1edb3e941f55ef78df8141a8", "type": "github" }, "original": { @@ -59,11 +56,11 @@ "mobile-nixos": { "flake": false, "locked": { - "lastModified": 1730912712, - "narHash": "sha256-T5A9I6Tfh9zrv9sRWfu/ZKN6VkE670YQ6bjC5sbpTzk=", + "lastModified": 1733700802, + "narHash": "sha256-YuhtFJLVW3d3zr5+VoyApm6PUFoIHhOCi+VOfi2LNzA=", "owner": "nixos", "repo": "mobile-nixos", - "rev": "2268e358ed407d9c0a4499ae767d105eeaeec586", + "rev": "0532a626e69fa9451e50297011008851527b9259", "type": "github" }, "original": { @@ -74,11 +71,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1730919458, - "narHash": "sha256-yMO0T0QJlmT/x4HEyvrCyigGrdYfIXX3e5gWqB64wLg=", + "lastModified": 1733861262, + "narHash": "sha256-+jjPup/ByS0LEVIrBbt7FnGugJgLeG9oc+ivFASYn2U=", "owner": "Nixos", "repo": "nixos-hardware", - "rev": "e1cc1f6483393634aee94514186d21a4871e78d7", + "rev": "cf737e2eba82b603f54f71b10cb8fd09d22ce3f5", "type": "github" }, "original": { @@ -90,11 +87,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1730785428, - "narHash": "sha256-Zwl8YgTVJTEum+L+0zVAWvXAGbWAuXHax3KzuejaDyo=", + "lastModified": 1734119587, + "narHash": "sha256-AKU6qqskl0yf2+JdRdD0cfxX4b9x3KKV5RqA6wijmPM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4aa36568d413aca0ea84a1684d2d46f55dbabad7", + "rev": "3566ab7246670a43abd2ffa913cc62dad9cdf7d5", "type": "github" }, "original": { @@ -123,15 +120,16 @@ "nixpkgs-xr": { "inputs": { "flake-compat": "flake-compat", - "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs_2" + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs_2", + "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1730942067, - "narHash": "sha256-F+MvnvRlRcL8BktdqOK6LRoVhyFX/jzWfcm0mPbJNeY=", + "lastModified": 1734226209, + "narHash": "sha256-6QO56uh1J853+zj7iv5RoFTQLgk6nL0BKshMfWyE7vI=", "owner": "nix-community", "repo": "nixpkgs-xr", - "rev": "87d61362cb82ed15d54dd56b24944f3404646c72", + "rev": "402eb3d51b418ebd128e2e579952cc0afda53cee", "type": "github" }, "original": { @@ -142,11 +140,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1730785428, - "narHash": "sha256-Zwl8YgTVJTEum+L+0zVAWvXAGbWAuXHax3KzuejaDyo=", + "lastModified": 1733940404, + "narHash": "sha256-Pj39hSoUA86ZePPF/UXiYHHM7hMIkios8TYG29kQT4g=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4aa36568d413aca0ea84a1684d2d46f55dbabad7", + "rev": "5d67ea6b4b63378b9c13be21e2ec9d1afc921713", "type": "github" }, "original": { @@ -165,6 +163,42 @@ "nixpkgs-quartus": "nixpkgs-quartus", "nixpkgs-xr": "nixpkgs-xr" } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "nixpkgs-xr", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1733761991, + "narHash": "sha256-s4DalCDepD22jtKL5Nw6f4LP5UwoMcPzPZgHWjAfqbQ=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "0ce9d149d99bc383d1f2d85f31f6ebd146e46085", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } } }, "root": "root", From 81b214586f1f5ec0662dd355c8fa4080dd6bee5b Mon Sep 17 00:00:00 2001 From: stitchy Date: Mon, 16 Dec 2024 01:29:58 +0000 Subject: [PATCH 050/132] fix: nixos build --- packages/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/default.nix b/packages/default.nix index 7e470ce..31755c0 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -156,9 +156,8 @@ in "noto-fonts" "noto-fonts-emoji" "liberation_ttf" - "nerdfonts" "ipafont" - ] pkgs; + ] pkgs ++ builtins.filter lib.attrsets.isDerivation (builtins.attrValues pkgs.nerd-fonts); fonts.fontconfig.defaultFonts = { monospace = [ From 93571017f746bee464e26993e1e64868bbc48594 Mon Sep 17 00:00:00 2001 From: stitchy Date: Tue, 17 Dec 2024 11:01:21 +0000 Subject: [PATCH 051/132] nvim: add javascript syntax highlighting, lsp, and formatting --- config/nvim/nvim.lua | 3 ++- packages/default.nix | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/config/nvim/nvim.lua b/config/nvim/nvim.lua index a2aa1ff..7931289 100644 --- a/config/nvim/nvim.lua +++ b/config/nvim/nvim.lua @@ -37,7 +37,7 @@ local capabilities = require("cmp_nvim_lsp").default_capabilities() local lspconfig = require('lspconfig') -- Enable some language servers with the additional completion capabilities offered by nvim-cmp -local servers = { 'clangd', 'rust_analyzer', 'ts_ls', 'typst_lsp', 'vhdl_ls' } +local servers = { 'clangd', 'rust_analyzer', 'typst_lsp', 'vhdl_ls', 'vtsls' } for _, lsp in ipairs(servers) do lspconfig[lsp].setup { -- on_attach = my_custom_on_attach, @@ -108,6 +108,7 @@ require("conform").setup({ formatters_by_ft = { css = { "prettier", }, html = { "prettier", }, + javascript = { "prettier", }, python = { "black" }, }, format_on_save = { diff --git a/packages/default.nix b/packages/default.nix index 31755c0..0cf3b72 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -81,6 +81,7 @@ in "typst-lsp" "unzip" "vhdl-ls" + "vtsls" "wget" "zip" "zoxide" @@ -116,6 +117,8 @@ in nvim-lspconfig (nvim-treesitter.withPlugins ( plugins: with plugins; [ + glsl + javascript markdown ] )) From a17eb40eaec324c6f38550f16abaa82bdcaff775 Mon Sep 17 00:00:00 2001 From: stitchy Date: Wed, 18 Dec 2024 07:47:12 +0000 Subject: [PATCH 052/132] nvim: typst_lsp -> tinymist && glsl_analyzer --- config/nvim/nvim.lua | 2 +- packages/default.nix | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/config/nvim/nvim.lua b/config/nvim/nvim.lua index 7931289..39e44a1 100644 --- a/config/nvim/nvim.lua +++ b/config/nvim/nvim.lua @@ -37,7 +37,7 @@ local capabilities = require("cmp_nvim_lsp").default_capabilities() local lspconfig = require('lspconfig') -- Enable some language servers with the additional completion capabilities offered by nvim-cmp -local servers = { 'clangd', 'rust_analyzer', 'typst_lsp', 'vhdl_ls', 'vtsls' } +local servers = { 'clangd', 'glsl_analyzer', 'rust_analyzer', 'tinymist', 'vhdl_ls', 'vtsls' } for _, lsp in ipairs(servers) do lspconfig[lsp].setup { -- on_attach = my_custom_on_attach, diff --git a/packages/default.nix b/packages/default.nix index 0cf3b72..3714c40 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -72,13 +72,15 @@ in "fzf" "git" "glib" + "glsl_analyzer" "gnumake" "gnupg" "mypy" "neofetch" "p7zip" "pinentry" - "typst-lsp" + "rust-analyzer" + "tinymist" "unzip" "vhdl-ls" "vtsls" From 19069aba4454f91e018bf51729c778ee2cbd4879 Mon Sep 17 00:00:00 2001 From: stitchy Date: Wed, 18 Dec 2024 07:48:02 +0000 Subject: [PATCH 053/132] zsh: add nixos-rebuild aliases --- config/zshrc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/config/zshrc b/config/zshrc index 0595102..b959ed4 100755 --- a/config/zshrc +++ b/config/zshrc @@ -137,8 +137,13 @@ export RUSTUP_HOME="$XDG_DATA_HOME"/rustup export CARGO_HOME="$XDG_DATA_HOME"/cargo -alias dosbox="dosbox -conf "$XDG_CONFIG_HOME"/dosbox/dosbox.conf " +alias dosbox="dosbox -conf $XDG_CONFIG_HOME/dosbox/dosbox.conf" +alias rbs="reconfig switch" +alias rbb="reconfig build" +reconfig() { + sudo nixos-rebuild --flake "/etc/nixos#$(cat /etc/hostname)" "$@" +} # Autostart Hyprland after all environmental Variables have been declared if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then From 76f7c6695af767afa701ad707c686f48c0ac970a Mon Sep 17 00:00:00 2001 From: stitchy Date: Wed, 18 Dec 2024 08:27:16 +0000 Subject: [PATCH 054/132] nvim: fix rust-analyzer --- config/nvim/nvim.lua | 2 +- packages/default.nix | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config/nvim/nvim.lua b/config/nvim/nvim.lua index 39e44a1..33dbf2c 100644 --- a/config/nvim/nvim.lua +++ b/config/nvim/nvim.lua @@ -37,7 +37,7 @@ local capabilities = require("cmp_nvim_lsp").default_capabilities() local lspconfig = require('lspconfig') -- Enable some language servers with the additional completion capabilities offered by nvim-cmp -local servers = { 'clangd', 'glsl_analyzer', 'rust_analyzer', 'tinymist', 'vhdl_ls', 'vtsls' } +local servers = { 'clangd', 'glsl_analyzer', 'tinymist', 'rust_analyzer', 'vhdl_ls', 'vtsls' } for _, lsp in ipairs(servers) do lspconfig[lsp].setup { -- on_attach = my_custom_on_attach, diff --git a/packages/default.nix b/packages/default.nix index 3714c40..3c66915 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -80,6 +80,7 @@ in "p7zip" "pinentry" "rust-analyzer" + "rustup" "tinymist" "unzip" "vhdl-ls" From ec823cbbadc0d3be9609ab4481e2bcc7ec4d772c Mon Sep 17 00:00:00 2001 From: stitchy Date: Sat, 21 Dec 2024 18:42:13 +0000 Subject: [PATCH 055/132] fix: osu name change --- config/hypr/binds.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/hypr/binds.conf b/config/hypr/binds.conf index df5c062..c903843 100644 --- a/config/hypr/binds.conf +++ b/config/hypr/binds.conf @@ -31,7 +31,7 @@ bindl=,switch:Lid Switch,exec,swaylock --effect-greyscale # Games bind=ALTSHIFT,C,exec,"/home/flyingstitchman/Documents/Games/Celeste/Celeste" -bind=ALTSHIFT,O,exec,osu-lazer +bind=ALTSHIFT,O,exec,osu\! bind=ALTSHIFT,R,exec,"/home/flyingstitchman/Documents/Games/factorio/bin/x64/factorio" bind=ALTSHIFT,S,exec,"/home/flyingstitchman/Documents/Games/Stardew Valley/StardewValley" bind=ALTSHIFT,T,exec,gamescope -w 1280 -h 960 -f -r 60 wine "/home/flyingstitchman/Documents/Games/Touhou 15 - Legacy of Lunatic Kingdom/th15.exe" From 8fe62f295f300879ceffcdb49dbf157e4f1a2ca7 Mon Sep 17 00:00:00 2001 From: stitchy Date: Sat, 21 Dec 2024 18:54:42 +0000 Subject: [PATCH 056/132] fix(hyprland): remove obsolete and unecessary drop shadow --- config/hypr/hyprland.conf | 7 ------- 1 file changed, 7 deletions(-) diff --git a/config/hypr/hyprland.conf b/config/hypr/hyprland.conf index 33459c4..15c1b43 100755 --- a/config/hypr/hyprland.conf +++ b/config/hypr/hyprland.conf @@ -54,13 +54,6 @@ decoration { } # Shadow - drop_shadow=0 - shadow_range=15 - shadow_render_power=2 - shadow_ignore_window=1 - col.shadow=0xdb331153 - col.shadow_inactive=0x99333333 - shadow_offset=3 2 # Other rounding=15 From 89cd96a5c5932bcd9522663f373a32a562e76118 Mon Sep 17 00:00:00 2001 From: stitchy Date: Sat, 21 Dec 2024 22:14:08 +0000 Subject: [PATCH 057/132] feat(nvim): mini.pairs --- config/nvim/nvim.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/config/nvim/nvim.lua b/config/nvim/nvim.lua index 33dbf2c..a2e55a9 100644 --- a/config/nvim/nvim.lua +++ b/config/nvim/nvim.lua @@ -134,6 +134,7 @@ require("bufferline").setup({ options = { },}) require("gitsigns").setup() require("ibl").setup() +require("mini.pairs").setup() require("mini.comment").setup() require("mini.icons").setup() require("neo-tree").setup() From 0376b2eb94bbe02303bd9281a8af7f07e077c4e0 Mon Sep 17 00:00:00 2001 From: stitchy Date: Sat, 21 Dec 2024 22:14:47 +0000 Subject: [PATCH 058/132] feat(nvim): rust formatting --- packages/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/default.nix b/packages/default.nix index 3c66915..8d18bee 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -80,6 +80,7 @@ in "p7zip" "pinentry" "rust-analyzer" + "rustfmt" "rustup" "tinymist" "unzip" From aa269aa681a0f1ad2625ad024dc9c9ed201c938b Mon Sep 17 00:00:00 2001 From: stitchy Date: Sat, 21 Dec 2024 18:38:44 -0800 Subject: [PATCH 059/132] fix: packages missing from global config --- packages/default.nix | 2 ++ users/stitchynyan/home.nix | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/default.nix b/packages/default.nix index 8d18bee..498c230 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -75,10 +75,12 @@ in "glsl_analyzer" "gnumake" "gnupg" + "lazygit" "mypy" "neofetch" "p7zip" "pinentry" + "ripgrep" "rust-analyzer" "rustfmt" "rustup" diff --git a/users/stitchynyan/home.nix b/users/stitchynyan/home.nix index 19d7638..851f9d6 100644 --- a/users/stitchynyan/home.nix +++ b/users/stitchynyan/home.nix @@ -22,7 +22,6 @@ let "imv" "isync" "kitty" - "lazygit" "libreoffice" "librewolf" "lynx" @@ -60,7 +59,6 @@ in kicad #steamvr? procps - ripgrep usbutils yt-dlp (python3.withPackages (lib.attrVals [ "matplotlib" "pyflakes" "python-lsp-server" "sympy"])) From bfeae72f731dfa44850034db29347d8d0c9adf17 Mon Sep 17 00:00:00 2001 From: stitchy Date: Sat, 21 Dec 2024 18:54:43 -0800 Subject: [PATCH 060/132] refactor: move openssh config to a mkif --- hosts/default.nix | 6 ++++++ hosts/gemini/default.nix | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hosts/default.nix b/hosts/default.nix index 508f4eb..09b7e72 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -84,6 +84,12 @@ in ''; })]; + services.openssh = lib.mkIf (config.stitchyconf.form == "server"){ + enable = true; + settings.PasswordAuthentication = false; + settings.KbdInteractiveAuthentication = false; + }; + environment.etc.hosts.mode = "0644"; nix.settings.experimental-features = [ "nix-command" "flakes" ]; }; diff --git a/hosts/gemini/default.nix b/hosts/gemini/default.nix index 5dfb66c..1a9cb36 100644 --- a/hosts/gemini/default.nix +++ b/hosts/gemini/default.nix @@ -18,12 +18,6 @@ networking.hostName = "gemini"; time.timeZone = "America/Los_Angeles"; - services.openssh = { - enable = true; - settings.PasswordAuthentication = false; - settings.KbdInteractiveAuthentication = false; - }; - # Open ports in the firewall. networking.firewall.allowedTCPPorts = [ 22 25565 ]; networking.firewall.allowedUDPPorts = [ 51820 ]; From 0c12e523534b187e7e785a12b167f353ac0654f6 Mon Sep 17 00:00:00 2001 From: stitchy Date: Sat, 21 Dec 2024 19:13:30 -0800 Subject: [PATCH 061/132] fix: hugo systemwide package --- packages/default.nix | 1 + users/stitchynyan/home.nix | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/default.nix b/packages/default.nix index 498c230..1d3d24a 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -75,6 +75,7 @@ in "glsl_analyzer" "gnumake" "gnupg" + "hugo" "lazygit" "mypy" "neofetch" diff --git a/users/stitchynyan/home.nix b/users/stitchynyan/home.nix index 851f9d6..fabc2a4 100644 --- a/users/stitchynyan/home.nix +++ b/users/stitchynyan/home.nix @@ -55,7 +55,6 @@ in home.packages = with pkgs; [ cider ngspice - hugo kicad #steamvr? procps From 0283dea2e60770c86636bc3a5ed49ecb7ad80b92 Mon Sep 17 00:00:00 2001 From: stitchy Date: Sat, 21 Dec 2024 19:17:11 -0800 Subject: [PATCH 062/132] feat!: init tanzanite host! --- flake.nix | 18 +++++++++ hosts/tanzanite/default.nix | 76 +++++++++++++++++++++++++++++++++++++ 2 files changed, 94 insertions(+) create mode 100644 hosts/tanzanite/default.nix diff --git a/flake.nix b/flake.nix index 310483f..be3e0c6 100644 --- a/flake.nix +++ b/flake.nix @@ -68,6 +68,24 @@ } ]; }; + tanzanite = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { inherit inputs; }; + modules = [ + + ./packages/default.nix + ./hosts/tanzanite/default.nix + ./users/nyadmin/default.nix + + home-manager.nixosModules.home-manager + { + home-manager.extraSpecialArgs = {inherit inputs;}; + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.nyadmin = import ./users/nyadmin/home.nix; + } + ]; + }; }; }; diff --git a/hosts/tanzanite/default.nix b/hosts/tanzanite/default.nix new file mode 100644 index 0000000..7fca921 --- /dev/null +++ b/hosts/tanzanite/default.nix @@ -0,0 +1,76 @@ +{ config, lib, pkgs, modulesPath, ... }: +let + +in { + imports = [ ../default.nix ]; + + stitchyconf = { + form = "server"; + }; + + networking.hostName = "tanzanite"; + time.timeZone = "America/Los_Angeles"; + networking.firewall = { + allowedTCPPorts = [ 22 80 222 443 ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + }; + + }; + # Non-Redundant Storage + fileSystems."/" = + { device = "/dev/disk/by-uuid/ac31f656-1882-415e-bbb7-b4d24c0af01c"; + fsType = "btrfs"; + options = [ "subvol=@nix-root" "compress=zstd"]; + }; + + fileSystems."/home" = + { device = "/dev/disk/by-uuid/ac31f656-1882-415e-bbb7-b4d24c0af01c"; + fsType = "btrfs"; + options = [ "subvol=@nix-home" "compress=zstd"]; + }; + + fileSystems."/nix/store" = + { device = "/dev/disk/by-uuid/ac31f656-1882-415e-bbb7-b4d24c0af01c"; + fsType = "btrfs"; + options = [ "subvol=@nix" "noatime" "compress=zstd"]; + }; + + fileSystems."/persist" = + { device = "/dev/disk/by-uuid/ac31f656-1882-415e-bbb7-b4d24c0af01c"; + fsType = "btrfs"; + options = [ "subvol=@persist" "compress=zstd"]; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/262D-F161"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/5c007a16-9f0f-42d0-8761-63bea3120f6d"; } + ]; + + # Static Networking + systemd.network.enable = true; + networking.useNetworkd = true; + systemd.network.networks."10-lan" = { + matchConfig.Name = "enp0s31f6"; + address = [ + "192.168.51.3/24" + ]; + routes = [ + { Gateway = "192.168.51.1"; } + ]; + linkConfig.RequiredForOnline = "routable"; + }; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + system.stateVersion = "24.11"; +} From 8bff5db0f5c587d1abda6214da1a7c1c6f669042 Mon Sep 17 00:00:00 2001 From: stitchy Date: Sat, 21 Dec 2024 19:17:45 -0800 Subject: [PATCH 063/132] feat(tanzanite): redundant storage configuration --- hosts/tanzanite/default.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/hosts/tanzanite/default.nix b/hosts/tanzanite/default.nix index 7fca921..3d928e8 100644 --- a/hosts/tanzanite/default.nix +++ b/hosts/tanzanite/default.nix @@ -18,9 +18,25 @@ in { boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; + # Redundant Storage + fileSystems."/opt/data" = { + device = "/dev/disk/by-uuid/0acaee69-07df-45f3-a2f4-65e2f3fda529"; + fsType = "btrfs"; + options = [ "subvol=@data" "compress=zstd" ]; }; + fileSystems."/opt/docker-containers" = { + device = "/dev/disk/by-uuid/0acaee69-07df-45f3-a2f4-65e2f3fda529"; + fsType = "btrfs"; + options = [ "subvol=@docker-containers" "compress=zstd" ]; }; + + fileSystems."/opt/www" = { + device = "/dev/disk/by-uuid/0acaee69-07df-45f3-a2f4-65e2f3fda529"; + fsType = "btrfs"; + options = [ "subvol=@www" "compress=zstd" ]; + }; + # Non-Redundant Storage fileSystems."/" = { device = "/dev/disk/by-uuid/ac31f656-1882-415e-bbb7-b4d24c0af01c"; From 0effd941824123b1f0aa69e462f31969c0b7c78c Mon Sep 17 00:00:00 2001 From: stitchy Date: Sat, 21 Dec 2024 19:18:09 -0800 Subject: [PATCH 064/132] feat(tanzanite): use old docker data dir --- hosts/tanzanite/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hosts/tanzanite/default.nix b/hosts/tanzanite/default.nix index 3d928e8..a475a20 100644 --- a/hosts/tanzanite/default.nix +++ b/hosts/tanzanite/default.nix @@ -10,6 +10,13 @@ in { networking.hostName = "tanzanite"; time.timeZone = "America/Los_Angeles"; + + virtualisation.docker = { + enable = true; + daemon.settings = { + data-root = "/opt/data"; + }; + }; networking.firewall = { allowedTCPPorts = [ 22 80 222 443 ]; From 38c91175518f8d3a3343410b744a26a8e9ebd21a Mon Sep 17 00:00:00 2001 From: stitchy Date: Sat, 21 Dec 2024 19:18:43 -0800 Subject: [PATCH 065/132] feat(tanzanite): acme cert configuration --- hosts/tanzanite/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/hosts/tanzanite/default.nix b/hosts/tanzanite/default.nix index a475a20..2af54d3 100644 --- a/hosts/tanzanite/default.nix +++ b/hosts/tanzanite/default.nix @@ -17,6 +17,16 @@ in { data-root = "/opt/data"; }; }; + security.acme = { + acceptTerms = true; + defaults.email = "stitchy@stitchy.moe"; + defaults.dnsProvider = "porkbun"; + defaults.environmentFile = "/persist/acme/porkbun.tokens"; + certs = { + }; + }; + + }; networking.firewall = { allowedTCPPorts = [ 22 80 222 443 ]; From 59ad1090685aae03bee47a5e5deee8524eff9c7d Mon Sep 17 00:00:00 2001 From: stitchy Date: Sat, 21 Dec 2024 19:19:45 -0800 Subject: [PATCH 066/132] feat(tanzanite): nginx configuration for website --- hosts/tanzanite/default.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/hosts/tanzanite/default.nix b/hosts/tanzanite/default.nix index 2af54d3..63414e5 100644 --- a/hosts/tanzanite/default.nix +++ b/hosts/tanzanite/default.nix @@ -17,6 +17,7 @@ in { data-root = "/opt/data"; }; }; + security.acme = { acceptTerms = true; defaults.email = "stitchy@stitchy.moe"; @@ -26,9 +27,22 @@ in { }; }; + services.nginx = { + enable = true; + recommendedProxySettings = true; + recommendedTlsSettings = true; + virtualHosts = { + "stitchy.moe" = { + enableACME = true; + forceSSL = true; + root = "/opt/www/stitchy.moe/public"; + }; }; + }; + networking.firewall = { allowedTCPPorts = [ 22 80 222 443 ]; + }; boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ ]; From 5a37fd5165a73db74b921725ea1681d38a50ee8e Mon Sep 17 00:00:00 2001 From: stitchy Date: Sat, 21 Dec 2024 19:20:17 -0800 Subject: [PATCH 067/132] feat(tanzanite): nginx configuration for forgio --- hosts/tanzanite/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hosts/tanzanite/default.nix b/hosts/tanzanite/default.nix index 63414e5..d30c4e5 100644 --- a/hosts/tanzanite/default.nix +++ b/hosts/tanzanite/default.nix @@ -37,6 +37,13 @@ in { forceSSL = true; root = "/opt/www/stitchy.moe/public"; }; + "gay.stitchy.moe" = { + enableACME = true; + forceSSL = true; + locations."/" = { + proxyPass = "http://127.0.0.1:3333"; + }; + }; }; }; From 97886fa0f0e5f18326c95a48271f5533fb68e34d Mon Sep 17 00:00:00 2001 From: stitchy Date: Sat, 21 Dec 2024 22:24:12 -0800 Subject: [PATCH 068/132] fix(tanzanite): use correct docker dir --- hosts/tanzanite/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/tanzanite/default.nix b/hosts/tanzanite/default.nix index d30c4e5..9caac34 100644 --- a/hosts/tanzanite/default.nix +++ b/hosts/tanzanite/default.nix @@ -14,7 +14,7 @@ in { virtualisation.docker = { enable = true; daemon.settings = { - data-root = "/opt/data"; + data-root = "/opt/data/docker-data"; }; }; From 4818be44d351382e2696b09d5d2743f87527cf75 Mon Sep 17 00:00:00 2001 From: stitchy Date: Sat, 21 Dec 2024 22:24:51 -0800 Subject: [PATCH 069/132] feat(tanzanite): nginx config for matrix --- hosts/tanzanite/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hosts/tanzanite/default.nix b/hosts/tanzanite/default.nix index 9caac34..2ceaf38 100644 --- a/hosts/tanzanite/default.nix +++ b/hosts/tanzanite/default.nix @@ -44,6 +44,13 @@ in { proxyPass = "http://127.0.0.1:3333"; }; }; + "matrix.stitchy.moe" = { + enableACME = true; + forceSSL = true; + locations."/" = { + proxyPass = "http://127.0.0.1:9008"; + }; + }; }; }; @@ -51,6 +58,7 @@ in { allowedTCPPorts = [ 22 80 222 443 ]; }; + # Boot Config boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; From 5544f0d6c092fe85f052d7a3ad7f503a29831d31 Mon Sep 17 00:00:00 2001 From: stitchy Date: Sun, 22 Dec 2024 02:50:33 -0800 Subject: [PATCH 070/132] fix(tanzanite): configure custom 404 page --- hosts/tanzanite/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hosts/tanzanite/default.nix b/hosts/tanzanite/default.nix index 2ceaf38..2c4e44c 100644 --- a/hosts/tanzanite/default.nix +++ b/hosts/tanzanite/default.nix @@ -36,6 +36,12 @@ in { enableACME = true; forceSSL = true; root = "/opt/www/stitchy.moe/public"; + extraConfig = '' + error_page 404 /404.html; + location = /404.html { + internal; + } + ''; }; "gay.stitchy.moe" = { enableACME = true; From f60c305e7e815e8ce60058f253d96e6ccf63e943 Mon Sep 17 00:00:00 2001 From: stitchy Date: Sun, 22 Dec 2024 20:53:39 -0800 Subject: [PATCH 071/132] fix(tanzanite): matrix not being able to sign in --- hosts/tanzanite/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/hosts/tanzanite/default.nix b/hosts/tanzanite/default.nix index 2c4e44c..85c940e 100644 --- a/hosts/tanzanite/default.nix +++ b/hosts/tanzanite/default.nix @@ -37,6 +37,7 @@ in { forceSSL = true; root = "/opt/www/stitchy.moe/public"; extraConfig = '' + add_header 'Access-Control-Allow-Origin' '*' always; error_page 404 /404.html; location = /404.html { internal; From 97e544b3f2d97867e1782414daa0e4b213f6e77f Mon Sep 17 00:00:00 2001 From: stitchy Date: Sun, 22 Dec 2024 20:53:56 -0800 Subject: [PATCH 072/132] fix(tanzanite): sliding-sync proxy --- hosts/tanzanite/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hosts/tanzanite/default.nix b/hosts/tanzanite/default.nix index 85c940e..0130f96 100644 --- a/hosts/tanzanite/default.nix +++ b/hosts/tanzanite/default.nix @@ -58,6 +58,13 @@ in { proxyPass = "http://127.0.0.1:9008"; }; }; + "syncv3.stitchy.moe" = { + enableACME = true; + forceSSL = true; + locations."/" = { + proxyPass = "http://127.0.0.1:8008"; + }; + }; }; }; From d98e01928e38fe18e611945d499747a386d14980 Mon Sep 17 00:00:00 2001 From: stitchy Date: Sun, 22 Dec 2024 22:20:31 -0800 Subject: [PATCH 073/132] feat(tanzanite): open coturn ports This opening the ports required for my coturn docker container. In the near future, I would like to use agenix and do a fully nix-based coturn configuration. It doesn't have any persistant data, so it should be a good candidate to moving to a 100% nix based config. --- hosts/tanzanite/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hosts/tanzanite/default.nix b/hosts/tanzanite/default.nix index 0130f96..3a9a1cc 100644 --- a/hosts/tanzanite/default.nix +++ b/hosts/tanzanite/default.nix @@ -24,6 +24,7 @@ in { defaults.dnsProvider = "porkbun"; defaults.environmentFile = "/persist/acme/porkbun.tokens"; certs = { + "turn.stitchy.moe" = {}; }; }; @@ -69,7 +70,11 @@ in { }; networking.firewall = { - allowedTCPPorts = [ 22 80 222 443 ]; + allowedTCPPorts = [ 22 80 222 443 3478 5349 ]; + allowedUDPPorts = [ 3478 5349 ]; + allowedUDPPortRanges = [ + { from = 19000; to = 20000; } + ]; }; # Boot Config From ea053ca45d5f7580e340c528031d32b1334b747e Mon Sep 17 00:00:00 2001 From: stitchy Date: Mon, 23 Dec 2024 01:08:18 -0800 Subject: [PATCH 074/132] fix(tanzanite): sliding-sync proxy bad gateway --- hosts/tanzanite/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/tanzanite/default.nix b/hosts/tanzanite/default.nix index 3a9a1cc..184c328 100644 --- a/hosts/tanzanite/default.nix +++ b/hosts/tanzanite/default.nix @@ -63,7 +63,7 @@ in { enableACME = true; forceSSL = true; locations."/" = { - proxyPass = "http://127.0.0.1:8008"; + proxyPass = "http://127.0.0.1:8009"; }; }; }; From ab9794ced11a954e44f1d0f581e0558b624c4c72 Mon Sep 17 00:00:00 2001 From: stitchy Date: Tue, 24 Dec 2024 06:11:32 -0800 Subject: [PATCH 075/132] feat(nvim): spaceman directories for tanzanite --- config/nvim/nvim.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/nvim/nvim.lua b/config/nvim/nvim.lua index a2e55a9..66b367a 100644 --- a/config/nvim/nvim.lua +++ b/config/nvim/nvim.lua @@ -153,11 +153,13 @@ require("spaceman").setup({ "/etc/nixos", { "config", "/etc/nixos/config/" }, { "home", "~/" }, + "/opt/www/stitchy.moe" , }, directories = { "~/Documents/Classes", "~/Documents/Repos", "~/Documents/Repos/ExtremeHeatTransfer", + "/opt/docker-containers/", }, use_default_keymaps = true, hooks = { From a1885849a2eee9dc52f39ac2a932d73bd6da1c71 Mon Sep 17 00:00:00 2001 From: stitchy Date: Tue, 24 Dec 2024 13:08:10 +0000 Subject: [PATCH 076/132] feat(nvim): nix lsp --- config/nvim/nvim.lua | 2 +- packages/default.nix | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config/nvim/nvim.lua b/config/nvim/nvim.lua index 66b367a..d518a0d 100644 --- a/config/nvim/nvim.lua +++ b/config/nvim/nvim.lua @@ -37,7 +37,7 @@ local capabilities = require("cmp_nvim_lsp").default_capabilities() local lspconfig = require('lspconfig') -- Enable some language servers with the additional completion capabilities offered by nvim-cmp -local servers = { 'clangd', 'glsl_analyzer', 'tinymist', 'rust_analyzer', 'vhdl_ls', 'vtsls' } +local servers = { 'clangd', 'glsl_analyzer', 'nixd', 'tinymist', 'rust_analyzer', 'vhdl_ls', 'vtsls' } for _, lsp in ipairs(servers) do lspconfig[lsp].setup { -- on_attach = my_custom_on_attach, diff --git a/packages/default.nix b/packages/default.nix index 1d3d24a..80d93e5 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -79,6 +79,7 @@ in "lazygit" "mypy" "neofetch" + "nixd" "p7zip" "pinentry" "ripgrep" From f66ed49776ae7a6b22a232ff69f4efd7aa7e7db3 Mon Sep 17 00:00:00 2001 From: stitchy Date: Wed, 25 Dec 2024 04:17:34 +0000 Subject: [PATCH 077/132] refactor(hyprland): faster animations --- config/hypr/hyprland.conf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/hypr/hyprland.conf b/config/hypr/hyprland.conf index 15c1b43..dfc8fb7 100755 --- a/config/hypr/hyprland.conf +++ b/config/hypr/hyprland.conf @@ -64,14 +64,14 @@ decoration { animations { enabled=true - bezier = myBezier, 0.05, 0.9, 0.1, 1.05 + bezier = fast, 0.41, 0.6, 0.02, 0.93 - animation = windows, 1, 7, myBezier + animation = windows, 1, 1, fast animation = windowsOut, 1, 7, default, popin 80% animation = border, 1, 10, default animation = borderangle, 1, 8, default - animation = fade, 1, 7, default - animation = workspaces, 1, 6, default + animation = fade, 1, 3, default + animation = workspaces, 1, 1, fast } dwindle { From c87558574d5666fdd0776087922b9650c65edf49 Mon Sep 17 00:00:00 2001 From: stitchy Date: Wed, 25 Dec 2024 04:26:35 +0000 Subject: [PATCH 078/132] chore(hyprland): update colors --- config/hypr/hyprland.conf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/config/hypr/hyprland.conf b/config/hypr/hyprland.conf index dfc8fb7..19c3445 100755 --- a/config/hypr/hyprland.conf +++ b/config/hypr/hyprland.conf @@ -27,7 +27,7 @@ input { accel_profile=adaptive touchpad { - natural_scroll=false + natural_scroll=false disable_while_typing=false } @@ -51,6 +51,9 @@ decoration { passes=3 ignore_opacity=false new_optimizations=true + noise=.03 + vibrancy=.2 + vibrancy_darkness=0.5 } # Shadow From 64d37c19dac7341f8e660d1514513567817b6cfe Mon Sep 17 00:00:00 2001 From: stitchy Date: Wed, 25 Dec 2024 12:35:54 +0000 Subject: [PATCH 079/132] chore: rebind plumbing keys --- config/hypr/binds.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/hypr/binds.conf b/config/hypr/binds.conf index c903843..ab16ad7 100644 --- a/config/hypr/binds.conf +++ b/config/hypr/binds.conf @@ -6,8 +6,8 @@ bind=ALT,A,exec,footclient nvim bind=ALT,B,exec,swaylock bind=ALT,E,exec,dolphin -bind=ALT,F,exec,${XDG_CONFIG_HOME:-~/.config}/hypr/plumbing.sh -bind=ALT,G,exec,${XDG_CONFIG_HOME:-~/.config}/hypr/plumbing.sh clip +bind=ALT,G,exec,${XDG_CONFIG_HOME:-~/.config}/hypr/plumbing.sh +bind=ALT,C,exec,${XDG_CONFIG_HOME:-~/.config}/hypr/plumbing.sh clip bind=ALT,RETURN,exec,footclient bindr=ALTSHIFT,RETURN,exec,pkill wofi || wofi -S drun --allow-images From 071f45d1117f30d6858bf4e773b7c4925a5b7845 Mon Sep 17 00:00:00 2001 From: stitchy Date: Wed, 25 Dec 2024 12:36:15 +0000 Subject: [PATCH 080/132] chore: remove fullscreen keybind --- config/hypr/binds.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/config/hypr/binds.conf b/config/hypr/binds.conf index ab16ad7..f6bebec 100644 --- a/config/hypr/binds.conf +++ b/config/hypr/binds.conf @@ -15,7 +15,6 @@ bindr=ALTSHIFT,RETURN,exec,pkill wofi || wofi -S drun --allow-images # Basic Actions bind=ALT,Q,killactive, bind=ALT,V,togglefloating, -bind=ALTSHIFT,F,fullscreen,1 bind=ALTSHIFT,M,fullscreen,0 bind=SUPER,M,exec,hyprctl dispatch exit 0 From 8fd1741c7fc81fbffa4e6be3261b820b2441b0a2 Mon Sep 17 00:00:00 2001 From: stitchy Date: Wed, 25 Dec 2024 12:36:41 +0000 Subject: [PATCH 081/132] feat: special workspaces --- config/hypr/binds.conf | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/config/hypr/binds.conf b/config/hypr/binds.conf index f6bebec..4bee271 100644 --- a/config/hypr/binds.conf +++ b/config/hypr/binds.conf @@ -65,6 +65,16 @@ bind=ALTSHIFT,k,swapwindow, u bind=ALTSHIFT,h,swapwindow, l bind=ALTSHIFT,l,swapwindow, r +## Special Workspaces ## + +# Firefox +bind=ALT,F,togglespecialworkspace,firefox +bind=ALTSHIFT,F,movetoworkspace,special:firefox + +# Chat Programs +bind=ALT,D,togglespecialworkspace,chat +bind=ALTSHIFT,D,movetoworkspace,special:chat + # Switch Workspace Bindings bind=ALT,1,workspace,1 bind=ALT,2,workspace,2 From 205575056c767fc241b476a374e9dda0bcc94e8a Mon Sep 17 00:00:00 2001 From: stitchy Date: Wed, 25 Dec 2024 12:38:18 +0000 Subject: [PATCH 082/132] refactor: change window resizing keybinds --- config/hypr/binds.conf | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/config/hypr/binds.conf b/config/hypr/binds.conf index 4bee271..7db93a1 100644 --- a/config/hypr/binds.conf +++ b/config/hypr/binds.conf @@ -99,24 +99,16 @@ bind=ALTSHIFT,8,movetoworkspace,8 bind=ALTSHIFT,9,movetoworkspace,9 bind=ALTSHIFT,10,movetoworkspace,0 -# Submap for resizing windows -bind=ALT,R,submap,resize # will switch to a submap called resize +## Resizing Windows ## +binde=SUPER,L,resizeactive,10 0 +binde=SUPER,H,resizeactive,-10 0 +binde=SUPER,K,resizeactive,0 -10 +binde=SUPER,J,resizeactive,0 10 -submap=resize # will start a submap called "resize" - -binde=,L,resizeactive,10 0 -binde=,H,resizeactive,-10 0 -binde=,K,resizeactive,0 -10 -binde=,J,resizeactive,0 10 - -binde=SHIFT,L,resizeactive,50 0 -binde=SHIFT,H,resizeactive,-50 0 -binde=SHIFT,K,resizeactive,0 -50 -binde=SHIFT,J,resizeactive,0 50 - -bind=ALT,R,submap,reset # use reset to go back to the global submap - -submap=reset # will reset the submap, meaning end the current one and return to the global one. +binde=SUPERSHIFT,L,resizeactive,50 0 +binde=SUPERSHIFT,H,resizeactive,-50 0 +binde=SUPERSHIFT,K,resizeactive,0 -50 +binde=SUPERSHIFT,J,resizeactive,0 50 # Submap to disable all keybinds (for blender) bind=ALT,U,submap,clean From deb0db6ec02f4871100c6e0c8d44fa2e43c691fa Mon Sep 17 00:00:00 2001 From: stitchy Date: Wed, 25 Dec 2024 12:39:14 +0000 Subject: [PATCH 083/132] fix: special workspace slow to appear --- config/hypr/hyprland.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/config/hypr/hyprland.conf b/config/hypr/hyprland.conf index 19c3445..0b1addc 100755 --- a/config/hypr/hyprland.conf +++ b/config/hypr/hyprland.conf @@ -75,6 +75,7 @@ animations { animation = borderangle, 1, 8, default animation = fade, 1, 3, default animation = workspaces, 1, 1, fast + animation = specialWorkspace, 0 } dwindle { From 2f1b3fc090fb68ec577d2c695fc506022db59ef2 Mon Sep 17 00:00:00 2001 From: stitchy Date: Wed, 25 Dec 2024 12:39:51 +0000 Subject: [PATCH 084/132] chore(hyprland): remove shadow --- config/hypr/hyprland.conf | 2 -- 1 file changed, 2 deletions(-) diff --git a/config/hypr/hyprland.conf b/config/hypr/hyprland.conf index 0b1addc..a9844a5 100755 --- a/config/hypr/hyprland.conf +++ b/config/hypr/hyprland.conf @@ -56,8 +56,6 @@ decoration { vibrancy_darkness=0.5 } - # Shadow - # Other rounding=15 inactive_opacity=.8 From 1149888ef8ca29f86d138d0d2ee56bc2ee9a8ccd Mon Sep 17 00:00:00 2001 From: stitchy Date: Wed, 25 Dec 2024 21:39:59 +0000 Subject: [PATCH 085/132] fix: keybind conflict (ALT D) --- config/hypr/binds.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/hypr/binds.conf b/config/hypr/binds.conf index 7db93a1..7719974 100644 --- a/config/hypr/binds.conf +++ b/config/hypr/binds.conf @@ -72,8 +72,8 @@ bind=ALT,F,togglespecialworkspace,firefox bind=ALTSHIFT,F,movetoworkspace,special:firefox # Chat Programs -bind=ALT,D,togglespecialworkspace,chat -bind=ALTSHIFT,D,movetoworkspace,special:chat +bind=ALT,S,togglespecialworkspace,chat +bind=ALTSHIFT,S,movetoworkspace,special:chat # Switch Workspace Bindings bind=ALT,1,workspace,1 From 00f735aa4f07ab95d222c3547c3c9d383257e920 Mon Sep 17 00:00:00 2001 From: stitchy Date: Mon, 30 Dec 2024 08:59:06 +0000 Subject: [PATCH 086/132] fix: foot fix when not in root --- config/hypr/windowrules.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/hypr/windowrules.conf b/config/hypr/windowrules.conf index ee7fa91..d36264a 100644 --- a/config/hypr/windowrules.conf +++ b/config/hypr/windowrules.conf @@ -2,7 +2,7 @@ # Application Fixes # Foot Fullscreen Transparency Fix -windowrulev2 = syncfullscreen 0, class:(foot), title:(foot) +windowrulev2 = syncfullscreen 0, initialClass:(footclient), initialTitle:(foot) windowrule=nofocus,ibus,^(Ibus-ui-gtk3)$ From e31a8c520f3ce20a3af8f499e8ac423364ebbccd Mon Sep 17 00:00:00 2001 From: stitchy Date: Sun, 26 Jan 2025 05:35:41 +0000 Subject: [PATCH 087/132] fix: binding paths incorrect --- config/hypr/binds.conf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/hypr/binds.conf b/config/hypr/binds.conf index 7719974..781b97d 100644 --- a/config/hypr/binds.conf +++ b/config/hypr/binds.conf @@ -29,11 +29,11 @@ bindl=,switch:Lid Switch,exec,swaylock --effect-greyscale # Games -bind=ALTSHIFT,C,exec,"/home/flyingstitchman/Documents/Games/Celeste/Celeste" +bind=ALTSHIFT,C,exec,steam-run "~/Documents/Games/Celeste/Celeste" bind=ALTSHIFT,O,exec,osu\! -bind=ALTSHIFT,R,exec,"/home/flyingstitchman/Documents/Games/factorio/bin/x64/factorio" -bind=ALTSHIFT,S,exec,"/home/flyingstitchman/Documents/Games/Stardew Valley/StardewValley" -bind=ALTSHIFT,T,exec,gamescope -w 1280 -h 960 -f -r 60 wine "/home/flyingstitchman/Documents/Games/Touhou 15 - Legacy of Lunatic Kingdom/th15.exe" +bind=ALTSHIFT,R,exec,steam-run "~/Documents/Games/factorio/bin/x64/factorio" +bind=ALTSHIFT,S,exec,steam-run "~/Documents/Games/Stardew Valley/StardewValley" +bind=ALTSHIFT,T,exec,gamescope -w 1280 -h 960 -f -r 60 wine "~/Documents/Games/Touhou 15 - Legacy of Lunatic Kingdom/th15.exe" # Window Moving From 4791277f2e35ab55c88963c9f7acc5b504ec3695 Mon Sep 17 00:00:00 2001 From: stitchy Date: Fri, 31 Jan 2025 02:57:53 +0000 Subject: [PATCH 088/132] fix(lappy): add missing persist mount --- hosts/lappy/hardware-configuration.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hosts/lappy/hardware-configuration.nix b/hosts/lappy/hardware-configuration.nix index e377b09..48c891e 100644 --- a/hosts/lappy/hardware-configuration.nix +++ b/hosts/lappy/hardware-configuration.nix @@ -26,6 +26,11 @@ fsType = "btrfs"; options = [ "compress=zstd" "subvol=@nix-store" "noatime"]; }; + "/persist" = { + device = "/dev/disk/by-uuid/d626409d-8166-45c2-a168-09dfab31b8a4"; + fsType = "btrfs"; + options = [ "compress=zstd" "subvol=@persist" ]; + }; }; boot.initrd.luks.devices."luksdev".device = "/dev/disk/by-uuid/100a5596-671b-48ba-a1d1-0723559baf87"; From cba53547dba982261676d470c95a33d8311763fd Mon Sep 17 00:00:00 2001 From: stitchy Date: Thu, 9 Jan 2025 19:05:00 -0800 Subject: [PATCH 089/132] feat(tanzanite): add files location to website --- hosts/tanzanite/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hosts/tanzanite/default.nix b/hosts/tanzanite/default.nix index 184c328..0c1bc3f 100644 --- a/hosts/tanzanite/default.nix +++ b/hosts/tanzanite/default.nix @@ -43,6 +43,9 @@ in { location = /404.html { internal; } + location ^~/files/ { + alias /opt/www/files/; + } ''; }; "gay.stitchy.moe" = { From d3869fd58ed10f4c0b62475ef2cfc4255ce81b4b Mon Sep 17 00:00:00 2001 From: stitchy Date: Thu, 9 Jan 2025 19:05:13 -0800 Subject: [PATCH 090/132] feat(tanzanite): add shaders location to website --- hosts/tanzanite/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hosts/tanzanite/default.nix b/hosts/tanzanite/default.nix index 0c1bc3f..fdd211c 100644 --- a/hosts/tanzanite/default.nix +++ b/hosts/tanzanite/default.nix @@ -43,6 +43,9 @@ in { location = /404.html { internal; } + location ^~/shaders/ { + alias /opt/www/shader-web-test/; + } location ^~/files/ { alias /opt/www/files/; } From 84e0e0688b7d95e3f818417620b56988994a3024 Mon Sep 17 00:00:00 2001 From: stitchy Date: Tue, 4 Feb 2025 11:24:14 -0800 Subject: [PATCH 091/132] fix(tanzanite): proper upload size --- hosts/tanzanite/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/hosts/tanzanite/default.nix b/hosts/tanzanite/default.nix index fdd211c..745dadf 100644 --- a/hosts/tanzanite/default.nix +++ b/hosts/tanzanite/default.nix @@ -32,6 +32,7 @@ in { enable = true; recommendedProxySettings = true; recommendedTlsSettings = true; + clientMaxBodySize = "100m"; virtualHosts = { "stitchy.moe" = { enableACME = true; From 1849c1b471dbf3c0b19dbca301014ec7ea5d2c07 Mon Sep 17 00:00:00 2001 From: stitchy Date: Wed, 5 Feb 2025 02:05:16 +0000 Subject: [PATCH 092/132] feat(nvim): add C and CPP formatting --- config/nvim/nvim.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/config/nvim/nvim.lua b/config/nvim/nvim.lua index d518a0d..6ad3449 100644 --- a/config/nvim/nvim.lua +++ b/config/nvim/nvim.lua @@ -110,6 +110,7 @@ require("conform").setup({ html = { "prettier", }, javascript = { "prettier", }, python = { "black" }, + C = { "clang-format"}, }, format_on_save = { timeout_ms = 500, From c332aedab00ab2b0d9fbd68ca56db26e8a4f15ad Mon Sep 17 00:00:00 2001 From: stitchy Date: Fri, 7 Feb 2025 05:36:48 +0000 Subject: [PATCH 093/132] fix(swaylock): unbreak font and colors --- config/swaylock/config | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/config/swaylock/config b/config/swaylock/config index 113fb7b..23cc302 100644 --- a/config/swaylock/config +++ b/config/swaylock/config @@ -5,11 +5,13 @@ indicator-radius=100 indicator-thickness=7 effect-blur=7x5 effect-vignette=0.5:0.5 -ring-color=bb00cc -key-hl-color=880033 +ring-color=c6a0f6 +text-color=8aadf4 +key-hl-color=ed8796 line-color=00000000 -inside-color 00000088 -separator-color 00000000 +inside-color=00000088 +separator-color=00000000 fade-in=0.2 -datestr="%a, %b %e %Y" -greyscale +datestr=%a, %b %e %Y +effect-greyscale +font=IPAGothic From d62d8911336e9b4559be53dfb93775e34f46d054 Mon Sep 17 00:00:00 2001 From: stitchy Date: Fri, 7 Feb 2025 05:39:28 +0000 Subject: [PATCH 094/132] chore(hyprland): update binding --- config/hypr/binds.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/hypr/binds.conf b/config/hypr/binds.conf index 781b97d..9dd9949 100644 --- a/config/hypr/binds.conf +++ b/config/hypr/binds.conf @@ -25,7 +25,7 @@ bind=SHIFTSUPER,Print,exec,hyprctl -j activewindow | jq -r '"\(.at[0]),\(.at[1]) bind=SUPER,Print,exec,hyprctl -j activewindow | jq -r '"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"' | grim -g - Downloads/screenshot.jpeg # trigger when the switch is toggled -bindl=,switch:Lid Switch,exec,swaylock --effect-greyscale +bindl=,switch:Lid Switch,exec,swaylock # Games From 19302b6d29ffe81449d5e5de40d15a0ac0f8c259 Mon Sep 17 00:00:00 2001 From: stitchy Date: Sat, 8 Feb 2025 23:44:32 +0000 Subject: [PATCH 095/132] feat(nvim): lazygit popup panel --- config/nvim/lua/keymap.lua | 1 + config/nvim/nvim.lua | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/config/nvim/lua/keymap.lua b/config/nvim/lua/keymap.lua index 6336d20..bea7ae5 100644 --- a/config/nvim/lua/keymap.lua +++ b/config/nvim/lua/keymap.lua @@ -33,6 +33,7 @@ map("n", ">", "BufferLineMoveNext", { desc = "Move buffer right -- ToggleTerm Bindings map("n", "a", "ToggleTerm name=main", { desc = "Floating Terminal", silent = true }) +map("n", "g", "lua _lazygit_toggle()", {noremap = true, silent = true}) -- Undotree map("n", "fu", "Telescope undo") diff --git a/config/nvim/nvim.lua b/config/nvim/nvim.lua index 6ad3449..348b6b4 100644 --- a/config/nvim/nvim.lua +++ b/config/nvim/nvim.lua @@ -168,3 +168,10 @@ require("spaceman").setup({ } }) +-- Lazygit Panel +local Terminal = require('toggleterm.terminal').Terminal +local lazygit = Terminal:new({ cmd = "lazygit", hidden = true }) + +function _lazygit_toggle() + lazygit:toggle() +end From 9d507f861981fbeb86b24a108a93e6daa6183d3d Mon Sep 17 00:00:00 2001 From: stitchy Date: Sat, 8 Feb 2025 23:46:17 +0000 Subject: [PATCH 096/132] feat(foot): catpuccin terminal colors --- config/foot/catppuccin-macchiato.ini | 37 ++++++++++++++++++++++++++++ config/foot/foot.ini | 10 +++----- 2 files changed, 41 insertions(+), 6 deletions(-) create mode 100644 config/foot/catppuccin-macchiato.ini diff --git a/config/foot/catppuccin-macchiato.ini b/config/foot/catppuccin-macchiato.ini new file mode 100644 index 0000000..3dd9312 --- /dev/null +++ b/config/foot/catppuccin-macchiato.ini @@ -0,0 +1,37 @@ +[cursor] +color=181926 f4dbd6 + +[colors] +foreground=cad3f5 +background=24273a + +regular0=494d64 +regular1=ed8796 +regular2=a6da95 +regular3=eed49f +regular4=8aadf4 +regular5=f5bde6 +regular6=8bd5ca +regular7=b8c0e0 + +bright0=5b6078 +bright1=ed8796 +bright2=a6da95 +bright3=eed49f +bright4=8aadf4 +bright5=f5bde6 +bright6=8bd5ca +bright7=a5adcb + +16=f5a97f +17=f4dbd6 +18=c6a0f6 + +selection-foreground=cad3f5 +selection-background=454a5f + +search-box-no-match=181926 ed8796 +search-box-match=cad3f5 363a4f + +jump-labels=181926 f5a97f +urls=8aadf4 diff --git a/config/foot/foot.ini b/config/foot/foot.ini index 6eca261..3190d53 100644 --- a/config/foot/foot.ini +++ b/config/foot/foot.ini @@ -1,14 +1,12 @@ # -*- conf -*- +[main] +include=~/.config/foot/catppuccin-macchiato.ini + font=monospace:size=10 [colors] - alpha = .65 - foreground=dcdccc - background=393052 - -[cursor] - color=111111 dcdccc +alpha = .65 [key-bindings] spawn-terminal=Control+Shift+n From c716b55ad422c89d4d6f5412f107a5f064167507 Mon Sep 17 00:00:00 2001 From: stitchy Date: Sat, 8 Feb 2025 23:51:49 +0000 Subject: [PATCH 097/132] chore: remove streamline imports --- flake.nix | 4 ---- hosts/default.nix | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/flake.nix b/flake.nix index be3e0c6..5367d17 100644 --- a/flake.nix +++ b/flake.nix @@ -15,7 +15,6 @@ specialArgs = { inherit inputs; }; modules = [ - ./packages/default.nix ./hosts/malachite/default.nix ./users/stitchynyan/default.nix nixpkgs-xr.nixosModules.nixpkgs-xr @@ -35,7 +34,6 @@ modules = [ nixos-hardware.nixosModules.framework-12th-gen-intel - ./packages/default.nix ./hosts/lappy/default.nix ./users/stitchynyan/default.nix @@ -53,7 +51,6 @@ specialArgs = { inherit inputs; }; modules = [ - ./packages/default.nix ./hosts/gemini/default.nix ./users/nyadmin/default.nix ./users/cirno/default.nix @@ -73,7 +70,6 @@ specialArgs = { inherit inputs; }; modules = [ - ./packages/default.nix ./hosts/tanzanite/default.nix ./users/nyadmin/default.nix diff --git a/hosts/default.nix b/hosts/default.nix index 09b7e72..84c5923 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -6,7 +6,7 @@ let in { options = {}; - imports = [ ../packages/default.nix ]; + imports = [ ../packages/default.nix ../users/default.nix ]; config = { hardware = { From 1ecaee308cbceff4b1a45f1a43e83972835ffad2 Mon Sep 17 00:00:00 2001 From: stitchy Date: Sun, 9 Feb 2025 00:51:49 +0000 Subject: [PATCH 098/132] feat(swaylock): new visual This refactors the config to be a lot more readable. In addition it adds: * New Wallpaper * Different Indicator Position * Removes Startup Delay * New Colors This removes another program from the list that I never bothered to make look good. --- config/swaylock/config | 47 +++++++++++++++++++++++++++++------------- 1 file changed, 33 insertions(+), 14 deletions(-) diff --git a/config/swaylock/config b/config/swaylock/config index 23cc302..4cdc904 100644 --- a/config/swaylock/config +++ b/config/swaylock/config @@ -1,17 +1,36 @@ -screenshots +## Default Settings ## + clock -indicator -indicator-radius=100 -indicator-thickness=7 -effect-blur=7x5 -effect-vignette=0.5:0.5 -ring-color=c6a0f6 -text-color=8aadf4 -key-hl-color=ed8796 -line-color=00000000 -inside-color=00000088 -separator-color=00000000 -fade-in=0.2 datestr=%a, %b %e %Y -effect-greyscale +image=~/.config/wallpapers/girls-last-tour-chibi-eepi.jpg + +## Text Settings ## + +text-color=8aadf4 font=IPAGothic + +## Indicator Settings ## + +indicator +indicator-radius=140 +indicator-thickness=7 +indicator-x-position=1200 +indicator-y-position=500 + +## Ring Colors ## + +ring-color=a6da95 +ring-clear-color=eed49f +ring-ver-color=8aadf4 +ring-wrong-color=ed8796 + +line-color=00000000 +separator-color=00000000 +key-hl-color=c6a0f6 + +## Inside Colors ## + +inside-color=00000088 +inside-clear-color=eed49f +inside-ver-color=8aadf4 +inside-wrong-color=ed8796 From abbf8000dbadbda267ee45d52224aceaff4a4ab9 Mon Sep 17 00:00:00 2001 From: stitchy Date: Fri, 14 Feb 2025 04:18:43 +0000 Subject: [PATCH 099/132] fix(nvim): rust_analyzer check gated features --- config/nvim/nvim.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/config/nvim/nvim.lua b/config/nvim/nvim.lua index 348b6b4..d56ae46 100644 --- a/config/nvim/nvim.lua +++ b/config/nvim/nvim.lua @@ -42,6 +42,13 @@ for _, lsp in ipairs(servers) do lspconfig[lsp].setup { -- on_attach = my_custom_on_attach, capabilities = capabilities, + settings = { + ['rust-analyzer'] = { + cargo = { + allFeatures = true; + } + } + } } end From c34fea90fe00f4beeb4ab150038238eb5602dd6d Mon Sep 17 00:00:00 2001 From: stitchy Date: Fri, 14 Feb 2025 22:10:26 +0000 Subject: [PATCH 100/132] fix(mutt): notifications now showing on sync service --- users/stitchynyan/home.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/users/stitchynyan/home.nix b/users/stitchynyan/home.nix index fabc2a4..2e336fa 100644 --- a/users/stitchynyan/home.nix +++ b/users/stitchynyan/home.nix @@ -118,7 +118,7 @@ in "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus" "DISPLAY=:0" "MBSYNCRC=/home/stitchynyan/.config/mbsync/config" - "PATH=$PATH:${lib.makeBinPath (lib.attrVals [ "busybox" "cyrus-sasl-xoauth2" "gnupg" "isync" "notify" "notmuch" "pass" "perl" "python3" ] pkgs)}" + "PATH=$PATH:${lib.makeBinPath (lib.attrVals [ "busybox" "cyrus-sasl-xoauth2" "gnupg" "isync" "libnotify" "notmuch" "pass" "perl" "python3" ] pkgs)}" "SASL_PATH=/run/current-system/sw/lib/sasl2" "WAYLAND_DISPLAY=wayland-1" ]; From 9f19b0e60eaa825383d153bf4113f07e662854bd Mon Sep 17 00:00:00 2001 From: stitchy Date: Sat, 15 Feb 2025 07:41:27 +0000 Subject: [PATCH 101/132] feat(eww): add power button click --- config/eww/eww.yuck | 4 +++- users/stitchynyan/home.nix | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/config/eww/eww.yuck b/config/eww/eww.yuck index 7870b16..aa76a33 100644 --- a/config/eww/eww.yuck +++ b/config/eww/eww.yuck @@ -83,7 +83,9 @@ :char "󰃠"))) (defwidget power [] - (box :class "power" :valign "end" "⏻")) + (eventbox + :onclick "hyprctl dispatch exec 'wlogout'" + (box :class "power" :valign "end" "⏻"))) (defwidget tray [] (systray :orientation "v" :icon-size 20)) diff --git a/users/stitchynyan/home.nix b/users/stitchynyan/home.nix index 2e336fa..d45623b 100644 --- a/users/stitchynyan/home.nix +++ b/users/stitchynyan/home.nix @@ -43,6 +43,7 @@ let "slurp" "swaylock-effects" "tofi" + "wlogout" "wofi" "zathura" ] pkgs ++ [ pkgs.hunspellDicts.en_US ]; From 5038eeacfa600ff3a202d4e074f6c63cb07d19c6 Mon Sep 17 00:00:00 2001 From: stitchy Date: Sat, 22 Feb 2025 22:33:58 +0000 Subject: [PATCH 102/132] chore: flake update (temp blender broken) --- flake.lock | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/flake.lock b/flake.lock index a5b91fb..2795db6 100644 --- a/flake.lock +++ b/flake.lock @@ -2,12 +2,12 @@ "nodes": { "flake-compat": { "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "revCount": 57, + "lastModified": 1733328505, + "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", + "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", + "revCount": 69, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.1.0/01948eb7-9cba-704f-bbf3-3fa956735b52/source.tar.gz" }, "original": { "type": "tarball", @@ -39,11 +39,11 @@ ] }, "locked": { - "lastModified": 1734093295, - "narHash": "sha256-hSwgGpcZtdDsk1dnzA0xj5cNaHgN9A99hRF/mxMtwS4=", + "lastModified": 1739198052, + "narHash": "sha256-fvAgCGK2phagbKv2S4YH4AIM566TKasfWMqYl3c3mPQ=", "owner": "nix-community", "repo": "home-manager", - "rev": "66c5d8b62818ec4c1edb3e941f55ef78df8141a8", + "rev": "b0bd29bb4b8df265b13bbb4a6639afa74faaa831", "type": "github" }, "original": { @@ -56,11 +56,11 @@ "mobile-nixos": { "flake": false, "locked": { - "lastModified": 1733700802, - "narHash": "sha256-YuhtFJLVW3d3zr5+VoyApm6PUFoIHhOCi+VOfi2LNzA=", + "lastModified": 1737346419, + "narHash": "sha256-YHByUFujAnfJJ2JnhHIJyohECr5o0EDmuRdyUcvnZGQ=", "owner": "nixos", "repo": "mobile-nixos", - "rev": "0532a626e69fa9451e50297011008851527b9259", + "rev": "1498c4d7fd59026479469efdbfe30c78a7300d89", "type": "github" }, "original": { @@ -71,11 +71,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1733861262, - "narHash": "sha256-+jjPup/ByS0LEVIrBbt7FnGugJgLeG9oc+ivFASYn2U=", + "lastModified": 1738816619, + "narHash": "sha256-5yRlg48XmpcX5b5HesdGMOte+YuCy9rzQkJz+imcu6I=", "owner": "Nixos", "repo": "nixos-hardware", - "rev": "cf737e2eba82b603f54f71b10cb8fd09d22ce3f5", + "rev": "2eccff41bab80839b1d25b303b53d339fbb07087", "type": "github" }, "original": { @@ -87,11 +87,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1734119587, - "narHash": "sha256-AKU6qqskl0yf2+JdRdD0cfxX4b9x3KKV5RqA6wijmPM=", + "lastModified": 1739020877, + "narHash": "sha256-mIvECo/NNdJJ/bXjNqIh8yeoSjVLAuDuTUzAo7dzs8Y=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3566ab7246670a43abd2ffa913cc62dad9cdf7d5", + "rev": "a79cfe0ebd24952b580b1cf08cd906354996d547", "type": "github" }, "original": { @@ -125,11 +125,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1734226209, - "narHash": "sha256-6QO56uh1J853+zj7iv5RoFTQLgk6nL0BKshMfWyE7vI=", + "lastModified": 1739185619, + "narHash": "sha256-sY8dGtL5MAJJ3Ts3Yn1zGyOdOY+JKZ9WOw9OPrc9Kgc=", "owner": "nix-community", "repo": "nixpkgs-xr", - "rev": "402eb3d51b418ebd128e2e579952cc0afda53cee", + "rev": "93c8097fc0101937aec4b8df39acf0f1798db0ff", "type": "github" }, "original": { @@ -140,11 +140,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1733940404, - "narHash": "sha256-Pj39hSoUA86ZePPF/UXiYHHM7hMIkios8TYG29kQT4g=", + "lastModified": 1739020877, + "narHash": "sha256-mIvECo/NNdJJ/bXjNqIh8yeoSjVLAuDuTUzAo7dzs8Y=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5d67ea6b4b63378b9c13be21e2ec9d1afc921713", + "rev": "a79cfe0ebd24952b580b1cf08cd906354996d547", "type": "github" }, "original": { @@ -187,11 +187,11 @@ ] }, "locked": { - "lastModified": 1733761991, - "narHash": "sha256-s4DalCDepD22jtKL5Nw6f4LP5UwoMcPzPZgHWjAfqbQ=", + "lastModified": 1738953846, + "narHash": "sha256-yrK3Hjcr8F7qS/j2F+r7C7o010eVWWlm4T1PrbKBOxQ=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "0ce9d149d99bc383d1f2d85f31f6ebd146e46085", + "rev": "4f09b473c936d41582dd744e19f34ec27592c5fd", "type": "github" }, "original": { From 3e893367edd4f051a41818ae07e923b5ee17d598 Mon Sep 17 00:00:00 2001 From: stitchy Date: Sat, 22 Feb 2025 23:28:13 +0000 Subject: [PATCH 103/132] chore: flake update (proper) --- flake.lock | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/flake.lock b/flake.lock index 2795db6..8bb6fed 100644 --- a/flake.lock +++ b/flake.lock @@ -39,11 +39,11 @@ ] }, "locked": { - "lastModified": 1739198052, - "narHash": "sha256-fvAgCGK2phagbKv2S4YH4AIM566TKasfWMqYl3c3mPQ=", + "lastModified": 1740254115, + "narHash": "sha256-MwxDtYB/MSGZlr/xS+ExGYH2QgHk73ShD40shxjad/Y=", "owner": "nix-community", "repo": "home-manager", - "rev": "b0bd29bb4b8df265b13bbb4a6639afa74faaa831", + "rev": "cb3f6e9b59d3a5e51ef9f7da2b8418d5c72aaef8", "type": "github" }, "original": { @@ -71,11 +71,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1738816619, - "narHash": "sha256-5yRlg48XmpcX5b5HesdGMOte+YuCy9rzQkJz+imcu6I=", + "lastModified": 1740089251, + "narHash": "sha256-Y78mDBWoO8CLLTjQfPfII+KXFb6lAmF9GrLbyVBsIMM=", "owner": "Nixos", "repo": "nixos-hardware", - "rev": "2eccff41bab80839b1d25b303b53d339fbb07087", + "rev": "18e9f9753e9ae261bcc7d3abe15745686991fd30", "type": "github" }, "original": { @@ -87,11 +87,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1739020877, - "narHash": "sha256-mIvECo/NNdJJ/bXjNqIh8yeoSjVLAuDuTUzAo7dzs8Y=", + "lastModified": 1739866667, + "narHash": "sha256-EO1ygNKZlsAC9avfcwHkKGMsmipUk1Uc0TbrEZpkn64=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a79cfe0ebd24952b580b1cf08cd906354996d547", + "rev": "73cf49b8ad837ade2de76f87eb53fc85ed5d4680", "type": "github" }, "original": { @@ -125,11 +125,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1739185619, - "narHash": "sha256-sY8dGtL5MAJJ3Ts3Yn1zGyOdOY+JKZ9WOw9OPrc9Kgc=", + "lastModified": 1740221878, + "narHash": "sha256-g9MxGpvOqLInb6/QoAFy/sy/SgYIVZbAPBCE1H2vZnA=", "owner": "nix-community", "repo": "nixpkgs-xr", - "rev": "93c8097fc0101937aec4b8df39acf0f1798db0ff", + "rev": "348600e86789833a7f7c76a90e1e9464530768e1", "type": "github" }, "original": { @@ -140,11 +140,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1739020877, - "narHash": "sha256-mIvECo/NNdJJ/bXjNqIh8yeoSjVLAuDuTUzAo7dzs8Y=", + "lastModified": 1739866667, + "narHash": "sha256-EO1ygNKZlsAC9avfcwHkKGMsmipUk1Uc0TbrEZpkn64=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a79cfe0ebd24952b580b1cf08cd906354996d547", + "rev": "73cf49b8ad837ade2de76f87eb53fc85ed5d4680", "type": "github" }, "original": { @@ -187,11 +187,11 @@ ] }, "locked": { - "lastModified": 1738953846, - "narHash": "sha256-yrK3Hjcr8F7qS/j2F+r7C7o010eVWWlm4T1PrbKBOxQ=", + "lastModified": 1739829690, + "narHash": "sha256-mL1szCeIsjh6Khn3nH2cYtwO5YXG6gBiTw1A30iGeDU=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "4f09b473c936d41582dd744e19f34ec27592c5fd", + "rev": "3d0579f5cc93436052d94b73925b48973a104204", "type": "github" }, "original": { From 7175f2c628ef68f41bd583295a2c51ba4ea44984 Mon Sep 17 00:00:00 2001 From: stitchy Date: Tue, 25 Feb 2025 11:31:05 +0000 Subject: [PATCH 104/132] refactor(eww): clean up scss and add color variables --- config/eww/eww.scss | 54 ++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/config/eww/eww.scss b/config/eww/eww.scss index ea1c6fd..f7ed844 100644 --- a/config/eww/eww.scss +++ b/config/eww/eww.scss @@ -1,63 +1,63 @@ +$color-primary: #c6a0f6; +$color-sec: #f5bde6; +$color-bg: #24273a; +$color-plane: #5a2d85; +$color-light: #5b6078; .bar { + background-color: $color-bg; border-radius: 12px; - + border: 3px solid $color-light; } .bat { - color: #cac; - + color: $color-primary; } .circle { margin-top: -2.5rem; - color: #cac; + color: $color-primary; } .workspace-entry { + border: 2px solid $color-primary; border-radius: 20px; - border-width: 2px; - border-style: solid; - border-color: #cac; margin: 2px; - &.empty { - - } + &.empty {} &.occupied{ + background-color: $color-light; } &.current { - background-color: #536; + background-color: $color-plane; } } .power { - color: #cac; - font-size: 20; - padding-top: 2px; - padding-right: 4px; - padding-left: 0px; - padding-bottom: 4px; + color: $color-primary; + font-size: 18; + padding-right: 3px; + padding-bottom: 2px; margin-bottom: 5px; - margin-left: 1px; - background-color: #515; + // margin-left: 1px; + margin: 5px 2px; + background-color: $color-plane; + border: 2px solid; border-radius: 15px; } .cal { + background-color: $color-primary; + border-radius: 8px; padding: 5px; } .clock { - background-color: #536; - border-width: 2px; - border-style: solid; - border-color: #cac; - border-radius: 5px; - color: #cac; + color: $color-primary; + background-color: $color-plane; + border: 2px solid $color-primary; + border-radius: 3px; padding: 2px; margin: 2px; - border-radius: 3px; - } From 972b761ac09dadd065e6fb8e1a771d065678eb79 Mon Sep 17 00:00:00 2001 From: stitchy Date: Tue, 25 Feb 2025 11:31:45 +0000 Subject: [PATCH 105/132] refactor(hyprland): border-color changes --- config/hypr/hyprland.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/hypr/hyprland.conf b/config/hypr/hyprland.conf index a9844a5..ca9a8ee 100755 --- a/config/hypr/hyprland.conf +++ b/config/hypr/hyprland.conf @@ -36,9 +36,9 @@ input { general { gaps_in=3 gaps_out=5 - border_size=3 - col.active_border=0xff7733cc - col.inactive_border=0xff333333 + border_size=4 + col.active_border=0xffcc6a0f6 + col.inactive_border=0xff494d64 layout=dwindle } From ec52de2dc66924863f8062b06cfe166b376aa1b1 Mon Sep 17 00:00:00 2001 From: stitchy Date: Tue, 25 Feb 2025 11:32:27 +0000 Subject: [PATCH 106/132] fix(swaylock): add grace time --- config/swaylock/config | 1 + users/stitchynyan/home.nix | 1 + 2 files changed, 2 insertions(+) diff --git a/config/swaylock/config b/config/swaylock/config index 4cdc904..86b4404 100644 --- a/config/swaylock/config +++ b/config/swaylock/config @@ -3,6 +3,7 @@ clock datestr=%a, %b %e %Y image=~/.config/wallpapers/girls-last-tour-chibi-eepi.jpg +grace-no-mouse ## Text Settings ## diff --git a/users/stitchynyan/home.nix b/users/stitchynyan/home.nix index d45623b..cb80be6 100644 --- a/users/stitchynyan/home.nix +++ b/users/stitchynyan/home.nix @@ -41,6 +41,7 @@ let "qbittorrent" "qt6ct" "slurp" + "swayidle" "swaylock-effects" "tofi" "wlogout" From 6ec283a1a7b823dd1dbfba0435321e1f88430482 Mon Sep 17 00:00:00 2001 From: stitchy Date: Thu, 27 Feb 2025 02:28:02 +0000 Subject: [PATCH 107/132] feat(nix): add direnv support --- config/zshrc | 3 +++ hosts/default.nix | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/config/zshrc b/config/zshrc index b959ed4..439315c 100755 --- a/config/zshrc +++ b/config/zshrc @@ -152,3 +152,6 @@ if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then fi export QSYS_ROOTDIR="/home/flyingstitchman/.cache/paru/clone/quartus-free/pkg/quartus-free-quartus/opt/intelFPGA/21.1/quartus/sopc_builder/bin" + +# Nix Direnv Support +eval "$(direnv hook zsh)" diff --git a/hosts/default.nix b/hosts/default.nix index 84c5923..a8ebc94 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -22,7 +22,13 @@ in }; }; - programs.appimage.binfmt = true; + programs = { + appimage.binfmt = true; + direnv = { + enable = true; + nix-direnv.enable = true; + }; + }; security.sudo.wheelNeedsPassword = false; security.rtkit.enable = true; services = { From 47bed4aec042d981743f1faf2d13e8d4fefff85a Mon Sep 17 00:00:00 2001 From: stitchy Date: Fri, 28 Feb 2025 10:20:49 +0000 Subject: [PATCH 108/132] feat(nvim): prettypst formatting --- config/nvim/nvim.lua | 6 ++++++ packages/default.nix | 1 + 2 files changed, 7 insertions(+) diff --git a/config/nvim/nvim.lua b/config/nvim/nvim.lua index d56ae46..22a388a 100644 --- a/config/nvim/nvim.lua +++ b/config/nvim/nvim.lua @@ -118,6 +118,12 @@ require("conform").setup({ javascript = { "prettier", }, python = { "black" }, C = { "clang-format"}, + typst = { "prettypst" } + }, + formatters = { + prettypst = { + args = { "--use-std-in", "--use-std-out" } + } }, format_on_save = { timeout_ms = 500, diff --git a/packages/default.nix b/packages/default.nix index 80d93e5..b331e20 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -24,6 +24,7 @@ let "libnotify" "mutt-wizard" "powertop" + "prettypst" "wl-clipboard" # temporary home manager things "eww" From 463a840f8c3052b7a3c849530be3aa7cd1b9db8f Mon Sep 17 00:00:00 2001 From: stitchy Date: Fri, 28 Feb 2025 10:21:24 +0000 Subject: [PATCH 109/132] feat(nix): stm32 device rules --- hosts/config/stm32/default.nix | 25 +++++ hosts/config/stm32/probe-rs.rules | 146 ++++++++++++++++++++++++++++++ hosts/default.nix | 2 +- hosts/lappy/default.nix | 1 + users/stitchynyan/default.nix | 2 +- 5 files changed, 174 insertions(+), 2 deletions(-) create mode 100644 hosts/config/stm32/default.nix create mode 100644 hosts/config/stm32/probe-rs.rules diff --git a/hosts/config/stm32/default.nix b/hosts/config/stm32/default.nix new file mode 100644 index 0000000..6710199 --- /dev/null +++ b/hosts/config/stm32/default.nix @@ -0,0 +1,25 @@ +{ lib, pkgs, config, ...}: + +let + +in +{ + options = { + stitchyconf = { + dev.stm32.enable = lib.mkEnableOption "Enables STM32 Development"; + }; + }; + + config = { + # Group for probe-rs rules + users.groups.plugdev = {}; + + # Udev Files + services.udev.packages = lib.mkIf config.stitchyconf.dev.stm32.enable [ + (pkgs.writeTextFile { + name = "probe-rs-udev"; + destination = "/etc/udev/rules.d/69-probe-rs.rules"; + text = (builtins.readFile ./probe-rs.rules); + })]; + }; +} diff --git a/hosts/config/stm32/probe-rs.rules b/hosts/config/stm32/probe-rs.rules new file mode 100644 index 0000000..22aa177 --- /dev/null +++ b/hosts/config/stm32/probe-rs.rules @@ -0,0 +1,146 @@ +# Copy this file to /etc/udev/rules.d/ +# If rules fail to reload automatically, you can refresh udev rules +# with the command "udevadm control --reload" + +# This rules are based on the udev rules from the OpenOCD project, with unsupported probes removed. +# See http://openocd.org/ for more details. +# +# This file is available under the GNU General Public License v2.0 + +ACTION!="add|change", GOTO="probe_rs_rules_end" + +SUBSYSTEM=="gpio", MODE="0660", GROUP="plugdev", TAG+="uaccess" + +SUBSYSTEM!="usb|tty|hidraw", GOTO="probe_rs_rules_end" + +# Please keep this list sorted by VID:PID + +# STMicroelectronics ST-LINK V1 +ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3744", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# STMicroelectronics ST-LINK/V2 +ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3748", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# STMicroelectronics ST-LINK/V2.1 +ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3752", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# STMicroelectronics STLINK-V3 +ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374d", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374e", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374f", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3753", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3754", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# SEGGER J-Link +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="0101", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="0102", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="0103", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="0104", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="0105", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="0107", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="0108", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1001", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1002", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1003", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1004", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1005", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1006", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1007", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1008", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1009", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="100a", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="100b", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="100c", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="100d", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="100e", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="100f", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1010", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1011", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1012", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1013", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1014", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1015", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1016", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1017", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1018", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1019", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="101a", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="101b", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="101c", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="101d", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="101e", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="101f", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1020", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1021", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1022", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1023", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1024", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1025", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1026", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1027", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1028", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1029", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="102a", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="102b", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="102c", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="102d", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="102e", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="102f", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1050", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1051", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1052", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1053", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1054", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1055", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1056", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1057", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1058", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1059", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="105a", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="105b", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="105c", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="105d", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="105e", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="105f", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1060", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1061", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1062", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1063", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1064", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1065", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1066", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1067", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1068", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1069", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="106a", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="106b", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="106c", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="106d", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="106e", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="1366", ATTRS{idProduct}=="106f", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# FT232H +ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6014", MODE="660", GROUP="plugdev", TAG+="uaccess" +# FT2232x +ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", MODE="660", GROUP="plugdev", TAG+="uaccess" +# FT4232H +ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6011", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# FTDI-based Olimex devices +ATTRS{idVendor}=="0x15ba", ATTRS{idProduct}=="0x0003", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="0x15ba", ATTRS{idProduct}=="0x0004", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="0x15ba", ATTRS{idProduct}=="0x002a", MODE="660", GROUP="plugdev", TAG+="uaccess" +ATTRS{idVendor}=="0x15ba", ATTRS{idProduct}=="0x002b", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# Espressif USB JTAG/serial debug unit +ATTRS{idVendor}=="303a", ATTRS{idProduct}=="1001", MODE="660", GROUP="plugdev", TAG+="uaccess" +# Espressif USB Bridge +ATTRS{idVendor}=="303a", ATTRS{idProduct}=="1002", MODE="660", GROUP="plugdev", TAG+="uaccess" + +# CMSIS-DAP compatible adapters +ATTRS{product}=="*CMSIS-DAP*", MODE="660", GROUP="plugdev", TAG+="uaccess" +# WCH Link (CMSIS-DAP compatible adapter) +ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="8011", MODE="660", GROUP="plugdev", TAG+="uaccess" + +LABEL="probe_rs_rules_end" diff --git a/hosts/default.nix b/hosts/default.nix index a8ebc94..69592f6 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -6,7 +6,7 @@ let in { options = {}; - imports = [ ../packages/default.nix ../users/default.nix ]; + imports = [ ../packages/default.nix ../users/default.nix ./config/stm32 ]; config = { hardware = { diff --git a/hosts/lappy/default.nix b/hosts/lappy/default.nix index 4c49ef7..38d6ad2 100644 --- a/hosts/lappy/default.nix +++ b/hosts/lappy/default.nix @@ -10,6 +10,7 @@ stitchyconf = { artPkgs.enable = true; + dev.stm32.enable = true; }; services.logind.powerKey = "ignore"; diff --git a/users/stitchynyan/default.nix b/users/stitchynyan/default.nix index 1a66d83..46da119 100644 --- a/users/stitchynyan/default.nix +++ b/users/stitchynyan/default.nix @@ -56,7 +56,7 @@ users.users.stitchynyan = { description = "Personal user"; - extraGroups = [ "audio" "dialout" "docker" "kvm" "libvirtd" "networkmanager" "wireshark" "wheel" ]; + extraGroups = [ "audio" "dialout" "docker" "kvm" "libvirtd" "networkmanager" "plugdev" "wireshark" "wheel" ]; home = "/home/stitchynyan"; initialHashedPassword = "$y$j9T$rvySCWHYE4AO4A9J0Vf20.$x5hpBNsOWovQFtNfFUIt17OAH5MJFwFBGjxbaEIagJ3"; isNormalUser = true; From 61e19b05f28beeace1de67938f7cd472854764cf Mon Sep 17 00:00:00 2001 From: stitchy Date: Fri, 28 Feb 2025 10:21:55 +0000 Subject: [PATCH 110/132] feat(nix): remove spaceman builder --- packages/default.nix | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/packages/default.nix b/packages/default.nix index b331e20..2a11ce0 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, inputs, ... }: +{ config, lib, pkgs, ... }: let artPkgs = lib.attrVals [ @@ -40,16 +40,6 @@ let #"package" ] pkgs; - spaceman-nvim = pkgs.vimUtils.buildVimPlugin { - name = "spaceman-nvim"; - src = pkgs.fetchFromGitHub { - owner = "FireIsGood"; - repo = "spaceman.nvim"; - rev = "7910d202073bcc5f567481426f771b3737451dd9"; - hash = "sha256-VvKce2uiFzv0TjoJfEX461p9tY9aE237Xr1q/Lw3Utw="; - }; - }; - in { options = { From f09aced1139ebd96ed479e170f3332c6c99b72ea Mon Sep 17 00:00:00 2001 From: stitchy Date: Sat, 1 Mar 2025 08:15:24 +0000 Subject: [PATCH 111/132] refactor(hyprland): change exec-start config --- config/hypr/exec-start.conf | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/config/hypr/exec-start.conf b/config/hypr/exec-start.conf index 12ebae0..d03f21a 100644 --- a/config/hypr/exec-start.conf +++ b/config/hypr/exec-start.conf @@ -1,14 +1,21 @@ # Executable Startup File for Hyprland -#exec-once=uclampset -M 10 waybar -exec-once=${XDG_CONFIG_HOME:-~/.config}/dunst/scripts/low-battery.sh + +# Activity Watch exec-once=aw-server exec-once=awatcher -exec-once=dbus-daemon --session --address=unix:path=$XDG_RUNTIME_DIR/bus -exec-once=dunst + +# Copy and Paste +exec-once=wl-paste -t text --watch clipman store --no-persist + +# Desktop Rice exec-once=eww open bar exec-once=fcitx5 -exec-once=foot -s exec-once=hyprpaper exec-once=swayidle -exec-once=systemctl --user import-environment DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP -exec-once=wl-paste -t text --watch clipman store --no-persist + +# Notifications +exec-once=dunst +exec-once=${XDG_CONFIG_HOME:-~/.config}/dunst/scripts/low-battery.sh + +# Terminal +exec-once=foot -s From 1f64a070f95ed97e50cee9ea8bf0a8a9e278e8ac Mon Sep 17 00:00:00 2001 From: stitchy Date: Sat, 1 Mar 2025 08:16:20 +0000 Subject: [PATCH 112/132] refactor(hyprland): migrate to windowrulev2 --- config/hypr/windowrules.conf | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/config/hypr/windowrules.conf b/config/hypr/windowrules.conf index d36264a..958f3be 100644 --- a/config/hypr/windowrules.conf +++ b/config/hypr/windowrules.conf @@ -16,10 +16,12 @@ windowrule=pseudo,abc windowrule=monitor 0,wlogout # Don't blur performance intensive applications -windowrule=noblur,osu! -windowrule=noblur,^(firefox)$ -windowrule=noblur,^(librewolf)$ -windowrule=noblur,Blender -windowrule=noblur,Steam -windowrule=noblur,nheko +windowrulev2 = noblur,class:osu! +windowrulev2 = noblur,class:firefox +windowrulev2 = noblur,class:librewolf +windowrulev2 = noblur,class:blender +windowrulev2 = noblur,class:steam #windowrulev2=noblur,fullscreen:1 + +# Funny Opacity +windowrulev2 = opacity .8, class:nheko From 48de9bce715051f860b05f08a20ccfa864744422 Mon Sep 17 00:00:00 2001 From: stitchy Date: Sat, 1 Mar 2025 08:16:56 +0000 Subject: [PATCH 113/132] feat(nvim): append / prepend newline --- config/nvim/lua/keymap.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/nvim/lua/keymap.lua b/config/nvim/lua/keymap.lua index bea7ae5..ad01663 100644 --- a/config/nvim/lua/keymap.lua +++ b/config/nvim/lua/keymap.lua @@ -5,6 +5,10 @@ local map = vim.keymap.set map("i", "jk", "noh", { silent = true }) map({"n", "x"}, "", "noh", { silent = true }) +-- Append and Prepend Newline +map("n", "[", "call append(line('.')-1, '')", { desc = "Prepend Newline"}) +map("n", "]", "call append(line('.'), '')", { desc = "Append Newline"}) + ---- -- Movements ---- @@ -37,6 +41,7 @@ map("n", "g", "lua _lazygit_toggle()", {noremap = true, silent -- Undotree map("n", "fu", "Telescope undo") + ---- -- Cool Macros ---- From b690ef8763b1e97c2f817dc052f07138bb07ead3 Mon Sep 17 00:00:00 2001 From: stitchy Date: Tue, 4 Mar 2025 20:53:53 +0000 Subject: [PATCH 114/132] fix(hyprland): dbus issues --- config/hypr/exec-start.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/hypr/exec-start.conf b/config/hypr/exec-start.conf index d03f21a..1805b80 100644 --- a/config/hypr/exec-start.conf +++ b/config/hypr/exec-start.conf @@ -19,3 +19,6 @@ exec-once=${XDG_CONFIG_HOME:-~/.config}/dunst/scripts/low-battery.sh # Terminal exec-once=foot -s + +# Systemdeeznuts +exec-once=dbus-daemon --session --address=unix:path=$XDG_RUNTIME_DIR/bus From 49deabf581f9c88cf0f38127ef04e70c7a81b87c Mon Sep 17 00:00:00 2001 From: stitchy Date: Sat, 8 Mar 2025 22:24:22 +0000 Subject: [PATCH 115/132] chore(zsh): sort aliases and remove comments This 1. Sorts the aliases 2. Removes a couple of comments that havent been used in a long time 3. Shortens paths to include ~/ instead of /home/flyingstitchman --- config/zshrc | 48 +++++++++++++++++++----------------------------- 1 file changed, 19 insertions(+), 29 deletions(-) diff --git a/config/zshrc b/config/zshrc index 439315c..cd1d0bc 100755 --- a/config/zshrc +++ b/config/zshrc @@ -13,36 +13,29 @@ export XDG_DATA_HOME="$HOME/.local/share" export XDG_STATE_HOME="$HOME/.local/state" # Aliases -alias kon="ncmpcpp -b ~/.config/ncmpcpp/bindings" -alias myip="curl ifconfig.me" +alias c='clear' +alias cd="z" +alias find="fd" +alias gdb="gdb -x /usr/share/pwndbg/gdbinit.py" #pwntools for GDB alias ghidra="_JAVA_AWT_WM_NONREPARENTING=1 ghidra" -alias ls='eza' +alias icat="kitty +kitten icat" +alias imv="imv -b aa77bb" +alias kon="ncmpcpp -b ~/.config/ncmpcpp/bindings" alias l='ls -l' alias la='ls -la' +alias lg='lazygit' alias ll='ls -l' alias lla='ls -la' -alias v="nvim" # Launch neovim with 'v' -alias mountUSB="mount /home/flyingstitchman/ExternalDrive" # Automagically mount and unmount my flashdrive -alias umountUSB="umount /home/flyingstitchman/ExternalDrive" -alias unityAvi="/home/flyingstitchman/Documents/Unity/Editors/2019.4.31f1/Editor/Unity -projectPath ~/ExternalDrive/Unity\ Projects/Avatar\ 3.0\ 2019" -alias ssh="TERM=xterm ssh" #Fix foot issue in ssh -alias gdb="gdb -x /usr/share/pwndbg/gdbinit.py" #pwntools for GDB +alias ls='eza' alias make="make -j 20" -alias cd="z" -alias imv="imv -b aa77bb" -alias find="fd" -alias tree="eza --tree" -alias icat="kitty +kitten icat" +alias mountUSB="mount ~/ExternalDrive" # Automagically mount and unmount my flashdrive +alias myip="curl ifconfig.me" alias qsus="NIXPKGS_ALLOW_UNFREE=1 nix-shell -p quartus-prime-lite -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/fe7ab74a86d78ba00d144aa7a8da8c71a200c563.tar.gz" - -# thanks fire :3 -alias c='clear' -alias lg='lazygit' -# Future fire, this is for a meme. -nya() { - args=$(echo $@ | sed 's/nya/git/g') - git $args 2>&1 >/dev/null | sed 's/git/nya/g' | sed 's/GIT/NYA/g' | sed 's/Git/Nya/g' -} +alias ssh="TERM=xterm ssh" #Fix foot issue in ssh +alias tree="eza --tree" +alias umountUSB="umount ~/ExternalDrive" +alias unityAvi="~/Documents/Unity/Editors/2019.4.31f1/Editor/Unity -projectPath ~/ExternalDrive/Unity\ Projects/Avatar\ 3.0\ 2019" +alias v="nvim" # Launch neovim with 'v' # Automatically get new programs for autocompletion @@ -102,10 +95,6 @@ compinit # End of lines added by compinstall eval "$(zoxide init zsh)" - -# Default Programs -export EDITOR=nvim - # Needed for pam_gnupg for ssh keys TO DO #export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) export PATH="${PATH}:/home/flyingstitchman/.cargo/bin" @@ -138,6 +127,8 @@ export CARGO_HOME="$XDG_DATA_HOME"/cargo alias dosbox="dosbox -conf $XDG_CONFIG_HOME/dosbox/dosbox.conf" + +# Nixos Rebuilding alias rbs="reconfig switch" alias rbb="reconfig build" @@ -147,11 +138,10 @@ reconfig() { # Autostart Hyprland after all environmental Variables have been declared if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then -# export WLR_DRM_DEVICES=/dev/dri/card0 exec Hyprland fi -export QSYS_ROOTDIR="/home/flyingstitchman/.cache/paru/clone/quartus-free/pkg/quartus-free-quartus/opt/intelFPGA/21.1/quartus/sopc_builder/bin" +export QSYS_ROOTDIR="~/.cache/paru/clone/quartus-free/pkg/quartus-free-quartus/opt/intelFPGA/21.1/quartus/sopc_builder/bin" # Nix Direnv Support eval "$(direnv hook zsh)" From 961481549f14dd5fec255234bf9c37cafef0703a Mon Sep 17 00:00:00 2001 From: stitchy Date: Sat, 8 Mar 2025 22:45:52 +0000 Subject: [PATCH 116/132] feat(fcitx): proper themeing and fix wayland issues --- config/hypr/hyprland.conf | 9 +++++---- config/zshrc | 3 --- users/stitchynyan/default.nix | 11 +++++++---- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/config/hypr/hyprland.conf b/config/hypr/hyprland.conf index ca9a8ee..a7c6887 100755 --- a/config/hypr/hyprland.conf +++ b/config/hypr/hyprland.conf @@ -54,12 +54,13 @@ decoration { noise=.03 vibrancy=.2 vibrancy_darkness=0.5 + input_methods=true } - # Other - rounding=15 - inactive_opacity=.8 - fullscreen_opacity=1 multiplier + # Other + rounding=15 + inactive_opacity=.8 + fullscreen_opacity=1 multiplier } animations { diff --git a/config/zshrc b/config/zshrc index cd1d0bc..f513bde 100755 --- a/config/zshrc +++ b/config/zshrc @@ -99,9 +99,6 @@ eval "$(zoxide init zsh)" #export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) export PATH="${PATH}:/home/flyingstitchman/.cargo/bin" -# Fcitx for Xwayland -XMODIFIERS=@im=fcitx - # Clean Up export QT_QPA_PLATFORM=wayland export QT_QPA_PLATFORMTHEME=qt5ct diff --git a/users/stitchynyan/default.nix b/users/stitchynyan/default.nix index 46da119..5b13f72 100644 --- a/users/stitchynyan/default.nix +++ b/users/stitchynyan/default.nix @@ -68,10 +68,13 @@ inputMethod = { enable = true; type = "fcitx5"; - fcitx5.addons = with pkgs; [ - fcitx5-mozc - fcitx5-nord - ]; + fcitx5 = { + waylandFrontend = true; + addons = with pkgs; [ + fcitx5-mozc + fcitx5-fluent + ]; + }; }; }; } From 23d668669753eb22de387d6a9708c19d59107238 Mon Sep 17 00:00:00 2001 From: stitchy Date: Sat, 8 Mar 2025 22:47:23 +0000 Subject: [PATCH 117/132] fix(font): allow reading chinese characters --- packages/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/default.nix b/packages/default.nix index 2a11ce0..556cf8c 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -157,6 +157,8 @@ in fonts.packages = lib.attrVals [ "noto-fonts" "noto-fonts-emoji" + "noto-fonts-cjk-sans" + "noto-fonts-cjk-serif" "liberation_ttf" "ipafont" ] pkgs ++ builtins.filter lib.attrsets.isDerivation (builtins.attrValues pkgs.nerd-fonts); From 341db7911eb36bf16961c9491d7d8284f5b6d7de Mon Sep 17 00:00:00 2001 From: stitchy Date: Sat, 8 Mar 2025 22:47:45 +0000 Subject: [PATCH 118/132] fix(mailsync): incorrect indent --- users/stitchynyan/home.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/users/stitchynyan/home.nix b/users/stitchynyan/home.nix index cb80be6..e85f8f3 100644 --- a/users/stitchynyan/home.nix +++ b/users/stitchynyan/home.nix @@ -111,7 +111,7 @@ in mailsync = { Unit = { Description = "Syncs email"; - After = [ "network-online.target" ]; + After = [ "network-online.target" ]; }; Service = { Type = "oneshot"; From 22dbb128c032a3f6f9ef75940afe00e5a48ac79a Mon Sep 17 00:00:00 2001 From: stitchy Date: Fri, 21 Mar 2025 06:16:15 +0000 Subject: [PATCH 119/132] feat(neomutt): Add initial non-secret configuration Adds the config that I use for a lot of the non-secret or personally identifying parts of neomutt. Lacks a lot of important bits like actually doing anything with the emails; but at least a lot of the graphical stuff is pretty now and saved in git. --- config/mutt/config.muttrc | 118 +++++++++++++++++++++++++++ config/mutt/mailcap | 10 +++ config/mutt/style.muttrc | 163 +++++++++++++++++++++++++++++++++++++ config/mutt/switch.muttrc | 10 +++ users/stitchynyan/home.nix | 7 ++ 5 files changed, 308 insertions(+) create mode 100644 config/mutt/config.muttrc create mode 100644 config/mutt/mailcap create mode 100644 config/mutt/style.muttrc create mode 100644 config/mutt/switch.muttrc diff --git a/config/mutt/config.muttrc b/config/mutt/config.muttrc new file mode 100644 index 0000000..ddfb9f6 --- /dev/null +++ b/config/mutt/config.muttrc @@ -0,0 +1,118 @@ +# vim: filetype=neomuttrc + +# General Settings +set send_charset="us-ascii:utf-8" +set mime_type_query_command = "file --mime-type -b %s" +set date_format="%y/%m/%d %I:%M%p" +set index_format="%2C %Z %?X?A& ? %D %-15.15F %s (%-4.4c)" +set sort = 'reverse-date' +set smtp_authenticators = 'gssapi:login' +set query_command = "abook --mutt-query '%s'" +set rfc2047_parameters = yes +set sleep_time = 0 # Pause 0 seconds for informational messages +set markers = no # Disables the `+` displayed at line wraps +set mark_old = no # Unread mail stay unread until read +set mime_forward = no # mail body is forwarded as text +set forward_attachments = yes # attachments are forwarded with mail +set wait_key = no # mutt won't ask "press key to continue" +set fast_reply # skip to compose when replying +set fcc_attach # save attachments with the body +set forward_format = "Fwd: %s" # format of subject when forwarding +set forward_quote # include message in forwards +set reverse_name # reply as whomever it was to +set include # include message in replies +# set mail_check=60 # to avoid lags using IMAP with some email providers (yahoo for example) +# set use_threads=threads sort=reverse-date sort_aux=date + +# HTML Viewing +auto_view text/html # automatically show html (mailcap uses lynx) +auto_view application/pgp-encrypted +alternative_order text/html text/plain text/enriched + +# Change Header Cache to faster +set header_cache_backend = "lmdb" +set header_cache_compress_method = "zstd" +set header_cache_compress_level = 18 + +set mailcap_path = $XDG_CONFIG_HOME/mutt/mailcap + +bind index,pager i noop +bind index,pager g noop +bind index \Cf noop +bind index,pager M noop +bind index,pager C noop + +# General rebindings +bind index gg first-entry +bind index j next-entry +bind index k previous-entry +bind attach view-mailcap +bind attach l view-mailcap +bind editor noop +bind index G last-entry +bind pager,attach h exit +bind pager j next-line +bind pager k previous-line +bind pager l view-attachments +bind index D delete-message +bind index U undelete-message +bind index L limit +bind index h noop +bind index l display-message +bind index,query tag-entry +#bind browser h goto-parent +macro browser h '..' "Go to parent folder" +bind index,pager H view-raw-message +bind browser l select-entry +bind browser gg top-page +bind browser G bottom-page +bind pager gg top +bind pager G bottom +bind index,pager,browser d half-down +bind index,pager,browser u half-up +bind index,pager S sync-mailbox +bind index,pager R group-reply +bind index \031 previous-undeleted # Mouse wheel +bind index \005 next-undeleted # Mouse wheel +bind pager \031 previous-line # Mouse wheel +bind pager \005 next-line # Mouse wheel +bind editor complete-query + +macro index,pager gi "=INBOX" "go to inbox" +macro index,pager Mi ";=INBOX" "move mail to inbox" +macro index,pager Ci ";=INBOX" "copy mail to inbox" +macro index,pager gd "=Drafts" "go to drafts" +macro index,pager Md ";=Drafts" "move mail to drafts" +macro index,pager Cd ";=Drafts" "copy mail to drafts" +macro index,pager gj "=Junk" "go to junk" +macro index,pager Mj ";=Junk" "move mail to junk" +macro index,pager Cj ";=Junk" "copy mail to junk" +macro index,pager gt "=Trash" "go to trash" +macro index,pager Mt ";=Trash" "move mail to trash" +macro index,pager Ct ";=Trash" "copy mail to trash" +macro index,pager gs "=Sent" "go to sent" +macro index,pager Ms ";=Sent" "move mail to sent" +macro index,pager Cs ";=Sent" "copy mail to sent" +macro index,pager ga "=Archive" "go to archive" +macro index,pager Ma ";=Archive" "move mail to archive" +macro index,pager Ca ";=Archive" "copy mail to archive" + +macro index,pager a "set my_pipe_decode=\$pipe_decode pipe_decodeabook --add-emailset pipe_decode=\$my_pipe_decode; unset my_pipe_decode" "add the sender address to abook" +macro index \Cr "T~UN." "mark all messages as read" +macro index O "mailsync" "run mailsync to sync all mail" +macro index \Cf "unset wait_keyprintf 'Enter a search term to find with notmuch: '; read x; echo \$x >~/.cache/mutt_terms~i \"\`notmuch search --output=messages \$(cat ~/.cache/mutt_terms) | head -n 600 | perl -le '@a=<>;s/\^id:// for@a;$,=\"|\";print@a' | perl -le '@a=<>; chomp@a; s/\\+/\\\\+/ for@a;print@a' \`\"" "show only messages matching a notmuch pattern" +macro index A "all\n" "show all messages (undo limit)" + +# Sidebar mappings +set sidebar_visible = yes +set sidebar_width = 20 +set sidebar_short_path = yes +set sidebar_next_new_wrap = yes +set mail_check_stats +set sidebar_format = '%D%?F? [%F]?%* %?N?%N/? %?S?%S?' +bind index,pager \Ck sidebar-prev +bind index,pager \Cj sidebar-next +bind index,pager \Co sidebar-open +bind index,pager \Cp sidebar-prev-new +bind index,pager \Cn sidebar-next-new +bind index,pager B sidebar-toggle-visible diff --git a/config/mutt/mailcap b/config/mutt/mailcap new file mode 100644 index 0000000..6d6ec9e --- /dev/null +++ b/config/mutt/mailcap @@ -0,0 +1,10 @@ +text/plain; $EDITOR %s ; +text/html; xdg-open %s ; nametemplate=%s.html +text/html; lynx -assume_charset=%{charset} -display_charset=utf-8 -dump -width=1024 %s; nametemplate=%s.html; copiousoutput; +image/*; xdg-open %s ; +video/*; setsid mpv --quiet %s &; copiousoutput +audio/*; mpv %s ; +application/pdf; xdg-open %s ; +application/pgp-encrypted; gpg -d '%s'; copiousoutput; +application/pgp-keys; gpg --import '%s'; copiousoutput; +application/x-subrip; $EDITOR %s ; diff --git a/config/mutt/style.muttrc b/config/mutt/style.muttrc new file mode 100644 index 0000000..bb407ab --- /dev/null +++ b/config/mutt/style.muttrc @@ -0,0 +1,163 @@ +# vim: filetype=neomuttrc +# Adapted from https://github.com/ceuk/mutt_dotfiles/ + +# Formatting ---------------------------------------------------------------------- +set date_format = "%a %d %h %H:%M" +set index_format=" %{$date_format} %zc %zs %zt | %-30.30L | %-30.80s %> %?Y?%Y ? " +set pager_format="%n %T %s%*  %{!%d %b · %H:%M} %?X? %X?%P" +set status_format = " %D %?u? %u ?%?R?󰗯 %R ?%?d? %d ?%?t? %t ?%?F? %F ?%?p? %p? \n \n" +set compose_format="-- NeoMutt: Compose [Approx. msg size: %l Atts: %a]%>-" +set vfolder_format = "%N %?n?%3n& ? %8m  · %f" +set attach_format = "%u%D  %T%-75.75d %?T?& ? %5s · %m/%M" +set sidebar_format = '%D%?Z? [%Z]?%* %?S?%S?' +index-format-hook attachment_info '=B text/calendar ~X 1' ' ' +index-format-hook attachment_info '=B text/calendar' " " +index-format-hook attachment_info '~X 1' " " +index-format-hook attachment_info '~A' " " + + +# General Colors ------------------------------------------------------------------ +color normal default default # general text +color error color231 color212 # error messages +color message default default # messages at the bottom +color prompt default default # prompt text +color search black color10 # search highlight + + +# Statusbar Colors ---------------------------------------------------------------- +color status color141 default +color status color0 default '(|)' # statusline "bubbles" +color status yellow color0 '' # Flagged icon +color status green color0 '' # Unread messages count +color status blue color0 '󰗯' # Read messages count icon +color status red color8 '' # Pending delete icon +color status color7 color0 '([a-zA-Z0-9\.,]|\[|\])(\s)' # bubble content 1 +color status color7 color0 '(\s)([a-zA-Z0-9\.,]|\[|\])' # bubble content 2 +color status color7 color0 '(\% )' # % symbol +color status color7 color0 '(\S)' # empty spaces +# color status color69 black '(\` )' # bubble account variation +color status white color69 '([a-zA-Z0-9\.]+)( )' # account text + + +# Index Colors -------------------------------------------------------------------- +color index color4 default '~N' # new messages +color index color15 default '~R' # read messages +color index color8 default '~Q' # messages which have been replied to +color index_collapsed color4 default # collapsed thread (message count text) +# color index color5 default '!~Q^~p' # sent only to me and haven't been replied to +color index color22 default '~h X-Label..' # messages with a complete label +color index color5 default '~F' # flagged messages +color index color6 default '~F~N' # flagged messages (new) +color index color6 default '~F~R' # flagged messages (read) +color index color1 default '~D' # deleted messages +color index color1 default '~D~N' # deleted messages (new) +color index color9 default '~D~R' # deleted messages (read) +color index color3 default '~T' # tagged messages +color index color3 default '~T~N' # tagged messages (new) +color index color11 default '~T~R' # tagged messages (read) +color tree color8 color8 # thread tree lines/arrow +color indicator default color8 # selection indicator +color index_date color14 default # date is always the same colour +color index_label color6 default # label is always the same colour + + +# Sidebar Colors ------------------------------------------------------------------ +color sidebar_indicator color14 black # currently selected mailbox +color sidebar_highlight white color8 # highlighted, but not open, mailbox. +color sidebar_ordinary color8 default # Color to give mailboxes by default +color sidebar_divider color8 black # divider between sidebar & content +color sidebar_flagged red black # mailboxes containing flagged mail +color sidebar_new green black # mailboxes containing new mail +color sidebar_unread color7 default # mailboxes containing unread mail +color sidebar_unread color7 default # mailboxes containing unread mail + + +# Message Headers ----------------------------------------------------------------- +color hdrdefault color8 default + + +# Message Body -------------------------------------------------------------------- + +# Attachments +color attachment color8 default + +# Signature +color signature color8 default + +# emails +# color body color14 default '[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+' + +# hide "mailto" +color body color0 color0 '' + +# URLs +color body color3 default '(https?|ftp)://[-\.,/%~_:?&=\#a-zA-Z0-9\+]+' + +# Dividers +color body color8 default '(^[-_]*$)' + +# Important info in calendar invites +color body color6 default '^(Date\/Time|Location|Organiser|Invitees|Teams Meeting)(:| \~\~)' + +# Quotes +color quoted color61 default +color quoted1 color117 default +color quoted2 color84 default +color quoted3 color215 default +color quoted4 color212 default + +# Forward/reply headers +color body color8 default '(^(To|From|Sent|Subject):.*)' + +# Patch syntax highlighting +# color body brightwhite default '^[[:space:]].*' +# color body yellow default ^(diff).* +# color body white default ^[\-\-\-].* +# color body white default ^[\+\+\+].* +# color body green default ^[\+].* +# color body red default ^[\-].* +# color body brightblue default [@@].* +# color body cyan default ^(Signed-off-by).* +# color body brightwhite default ^(Cc) +# color body yellow default "^diff \-.*" +# color body brightwhite default "^index [a-f0-9].*" +# color body brightblue default "^---$" +# color body white default "^\-\-\- .*" +# color body white default "^[\+]{3} .*" +# color body green default "^[\+][^\+]+.*" +# color body red default "^\-[^\-]+.*" +# color body brightblue default "^@@ .*" +# color body green default "LGTM" +# color body brightmagenta default "-- Commit Summary --" +# color body brightmagenta default "-- File Changes --" +# color body brightmagenta default "-- Patch Links --" +# color body green default "^Merged #.*" +# color body red default "^Closed #.*" +# color body brightblue default "^Reply to this email.*" + + +# Misc ----------------------------------------------------------------------------- + +# no addressed to me, to me, group, cc, sent by me, mailing list +set to_chars=" " + +# unchanged mailbox, changed, read only, attach mode +set status_chars = " " +ifdef crypt_chars set crypt_chars = " " +set flag_chars = " " + +# hide some tags +set hidden_tags = "unread,draft,flagged,passed,replied,attachment,signed,encrypted" +tag-transforms "replied" "↻ " \ + "encrytpted" "" \ + "signed" "" \ + "attachment" "" \ + +# The formats must start with 'G' and the entire sequence is case sensitive. +tag-formats "replied" "GR" \ + "encrypted" "GE" \ + "signed" "GS" \ + "attachment" "GA" \ + + # don't put '+' at the beginning of wrapped lines +set markers=no diff --git a/config/mutt/switch.muttrc b/config/mutt/switch.muttrc new file mode 100644 index 0000000..c808c99 --- /dev/null +++ b/config/mutt/switch.muttrc @@ -0,0 +1,10 @@ +# vim: filetype=neomuttrc + +# This is an embarrassing and hacky file that unbinds a bunch of binds between +# switching accounts. It is called each time an account is changed. + +unset hostname +unmy_hdr Organization +unmailboxes * +unalternates * +unset signature diff --git a/users/stitchynyan/home.nix b/users/stitchynyan/home.nix index e85f8f3..d06e6cb 100644 --- a/users/stitchynyan/home.nix +++ b/users/stitchynyan/home.nix @@ -101,6 +101,13 @@ in source = config.lib.file.mkOutOfStoreSymlink "/etc/nixos/config/hypr"; recursive = true; }; + "mutt" = { + source = config.lib.file.mkOutOfStoreSymlink "/etc/nixos/config/mutt"; + recursive = true; + }; + "mutt_oauth2.py" = { + source = "${pkgs.neomutt}/share/neomutt/oauth2/mutt_oauth2.py"; + }; "swaylock" = { source = config.lib.file.mkOutOfStoreSymlink "/etc/nixos/config/swaylock"; recursive = true; From 319c25098c413f7452dc8c1d247e8b8c413a2c62 Mon Sep 17 00:00:00 2001 From: stitchy Date: Fri, 21 Mar 2025 10:43:34 +0000 Subject: [PATCH 120/132] feat(themeing): Major refactor themeing for whole computer Adds catppuccin nix flake for themeing lots of programs easily. This enables proper themeing for: * zathura * imv * fcitx (declarative settings) * lazygit * btop * gtk It also pulls in the home-manager sessionVars which is necessary to theme applications. The session vars change also reduces the number of env-vars that need to be set in the zshrc due to them being set declaratively elsewhere. --- config/nvim/lua/options.lua | 6 +++++ config/swaylock/config | 2 ++ config/zshrc | 19 +++------------ flake.lock | 45 +++++++++++++++++++++++++++++++---- flake.nix | 20 ++++++++++++++-- packages/default.nix | 2 -- users/home.nix | 36 ++++++++++++++++++++++++++++ users/stitchynyan/default.nix | 8 +++++++ users/stitchynyan/home.nix | 6 +---- 9 files changed, 114 insertions(+), 30 deletions(-) create mode 100644 users/home.nix diff --git a/config/nvim/lua/options.lua b/config/nvim/lua/options.lua index 1029b8e..1baefd7 100644 --- a/config/nvim/lua/options.lua +++ b/config/nvim/lua/options.lua @@ -40,6 +40,12 @@ opt.linebreak = true opt.wrap = true -- Colors +require("tokyonight").setup({ + transparent = true, + styles = { + floats = "transparent" + } +}) vim.cmd("colorscheme tokyonight") vim.cmd("hi Comment guifg=#e69dc5") vim.cmd("hi Linenr guifg=#a672f3") diff --git a/config/swaylock/config b/config/swaylock/config index 86b4404..a58e2ba 100644 --- a/config/swaylock/config +++ b/config/swaylock/config @@ -29,6 +29,8 @@ line-color=00000000 separator-color=00000000 key-hl-color=c6a0f6 +bs-hl-color=ed8796 + ## Inside Colors ## inside-color=00000088 diff --git a/config/zshrc b/config/zshrc index f513bde..c056349 100755 --- a/config/zshrc +++ b/config/zshrc @@ -7,10 +7,6 @@ unsetopt autocd beep notify unsetopt PROMPT_SP bindkey -v # End of lines configured by zsh-newuser-install -export XDG_CONFIG_HOME="$HOME/.config" -export XDG_CACHE_HOME="$HOME/.cache" -export XDG_DATA_HOME="$HOME/.local/share" -export XDG_STATE_HOME="$HOME/.local/state" # Aliases alias c='clear' @@ -19,7 +15,6 @@ alias find="fd" alias gdb="gdb -x /usr/share/pwndbg/gdbinit.py" #pwntools for GDB alias ghidra="_JAVA_AWT_WM_NONREPARENTING=1 ghidra" alias icat="kitty +kitten icat" -alias imv="imv -b aa77bb" alias kon="ncmpcpp -b ~/.config/ncmpcpp/bindings" alias l='ls -l' alias la='ls -la' @@ -95,24 +90,14 @@ compinit # End of lines added by compinstall eval "$(zoxide init zsh)" -# Needed for pam_gnupg for ssh keys TO DO -#export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) export PATH="${PATH}:/home/flyingstitchman/.cargo/bin" # Clean Up -export QT_QPA_PLATFORM=wayland -export QT_QPA_PLATFORMTHEME=qt5ct -# Fuck Gnome Devs, All my homies Hate Gnome Devs -#export GDK_DEBUG=1 export MBSYNCRC=${XDG_CONFIG_HOME:-~/.config}/mbsync/config export PASSWORD_STORE_DIR=${XDG_CONFIG_HOME:-~/.config}/password_store export NOTMUCH_CONFIG=${XDG_CONFIG_HOME-~/.config}/notmuch/config -export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority export KDEHOME="$XDG_CONFIG_HOME"/kde export GRADLE_USER_HOME="$XDG_DATA_HOME"/gradle -export GNUPGHOME=${XDG_DATA_HOME-~/.config}/gnupg -export GPG_TTY=$(tty) -export SDL_VIDEODRIVER=wayland export GOPATH="$XDG_DATA_HOME" export GOMODCACHE="$XDG_CACHE_HOME" export NUGET_PACKAGES="$XDG_CACHE_HOME"/NuGetPackages @@ -122,7 +107,6 @@ export DOTNET_CLI_HOME="$XDG_CONFIG_HOME"/dotnet export RUSTUP_HOME="$XDG_DATA_HOME"/rustup export CARGO_HOME="$XDG_DATA_HOME"/cargo - alias dosbox="dosbox -conf $XDG_CONFIG_HOME/dosbox/dosbox.conf" # Nixos Rebuilding @@ -142,3 +126,6 @@ export QSYS_ROOTDIR="~/.cache/paru/clone/quartus-free/pkg/quartus-free-quartus/o # Nix Direnv Support eval "$(direnv hook zsh)" + +# Home Manager Variables +source ~/.local/state/nix/profiles/home-manager/home-path/etc/profile.d/hm-session-vars.sh diff --git a/flake.lock b/flake.lock index 8bb6fed..6cd5fb4 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,23 @@ { "nodes": { + "catppuccin": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1742254251, + "narHash": "sha256-3wGCx5UR86pgurSYB//LsBMKAsw6qpiOpnzgShPQKkM=", + "owner": "catppuccin", + "repo": "nix", + "rev": "4cb9c621072312fb45c6e86b57e5fabd97f1b95d", + "type": "github" + }, + "original": { + "owner": "catppuccin", + "repo": "nix", + "type": "github" + } + }, "flake-compat": { "locked": { "lastModified": 1733328505, @@ -87,11 +105,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1739866667, - "narHash": "sha256-EO1ygNKZlsAC9avfcwHkKGMsmipUk1Uc0TbrEZpkn64=", + "lastModified": 1741851582, + "narHash": "sha256-cPfs8qMccim2RBgtKGF+x9IBCduRvd/N5F4nYpU0TVE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "73cf49b8ad837ade2de76f87eb53fc85ed5d4680", + "rev": "6607cf789e541e7873d40d3a8f7815ea92204f32", "type": "github" }, "original": { @@ -121,7 +139,7 @@ "inputs": { "flake-compat": "flake-compat", "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "treefmt-nix": "treefmt-nix" }, "locked": { @@ -154,12 +172,29 @@ "type": "github" } }, + "nixpkgs_3": { + "locked": { + "lastModified": 1739866667, + "narHash": "sha256-EO1ygNKZlsAC9avfcwHkKGMsmipUk1Uc0TbrEZpkn64=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "73cf49b8ad837ade2de76f87eb53fc85ed5d4680", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { + "catppuccin": "catppuccin", "home-manager": "home-manager", "mobile-nixos": "mobile-nixos", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_2", "nixpkgs-quartus": "nixpkgs-quartus", "nixpkgs-xr": "nixpkgs-xr" } diff --git a/flake.nix b/flake.nix index 5367d17..13ec3c6 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,7 @@ { description = "System Configuration Flake"; outputs = inputs@{ + catppuccin, nixpkgs, nixpkgs-xr, nixos-hardware, @@ -14,6 +15,7 @@ system = "x86_64-linux"; specialArgs = { inherit inputs; }; modules = [ + catppuccin.nixosModules.catppuccin ./hosts/malachite/default.nix ./users/stitchynyan/default.nix @@ -24,7 +26,13 @@ home-manager.extraSpecialArgs = {inherit inputs;}; home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; - home-manager.users.stitchynyan = import ./users/stitchynyan/home.nix; + home-manager.users.stitchynyan = { + imports = [ + catppuccin.homeManagerModules.catppuccin + ./users/stitchynyan/home.nix + ./users/home.nix + ]; + }; } ]; }; @@ -32,6 +40,7 @@ system = "x86_64-linux"; specialArgs = { inherit inputs; }; modules = [ + catppuccin.nixosModules.catppuccin nixos-hardware.nixosModules.framework-12th-gen-intel ./hosts/lappy/default.nix @@ -42,7 +51,13 @@ home-manager.extraSpecialArgs = {inherit inputs;}; home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; - home-manager.users.stitchynyan = import ./users/stitchynyan/home.nix; + home-manager.users.stitchynyan = { + imports = [ + catppuccin.homeManagerModules.catppuccin + ./users/stitchynyan/home.nix + ./users/home.nix + ]; + }; } ]; }; @@ -86,6 +101,7 @@ }; inputs = { + catppuccin.url = "github:catppuccin/nix"; home-manager = { url = "github:nix-community/home-manager/master"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/packages/default.nix b/packages/default.nix index 556cf8c..e2cd363 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -56,7 +56,6 @@ in config = { environment.systemPackages = (lib.attrVals [ "black" - "btop" "clang-tools" "eza" "fd" @@ -67,7 +66,6 @@ in "gnumake" "gnupg" "hugo" - "lazygit" "mypy" "neofetch" "nixd" diff --git a/users/home.nix b/users/home.nix new file mode 100644 index 0000000..cd65e66 --- /dev/null +++ b/users/home.nix @@ -0,0 +1,36 @@ +{ + ... }: +let + +in { + catppuccin = { + enable = true; + flavor = "macchiato"; + fcitx5.enable = false; + gtk.enable = true; + kvantum.enable = false; + }; + + qt = { + enable = true; + platformTheme.name = "qtct"; + }; + + programs = { + btop = { + enable = true; + settings = { + theme_background = false; + }; + }; + imv.enable = true; + lazygit.enable = true; + wlogout.enable = true; + zathura = { + enable = true; + options = { + recolor-keephue = true; + }; + }; + }; +} diff --git a/users/stitchynyan/default.nix b/users/stitchynyan/default.nix index 5b13f72..e8b1045 100644 --- a/users/stitchynyan/default.nix +++ b/users/stitchynyan/default.nix @@ -70,6 +70,14 @@ type = "fcitx5"; fcitx5 = { waylandFrontend = true; + settings.addons = { + classicui.globalSection = { + Theme = "FluentLight"; + DarkTheme = "FluentDark"; + UseDarkTheme = "True"; + UseAccentColor = "True"; + }; + }; addons = with pkgs; [ fcitx5-mozc fcitx5-fluent diff --git a/users/stitchynyan/home.nix b/users/stitchynyan/home.nix index d06e6cb..a695ea8 100644 --- a/users/stitchynyan/home.nix +++ b/users/stitchynyan/home.nix @@ -19,7 +19,6 @@ let "grim" "hunspell" "hyprpaper" - "imv" "isync" "kitty" "libreoffice" @@ -44,9 +43,7 @@ let "swayidle" "swaylock-effects" "tofi" - "wlogout" "wofi" - "zathura" ] pkgs ++ [ pkgs.hunspellDicts.en_US ]; in { @@ -77,7 +74,6 @@ in # To-Do Later home.sessionVariables = { FOO = "BAR"; - }; home.file = { @@ -159,7 +155,7 @@ in Unit.Description = "Syncs email"; Timer = { OnBootSec = "1min"; - OnUnitActiveSec = "10min"; + OnUnitActiveSec = "10min"; }; Install.WantedBy = [ "timers.target" ]; }; From ff9cc5ad6388282351018470b7b7171d27cf2086 Mon Sep 17 00:00:00 2001 From: stitchy Date: Fri, 21 Mar 2025 11:05:26 +0000 Subject: [PATCH 121/132] fix(gtk): enable and set default dark theme --- users/stitchynyan/home.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/users/stitchynyan/home.nix b/users/stitchynyan/home.nix index a695ea8..bd8e2b8 100644 --- a/users/stitchynyan/home.nix +++ b/users/stitchynyan/home.nix @@ -76,6 +76,13 @@ in FOO = "BAR"; }; + gtk.enable = true; + dconf.settings = { + "org/gnome/desktop/interface" = { + color-scheme = "prefer-dark"; + }; + }; + home.file = { ".zshrc".source = config.lib.file.mkOutOfStoreSymlink "/etc/nixos/config/zshrc"; }; From 6edd87f13aeadb5be39cb7becd579d83b43e8e0c Mon Sep 17 00:00:00 2001 From: stitchy Date: Fri, 21 Mar 2025 11:14:48 +0000 Subject: [PATCH 122/132] fix: properly source env-vars Had an issue where hyprland wouldn't source the env-vars for stuff because I put the source for it under the execute hyprland :) --- config/zshrc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/config/zshrc b/config/zshrc index c056349..c6194f0 100755 --- a/config/zshrc +++ b/config/zshrc @@ -93,13 +93,15 @@ eval "$(zoxide init zsh)" export PATH="${PATH}:/home/flyingstitchman/.cargo/bin" # Clean Up -export MBSYNCRC=${XDG_CONFIG_HOME:-~/.config}/mbsync/config -export PASSWORD_STORE_DIR=${XDG_CONFIG_HOME:-~/.config}/password_store -export NOTMUCH_CONFIG=${XDG_CONFIG_HOME-~/.config}/notmuch/config +export MBSYNCRC=$XDG_CONFIG_HOME/mbsync/config +export PASSWORD_STORE_DIR=$XDG_CONFIG_HOME/password_store +export NOTMUCH_CONFIG=$XDG_CONFIG_HOME/notmuch/config export KDEHOME="$XDG_CONFIG_HOME"/kde export GRADLE_USER_HOME="$XDG_DATA_HOME"/gradle +export GNUPGHOME=$XDG_DATA_HOME/gnupg export GOPATH="$XDG_DATA_HOME" export GOMODCACHE="$XDG_CACHE_HOME" +export GPG_TTY=$(tty) export NUGET_PACKAGES="$XDG_CACHE_HOME"/NuGetPackages export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java export WINEPREFIX="$XDG_DATA_HOME"/wineprefixes/default @@ -117,6 +119,9 @@ reconfig() { sudo nixos-rebuild --flake "/etc/nixos#$(cat /etc/hostname)" "$@" } +# Home Manager Variables +source ~/.local/state/nix/profiles/home-manager/home-path/etc/profile.d/hm-session-vars.sh + # Autostart Hyprland after all environmental Variables have been declared if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then exec Hyprland @@ -126,6 +131,3 @@ export QSYS_ROOTDIR="~/.cache/paru/clone/quartus-free/pkg/quartus-free-quartus/o # Nix Direnv Support eval "$(direnv hook zsh)" - -# Home Manager Variables -source ~/.local/state/nix/profiles/home-manager/home-path/etc/profile.d/hm-session-vars.sh From 7c74f9053482841a0e1ba6e7a77ebb7e105dee99 Mon Sep 17 00:00:00 2001 From: stitchy Date: Fri, 21 Mar 2025 11:17:31 +0000 Subject: [PATCH 123/132] chore(hyprland): update monitor configuration Adds a couple of overclocks I did to my CRT and also cleans up the cruft from me being on hyprland for ages --- config/hypr/monitors.conf | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/config/hypr/monitors.conf b/config/hypr/monitors.conf index 214142c..6d79937 100644 --- a/config/hypr/monitors.conf +++ b/config/hypr/monitors.conf @@ -1,18 +1,18 @@ # Configure Monitor Setup for Hyprland # Assign Monitors -#monitor=DP-2,3440x1440@100,0x0,1 -#monitor=HDMI-A-1,1920x1080@60,3440x160,1 -#monitor=DP-3,disable - -# Set Default Workspaces -#workspace=HDMI-A-1,7 -#workspace=DP-2,1 - - -monitor=eDP-1,2256x1504@60,0x0,1.5 -#monitor=DP-2,1024x786,2256x0,1 +monitor=eDP-1,preferred,auto,1.5 workspace=eDP-1,1 +## CRT Fun ## +# Good Middle Ground +# monitor=DP-1,1280x1024@150,auto,1 + +# High Rez +# monitor=DP-1,2500x2000@30,auto,1 + +# Fast As FUK BOIZ - doesn't work well maybe adaptor +#monitor=DP-1,640x480@240,auto,1 + # Auto Monitor Rule monitor = , preferred, auto, 1 From 67a2858dd9a04cf6df9531858372cd6ae23c48b2 Mon Sep 17 00:00:00 2001 From: stitchy Date: Fri, 21 Mar 2025 11:18:07 +0000 Subject: [PATCH 124/132] chore: alphebatize formatters --- config/nvim/nvim.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/nvim/nvim.lua b/config/nvim/nvim.lua index 22a388a..7cb760d 100644 --- a/config/nvim/nvim.lua +++ b/config/nvim/nvim.lua @@ -113,11 +113,11 @@ cmp.setup { -- Funky plugins require("conform").setup({ formatters_by_ft = { + C = { "clang-format"}, css = { "prettier", }, html = { "prettier", }, javascript = { "prettier", }, python = { "black" }, - C = { "clang-format"}, typst = { "prettypst" } }, formatters = { From 77c28ceb4ed18d80f575fe84ff7c09e2a7933960 Mon Sep 17 00:00:00 2001 From: stitchy Date: Mon, 31 Mar 2025 04:46:03 -0700 Subject: [PATCH 125/132] fix(tanzanite): VM crashing under workloads Refer to linked git issue, but the tldr is that AMD gpus have a crashing issue when they are passed to a guest VM in linux host kernels greater than 6.6. --- hosts/malachite/hardware-configuration.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hosts/malachite/hardware-configuration.nix b/hosts/malachite/hardware-configuration.nix index b9202b5..0c23c7f 100644 --- a/hosts/malachite/hardware-configuration.nix +++ b/hosts/malachite/hardware-configuration.nix @@ -10,6 +10,10 @@ boot.kernelModules = [ "kvm-intel" "vfio-pci" ]; boot.extraModulePackages = lib.attrVals [ "rtl8812au" ] config.boot.kernelPackages; + # https://gitlab.com/qemu-project/qemu/-/issues/2574 + # Might bisect or something if I get around to it + boot.kernelPackages = pkgs.linuxPackages_6_6; + boot.kernelParams = [ "loglevel=3" "iommu=pt" From cf10e016efb07ea648fa3b96a1115c71ab2497b0 Mon Sep 17 00:00:00 2001 From: stitchy Date: Mon, 14 Apr 2025 03:54:11 +0000 Subject: [PATCH 126/132] feat(nvim): (system) verilog lsp and formatting --- config/nvim/nvim.lua | 9 ++++----- packages/default.nix | 1 + 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config/nvim/nvim.lua b/config/nvim/nvim.lua index 7cb760d..753408d 100644 --- a/config/nvim/nvim.lua +++ b/config/nvim/nvim.lua @@ -1,9 +1,6 @@ -- This will need some refactoring as it is mostly a -- copy and paste from the previous single-file .vim config -require'lspconfig'.rust_analyzer.setup{} -require'lspconfig'.texlab.setup{} -require'lspconfig'.svls.setup{} require'lspconfig'.pylsp.setup{ settings = { formatCommand = {"black"}, @@ -37,7 +34,7 @@ local capabilities = require("cmp_nvim_lsp").default_capabilities() local lspconfig = require('lspconfig') -- Enable some language servers with the additional completion capabilities offered by nvim-cmp -local servers = { 'clangd', 'glsl_analyzer', 'nixd', 'tinymist', 'rust_analyzer', 'vhdl_ls', 'vtsls' } +local servers = { 'clangd', 'glsl_analyzer', 'nixd', 'rust_analyzer', 'texlab', 'tinymist', 'verible', 'vhdl_ls', 'vtsls' } for _, lsp in ipairs(servers) do lspconfig[lsp].setup { -- on_attach = my_custom_on_attach, @@ -118,7 +115,9 @@ require("conform").setup({ html = { "prettier", }, javascript = { "prettier", }, python = { "black" }, - typst = { "prettypst" } + typst = { "prettypst" }, + verilog = { "verible", "trim_whitespace" }, + systemverilog = { "verible", "trim_whitespace" } }, formatters = { prettypst = { diff --git a/packages/default.nix b/packages/default.nix index e2cd363..da54ddc 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -77,6 +77,7 @@ in "rustup" "tinymist" "unzip" + "verible" "vhdl-ls" "vtsls" "wget" From 35e2bffc21056aca90df792208063f72aa790e11 Mon Sep 17 00:00:00 2001 From: stitchy Date: Wed, 7 May 2025 08:41:39 +0000 Subject: [PATCH 127/132] feat(vis): init cli-visualizer --- config/vis/colors/my_theme | 4 ++ config/vis/config | 91 ++++++++++++++++++++++++++++++++++++++ users/stitchynyan/home.nix | 4 ++ 3 files changed, 99 insertions(+) create mode 100644 config/vis/colors/my_theme create mode 100644 config/vis/config diff --git a/config/vis/colors/my_theme b/config/vis/colors/my_theme new file mode 100644 index 0000000..aa17611 --- /dev/null +++ b/config/vis/colors/my_theme @@ -0,0 +1,4 @@ +#c6a0f6 -- mauve +#8aadf4 -- blue +#8bd5ca -- unsat green +--#f5bde6 -- pink diff --git a/config/vis/config b/config/vis/config new file mode 100644 index 0000000..fe170e5 --- /dev/null +++ b/config/vis/config @@ -0,0 +1,91 @@ +##Refresh rate of the visualizers. A really high refresh rate may cause screen tearing. Default is 20. +visualizer.fps=24 + +##Specifies the color scheme. The color scheme must be in ~/.config/vis/colors/ directory. The default scheme is "colors". +colors.scheme=my_theme + +##Available smoothing options are monstercat, sgs, none. +visualizer.spectrum.smoothing.mode=monstercat + +##If set to false the visualizers will use mono mode instead of stereo. Some visualizers will +##behave differently when mono is enabled. For example, spectrum show two sets of bars. +audio.stereo.enabled=true + +##Applies scaling factor to both lorenz and ellipse visualizers. This is useful when the system audio is set +#to a low volume. +visualizer.scaling.multiplier=1.0 + +##Sets the audio sources to use. +##Currently available ones are "mpd", "pulse", "shmem", and "alsa". Defaults to "pulse". +#audio.sources=pulse + +##vis tries to find the correct pulseaudio sink, however this will not work on all systems. +##If pulse audio is not working with vis try switching the audio source. A list can be found by running the +##command pacmd list-sinks | grep -e 'name:' -e 'index' +#audio.pulse.source=0 + +##Defaults to "/tmp/mpd.fifo" +#mpd.fifo.path=/tmp/mpd.fifo + +##Specifies how often the visualizer will change in seconds. 0 means do not rotate. Default is 0. +#visualizer.rotation.secs=10 + +##Configures the samples rate and the cutoff frequencies. +#audio.sampling.frequency=44100 +#audio.low.cutoff.frequency=30 +#audio.high.cutoff.frequency=22050 + + +##Configures the visualizers and the order they are in. Available visualizers are spectrum,lorenz,ellipse. +##Defaults to spectrum,ellipse,lorenz +#visualizers=spectrum,ellipse,lorenz + + +##Configures what character the spectrum visualizer will use. Specifying a space (e.g " ") means the +##background will be colored instead of the character. Defaults to " ". +#visualizer.spectrum.character=# + +##Spectrum bar width. Defaults to 2. +#visualizer.spectrum.bar.width=2 + +##The amount of space between each bar in the spectrum visualizer. Defaults to 1. It's possible to set this to +##zero to have no space between bars +#visualizer.spectrum.bar.spacing=1 + +##This configures the falloff effect on the spectrum visualizer. Available falloff options are fill,top,none. +##Defaults to "fill" +#visualizer.spectrum.falloff.mode=fill + +##Configures how fast the falloff character falls. This is an exponential falloff so values usually look +##best 0.9+ and small changes in this value can have a large effect. Defaults to 0.95 +#visualizer.spectrum.falloff.weight=0.95 + +##Margins in percent of total screen for spectrum visualizer. All margins default to 0 +#visualizer.spectrum.top.margin=0.30 +#visualizer.spectrum.bottom.margin=0.10 +#visualizer.spectrum.right.margin=0.10 +#visualizer.spectrum.left.margin=0.10 + +##Reverses the direction of the spectrum so that high freqs are first and low freqs last. Defaults to false. +#visualizer.spectrum.reversed=false + +##This configures the sgs smoothing effect on the spectrum visualizer. More points spreads out the smoothing +##effect and increasing passes runs the smoother multiple times on reach run. Defaults are points=3 and passes=1 +#visualizer.sgs.smoothing.points=3 +#visualizer.sgs.smoothing.passes=1 + +##Configures what character the ellipse visualizer will use. Specifying a space (e.g " ") means the +##background will be colored instead of the character. Defaults to "█". +#visualizer.ellipse.character=# + +##The radius of each color ring in the ellipse visualizer. Defaults to 2. +#visualizer.ellipse.radius=.5 + + +##Configures what character the lorenz visualizer will use. Specifying a space (e.g " ") means the +##background will be colored instead of the character. Defaults to "█". +#visualizer.lorenz.character=# + +##Turns off overriding the user's terminal colors. This is true by default. +#colors.override.terminal=false + diff --git a/users/stitchynyan/home.nix b/users/stitchynyan/home.nix index bd8e2b8..078477b 100644 --- a/users/stitchynyan/home.nix +++ b/users/stitchynyan/home.nix @@ -115,6 +115,10 @@ in source = config.lib.file.mkOutOfStoreSymlink "/etc/nixos/config/swaylock"; recursive = true; }; + "vis" = { + source = config.lib.file.mkOutOfStoreSymlink "/etc/nixos/config/vis"; + recursive = true; + }; }; systemd.user.services = { From cbc745df1cb5d2eba99804caf93c45059c08309e Mon Sep 17 00:00:00 2001 From: stitchy Date: Wed, 14 May 2025 01:30:49 +0000 Subject: [PATCH 128/132] fix: tmux full color over ssh --- config/zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/zshrc b/config/zshrc index c6194f0..0062ca7 100755 --- a/config/zshrc +++ b/config/zshrc @@ -26,7 +26,7 @@ alias make="make -j 20" alias mountUSB="mount ~/ExternalDrive" # Automagically mount and unmount my flashdrive alias myip="curl ifconfig.me" alias qsus="NIXPKGS_ALLOW_UNFREE=1 nix-shell -p quartus-prime-lite -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/fe7ab74a86d78ba00d144aa7a8da8c71a200c563.tar.gz" -alias ssh="TERM=xterm ssh" #Fix foot issue in ssh +alias ssh="TERM=xterm-256color ssh" #Fix foot issue in ssh alias tree="eza --tree" alias umountUSB="umount ~/ExternalDrive" alias unityAvi="~/Documents/Unity/Editors/2019.4.31f1/Editor/Unity -projectPath ~/ExternalDrive/Unity\ Projects/Avatar\ 3.0\ 2019" From 0f4a83e3a11b6ddc1e5ab1c5c156a398fff5ddeb Mon Sep 17 00:00:00 2001 From: stitchy Date: Sat, 17 May 2025 21:48:14 +0000 Subject: [PATCH 129/132] chore: foce enable xdg --- users/home.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/users/home.nix b/users/home.nix index cd65e66..67a5c6d 100644 --- a/users/home.nix +++ b/users/home.nix @@ -33,4 +33,6 @@ in { }; }; }; + + xdg.enable = true; } From c368a9bd8e1ffb07b19da9c54c0a84d04d4f42a4 Mon Sep 17 00:00:00 2001 From: stitchy Date: Mon, 30 Jun 2025 10:02:08 +0000 Subject: [PATCH 130/132] chore: add zathura alias --- config/zshrc | 1 + 1 file changed, 1 insertion(+) diff --git a/config/zshrc b/config/zshrc index 0062ca7..856ed7a 100755 --- a/config/zshrc +++ b/config/zshrc @@ -31,6 +31,7 @@ alias tree="eza --tree" alias umountUSB="umount ~/ExternalDrive" alias unityAvi="~/Documents/Unity/Editors/2019.4.31f1/Editor/Unity -projectPath ~/ExternalDrive/Unity\ Projects/Avatar\ 3.0\ 2019" alias v="nvim" # Launch neovim with 'v' +alias za="zathura" # Automatically get new programs for autocompletion From 77a823a15cd4e9b9fbe515e3c6bcd577e62fe85a Mon Sep 17 00:00:00 2001 From: stitchy Date: Sat, 5 Jul 2025 12:18:38 -0700 Subject: [PATCH 131/132] fix: time zone wonky --- hosts/lappy/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/lappy/default.nix b/hosts/lappy/default.nix index 38d6ad2..804b59f 100644 --- a/hosts/lappy/default.nix +++ b/hosts/lappy/default.nix @@ -19,7 +19,7 @@ hostName = "lappy"; networkmanager.enable = true; }; - time.timeZone = "America/Lost_Angeles"; + time.timeZone = "America/Los_Angeles"; services.syncthing = { enable = true; From bbbba2c4a241271fdfd0874053c35170806b5a50 Mon Sep 17 00:00:00 2001 From: stitchy Date: Sat, 5 Jul 2025 14:49:27 -0700 Subject: [PATCH 132/132] feat: flake update --- flake.lock | 54 +++++++++++++++++++------------------- flake.nix | 4 +-- users/stitchynyan/home.nix | 3 +-- 3 files changed, 30 insertions(+), 31 deletions(-) diff --git a/flake.lock b/flake.lock index 6cd5fb4..d6b2d91 100644 --- a/flake.lock +++ b/flake.lock @@ -5,11 +5,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1742254251, - "narHash": "sha256-3wGCx5UR86pgurSYB//LsBMKAsw6qpiOpnzgShPQKkM=", + "lastModified": 1751705516, + "narHash": "sha256-Y099OGYWYHtpYFP4offuV6rldBnpUv4CYk+HwuaQwLU=", "owner": "catppuccin", "repo": "nix", - "rev": "4cb9c621072312fb45c6e86b57e5fabd97f1b95d", + "rev": "719bb50ca2c99bc9c077669a48bfd9815493a11d", "type": "github" }, "original": { @@ -57,11 +57,11 @@ ] }, "locked": { - "lastModified": 1740254115, - "narHash": "sha256-MwxDtYB/MSGZlr/xS+ExGYH2QgHk73ShD40shxjad/Y=", + "lastModified": 1751729568, + "narHash": "sha256-ay7O1jjalUxkL23QWLv9C2s8rdVGs3hUOPZClIbUHKs=", "owner": "nix-community", "repo": "home-manager", - "rev": "cb3f6e9b59d3a5e51ef9f7da2b8418d5c72aaef8", + "rev": "f117b383dd591fd579bce5ee7bac07a3fdc1d050", "type": "github" }, "original": { @@ -74,11 +74,11 @@ "mobile-nixos": { "flake": false, "locked": { - "lastModified": 1737346419, - "narHash": "sha256-YHByUFujAnfJJ2JnhHIJyohECr5o0EDmuRdyUcvnZGQ=", + "lastModified": 1749499850, + "narHash": "sha256-Fyy9ySTJ7jJ7z2h5+KHJU6OUhPJvy12OlVOichkwmZ0=", "owner": "nixos", "repo": "mobile-nixos", - "rev": "1498c4d7fd59026479469efdbfe30c78a7300d89", + "rev": "26faf325d6efb169e2e4a2c435346b46c19d08bc", "type": "github" }, "original": { @@ -89,11 +89,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1740089251, - "narHash": "sha256-Y78mDBWoO8CLLTjQfPfII+KXFb6lAmF9GrLbyVBsIMM=", + "lastModified": 1751432711, + "narHash": "sha256-136MeWtckSHTN9Z2WRNRdZ8oRP3vyx3L8UxeBYE+J9w=", "owner": "Nixos", "repo": "nixos-hardware", - "rev": "18e9f9753e9ae261bcc7d3abe15745686991fd30", + "rev": "497ae1357f1ac97f1aea31a4cb74ad0d534ef41f", "type": "github" }, "original": { @@ -105,11 +105,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1741851582, - "narHash": "sha256-cPfs8qMccim2RBgtKGF+x9IBCduRvd/N5F4nYpU0TVE=", + "lastModified": 1750776420, + "narHash": "sha256-/CG+w0o0oJ5itVklOoLbdn2dGB0wbZVOoDm4np6w09A=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "6607cf789e541e7873d40d3a8f7815ea92204f32", + "rev": "30a61f056ac492e3b7cdcb69c1e6abdcf00e39cf", "type": "github" }, "original": { @@ -143,11 +143,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1740221878, - "narHash": "sha256-g9MxGpvOqLInb6/QoAFy/sy/SgYIVZbAPBCE1H2vZnA=", + "lastModified": 1751678927, + "narHash": "sha256-zs13WzaoY3tI/uLAjLH4NX3NxpMnXJPRXHj3Y/gyKuI=", "owner": "nix-community", "repo": "nixpkgs-xr", - "rev": "348600e86789833a7f7c76a90e1e9464530768e1", + "rev": "7f9991b2104a43fb7c66a680a98b6ae21328a188", "type": "github" }, "original": { @@ -158,11 +158,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1739866667, - "narHash": "sha256-EO1ygNKZlsAC9avfcwHkKGMsmipUk1Uc0TbrEZpkn64=", + "lastModified": 1751637120, + "narHash": "sha256-xVNy/XopSfIG9c46nRmPaKfH1Gn/56vQ8++xWA8itO4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "73cf49b8ad837ade2de76f87eb53fc85ed5d4680", + "rev": "5c724ed1388e53cc231ed98330a60eb2f7be4be3", "type": "github" }, "original": { @@ -174,11 +174,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1739866667, - "narHash": "sha256-EO1ygNKZlsAC9avfcwHkKGMsmipUk1Uc0TbrEZpkn64=", + "lastModified": 1751271578, + "narHash": "sha256-P/SQmKDu06x8yv7i0s8bvnnuJYkxVGBWLWHaU+tt4YY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "73cf49b8ad837ade2de76f87eb53fc85ed5d4680", + "rev": "3016b4b15d13f3089db8a41ef937b13a9e33a8df", "type": "github" }, "original": { @@ -222,11 +222,11 @@ ] }, "locked": { - "lastModified": 1739829690, - "narHash": "sha256-mL1szCeIsjh6Khn3nH2cYtwO5YXG6gBiTw1A30iGeDU=", + "lastModified": 1750931469, + "narHash": "sha256-0IEdQB1nS+uViQw4k3VGUXntjkDp7aAlqcxdewb/hAc=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "3d0579f5cc93436052d94b73925b48973a104204", + "rev": "ac8e6f32e11e9c7f153823abc3ab007f2a65d3e1", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 13ec3c6..3e59731 100644 --- a/flake.nix +++ b/flake.nix @@ -28,7 +28,7 @@ home-manager.useUserPackages = true; home-manager.users.stitchynyan = { imports = [ - catppuccin.homeManagerModules.catppuccin + catppuccin.homeModules.catppuccin ./users/stitchynyan/home.nix ./users/home.nix ]; @@ -53,7 +53,7 @@ home-manager.useUserPackages = true; home-manager.users.stitchynyan = { imports = [ - catppuccin.homeManagerModules.catppuccin + catppuccin.homeModules.catppuccin ./users/stitchynyan/home.nix ./users/home.nix ]; diff --git a/users/stitchynyan/home.nix b/users/stitchynyan/home.nix index 078477b..6a0f820 100644 --- a/users/stitchynyan/home.nix +++ b/users/stitchynyan/home.nix @@ -30,7 +30,6 @@ let "networkmanagerapplet" "nheko" "notmuch" - "okular" "osu-lazer" "pass" "pavucontrol" @@ -44,7 +43,7 @@ let "swaylock-effects" "tofi" "wofi" - ] pkgs ++ [ pkgs.hunspellDicts.en_US ]; + ] pkgs ++ [ pkgs.hunspellDicts.en_US pkgs.kdePackages.okular ]; in { options = {