Initial dendritic rewrite

This commit is contained in:
2026-04-04 16:46:30 -04:00
parent 06a8e77924
commit f080e311d1
131 changed files with 3342 additions and 3148 deletions

View File

@@ -0,0 +1,51 @@
{
inputs,
...
}:
{
imports = [
inputs.agenix-rekey.flakeModule
];
perSystem =
{ config, pkgs, ... }:
{
devShells.nix = pkgs.mkShell {
nativeBuildInputs = [ config.agenix-rekey.package ];
};
agenix-rekey.nixosConfigurations = inputs.self.nixosConfigurations;
};
flake.modules.nixos.agenix =
{
config,
lib,
...
}:
{
imports = [
inputs.agenix.nixosModules.default
inputs.agenix-rekey.nixosModules.default
];
services.openssh.generateHostKeys = true;
age = {
# Need to explicitly set identity paths because OpenSSH daemon is disabled
# but the host keys are still generated via services.openssh.generateHostKeys = true
identityPaths = map (key: key.path) config.services.openssh.hostKeys;
rekey = {
masterIdentities = [ (inputs.secrets + "/age-yubikey-identity-d9ed335b.pub") ];
storageMode = "local";
localStorageDir = inputs.secrets + "/rekeyed/${config.networking.hostName}";
}
# We only set the hostPubkey if one is supplied. For new hosts the pub key will not
# exist until it is generated after the first rebuild. Runtime decryption will fail
# but then the ssh host key will be generated in /etc/ssh and can be supplied
// lib.optionalAttrs (config.hostPubkey != null) {
hostPubkey = config.hostPubkey;
};
};
};
}

View File

@@ -0,0 +1,10 @@
{
flake.modules.nixos.bluetooth = {
hardware = {
bluetooth = {
enable = true;
powerOnBoot = false;
};
};
};
}

13
modules/features/boot.nix Normal file
View File

@@ -0,0 +1,13 @@
{
flake.modules.nixos.boot = {
boot = {
loader = {
systemd-boot = {
enable = true;
configurationLimit = 10;
};
efi.canTouchEfiVariables = true;
};
};
};
}

View File

@@ -0,0 +1,8 @@
{
flake.modules.homeManager.direnv = {
programs.direnv = {
enable = true;
enableZshIntegration = true;
};
};
}

View File

@@ -0,0 +1,7 @@
{
flake.modules.homeManager.fastfetch = {
programs.fastfetch = {
enable = true;
};
};
}

View File

@@ -0,0 +1,161 @@
{
flake.modules.homeManager.firefox =
{
config,
pkgs,
lib,
...
}:
{
# This gets around having to run `pywalfox install` manually, which just creates this manifest
home.file.".mozilla/native-messaging-hosts/pywalfox.json".text = builtins.toJSON {
name = "pywalfox";
description = "Automatically theme your browser using the colors generated by Pywal";
path = lib.getExe' pkgs.pywalfox-native "pywalfox";
# path = "${pkgs.pywalfox-native}/bin/pywalfox";
type = "stdio";
allowed_extensions = [ "pywalfox@frewacom.org" ];
};
programs.firefox = {
enable = true;
languagePacks = [ "en-US" ];
nativeMessagingHosts = with pkgs; [
pywalfox-native
];
policies = {
DefaultDownloadDirectory = config.xdg.userDirs.download;
DisableFirefoxAccounts = true;
DisableFirefoxStudies = true;
DisablePocket = true;
DisableProfileImport = true;
DisableProfileRefresh = true;
DisableTelemetry = true;
DisplayBookmarksToolbar = "never";
DontCheckDefaultBrowser = true;
EnableTrackingProtection = {
Value = true; # Tracking protection is enabled by default in both the regular browser and private browsing
Locked = true; # Whether or not a user can change tracking protection
Cryptomining = true; # Block cryptomining scripts
Fingerprinting = true; # Block fingerprinting scripts
EmailTracking = true; # Block email tracking pixels and scripts
};
FirefoxHome = {
Search = true;
TopSites = true;
SponsoredTopSites = false;
Highlights = false;
Pocket = false;
Stories = false;
SponsoredPocket = false;
SponsoredStories = false;
Snippets = true;
Locked = true;
};
FirefoxSuggest = {
WebSuggestions = true;
SponsoredSuggestions = false;
ImproveSuggest = false;
Locked = true;
};
Homepage = {
URL = "http://100.78.212.35:30054";
Locked = true;
StartPage = "homepage";
};
OfferToSaveLogins = false;
OverrideFirstRunPage = "";
PasswordManagerEnabled = false;
PopupBlocking = {
Default = false;
Locked = true;
};
PrimaryPassword = false;
SearchBar = "unified";
ShowHomeButton = true;
SkipTermsOfUse = true;
};
profiles.eclypse = {
name = "Eclypse";
isDefault = true;
extensions = {
force = true;
# For a list of available packaged extensions, see:
# https://github.com/nix-community/nur-combined/blob/main/repos/rycee/pkgs/firefox-addons/addons.json
packages = with pkgs.nur.repos.rycee.firefox-addons; [
ublock-origin
bitwarden
pywalfox
];
settings = {
"uBlock0@raymondhill.net".settings = {
selectedFilterLists = [
"ublock-filters"
"ublock-badware"
"ublock-privacy"
"ublock-unbreak"
"ublock-quick-fixes"
];
};
};
};
search = {
default = "google";
force = true;
engines = {
nix-packages = {
name = "Nix Packages";
urls = [
{
template = "https://search.nixos.org/packages";
params = [
{
name = "channel";
value = "unstable";
}
{
name = "query";
value = "{searchTerms}";
}
];
}
];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@np" ];
};
home-manager = {
name = "Home Manager";
urls = [
{
template = "https://home-manager-options.extranix.com";
params = [
{
name = "query";
value = "{searchTerms}";
}
];
}
];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@hm" ];
};
surugaya = {
name = "Surugaya";
urls = [
{
template = "https://www.suruga-ya.jp/search?search_word={searchTerms}";
}
];
iconMapObj."16" = "https://www.suruga-ya.jp/drupal/themes/surugaya/favicon.ico";
definedAliases = [ "@suru" ];
};
};
};
settings = {
# Auto-enable extensions
"extensions.autoDisableScopes" = 0;
};
};
};
};
}

View File

@@ -0,0 +1,7 @@
{
flake.modules.nixos.firmware = {
services.fwupd = {
enable = true;
};
};
}

21
modules/features/foot.nix Normal file
View File

@@ -0,0 +1,21 @@
{
flake.modules.homeManager.foot =
{ config, ... }:
{
programs.foot = {
enable = true;
server.enable = false;
settings = {
main = {
term = "xterm-256color";
include = "${config.xdg.configHome}/foot/themes/noctalia";
dpi-aware = "no";
font = "${config.stylix.fonts.monospace.name}:size=${toString config.stylix.fonts.sizes.terminal}";
};
mouse = {
hide-when-typing = "yes";
};
};
};
};
}

