Reworked directory structure, changed aroundthings here and there in Kanata conf.kbd, Emacs init.el, and common.nix (added direnv)

This commit is contained in:
lulusilly 2026-04-05 00:44:25 -04:00
parent f3f8da5fdf
commit 507b016a03
25 changed files with 52 additions and 118 deletions

View file

View file

@ -56,6 +56,8 @@
programs.zsh.enable = true; programs.zsh.enable = true;
# Browser # Browser
programs.firefox.enable = true; programs.firefox.enable = true;
# Direnv
programs.direnv.enable = true;
# Flatpak # Flatpak
# services.flatpak.enable = true; # services.flatpak.enable = true;
# Tailscale # Tailscale

View file

@ -45,6 +45,9 @@
(latex . t) ;; Latex support (latex . t) ;; Latex support
(shell . t)) ;; Posix Shell support (shell . t)) ;; Posix Shell support
) )
;; For when I'm writing blog posts and whatnot
(require 'markdown-mode)
(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode))
;; Set the default export directory ;; Set the default export directory
(setq org-export-directory "~/org_exports/") (setq org-export-directory "~/org_exports/")
;; Show inline images in org documents ;; Show inline images in org documents

View file

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

Before After
Before After

View file

@ -137,7 +137,7 @@
# Neovim # Neovim
".config/nvim/init.lua" .source = dotfiles/nvim/init.lua; ".config/nvim/init.lua" .source = dotfiles/nvim/init.lua;
# Emacs # Emacs
".emacs.d/init.el" .source = dotfiles/.emacs.d/init.el; "emacs.d/init.el" .source = dotfiles/.emacs.d/init.el;
# MPV # MPV
".config/mpv/mpv.conf" .source = dotfiles/mpv/mpv.conf; ".config/mpv/mpv.conf" .source = dotfiles/mpv/mpv.conf;
# Neofetch # Neofetch

View file