View File

@@ -0,0 +1,5 @@
{
flake.modules.nixos.fprintd = {
services.fprintd.enable = true;
};
}

8
modules/features/fzf.nix Normal file
View File

@@ -0,0 +1,8 @@
{
flake.modules.homeManager.fzf = {
programs.fzf = {
enable = true;
enableZshIntegration = true;
};
};
}

10
modules/features/gdm.nix Normal file
View File

@@ -0,0 +1,10 @@
{
flake.modules.nixos.gdm = {
services.displayManager = {
gdm = {
enable = true;
wayland = true;
};
};
};
}

43
modules/features/git.nix Normal file
View File

@@ -0,0 +1,43 @@
{
flake.modules.homeManager.git =
{
pkgs,
config,
...
}:
let
name = "Eclypsed";
email = "Ec1ypsed@proton.me";
signingKey = "sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIB2h6y1Al2OVotYIpwPZMjiBLAncAI2pAPgES2+gVbJqAAAABHNzaDo= ssh:";
in
{
home.packages = with pkgs; [ git-ignore ];
xdg.configFile."git/allowed_signers".text = ''
${email} namespaces="git" ${signingKey}
'';
programs = {
git = {
enable = true;
settings = {
user = { inherit name email; };
init = {
defaultBranch = "main";
};
gpg.ssh.allowedSignersFile = "${config.xdg.configHome}/git/allowed_signers";
};
signing = {
format = "ssh";
key = "${config.home.homeDirectory}/.ssh/id_ed25519_sk_rk.pub";
signByDefault = true;
};
};
lazygit = {
enable = true;
enableZshIntegration = true;
shellWrapperName = "lg";
};
};
};
}

362
modules/features/helix.nix Normal file
View File

@@ -0,0 +1,362 @@
{
flake.modules.homeManager.helix =
{
pkgs,
...
}:
let
yazi-picker = pkgs.writeShellApplication {
name = "yazi-picker";
text = ''
paths=$(yazi --chooser-file=/dev/stdout)
if [[ -n "$paths" ]]; then
zellij action toggle-floating-panes
zellij action write 27 # send <Escape> key
zellij action write-chars ":$1 $paths"
zellij action write 13 # send <Enter> key
else
zellij action toggle-floating-panes
fi
'';
};
in
{
home.packages = [ yazi-picker ];
programs.helix = {
enable = true;
defaultEditor = true;
extraPackages = with pkgs; [
basedpyright # Python static type checker
ruff # Pyhton linter and formatter
nixd # Nix language server
nixfmt # Nix formatter
rust-analyzer # Rust language server
rustfmt # Rust formmater
clippy # Rust linter
lldb # Debugger for llvm languages
marksman # Markdown language server
markdown-oxide # Markdown PKM language server
rumdl # Markdown linter and formatter
libclang # C language family frontend for LLVM
typescript-language-server # Typescript language server
vscode-langservers-extracted # HTML/CSS/JSON/ESLint language servers extracted from vscode
emmet-language-server # Emmet support based on LSP
prettier # Formatter for HTML/CSS/JSON/ESLint languages
superhtml # HTML Language server and Templating Language Library
ruby-lsp # Ruby language server
solargraph # Alternative ruby language server
rubocop # Ruby linter and formatter
jdt-language-server # Java language server
];
settings = {
editor = {
line-number = "relative";
cursorline = true;
auto-format = true;
completion-timeout = 5;
completion-trigger-len = 1;
bufferline = "always";
color-modes = true;
end-of-line-diagnostics = "hint";
lsp = {
display-inlay-hints = true;
};
cursor-shape = {
insert = "bar";
normal = "block";
select = "underline";
};
indent-guides = {
render = true;
skip-levels = 1;
};
soft-wrap = {
enable = true;
max-indent-retain = 80;
};
inline-diagnostics = {
cursor-line = "warning";
};
};
keys =
let
arrow_keys = {
"up" = "jump_view_up";
"down" = "jump_view_down";
"left" = "jump_view_left";
"right" = "jump_view_right";
};
in
{
normal = {
"C-y" =
":sh zellij run -n Yazi -c -f -x 10%% -y 10%% --width 80%% --height 80%% -- yazi-picker open %{buffer_name}";
}
// arrow_keys;
insert = {
"C-k" = "move_visual_line_up";
"C-j" = "move_visual_line_down";
"C-h" = "move_char_left";
"C-l" = "move_char_right";
}
// arrow_keys;
select = { } // arrow_keys;
};
theme = "catppuccin_mocha";
};
# Check https://github.com/helix-editor/helix/blob/master/languages.toml for default language configuration
# Only explictly set options you want to override / make explicit
languages = {
language = [
{
name = "python";
language-servers = [
"basedpyright"
"ruff"
];
auto-format = true;
formatter = {
command = "ruff";
args = [
"format"
"-"
];
};
}
{
name = "nix";
language-servers = [ "nixd" ];
auto-format = true;
formatter = {
command = "nixfmt";
};
}
{
name = "rust";
auto-format = true;
formatter = {
command = "rustfmt";
};
}
{
name = "markdown";
auto-format = true;
formatter = {
command = "rumdl";
args = [
"fmt"
"-"
];
};
}
{
name = "c";
file-types = [
"c"
"h"
]; # "h" is currently missing from the default config
auto-format = true;
formatter = {
command = "clang-format";
args = [
"--style=WebKit"
];
};
}
{
name = "typescript";
language-servers = [
"typescript-language-server"
"vscode-eslint-language-server"
"emmet-language-server"
];
auto-format = true;
formatter = {
command = "prettier";
args = [
"--parser"
"typescript"
];
};
}
{
name = "tsx";
language-servers = [
"typescript-language-server"
"vscode-eslint-language-server"
"emmet-language-server"
];
auto-format = true;
formatter = {
command = "prettier";
args = [
"--parser"
"typescript"
];
};
}
{
name = "javascript";
language-servers = [
"typescript-language-server"
"vscode-eslint-language-server"
"emmet-language-server"
];
auto-format = true;
formatter = {
command = "prettier";
args = [
"--parser"
"typescript"
];
};
}
{
name = "jsx";
language-servers = [
"typescript-language-server"
"vscode-eslint-language-server"
"emmet-language-server"
];
auto-format = true;
formatter = {
command = "prettier";
args = [
"--parser"
"typescript"
];
};
}
{
name = "json";
auto-format = true;
formatter = {
command = "prettier";
args = [
"--parser"
"json"
];
};
}
{
name = "jsonc";
auto-format = true;
formatter = {
command = "prettier";
args = [
"--parser"
"jsonc"
];
};
}
{
name = "html";
language-servers = [
"vscode-html-language-server"
{
name = "superhtml";
except-features = [ "format" ];
}
"emmet-language-server"
];
auto-format = true;
formatter = {
command = "prettier";
args = [
"--parser"
"html"
];
};
}
{
name = "css";
language-servers = [
"vscode-css-language-server"
"emmet-language-server"
];
auto-format = true;
formatter = {
command = "prettier";
args = [
"--parser"
"css"
];
};
}
{
name = "scss";
language-servers = [
"vscode-css-language-server"
"emmet-language-server"
];
auto-format = true;
formatter = {
command = "prettier";
args = [
"--parser"
"scss"
];
};
}
{
name = "ruby";
language-servers = [
"ruby-lsp"
"solargraph"
];
auto-format = true;
formatter = {
command = "rubocop";
args = [
"--stdin"
"placeholder.rb"
"-a"
"--stderr"
"--fail-level"
"fatal"
];
};
}
];
language-server = {
basedpyright.config.python.analysis.typeCheckingMode = "strict";
rust-analyzer.config.check.command = "clippy";
emmet-language-server = {
command = "emmet-language-server";
args = [ "--stdio" ];
};
vscode-eslint-language-server = {
config = {
# Automatically fix ESLint errors
codeActionsOnSave = {
mode = "all";
"source.fixAll.eslint" = true;
};
quiet = false;
experimental = {
# Support for the modern ESLint configuration format
useFlatConfig = true;
};
};
};
ruby-lsp = {
command = "ruby-lsp";
config = {
diagnostics = true;
formatting = true;
};
};
solargraph = {
command = "solargraph";
config = {
diagnostics = true;
formatting = false;
};
};
};
};
};
};
}

View File

@@ -0,0 +1,38 @@
{
flake.modules.homeManager.kanshi = {
services.kanshi = {
enable = true;
settings = [
{
profile = {
name = "laptop";
outputs = [
{
criteria = "eDP-1";
status = "enable";
scale = 1.0;
}
];
};
}
{
profile = {
name = "docked";
outputs = [
{
criteria = "eDP-1";
status = "disable";
}
{
criteria = "LG Electronics LG TV SSCR2 *";
mode = "3840x2160@120Hz";
scale = 1.0;
status = "enable";
}
];
};
}
];
};
};
}

View File

@@ -0,0 +1,19 @@
{
flake.modules.nixos.network = {
networking = {
# Pick only one of the below networking options.
# wireless.enable = true; # Enables wireless support via wpa_supplicant.
networkmanager.enable = true; # Easiest to use and most distros use this by default.
# Configure network proxy if necessary
# proxy.default = "http://user:password@proxy:port/";
# proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Open ports in the firewall.
# firewall.allowedTCPPorts = [ ... ];
# firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# firewall.enable = false;
};
};
}

509
modules/features/niri.nix Normal file
View File

@@ -0,0 +1,509 @@
{
inputs,
...
}:
{
flake.modules.nixos.niri =
{ pkgs, ... }:
{
imports = [
inputs.niri.nixosModules.niri
];
nixpkgs.overlays = [ inputs.niri.overlays.niri ];
programs = {
niri = {
enable = true;
package = pkgs.niri-unstable;
};
uwsm = {
waylandCompositors.niri = {
prettyName = "Niri";
binPath = "/run/current-system/sw/bin/niri-session";
};
};
};
environment.systemPackages = [ pkgs.xwayland-satellite-unstable ];
};
flake.modules.homeManager.niri =
{
pkgs,
lib,
config,
...
}:
let
# Executables
foot = lib.getExe' config.programs.foot.package "foot";
vicinae = lib.getExe' config.programs.vicinae.package "vicinae";
yazi = lib.getExe' config.programs.yazi.package "yazi";
noctalia-shell = lib.getExe' config.programs.noctalia-shell.package "noctalia-shell";
playerctl = lib.getExe' pkgs.playerctl "playerctl";
wpctl = lib.getExe' pkgs.wireplumber "wpctl";
brightnessctl = lib.getExe' pkgs.brightnessctl "brightnessctl";
in
{
programs.niri = {
# Niri is enabled by niri.nixosModules.niri
settings = {
input = {
keyboard = {
xkb = {
layout = "us";
options = "compose:ralt";
};
};
touchpad = {
enable = true;
click-method = "clickfinger";
drag = true;
drag-lock = true;
dwt = true;
natural-scroll = false;
scroll-method = "two-finger";
tap = true;
tap-button-map = "left-right-middle"; # Mouse button click to register when tapping with 1, 2, or 3 fingers
};
warp-mouse-to-focus = {
enable = true;
mode = "center-xy-always";
};
focus-follows-mouse = {
enable = true;
};
mod-key = "Super";
};
binds = {
# General
"Mod+Slash" = {
action.show-hotkey-overlay = { };
repeat = false;
hotkey-overlay.title = "Show hotkeys";
};
"Mod+Q" = {
action.close-window = { };
repeat = false;
hotkey-overlay.title = "Close window";
};
"Mod+W" = {
action.spawn = foot;
repeat = false;
hotkey-overlay.title = "Terminal";
};
"Mod+A" = {
action.spawn = [
vicinae
"toggle"
];
repeat = false;
hotkey-overlay.title = "Launcher";
};
"Mod+E" = {
action.spawn = [
foot
"-e"
yazi
];
repeat = false;
hotkey-overlay.title = "File Explorer";
};
"Mod+Escape" = {
action.spawn = [
noctalia-shell
"ipc"
"call"
"sessionMenu"
"toggle"
];
repeat = false;
hotkey-overlay.title = "Session menu";
};
# Notifications
"Mod+N" = {
action.spawn = [
noctalia-shell
"ipc"
"call"
"notifications"
"toggleHistory"
];
repeat = false;
hotkey-overlay.title = "Show notifications";
};
"Mod+Ctrl+N" = {
action.spawn = [
noctalia-shell
"ipc"
"call"
"notifications"
"clear"
];
repeat = false;
hotkey-overlay.title = "Clear notifications";
};
# Media keys
"XF86AudioPrev" = {
action.spawn = [
playerctl
"previous"
];
repeat = false;
hotkey-overlay.title = "Previous track";
};
"XF86AudioPlay" = {
action.spawn = [
playerctl
"play-pause"
];
repeat = false;
hotkey-overlay.title = "Play / pause track";
};
"XF86AudioNext" = {
action.spawn = [
playerctl
"next"
];
repeat = false;
hotkey-overlay.title = "Next track";
};
"XF86AudioRaiseVolume" = {
action.spawn = [
wpctl
"set-volume"
"@DEFAULT_AUDIO_SINK@"
"0.05+"
];
repeat = true;
allow-when-locked = true;
hotkey-overlay.title = "Raise volume";
};
"XF86AudioLowerVolume" = {
action.spawn = [
wpctl
"set-volume"
"@DEFAULT_AUDIO_SINK@"
"0.05-"
];
repeat = true;
allow-when-locked = true;
hotkey-overlay.title = "Lower volume";
};
"XF86AudioMute" = {
action.spawn = [
wpctl
"set-mute"
"@DEFAULT_AUDIO_SINK@"
"toggle"
];
repeat = false;
allow-when-locked = true;
hotkey-overlay.title = "Mute playback";
};
"Alt+XF86AudioRaiseVolume" = {
action.spawn = [
wpctl
"set-volume"
"@DEFAULT_AUDIO_SOURCE@"
"0.05+"
];
repeat = true;
allow-when-locked = true;
hotkey-overlay.title = "Raise microphone volume";
};
"Alt+XF86AudioLowerVolume" = {
action.spawn = [
wpctl
"set-volume"
"@DEFAULT_AUDIO_SOURCE@"
"0.05-"
];
repeat = true;
allow-when-locked = true;
hotkey-overlay.title = "Lower microphone volume";
};
"Alt+XF86AudioMute" = {
action.spawn = [
wpctl
"set-mute"
"@DEFAULT_AUDIO_SOURCE@"
"toggle"
];
repeat = false;
allow-when-locked = true;
hotkey-overlay.title = "Mute microphone";
};
# Brightness
"XF86MonBrightnessUp" = {
action.spawn = [
brightnessctl
"set"
"5%+"
];
repeat = true;
allow-when-locked = true;
hotkey-overlay.title = "Increase brightness";
};
"XF86MonBrightnessDown" = {
action.spawn = [
brightnessctl
"set"
"5%-"
];
repeat = true;
allow-when-locked = true;
hotkey-overlay.title = "Decrease brightness";
};
# Screen capture
"Print" = {
action.screenshot = {
show-pointer = false;
};
repeat = false;
hotkey-overlay.title = "Screenshot";
};
"Mod+Print" = {
action.screenshot-window = {
# show-pointer = false;
};
repeat = false;
hotkey-overlay.title = "Screenshot window";
};
"Shift+Print" = {
action.screenshot-screen = {
show-pointer = false;
};
repeat = false;
hotkey-overlay.title = "Screenshot screen";
};
# Display scaling
"Mod+Ctrl+Equal" = {
action.spawn = [
"output-scale"
"+0.1"
];
repeat = true;
hotkey-overlay.title = "Increase display scale";
};
"Mod+Ctrl+Minus" = {
action.spawn = [
"output-scale"
"-0.1"
];
repeat = true;
hotkey-overlay.title = "Decrease display scale";
};
"Mod+Ctrl+0" = {
action.spawn = [
"output-scale"
"1.0"
];
repeat = true;
hotkey-overlay.title = "Reset display scale";
};
# Window and column size
"Mod+F" = {
action.maximize-column = { };
repeat = false;
hotkey-overlay.title = "Maximize Column";
};
"Mod+Shift+F" = {
action.fullscreen-window = { };
repeat = false;
hotkey-overlay.title = "Fullscreen";
};
"Mod+Ctrl+F" = {
action.expand-column-to-available-width = { };
repeat = false;
hotkey-overlay.title = "Fill empty column space";
};
"Mod+Equal" = {
action.set-column-width = "+10%";
repeat = true;
hotkey-overlay.title = "Increase column width";
};
"Mod+Minus" = {
action.set-column-width = "-10%";
repeat = true;
hotkey-overlay.title = "Decrease column width";
};
"Mod+Shift+Equal" = {
action.set-window-height = "+10%";
repeat = true;
hotkey-overlay.title = "Increase window height";
};
"Mod+Shift+Minus" = {
action.set-window-height = "-10%";
repeat = true;
hotkey-overlay.title = "Decrease window height";
};
"Mod+Z" = {
action.toggle-window-floating = { };
repeat = false;
hotkey-overlay.title = "Toggle floating";
};
"Mod+T" = {
action.toggle-column-tabbed-display = { };
repeat = false;
hotkey-overlay.title = "Toggle tabbed column";
};
# Window and column movement
"Mod+K" = {
action.focus-window-or-monitor-up = { };
repeat = false;
hotkey-overlay.title = "Focus window up";
};
"Mod+J" = {
action.focus-window-or-monitor-down = { };
repeat = false;
hotkey-overlay.title = "Focus window down";
};
"Mod+H" = {
action.focus-column-or-monitor-left = { };
repeat = false;
hotkey-overlay.title = "Focus window left";
};
"Mod+L" = {
action.focus-column-or-monitor-right = { };
repeat = false;
hotkey-overlay.title = "Focus window right";
};
"Mod+BracketLeft" = {
action.consume-or-expel-window-left = { };
repeat = false;
hotkey-overlay.title = "Move window left";
};
"Mod+BracketRight" = {
action.consume-or-expel-window-right = { };
repeat = false;
hotkey-overlay.title = "Move window right";
};
"Mod+Shift+K" = {
action.move-column-to-monitor-up = { };
repeat = false;
hotkey-overlay.title = "Move column up";
};
"Mod+Shift+J" = {
action.move-column-to-monitor-down = { };
repeat = false;
hotkey-overlay.title = "Move column down";
};
"Mod+Shift+H" = {
action.move-column-left-or-to-monitor-left = { };
repeat = false;
hotkey-overlay.title = "Move column left";
};
"Mod+Shift+L" = {
action.move-column-right-or-to-monitor-right = { };
repeat = false;
hotkey-overlay.title = "Move column right";
};
# Workspaces
"Mod+Ctrl+K" = {
action.focus-workspace-up = { };
repeat = false;
hotkey-overlay.title = "Focus workspace up";
};
"Mod+Ctrl+J" = {
action.focus-workspace-down = { };
repeat = false;
hotkey-overlay.title = "Focus workspace down";
};
"Mod+Ctrl+Shift+K" = {
action.move-column-to-workspace-up = { };
repeat = false;
hotkey-overlay.title = "Move column to workspace up";
};
"Mod+Ctrl+Shift+J" = {
action.move-column-to-workspace-down = { };
repeat = false;
hotkey-overlay.title = "Move column to workspace down";
};
# Overview
"Mod+Tab" = {
action.toggle-overview = { };
repeat = false;
hotkey-overlay.title = "Toggle overview";
};
};
window-rules = [
{
geometry-corner-radius = {
bottom-left = 10.0;
bottom-right = 10.0;
top-left = 10.0;
top-right = 10.0;
};
clip-to-geometry = true;
}
# Unfortunately windows like firefox extensions set their titles after spawning preventing
# the window rules from being applied. There is a script to fix this but it is pretty hacky.
# {
# matches = [
# {
# title = "^Extension:.*";
# app-id = "firefox";
# }
# ];
# open-floating = true;
# }
{
matches = [
{ app-id = "foot"; }
{ app-id = "Alacritty"; }
];
opacity = 0.90;
default-column-width.proportion = 0.4;
}
];
layer-rules = [
{
# Use noctalia wallpaper as overview backdrop
matches = [ { namespace = "^noctalia-overview*"; } ];
place-within-backdrop = true;
}
];
prefer-no-csd = true;
screenshot-path = "${config.xdg.userDirs.extraConfig.SCREENSHOTS}/%Y%m%d-%H%M%S.png";
hotkey-overlay = {
skip-at-startup = true;
};
spawn-at-startup = [
{ argv = [ "noctalia-shell" ]; }
];
cursor = {
size = config.stylix.cursor.size;
theme = config.stylix.cursor.name;
hide-when-typing = true;
};
gestures = {
hot-corners.enable = false;
};
xwayland-satellite = {
enable = true;
path = lib.getExe pkgs.xwayland-satellite-unstable;
};
environment = {
"NIXOS_OZONE_WL" = "1";
};
debug = {
# Allows notification actions and window activation from Noctalia.
honor-xdg-activation-with-invalid-serial = { };
};
# Support for external 'includes' sounds like it is in the works.
# Will just have to wait until then for noctalia color scheme integration.
};
};
};
}