@ -9,14 +9,12 @@
FEEL FREE TO FORK!!! FEEL FREE TO FORK!!!
|# |#
(defcfg (defcfg
process-unmapped-keys yes
block-unmapped-keys yes
concurrent-tap-hold yes concurrent-tap-hold yes
movemouse-smooth-diagonals yes movemouse-smooth-diagonals yes
) )
#|
Trying to be minimal in order to reduce constant editing
of layer keys, not to mention how ugly having a 60% layout
is when you have mapped keys in the grid.
|#
(defsrc (defsrc
caps caps
q w e r t y u i o p q w e r t y u i o p
@ -24,13 +22,13 @@
z x c v b n m , . / z x c v b n m , . /
lalt spc ralt lalt spc ralt
) )
;; Variables for clean code
(defvar (defvar
tap-time 200 tap-time 200
hold-time 250 hold-time 250
chord-time 50 chord-time 50
) )
;; Bindings
(defalias (defalias
;; Normal keyboard layer for gaming/other normie usage ;; Normal keyboard layer for gaming/other normie usage
normie (layer-switch norm) normie (layer-switch norm)
@ -41,13 +39,18 @@
cho (chord ch o) cho (chord ch o)
chs (chord ch s) chs (chord ch s)
chd (chord ch d) chd (chord ch d)
chf (chord ch f)
chj (chord ch j)
chk (chord ch k) chk (chord ch k)
chl (chord ch l) chl (chord ch l)
ch_lalt (chord ch lalt) ch_lalt (chord ch lalt)
ch_ralt (chord ch ralt) ch_ralt (chord ch ralt)
;; Hyper and Meh Aliases
hyper (multi lmet lsft lctl lalt)
meh (multi lsft lctl lalt)
;; Remap Caps to Escape/Nav layer ;; Remap Caps to Escape/Nav layer
navlayer (layer-while-held nav) navlayer (layer-while-held nav)
caps (tap-hold $tap-time $hold-time (tap-dance 200 (esc caps)) @navlayer) caps (tap-hold $tap-time $hold-time (tap-dance 200 (lctl @hyper caps)) @navlayer)
;; Home row mods ;; Home row mods
a (tap-hold $tap-time $hold-time a lmet) a (tap-hold $tap-time $hold-time a lmet)
s (tap-hold $tap-time $hold-time s lalt) s (tap-hold $tap-time $hold-time s lalt)
@ -57,22 +60,19 @@
k (tap-hold $tap-time $hold-time k lctl) k (tap-hold $tap-time $hold-time k lctl)
l (tap-hold $tap-time $hold-time l lalt) l (tap-hold $tap-time $hold-time l lalt)
scln (tap-hold $tap-time $hold-time scln rmet) scln (tap-hold $tap-time $hold-time scln rmet)
;; Numpad layer
numpad (layer-while-held num) numpad (layer-while-held num)
g (tap-hold $tap-time $hold-time g @numpad) g (tap-hold $tap-time $hold-time g @numpad)
;; Function key layer
fnkeys (layer-while-held fn) fnkeys (layer-while-held fn)
h (tap-hold $tap-time $hold-time h @fnkeys) h (tap-hold $tap-time $hold-time h @fnkeys)
#|
Hyper key when V or M are held down to allow for either hand to v (tap-hold $tap-time $hold-time v @meh)
use hyper key for AHK/Raycast shortcuts.
|#
v (tap-hold $tap-time $hold-time v (multi lsft lctl lalt))
m (tap-hold $tap-time $hold-time m (multi lsft lctl lalt)) m (tap-hold $tap-time $hold-time m (multi lsft lctl lalt))
;; Holding Spacebar activates symbol layer
symbols (layer-while-held symbol) symbols (layer-while-held symbol)
spc (tap-hold $tap-time $hold-time spc @symbols) spc (tap-hold $tap-time $hold-time spc @symbols)
;; Media layer when Z or / are held.
medialy (layer-while-held md) medialy (layer-while-held md)
z (tap-hold $tap-time $hold-time z @medialy) z (tap-hold $tap-time $hold-time z @medialy)
/ (tap-hold $tap-time $hold-time / @medialy) / (tap-hold $tap-time $hold-time / @medialy)
@ -80,39 +80,34 @@
;; Chord definitions. Kind of weird to read as a layperson ;; Chord definitions. Kind of weird to read as a layperson
;; so I provided sufficient comments for general understanding. ;; so I provided sufficient comments for general understanding.
(defchords ch $chord-time (defchords ch $chord-time
(w ) w ;; W => W (w ) w
( e) e ;; E => E ( e) e
(w e) ret ;; W + E => Enter (w e) XX
(i ) i ;; I => I (i ) i
( o) o ;; O => O ( o) o
(i o) bspc ;; I + O => Backspace (i o) XX
(s ) @s ;; S => S (s ) @s
( d) @d ;; D => D ( d) @d
(s d) tab ;; S + D => Tab (s d) tab
(k ) @k ;; K => K (See defalias) (f ) @f
( l) @l ;; L => L (See defalias) (f d) tab
(k l) esc ;; K + L => Escape (j k) esc
(lalt ) (tap-dance $tap-time ((multi lsft lctl lalt lmet) lalt)) ;; LAlt => Hyper Key, LAlt × 2 => LAlt (k ) @k
( ralt) (tap-dance $tap-time ((multi lsft lctl lalt lmet) lalt)) ;; RAlt => Hyper Key, RAlt × 2 => RAlt ( l) @l
#| (k l) ret
Put simply, the below line allows for toggling a no-bind (lalt ) (tap-dance $tap-time ((multi lsft lctl lalt lmet) lalt))
layer for when you may require a standard layout (such as ( ralt) (tap-dance $tap-time ((multi lsft lctl lalt lmet) lalt))
playing Street Fighter, Counter Strike, etc.) by pressing
both alt keys at the same time. You can toggle back to the
base layer by holding both alts at the same time, as to allow
for normal functionality when holding either key down for a shortcut.
|#
(lalt ralt) (tap-hold $tap-time $hold-time @normie (layer-switch base)) (lalt ralt) (tap-hold $tap-time $hold-time @normie (layer-switch base))
) )
;; Base layer with all binds enabled
(deflayer base (deflayer base
@caps @caps
q @chw @che r t y u @chi @cho p q @chw @che r t y u @chi @cho p
@a @chs @chd @f @g @h @j @chk @chl @scln @a @chs @chd @chf @g @h @chj @chk @chl @scln
@z x c @v b n @m , . @/ @z x c @v b n @m , . @/
@ch_lalt @spc @ch_ralt @ch_lalt @spc @ch_ralt
) )
;; Navigation layer
(deflayer nav (deflayer nav
_ _
mbck (movemouse-up 3 3) mfwd _ _ _ mlft mrgt pgup pgdn mbck (movemouse-up 3 3) mfwd _ _ _ mlft mrgt pgup pgdn
@ -120,7 +115,7 @@
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _
) )
;; Numpad Layer
(deflayer num (deflayer num
_ _
_ _ _ _ _ _ 7 8 9 _ _ _ _ _ _ _ 7 8 9 _
@ -128,7 +123,7 @@
_ _ _ _ _ 1 2 3 _ _ _ _ _ _ 1 2 3 _
_ _ _ _ _ _
) )
;; Function key layer
(deflayer fn (deflayer fn
_ _
f1 f2 f3 f4 _ _ _ _ _ _ f1 f2 f3 f4 _ _ _ _ _ _
@ -136,16 +131,15 @@
f9 f10 f11 f12 _ _ _ _ _ f9 f10 f11 f12 _ _ _ _ _
_ _ _ _ _ _
) )
;; Symbol layer
(deflayer symbol (deflayer symbol
_ _
S-1 S-2 S-3 S-4 S-5 S-6 S-7 S-8 S-9 S-0 S-1 S-2 S-3 S-4 S-5 S-6 S-7 S-8 S-9 S-0
- S-= S-[ S-] [ ] S-` S-scln S-\ \ S-\ = - S-= S-- ` S-` S-scln ' S-'
= _ _ ` _ S-- _ _ ' S-' _ \ S-[ S-] S-, S-. [ ] _ _
_ _ _ _ _ _
) )
;; Aformentioned standard layer with combo binds for toggling back
;; to base layer.
(deflayer norm (deflayer norm
esc esc
q w e r t y u i o p q w e r t y u i o p
@ -153,12 +147,11 @@
z x c v b n m , . / z x c v b n m , . /
@ch_lalt spc @ch_ralt @ch_lalt spc @ch_ralt
) )
;; Media layer
;; NOTE: On Windows the brdn and brup keys cause Kanata to crash for some reason as of kanata_gui 1.8.1
(deflayer md (deflayer md
_ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
prev pp next mute vold volu brdn brup ins del prev pp next mute _ _ vold volu brdn brup
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _
) )

View file

@ -1,18 +0,0 @@
{ config, pkgs, lib, inputs, ... }:
{
imports =
[
./hardware-configuration.nix
../../modules/kanata/kanata.nix
../../modules/laptop.nix
../../modules/efi.nix
../../modules/hypr.nix
../../modules/syncthing.nix
];
networking.hostName = "cantor";
# Overriding this, as the touchpad doesn't work properly anymore.
services.libinput.enable = lib.mkForce false;
system.stateVersion = "25.05";
}

View file

@ -1,46 +0,0 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/b6a3dc2d-983b-4be5-a1ae-e834b786377f";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/12CE-A600";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
fileSystems."/data/hdd" =
{ device = "/dev/disk/by-uuid/8db7c071-8946-4619-96fd-83259ae8d228";
fsType = "xfs";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/222e2b22-388c-490a-845f-35f774c395a8"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp4s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}