45
modules/features/nix.nix Normal file
View File

@@ -0,0 +1,45 @@
{
inputs,
self,
...
}:
{
flake.modules.nixos.nix = {
imports = [
inputs.nur.modules.nixos.default
];
nix = {
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
settings = {
experimental-features = [
"nix-command"
"flakes"
];
substituters = [
"https://cache.nixos.org"
"https://nix-community.cachix.org"
"https://devenv.cachix.org"
"https://hyprland.cachix.org"
"https://vicinae.cachix.org"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"vicinae.cachix.org-1:1kDrfienkGHPYbkpNj1mWTr7Fm1+zcenzgTizIcI3oc="
];
};
};
nixpkgs = {
config.allowUnfree = true;
overlays = [
self.overlays.default
];
};
programs.nix-ld.enable = true;
};
}

View File

@@ -0,0 +1,142 @@
{
inputs,
...
}:
{
flake.modules.homeManager.noctalia =
{
config,
...
}:
{
imports = [
inputs.noctalia.homeModules.default
];
programs.noctalia-shell = {
enable = true;
settings = {
general = {
avatarImage = "~/.face";
autoStartAuth = true;
allowPasswordWithFprintd = true;
};
location.name = "Washington DC";
bar = {
widgets = {
right = [
{
id = "plugin:tailscale";
}
{
id = "Tray";
}
{
id = "NotificationHistory";
}
{
id = "Battery";
}
{
id = "Volume";
}
{
id = "Brightness";
}
{
id = "ControlCenter";
}
];
};
};
templates = {
activeTemplates = [
{
enabled = true;
id = "alacritty";
}
{
enabled = true;
id = "discord";
}
{
enabled = true;
id = "foot";
}
{
enabled = true;
id = "gtk";
}
{
enabled = true;
id = "helix";
}
{
enabled = true;
id = "niri";
}
{
enabled = true;
id = "pywalfox";
}
{
enabled = true;
id = "qt";
}
{
enabled = true;
id = "vicinae";
}
{
enabled = true;
id = "yazi";
}
{
enabled = true;
id = "zed";
}
];
enableUserTheming = true;
};
wallpaper = {
enabled = true;
overviewEnabled = true;
directory = "${config.xdg.userDirs.extraConfig.WALLPAPERS}";
};
colorSchemes.predefinedScheme = "Catppuccin";
};
plugins = {
sources = [
{
enabled = true;
name = "Noctalia Plugins";
url = "https://github.com/noctalia-dev/noctalia-plugins";
}
];
states = {
tailscale = {
enabled = true;
sourceUrl = "https://github.com/noctalia-dev/noctalia-plugins";
};
activate-linux = {
enabled = true;
sourceUrl = "https://github.com/noctalia-dev/noctalia-plugins";
};
};
version = 1;
};
pluginSettings = {
tailscale = {
refreshInterval = 5000;
compactMode = true;
showIpAddress = false;
showPeerCount = false;
hideDisconnected = false;
terminalCommand = "foot";
pingCount = 5;
defaultPeerAction = "copy-ip";
};
};
};
};
}

View File

@@ -0,0 +1,19 @@
{
flake.modules.nixos.pipewire = {
# Enable sound with pipewire.
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
# jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
# media-session.enable = true;
};
security.rtkit.enable = true;
};
}

View File

@@ -0,0 +1,34 @@
{
flake.modules.nixos.power-management = {
services = {
upower.enable = true;
system76-scheduler.settings.cfsProfiles.enable = true;
tlp = {
enable = true;
settings = {
CPU_BOOST_ON_AC = 1;
CPU_BOOST_ON_BAT = 0;
CPU_SCALING_GOVERNOR_ON_AC = "performance";
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
PLATFORM_PROFILE_ON_AC = "performance";
PLATFORM_PROFILE_ON_BAT = "balanced";
START_CHARGE_THRESH_BAT1 = 65; # Only STOP_CHARGE_THRESH available on Framework
STOP_CHARGE_THRESH_BAT1 = 80;
# Fixes stuttering Hyprland animations on Intel iGPU (https://wiki.hypr.land/Configuring/Performance/)
INTEL_GPU_MIN_FREQ_ON_AC = 300;
INTEL_GPU_MIN_FREQ_ON_BAT = 300;
};
};
# Disable GNOME's power management (conflicts with TLP)
power-profiles-daemon.enable = false;
};
powerManagement = {
enable = true;
powertop.enable = true;
};
};
}

View File

@@ -0,0 +1,24 @@
{
flake.modules.nixos.printing =
{ pkgs, ... }:
{
services = {
# Enable CUPS to print documents.
printing = {
enable = true;
drivers = with pkgs; [
gutenprint
cnijfilter2
];
};
avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
};
};
hardware.sane.enable = true;
};
}

34
modules/features/ssh.nix Normal file
View File

@@ -0,0 +1,34 @@
{
flake.modules.homeManager.ssh = {
programs.ssh = {
enable = true;
enableDefaultConfig = false;
matchBlocks = {
"*" = {
addKeysToAgent = "yes";
identityFile = [ "~/.ssh/id_ed25519_sk_rk" ];
};
"stu" = {
hostname = "stu.cs.jmu.edu";
user = "tamassno";
localForwards = [
{
bind.port = 5432;
host = {
address = "data.cs.jmu.edu";
port = 5432;
};
}
];
serverAliveCountMax = 5;
serverAliveInterval = 60;
};
"cluster" = {
hostname = "login02.cluster.cs.jmu.edu";
user = "tamassno";
proxyJump = "stu";
};
};
};
};
}

View File

@@ -0,0 +1,46 @@
{
flake.modules.homeManager.starship =
{ lib, ... }:
{
programs.starship = {
enable = true;
enableZshIntegration = true;
settings = {
add_newline = true;
format = lib.strings.concatStrings [
"[ [\\[](1)$username([@](bold 2)$hostname)[\\]:](1) $directory( $git_branch)](5)"
"$line_break"
"[ $character](5)"
];
username = {
style_root = "white";
format = "[$user](3)";
disabled = false;
show_always = true;
};
hostname = {
format = "[$hostname](bold 4)";
disabled = false;
ssh_only = false;
};
character = {
success_symbol = "[](bold 5)";
error_symbol = "[](bold 5)";
vimcmd_symbol = "[](bold 5)";
};
directory = {
read_only = "";
format = "[ $path](5)";
read_only_style = "bold white";
truncation_length = 5;
};
git_branch = {
symbol = "";
style = "bright-black";
format = "[$symbol $branch]($style)";
};
scan_timeout = 100;
};
};
};
}

105
modules/features/stylix.nix Normal file
View File

@@ -0,0 +1,105 @@
{
inputs,
...
}:
{
flake.modules.homeManager.stylix =
{
config,
pkgs,
...
}:
{
imports = [
inputs.stylix.homeModules.stylix
];
# Not really using stylix as it was intended because IMO it sets too many defaults for some
# programs and not enought for others, meaning I wind up setting a lot myself anyway. That
# being said it provides a nice structure for setting fonts, cursors, icons, etc.
stylix = {
enable = true;
autoEnable = false;
polarity = "dark";
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
cursor = {
name = "catppuccin-mocha-dark-cursors";
package = pkgs.catppuccin-cursors.mochaDark;
size = 16;
};
# For some reason setting the fonts' package option doesn't work.
# Just use home.packages instead
fonts = {
monospace.name = "JetBrainsMono Nerd Font";
sansSerif.name = "Noto Sans";
emoji.name = "Noto Color Emoji";
sizes = {
applications = 12;
terminal = 12;
};
};
icons = {
enable = true;
package = pkgs.morewaita-icon-theme;
light = "MoreWaita";
dark = "MoreWaita";
};
};
# Fonts
home.packages = with pkgs; [
nerd-fonts.jetbrains-mono
noto-fonts
noto-fonts-cjk-sans
noto-fonts-color-emoji
];
fonts.fontconfig = {
enable = true;
defaultFonts = {
sansSerif = [ "Noto Sans" ];
monospace = [ "JetBrainsMono Nerd Font" ];
emoji = [ "Noto Color Emoji" ];
};
};
gtk = {
enable = true;
colorScheme = config.stylix.polarity;
# iconTheme is set by default by stylix.icons.enable
theme = {
name = "adw-gtk3-${config.stylix.polarity}";
package = pkgs.adw-gtk3;
};
gtk4.theme = config.gtk.theme;
};
qt =
let
qt_settings = ver: {
Appearance = {
color_scheme_path = "${config.xdg.configHome}/${ver}/colors/noctalia.conf";
custom_palette = true;
icon_theme = config.stylix.icons.${config.stylix.polarity};
standard_dialogs = "xdgdesktopportal";
style = "Breeze";
};
Fonts = {
fixed = "\"${config.stylix.fonts.monospace.name},${toString config.stylix.fonts.sizes.applications}\"";
general = "\"${config.stylix.fonts.sansSerif.name},${toString config.stylix.fonts.sizes.applications}\"";
};
};
in
{
enable = true;
platformTheme.name = "qtct";
style.name = "breeze";
qt5ctSettings = qt_settings "qt5ct";
qt6ctSettings = qt_settings "qt6ct";
};
home.sessionVariables = {
QS_ICON_THEME = config.stylix.icons.${config.stylix.polarity};
};
};
}

View File

@@ -0,0 +1,22 @@
{
flake.modules.homeManager.swappy =
{
config,
...
}:
{
programs.swappy = {
enable = true;
# Configuration options: https://github.com/jtheoof/swappy?tab=readme-ov-file#config
settings = {
Default = {
save_dir = config.xdg.userDirs.extraConfig.SCREENSHOTS;
save_filename_format = "%Y%m%d-%H%M%S.png";
show_panel = false;
auto_save = false;
early_exit = true;
};
};
};
};
}

View File

@@ -0,0 +1,36 @@
{
inputs,
...
}:
{
flake.modules.nixos.tailscale =
{ config, lib, ... }:
{
services.tailscale = {
enable = true;
useRoutingFeatures = "client";
authKeyFile = config.age.secrets.tailscale-auth.path;
# * Only applied if `authKeyFile` is specified
extraUpFlags = [
"--ssh"
"--accept-routes=true"
];
extraSetFlags = [
"--operator=eclypse"
];
};
age.secrets.tailscale-auth.rekeyFile = "${inputs.secrets}/tailscale-auth.age";
# Taildrop
systemd.user.services.taildrop = {
description = "Taildrop File Receiver Service";
wantedBy = [ "default.target" ];
serviceConfig = {
Type = "simple";
ExecStart = "${lib.getExe config.services.tailscale.package} file get --verbose --loop %h/Downloads/";
};
};
};
}

View File

@@ -0,0 +1,17 @@
{
flake.modules.homeManager.vesktop = {
programs.vesktop = {
enable = true;
vencord = {
settings = {
oUpdate = false;
autoUpdateNotification = false;
notifyAboutUpdates = false;
useQuickCss = true;
disableMinSize = true;
enabledThemes = [ "noctalia.theme.css" ];
};
};
};
};
}

View File

@@ -0,0 +1,43 @@
{
flake.modules.homeManager.vicinae =
{
config,
...
}:
{
# Not using Vicinae's flake because the server fucking seg faults immediately
programs.vicinae = {
enable = true;
systemd = {
enable = true;
autoStart = true;
};
# For configuration option documentation, see: https://github.com/vicinaehq/vicinae/blob/f6222f1e82fe2077ad42f10a6d6837dc61c67fd0/vicinae/assets/config.jsonc
settings = {
escape_key_behavior = "close_window";
close_on_focus_loss = true;
pop_to_root_on_close = true;
favicon_service = "twenty";
telemetry = {
system_info = false;
};
font = {
normal = {
size = config.stylix.fonts.sizes.applications;
family = "${config.stylix.fonts.monospace.name}";
};
};
theme = {
light = {
name = "noctalia";
icon_theme = "${config.stylix.icons.light}";
};
dark = {
name = "noctalia";
icon_theme = "${config.stylix.icons.dark}";
};
};
};
};
};
}

View File

@@ -0,0 +1,20 @@
{
flake.modules.nixos.virtualization =
{ config, pkgs, ... }:
{
boot = {
extraModulePackages = with config.boot.kernelPackages; [ virtualbox ];
kernelParams = [
"kvm.enable_virt_at_load=0" # Fixes some virtuallization issues
];
};
virtualisation = {
podman.enable = true;
};
environment.systemPackages = [ pkgs.distrobox ];
users.extraGroups.vboxusers.members = [ "eclypse" ];
};
}

View File

@@ -0,0 +1,8 @@
{
flake.modules.nixos.wayland = {
programs = {
uwsm.enable = true;
xwayland.enable = true;
};
};
}

15
modules/features/x11.nix Normal file
View File

@@ -0,0 +1,15 @@
{
flake.modules.nixos.x11 = {
services.xserver = {
# Enable the X11 windowing system.
# You can disable this if you're only using the Wayland session.
enable = true;
# Configure keymap in X11
xkb = {
layout = "us";
variant = "";
};
};
};
}

38
modules/features/xdg.nix Normal file
View File

@@ -0,0 +1,38 @@
{
flake.modules.homeManager.xdg =
{
config,
pkgs,
...
}:
{
xdg = {
enable = true;
portal = {
enable = true;
configPackages = [ pkgs.gnome-session ];
extraPortals = with pkgs; [
xdg-desktop-portal-gnome
xdg-desktop-portal-gtk
];
};
userDirs = {
enable = true;
setSessionVariables = true;
createDirectories = true;
extraConfig = {
DEV = "${config.home.homeDirectory}/Dev";
WALLPAPERS = "${config.xdg.userDirs.pictures}/Wallpapers";
SCREENSHOTS = "${config.xdg.userDirs.pictures}/Screenshots";
};
};
};
home.file.".face".source = ../../assets/profile-picture.jpg;
home.file."${config.xdg.userDirs.extraConfig.WALLPAPERS}" = {
source = ../../assets/wallpapers;
recursive = true;
};
};
}

66
modules/features/yazi.nix Normal file
View File

@@ -0,0 +1,66 @@
{
flake.modules.homeManager.yazi =
{
pkgs,
...
}:
{
home.packages = with pkgs; [
dragon-drop
];
programs.yazi = {
enable = true;
enableZshIntegration = true;
shellWrapperName = "y";
plugins = with pkgs.yaziPlugins; {
inherit git full-border chmod;
};
initLua = ''
require("git"):setup {
-- Order of status signs showing in the linemode
order = 1500,
}
require("full-border"):setup()
'';
keymap = {
mgr.prepend_keymap = [
{
on = "<C-d>";
run = "shell -- dragon-drop -x -i -T %s1";
desc = "Open a prompt to drag and drop a file";
}
{
on = [
"c"
"m"
];
run = "plugin chmod";
desc = "Chmod on selected files";
}
];
};
settings = {
plugin = {
# Disable all preset previewers, preloaders
# This is recommended by yazi when working with network shares
preloaders = [ ];
previewers = [ ];
prepend_fetchers = [
{
id = "git";
url = "*";
run = "git";
}
{
id = "git";
url = "*/";
run = "git";
}
];
};
};
};
};
}

View File

@@ -0,0 +1,16 @@
{
flake.modules.nixos.yubikey =
{ pkgs, ... }:
{
programs = {
yubikey-manager.enable = true;
yubikey-touch-detector.enable = true;
};
environment.systemPackages = [
pkgs.age-plugin-yubikey
];
services.yubikey-agent.enable = true;
};
}

22
modules/features/zed.nix Normal file
View File

@@ -0,0 +1,22 @@
{
flake.modules.homeManager.zed =
{
pkgs,
...
}:
{
programs.zed-editor = {
enable = true;
extensions = [
"nix"
];
extraPackages = [ pkgs.nixd ];
userSettings = {
features = {
edit_prediction_provider = "copilot";
};
};
};
};
}

458
modules/features/zellij.nix Normal file
View File

@@ -0,0 +1,458 @@
{
flake.modules.homeManager.zellij = {
programs.zellij =
let
mod = "Alt"; # Can be one of "Ctrl", "Alt", "Shift", "Super"
in
{
enable = true;
enableZshIntegration = true;
settings = {
theme = "catppuccin-mocha";
show_startup_tips = false;
keybinds = {
_props = {
clear-defaults = true;
};
_children = [
{
locked._children = [
{
bind = {
_args = [ "${mod} g" ];
_children = [ { SwitchToMode._args = [ "Normal" ]; } ];
};
}
];
}
{
resize._children = [
{
bind = {
_args = [ "${mod} r" ];
_children = [ { SwitchToMode._args = [ "Normal" ]; } ];
};
}
{
bind = {
_args = [ "h" ];
_children = [ { Resize._args = [ "Increase Left" ]; } ];
};
}
{
bind = {
_args = [ "j" ];
_children = [ { Resize._args = [ "Increase Down" ]; } ];
};
}
{
bind = {
_args = [ "k" ];
_children = [ { Resize._args = [ "Increase Up" ]; } ];
};
}
{
bind = {
_args = [ "l" ];
_children = [ { Resize._args = [ "Increase Right" ]; } ];
};
}
];
}
{
pane._children = [
{
bind = {
_args = [ "${mod} p" ];
_children = [ { SwitchToMode._args = [ "Normal" ]; } ];
};
}
{
bind = {
_args = [ "c" ];
_children = [ { Clear = { }; } ];
};
}
{
bind = {
_args = [ "e" ];
_children = [
{ TogglePaneEmbedOrFloating = { }; }
{ SwitchToMode._args = [ "Normal" ]; }
];
};
}
{
bind = {
_args = [ "f" ];
_children = [
{ ToggleFocusFullscreen = { }; }
{ SwitchToMode._args = [ "Normal" ]; }
];
};
}
{
bind = {
_args = [ "s" ];
_children = [
{ NewPane._args = [ "stacked" ]; }
{ SwitchToMode._args = [ "Normal" ]; }
];
};
}
{
bind = {
_args = [ "j" ];
_children = [
{ NewPane._args = [ "Down" ]; }
{ SwitchToMode._args = [ "Normal" ]; }
];
};
}
{
bind = {
_args = [ "l" ];
_children = [
{ NewPane._args = [ "Right" ]; }
{ SwitchToMode._args = [ "Normal" ]; }
];
};
}
{
bind = {
_args = [ "n" ];
_children = [
{ NewPane = { }; }
{ SwitchToMode._args = [ "Normal" ]; }
];
};
}
{
bind = {
_args = [ "p" ];
_children = [
{ SwitchFocus = { }; }
{ SwitchToMode._args = [ "Normal" ]; }
];
};
}
{
bind = {
_args = [ "r" ];
_children = [
{ SwitchToMode._args = [ "RenamePane" ]; }
{ PaneNameInput._args = [ 0 ]; }
];
};
}
{
bind = {
_args = [ "w" ];
_children = [
{ ToggleFloatingPanes = { }; }
{ SwitchToMode._args = [ "Normal" ]; }
];
};
}
{
bind = {
_args = [ "x" ];
_children = [
{ CloseFocus = { }; }
{ SwitchToMode._args = [ "Normal" ]; }
];
};
}
{
bind = {
_args = [ "z" ];
_children = [
{ TogglePaneFrames = { }; }
{ SwitchToMode._args = [ "Normal" ]; }
];
};
}
];
}
{
move._children = [
{
bind = {
_args = [ "${mod} m" ];
_children = [ { SwitchToMode._args = [ "Normal" ]; } ];
};
}
{
bind = {
_args = [ "h" ];
_children = [ { MovePane._args = [ "Left" ]; } ];
};
}
{
bind = {
_args = [ "j" ];
_children = [ { MovePane._args = [ "Down" ]; } ];
};
}
{
bind = {
_args = [ "k" ];
_children = [ { MovePane._args = [ "Up" ]; } ];
};
}
{
bind = {
_args = [ "l" ];
_children = [ { MovePane._args = [ "Right" ]; } ];
};
}
];
}
{
tab._children = [
{
bind = {
_args = [ "${mod} t" ];
_children = [ { SwitchToMode._args = [ "Normal" ]; } ];
};
}
{
bind = {
_args = [ "b" ];
_children = [
{ BreakPane = { }; }
{ SwitchToMode._args = [ "Normal" ]; }
];
};
}
{
bind = {
_args = [ "h" ];
_children = [ { MoveTab._args = [ "Left" ]; } ];
};
}
{
bind = {
_args = [ "l" ];
_children = [ { MoveTab._args = [ "Right" ]; } ];
};
}
{
bind = {
_args = [ "n" ];
_children = [
{ NewTab = { }; }
{ SwitchToMode._args = [ "Normal" ]; }
];
};
}
{
bind = {
_args = [ "r" ];
_children = [
{ SwitchToMode._args = [ "RenameTab" ]; }
{ TabNameInput._args = [ 0 ]; }
];
};
}
{
bind = {
_args = [ "x" ];
_children = [
{ CloseTab = { }; }
{ SwitchToMode._args = [ "Normal" ]; }
];
};
}
];
}
{
renametab._children = [
{
bind = {
_args = [ "${mod} c" ];
_children = [ { SwitchToMode._args = [ "Normal" ]; } ];
};
}
{
bind = {
_args = [ "Esc" ];
_children = [
{ UndoRenameTab = { }; }
{ SwitchToMode._args = [ "Normal" ]; }
];
};
}
];
}
{
renamepane._children = [
{
bind = {
_args = [ "${mod} c" ];
_children = [ { SwitchToMode._args = [ "Normal" ]; } ];
};
}
{
bind = {
_args = [ "Esc" ];
_children = [
{ UndoRenamePane = { }; }
{ SwitchToMode._args = [ "Normal" ]; }
];
};
}
];
}
{
shared_except = {
_args = [ "locked" ];
_children = [
{
bind = {
_args = [ "${mod} g" ];
_children = [ { SwitchToMode._args = [ "Locked" ]; } ];
};
}
{
bind = {
_args = [ "${mod} h" ];
_children = [ { MoveFocusOrTab._args = [ "Left" ]; } ];
};
}
{
bind = {
_args = [ "${mod} l" ];
_children = [ { MoveFocusOrTab._args = [ "Right" ]; } ];
};
}
{
bind = {
_args = [ "${mod} j" ];
_children = [ { MoveFocus._args = [ "Down" ]; } ];
};
}
{
bind = {
_args = [ "${mod} k" ];
_children = [ { MoveFocus._args = [ "Up" ]; } ];
};
}
{
bind = {
_args = [ "${mod} [" ];
_children = [ { PreviousSwapLayout = { }; } ];
};
}
{
bind = {
_args = [ "${mod} ]" ];
_children = [ { NextSwapLayout = { }; } ];
};
}
];
};
}
{
shared_except = {
_args = [
"normal"
"locked"
];
_children = [
{
bind = {
_args = [
"Enter"
"Esc"
];
_children = [ { SwitchToMode = [ "Normal" ]; } ];
};
}
];
};
}
{
shared_except = {
_args = [
"pane"
"locked"
];
_children = [
{
bind = {
_args = [ "${mod} p" ];
_children = [ { SwitchToMode = [ "Pane" ]; } ];
};
}
];
};
}
{
shared_except = {
_args = [
"resize"
"locked"
];
_children = [
{
bind = {
_args = [ "${mod} r" ];
_children = [ { SwitchToMode = [ "Resize" ]; } ];
};
}
];
};
}
{
shared_except = {
_args = [
"tab"
"locked"
];
_children = [
{
bind = {
_args = [ "${mod} t" ];
_children = [ { SwitchToMode = [ "Tab" ]; } ];
};
}
];
};
}
{
shared_except = {
_args = [
"move"
"locked"
];
_children = [
{
bind = {
_args = [ "${mod} m" ];
_children = [ { SwitchToMode = [ "Move" ]; } ];
};
}
];
};
}
];
};
plugins = {
compact-bar = {
_props = {
location = "zellij:compact-bar";
};
};
};
simplified_ui = true;
pane_frames = false;
copy_on_select = true;
};
};
};
}

View File

@@ -0,0 +1,8 @@
{
flake.modules.homeManager.zoxide = {
programs.zoxide = {
enable = true;
enableZshIntegration = true;
};
};
}

56
modules/features/zsh.nix Normal file
View File

@@ -0,0 +1,56 @@
{
flake.modules.nixos.zsh = {
programs.zsh.enable = true;
environment.pathsToLink = [ "/share/zsh" ];
};
flake.modules.homeManager.zsh =
{ config, ... }:
{
programs.zsh = {
enable = true;
enableCompletion = false;
antidote = {
enable = true;
plugins = [
"Aloxaf/fzf-tab"
];
};
autosuggestion.enable = true;
dotDir = "${config.xdg.configHome}/zsh";
history = {
append = true;
findNoDups = true;
ignoreSpace = true;
ignoreDups = true;
saveNoDups = true;
share = true;
};
historySubstringSearch = {
enable = true;
searchDownKey = "^p";
searchUpKey = "^n";
};
initContent = ''
# disable sort when completing `git checkout`
zstyle ':completion:*:git-checkout:*' sort false
# set descriptions format to enable group support
# NOTE: don't use escape sequences (like '%F{red}%d%f') here, fzf-tab will ignore them
zstyle ':completion:*:descriptions' format '[%d]'
# preview directory's content when completing cd or zoxide
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls --color $realpath'
zstyle ':fzf-tab:complete:__zoxide_z:*' fzf-preview 'ls --color $realpath'
# custom fzf flags
# NOTE: fzf-tab does not follow FZF_DEFAULT_OPTS by default
zstyle ':fzf-tab:*' fzf-flags --color=fg:1,fg+:2 --bind=tab:accept
# switch group using `<` and `>`
zstyle ':fzf-tab:*' switch-group '<' '>'
'';
syntaxHighlighting.enable = true;
shellAliases = {
ff = "fastfetch";
};
};
};
}