refactor: centralise home-manager configs in system configs

This commit is contained in:
Mohammad Rafiq 2025-03-27 04:02:14 +08:00
parent bb6da9ccb0
commit 3d04d338d1
No known key found for this signature in database
54 changed files with 667 additions and 628 deletions

View file

@ -13,7 +13,6 @@
./boot.nix
./networking.nix
./nix-config.nix
./programs/zsh.nix
./security.nix
./users.nix
]
@ -21,9 +20,6 @@
(lib.optionals (type == "desktop") [
./hardware/audio.nix
./hardware/bluetooth.nix
./programs/getty.nix
./programs/hyprland.nix
./programs/hyprlock.nix
./stylix.nix
])
# Options for specific hostnames.

22
configs/programs/ags.nix Normal file
View file

@ -0,0 +1,22 @@
{ inputs, pkgs, ... }:
{
home-manager.users.rafiq = {
imports = [ inputs.ags.homeManagerModules.default ];
# Expose the cli tools to the home environment
home.packages = [ inputs.ags.packages.${pkgs.stdenv.hostPlatform.system}.io ];
programs.ags = {
enable = true;
configDir = ./ags; # ~/.config/ags
systemd.enable = false;
# The module only includes the core astal3, astal4 and astal-io libraries
extraPackages = with pkgs; [
# add packages to runtime
# inputs.ags.packages.${pkgs.system}.battery
# fzf
];
};
};
}

View file

@ -0,0 +1,9 @@
{
home-manager.users.rafiq = {
services.clipse = {
enable = true;
historySize = 1000;
imageDisplay.type = "kitty";
};
};
}

View file

@ -0,0 +1,11 @@
{ inputs, ... }:
{
home-manager.users.rafiq = {
imports = [
inputs.nix-index-database.hmModules.nix-index
];
programs.nix-index.enable = true;
programs.nix-index-database.comma.enable = true;
};
}

View file

@ -0,0 +1,27 @@
{
imports = [
./ags.nix
./clipse.nix
./comma.nix
./zsh.nix
./direnv.nix
./dunst.nix
./firefox.nix
./fuzzel.nix
./fzf.nix
./getty.nix
./git.nix
./hyprland.nix
./hyprlock.nix
./hyprshade.nix
./kitty.nix
./nh.nix
./nvf.nix
./spicetify.nix
./starship.nix
./tealdeer.nix
./yazi.nix
./zellij.nix
./zoxide.nix
];
}

View file

@ -0,0 +1,12 @@
{
# direnv lets us declare a .envrc in each project directory
# and updates the shell with the packages specified.
home-manager.users.rafiq = {
programs.direnv = {
enable = true;
enableBashIntegration = true;
nix-direnv.enable = true;
};
};
}

View file

@ -0,0 +1,5 @@
{
home-manager.users.rafiq = {
services.dunst.enable = true;
};
}

View file

@ -0,0 +1,7 @@
{
home-manager.users.rafiq = {
programs.firefox = {
enable = true;
};
};
}

View file

@ -0,0 +1,15 @@
{
home-manager.users.rafiq = {
programs.fuzzel = {
enable = true;
settings = {
main = {
terminal = "kitty -1 -e";
layer = "top";
keyboard-focus = "on-demand";
list-executables-in-path = true;
};
};
};
};
}

7
configs/programs/fzf.nix Normal file
View file

@ -0,0 +1,7 @@
{
home-manager.users.rafiq = {
programs.fzf = {
enable = true;
};
};
}

21
configs/programs/git.nix Normal file
View file

@ -0,0 +1,21 @@
{ config, ... }:
{
home-manager.users.rafiq = {
home.sessionVariables.GIT_CONFIG_GLOBAL = "$HOME/.config/git/config";
programs.git = {
enable = true;
userName = "Mohammad Rafiq";
userEmail = "mohammadrafiq567@gmail.com";
signing.key = "~/.ssh/id_ed25519.pub";
signing.signByDefault = true;
extraConfig = {
init.defaultBranch = "prime";
push.autoSetupRemote = true;
pull.rebase = false;
core.editor = "nvim";
gpg.format = "ssh";
};
};
};
}

View file

@ -2,10 +2,134 @@
inputs,
pkgs,
...
}: {
}:
{
programs.hyprland = {
enable = true;
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
portalPackage =
inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
};
home-manager.users.rafiq = {
home.sessionVariables.NIXOS_OZONE_WL = "1";
wayland.windowManager.hyprland = {
enable = true;
package = null;
portalPackage = null;
settings = {
"$mainMonitor" = "desc:OOO AN-270W04K";
"$vertMonitor" = "desc:Philips Consumer Electronics Company PHL 246V5 AU11330000086";
"$mainMod" = "SUPER";
"$terminal" = "kitty -1";
"$multiplexer" = "$terminal -e zellij";
"$browser" = "firefox";
"$music" = "spotify";
"$launcher" = "fuzzel";
"$clipboard" = "$terminal --class clipse -e clipse";
# Programs to run at startup
exec-once = [
"hyprlock"
"clipse -listen"
"hyprcloser"
];
env = [
"XCURSOR_SIZE,32"
# Nvidia Settings
"LIBVA_DRIVER_NAME,nvidia"
"__GLX_VENDOR_LIBRARY_NAME,nvidia"
"NVD_BACKEND,direct # needed for running vaapi-driver on later drivers"
];
# Monitors
monitor = [
"$mainMonitor, 3840x2160@60, auto, auto"
"$vertMonitor, 1920x1080@60, auto-left, auto, transform, 3"
", preferred, auto, 1"
];
# Switching to the current workspace will switch to the previous
binds.workspace_back_and_forth = true;
cursor.default_monitor = "$mainMonitor";
# Windows
general = {
# Make there be no gaps in between windows or edges
border_size = 5;
gaps_in = 0;
gaps_out = 0;
resize_on_border = true;
};
windowrulev2 = [
"float, class:firefox, title:Picture-in-Picture"
"float, class:(clipse)"
"move cursor 0 0, class:(clipse)"
"size 622 652, class:(clipse)"
"noanim, class:(clipse)"
];
animation = [
"workspaces, 0, , "
];
# Keybinds
bind = [
"$mainMod, return, exec, $multiplexer"
"$mainMod, W, killactive"
"$mainMod, O, exec, $browser"
"$mainMod, Escape, exec, hyprlock"
"$mainMod, Space, exec, $launcher"
# Launch utilities
"$mainMod_SHIFT, A, exec, hyprpicker -a"
"$mainMod, V, exec, $clipboard"
# move between windows
"$mainMod, H, cyclenext, visible"
"$mainMod, L, cyclenext, visible prev"
# HJKL to move a window
"$mainMod_ALT, H, movewindow, l"
"$mainMod_ALT, J, movewindow, d"
"$mainMod_ALT, K, movewindow, u"
"$mainMod_ALT, L, movewindow, r"
# HJKL to resize a window
"ALT_SHIFT, H, resizeactive, -10% 0"
"ALT_SHIFT, J, resizeactive, 0 -10%"
"ALT_SHIFT, K, resizeactive, 0 10%"
"ALT_SHIFT, L, resizeactive, 10% 0"
# H and L to move between workspaces on the current monitor including creation
"$mainMod_CTRL, H, workspace, r-1"
"$mainMod_CTRL, L, workspace, r+1"
];
# Repeat when held
bindle = [
# Keyboard Media Keys
", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"
", XF86AudioLowerVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%-"
];
bindm = [
"ALT, mouse:272, movewindow"
];
input = {
numlock_by_default = true;
follow_mouse = 2; # Click on a window to change focus
};
debug = {
damage_tracking = 0;
};
};
};
};
}

View file

@ -46,6 +46,7 @@ in
};
input-field = {
monitor = cfg.mainMonitor;
fade_on_empty = true;
size = "200, 45";
halign = "center";

View file

@ -0,0 +1,25 @@
{ inputs, pkgs, ... }:
{
home-manager.users.rafiq = {
home.packages = [ pkgs.hyprshade ];
xdg.configFile."hypr/hyprshade.toml" = {
enable = true;
text = # toml
''
[[shades]]
name = "vibrance"
default = true # will be activated when no other shader is scheduled
[[shades]]
name = "blue-light-filter"
start_time = 22:00:00
end_time = 08:00:00 # optional if more than one shader has start_time
'';
};
xdg.configFile."hypr/shaders" = {
enable = true;
recursive = true;
source = "${inputs.hyprshaders}/shaders";
};
};
}

View file

@ -0,0 +1,16 @@
{
home-manager.users.rafiq = {
home.sessionVariables.TERMINAL = "kitty";
programs.kitty = {
enable = true;
keybindings = {
"ctrl+equal" = "change_font_size current +2.0";
"ctrl+minus" = "change_font_size current -2.0";
};
settings = {
window_padding_width = 10;
confirm_os_window_close = 0;
};
};
};
}

7
configs/programs/nh.nix Normal file
View file

@ -0,0 +1,7 @@
{
home-manager.users.rafiq = {
programs.nh = {
enable = true;
};
};
}

88
configs/programs/nvf.nix Normal file
View file

@ -0,0 +1,88 @@
{ inputs, pkgs, ... }:
{
home-manager.users.rafiq = {
imports = [
inputs.nvf.homeManagerModules.default
./nvf/input.nix
./nvf/languages.nix
./nvf/ui.nix
./nvf/utilities.nix
];
home.sessionVariables.EDITOR = "nvim";
programs.nvf = {
enable = true;
enableManpages = true;
settings.vim = {
viAlias = true;
vimAlias = true;
options = {
# Indentation
autoindent = true;
smartindent = true;
expandtab = true;
smarttab = true;
wrap = true;
shiftwidth = 2;
tabstop = 2;
foldlevel = 1000; # Open all folds by default
# Search
hlsearch = true;
ignorecase = true;
incsearch = true;
smartcase = true; # case-sensitive if search contains uppercase
# Visual
number = true;
cursorline = true;
visualbell = true;
termguicolors = true;
# Input
backspace = "indent,eol,start";
};
keymaps = [
{
desc = "Open the file path under the cursor, making the file if it doesn't exist.";
key = "gf";
mode = "n";
action = ":cd %:p:h<CR>:e <cfile><CR>";
silent = true;
}
{
desc = "Delete the previous word.";
key = "<C-BS>";
mode = "i";
action = "<C-W>";
silent = true;
}
{
desc = "Open the filetree.";
key = "t";
mode = "n";
action = ":Yazi<CR>";
silent = true;
}
];
luaConfigRC.turn_off_inline_diagnostics =
# lua
''
vim.diagnostic.config({
virtual_text = false -- turn off inline diagnostics
})
'';
extraPlugins = with pkgs.vimPlugins; {
yuck-vim = {
package = yuck-vim;
};
nvim-treesitter-parsers = {
package = nvim-treesitter-parsers.yuck;
};
nvim-parinfer = {
package = nvim-parinfer;
};
};
};
};
};
}

View file

@ -0,0 +1,23 @@
{
inputs,
pkgs,
...
}:
let
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.stdenv.system};
in
{
home-manager.users.rafiq = {
imports = [
inputs.spicetify-nix.homeManagerModules.spicetify
];
programs.spicetify = {
enable = true;
spotifyLaunchFlags = "--enable-features=UseOzonePlatform --ozone-platform=wayland";
windowManagerPatch = true;
enabledCustomApps = with spicePkgs.apps; [
marketplace
];
};
};
}

View file

@ -0,0 +1,16 @@
{
home-manager.users.rafiq = {
programs.starship = {
enable = true;
settings = {
add_newline = false;
format = "$character";
right_format = "$all";
character = {
success_symbol = "[\\$](bold green)";
error_symbol = "[\\$](bold red)";
};
};
};
};
}

View file

@ -0,0 +1,8 @@
{
home-manager.users.rafiq = {
programs.tealdeer = {
enable = true;
enableAutoUpdates = true;
};
};
}

129
configs/programs/yazi.nix Normal file
View file

@ -0,0 +1,129 @@
{
inputs,
pkgs,
...
}:
let
yazi-plugins = pkgs.fetchFromGitHub {
owner = "yazi-rs";
repo = "plugins";
rev = "273019910c1111a388dd20e057606016f4bd0d17";
hash = "sha256-80mR86UWgD11XuzpVNn56fmGRkvj0af2cFaZkU8M31I=";
};
in
{
home-manager.users.rafiq = {
programs.yazi = {
enable = true;
package = inputs.yazi.packages.${pkgs.system}.default;
shellWrapperName = "y";
# yazi.toml
settings = {
manager = {
sort_by = "natural"; # Sort naturally, e.g. 1.md < 2.md < 10.md
sort_translit = true; # Transliterate filenames for sorting
show_hidden = true;
};
plugin = {
prepend_preloaders = [
{
mime = "{audio,video,image}/*";
run = "mediainfo";
}
{
mime = "application/subrip";
run = "mediainfo";
}
];
prepend_previewers = [
{
name = "*.md";
run = "glow";
}
{
mime = "{audio,video,image}/*";
run = "mediainfo";
}
{
mime = "application/subrip";
run = "mediainfo";
}
];
prepend_fetchers = [
{
id = "git";
name = "*";
run = "git";
}
{
id = "git";
name = "*/";
run = "git";
}
];
};
};
# ~/.config/yazi/keymap.toml
keymap = {
manager.prepend_keymap = [
{
on = "l";
run = "plugin smart-enter";
desc = "Enter the child directory or open the file.";
}
{
on = "M";
run = "plugin mount";
desc = "Open the mount.yazi menu.";
}
];
};
plugins = {
full-border = "${yazi-plugins}/full-border.yazi";
smart-enter = "${yazi-plugins}/smart-enter.yazi";
git = "${yazi-plugins}/git.yazi";
mount = "${yazi-plugins}/mount.yazi";
glow = pkgs.fetchFromGitHub {
owner = "Reledia";
repo = "glow.yazi";
rev = "c76bf4fb612079480d305fe6fe570bddfe4f99d3";
sha256 = "sha256-DPud1Mfagl2z490f5L69ZPnZmVCa0ROXtFeDbEegBBU=";
};
mediainfo = pkgs.fetchFromGitHub {
owner = "boydaihungst";
repo = "mediainfo.yazi";
rev = "447fe95239a488459cfdbd12f3293d91ac6ae0d7";
sha256 = "sha256-U6rr3TrFTtnibrwJdJ4rN2Xco4Bt4QbwEVUTNXlWRps=";
};
starship = pkgs.fetchFromGitHub {
owner = "Rolv-Apneseth";
repo = "starship.yazi";
rev = "6c639b474aabb17f5fecce18a4c97bf90b016512";
sha256 = "sha256-bhLUziCDnF4QDCyysRn7Az35RAy8ibZIVUzoPgyEO1A=";
};
};
initLua = ''
require("full-border"):setup()
require("git"):setup()
require("starship"):setup({
config_file = "${./yazi/starship.toml}",
})
'';
};
home.packages = with pkgs; [
jq # JSON preview
poppler_utils # PDF preview
_7zz # archive extraction and preview
ffmpeg
ffmpegthumbnailer # video thumbnails
fd # file searching
ripgrep # file content searching
fzf # quick file subtree navigation
zoxide # historical directories navigation
imagemagick # SVG, font, HEIC, JPEG preview
chafa # image/gif preview
glow # markdown preview
mediainfo # media metadata
];
};
}

View file

@ -0,0 +1,14 @@
{
home-manager.users.rafiq = {
programs.zellij = {
enable = true;
settings = {
mouse_mode = false;
keybinds.unbind = [
"Ctrl h"
];
};
};
home.sessionVariables.ZELLIJ_AUTO_ATTACH = "true";
};
}

View file

@ -0,0 +1,7 @@
{
home-manager.users.rafiq = {
programs.zoxide = {
enable = true;
};
};
}

View file

@ -1,7 +1,41 @@
{pkgs, ...}: {
{
pkgs,
...
}:
{
programs.zsh = {
enable = true;
};
users.defaultUserShell = pkgs.zsh;
environment.pathsToLink = ["/share/zsh"]; # enables completion
environment.pathsToLink = [ "/share/zsh" ]; # enables completion
home-manager.users.rafiq = {
programs.zsh = {
enable = true;
enableCompletion = true;
enableVteIntegration = true;
dirHashes = {
repos = "$HOME/GitRepos";
dl = "$HOME/Downloads";
};
initContent = # zsh
''
# Bind CTRL+Backspace to delete whole word
bindkey '^H' backward-kill-word
'';
# TODO: Look into whether we need to add the history attribute
profileExtra = # bash
''
if [ -z "$WAYLAND_DISPLAY" ] && [ "$XDG_VTNR" -eq 1 ]; then
dbus-run-session Hyprland
fi
'';
plugins = [
{
name = "vi-mode";
src = pkgs.zsh-vi-mode;
file = "share/zsh-vi-mode/zsh-vi-mode.plugin.zsh";
}
];
};
};
}

View file

@ -1,14 +1,16 @@
{ pkgs, ... }:
{
home.packages = [
(pkgs.writers.writePython3Bin "git-extract" {
libraries = with pkgs.python3Packages; [
magic
chardet
];
} (builtins.readFile ./git-extract.py))
home-manager.users.rafiq = {
home.packages = [
(pkgs.writers.writePython3Bin "git-extract" {
libraries = with pkgs.python3Packages; [
magic
chardet
];
} (builtins.readFile ./git-extract.py))
(pkgs.writeShellScriptBin "rebuild" (builtins.readFile ./rebuild.sh))
(pkgs.writeShellScriptBin "byebye" (builtins.readFile ./byebye.sh))
];
(pkgs.writeShellScriptBin "rebuild" (builtins.readFile ./rebuild.sh))
(pkgs.writeShellScriptBin "byebye" (builtins.readFile ./byebye.sh))
];
};
}

View file

@ -17,30 +17,24 @@
time.timeZone = "Asia/Singapore";
i18n.defaultLocale = "en_SG.UTF-8";
home-manager.users.rafiq.imports = [
../programs_temp/ags.nix
../programs_temp/btop.nix
../programs_temp/clipse.nix
../programs_temp/comma.nix
../programs_temp/direnv.nix
../programs_temp/dunst.nix
../programs_temp/firefox.nix
../programs_temp/fuzzel.nix
../programs_temp/fzf.nix
../programs_temp/git.nix
../programs_temp/hyprland.nix
../programs_temp/hyprshade.nix
../programs_temp/kitty.nix
../programs_temp/nh.nix
../programs_temp/nvf.nix
../programs_temp/spicetify.nix
../programs_temp/starship.nix
../programs_temp/tealdeer.nix
../programs_temp/yazi.nix
../programs_temp/zellij.nix
../programs_temp/zoxide.nix
../programs_temp/zsh.nix
users.users.rafiq = {
isNormalUser = true;
description = "rafiq";
hashedPasswordFile = config.sops.secrets.password.path;
extraGroups = [
"networkmanager"
"wheel"
];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILdsZyY3gu8IGB8MzMnLdh+ClDxQQ2RYG9rkeetIKq8n"
];
};
imports = [
./scripts
./programs
];
home-manager.users.rafiq.imports = [
{
# This enables using home-manager from the command line.
programs.home-manager.enable = true;
@ -83,29 +77,18 @@
};
packages = with pkgs; [
fastfetch # system info
wl-clipboard # provides cli copy and paste commands
aichat # duh
ripgrep
devenv
bat
ttyper
btop # add settings as home-manager module
devenv
fastfetch # system info
hyprpicker
inputs.hyprcloser.packages.${pkgs.stdenv.hostPlatform.system}.default
ripgrep
ttyper
wl-clipboard # provides cli copy and paste commands
];
};
}
];
users.users.rafiq = {
isNormalUser = true;
description = "rafiq";
hashedPasswordFile = config.sops.secrets.password.path;
extraGroups = [
"networkmanager"
"wheel"
];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILdsZyY3gu8IGB8MzMnLdh+ClDxQQ2RYG9rkeetIKq8n"
];
};
}

View file

@ -1,20 +0,0 @@
{ inputs, pkgs, ... }:
{
imports = [ inputs.ags.homeManagerModules.default ];
# Expose the cli tools to the home environment
home.packages = [ inputs.ags.packages.${pkgs.stdenv.hostPlatform.system}.io ];
programs.ags = {
enable = true;
configDir = ./ags; # ~/.config/ags
systemd.enable = false;
# The module only includes the core astal3, astal4 and astal-io libraries
extraPackages = with pkgs; [
# add packages to runtime
# inputs.ags.packages.${pkgs.system}.battery
# fzf
];
};
}

View file

@ -1,5 +0,0 @@
{
programs.btop = {
enable = true;
};
}

View file

@ -1,7 +0,0 @@
{
services.clipse = {
enable = true;
historySize = 1000;
imageDisplay.type = "kitty";
};
}

View file

@ -1,9 +0,0 @@
{ inputs, ... }:
{
imports = [
inputs.nix-index-database.hmModules.nix-index
];
programs.nix-index.enable = true;
programs.nix-index-database.comma.enable = true;
}

View file

@ -1,9 +0,0 @@
{
# direnv lets us declare a .envrc in each project directory
# and updates the shell with the packages specified.
programs.direnv = {
enable = true;
enableBashIntegration = true;
nix-direnv.enable = true;
};
}

View file

@ -1,3 +0,0 @@
{
services.dunst.enable = true;
}

View file

@ -1,5 +0,0 @@
{
programs.firefox = {
enable = true;
};
}

View file

@ -1,13 +0,0 @@
{
programs.fuzzel = {
enable = true;
settings = {
main = {
terminal = "kitty -1 -e";
layer = "top";
keyboard-focus = "on-demand";
list-executables-in-path = true;
};
};
};
}

View file

@ -1,7 +0,0 @@
{
programs.fzf = {
enable = true;
enableBashIntegration = true;
tmux.enableShellIntegration = true;
};
}

View file

@ -1,19 +0,0 @@
{ config, ... }:
{
home.sessionVariables.GIT_CONFIG_GLOBAL = "$HOME/.config/git/config";
programs.git = {
enable = true;
userName = "Mohammad Rafiq";
userEmail = "mohammadrafiq567@gmail.com";
signing.key = "~/.ssh/id_ed25519.pub";
signing.signByDefault = true;
extraConfig = {
init.defaultBranch = "prime";
push.autoSetupRemote = true;
pull.rebase = false;
core.editor = "nvim";
gpg.format = "ssh";
};
};
}

View file

@ -1,121 +0,0 @@
{
home.sessionVariables.NIXOS_OZONE_WL = "1";
wayland.windowManager.hyprland = {
enable = true;
package = null;
portalPackage = null;
settings = {
"$mainMonitor" = "desc:OOO AN-270W04K";
"$vertMonitor" = "desc:Philips Consumer Electronics Company PHL 246V5 AU11330000086";
"$mainMod" = "SUPER";
"$terminal" = "kitty -1";
"$multiplexer" = "$terminal -e zellij";
"$browser" = "firefox";
"$music" = "spotify";
"$launcher" = "fuzzel";
"$clipboard" = "$terminal --class clipse -e clipse";
# Programs to run at startup
exec-once = [
"hyprlock"
"clipse -listen"
"hyprcloser"
];
env = [
"XCURSOR_SIZE,32"
# Nvidia Settings
"LIBVA_DRIVER_NAME,nvidia"
"__GLX_VENDOR_LIBRARY_NAME,nvidia"
"NVD_BACKEND,direct # needed for running vaapi-driver on later drivers"
];
# Monitors
monitor = [
"$mainMonitor, 3840x2160@60, auto, auto"
"$vertMonitor, 1920x1080@60, auto-left, auto, transform, 3"
", preferred, auto, 1"
];
# Switching to the current workspace will switch to the previous
binds.workspace_back_and_forth = true;
cursor.default_monitor = "$mainMonitor";
# Windows
general = {
# Make there be no gaps in between windows or edges
border_size = 5;
gaps_in = 0;
gaps_out = 0;
resize_on_border = true;
};
windowrulev2 = [
"float, class:firefox, title:Picture-in-Picture"
"float, class:(clipse)"
"move cursor 0 0, class:(clipse)"
"size 622 652, class:(clipse)"
"noanim, class:(clipse)"
];
animation = [
"workspaces, 0, , "
];
# Keybinds
bind = [
"$mainMod, return, exec, $multiplexer"
"$mainMod, W, killactive"
"$mainMod, O, exec, $browser"
"$mainMod, Escape, exec, hyprlock"
"$mainMod, Space, exec, $launcher"
# Launch utilities
"$mainMod_SHIFT, A, exec, hyprpicker -a"
"$mainMod, V, exec, $clipboard"
# move between windows
"$mainMod, H, cyclenext, visible"
"$mainMod, L, cyclenext, visible prev"
# HJKL to move a window
"$mainMod_ALT, H, movewindow, l"
"$mainMod_ALT, J, movewindow, d"
"$mainMod_ALT, K, movewindow, u"
"$mainMod_ALT, L, movewindow, r"
# HJKL to resize a window
"ALT_SHIFT, H, resizeactive, -10% 0"
"ALT_SHIFT, J, resizeactive, 0 -10%"
"ALT_SHIFT, K, resizeactive, 0 10%"
"ALT_SHIFT, L, resizeactive, 10% 0"
# H and L to move between workspaces on the current monitor including creation
"$mainMod_CTRL, H, workspace, r-1"
"$mainMod_CTRL, L, workspace, r+1"
];
# Repeat when held
bindle = [
# Keyboard Media Keys
", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"
", XF86AudioLowerVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%-"
];
bindm = [
"ALT, mouse:272, movewindow"
];
input = {
numlock_by_default = true;
follow_mouse = 2; # Click on a window to change focus
};
debug = {
damage_tracking = 0;
};
};
};
}

View file

@ -1,23 +0,0 @@
{ inputs, pkgs, ... }:
{
home.packages = [ pkgs.hyprshade ];
xdg.configFile."hypr/hyprshade.toml" = {
enable = true;
text = # toml
''
[[shades]]
name = "vibrance"
default = true # will be activated when no other shader is scheduled
[[shades]]
name = "blue-light-filter"
start_time = 22:00:00
end_time = 08:00:00 # optional if more than one shader has start_time
'';
};
xdg.configFile."hypr/shaders" = {
enable = true;
recursive = true;
source = "${inputs.hyprshaders}/shaders";
};
}

View file

@ -1,14 +0,0 @@
{
home.sessionVariables.TERMINAL = "kitty";
programs.kitty = {
enable = true;
keybindings = {
"ctrl+equal" = "change_font_size current +2.0";
"ctrl+minus" = "change_font_size current -2.0";
};
settings = {
window_padding_width = 10;
confirm_os_window_close = 0;
};
};
}

View file

@ -1,6 +0,0 @@
{
programs.nh = {
enable = true;
};
}

View file

@ -1,86 +0,0 @@
{ inputs, pkgs, ... }:
{
imports = [
inputs.nvf.homeManagerModules.default
./nvf/input.nix
./nvf/languages.nix
./nvf/ui.nix
./nvf/utilities.nix
];
home.sessionVariables.EDITOR = "nvim";
programs.nvf = {
enable = true;
enableManpages = true;
settings.vim = {
viAlias = true;
vimAlias = true;
options = {
# Indentation
autoindent = true;
smartindent = true;
expandtab = true;
smarttab = true;
wrap = true;
shiftwidth = 2;
tabstop = 2;
foldlevel = 1000; # Open all folds by default
# Search
hlsearch = true;
ignorecase = true;
incsearch = true;
smartcase = true; # case-sensitive if search contains uppercase
# Visual
number = true;
cursorline = true;
visualbell = true;
termguicolors = true;
# Input
backspace = "indent,eol,start";
};
keymaps = [
{
desc = "Open the file path under the cursor, making the file if it doesn't exist.";
key = "gf";
mode = "n";
action = ":cd %:p:h<CR>:e <cfile><CR>";
silent = true;
}
{
desc = "Delete the previous word.";
key = "<C-BS>";
mode = "i";
action = "<C-W>";
silent = true;
}
{
desc = "Open the filetree.";
key = "t";
mode = "n";
action = ":Yazi<CR>";
silent = true;
}
];
luaConfigRC.turn_off_inline_diagnostics =
# lua
''
vim.diagnostic.config({
virtual_text = false -- turn off inline diagnostics
})
'';
extraPlugins = with pkgs.vimPlugins; {
yuck-vim = {
package = yuck-vim;
};
nvim-treesitter-parsers = {
package = nvim-treesitter-parsers.yuck;
};
nvim-parinfer = {
package = nvim-parinfer;
};
};
};
};
}

View file

@ -1,19 +0,0 @@
{
inputs,
pkgs,
...
}: let
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.stdenv.system};
in {
imports = [
inputs.spicetify-nix.homeManagerModules.spicetify
];
programs.spicetify = {
enable = true;
spotifyLaunchFlags = "--enable-features=UseOzonePlatform --ozone-platform=wayland";
windowManagerPatch = true;
enabledCustomApps = with spicePkgs.apps; [
marketplace
];
};
}

View file

@ -1,15 +0,0 @@
{
# starship is a customisable prompt for any shell
programs.starship = {
enable = true;
settings = {
add_newline = false;
format = "$character";
right_format = "$all";
character = {
success_symbol = "[\\$](bold green)";
error_symbol = "[\\$](bold red)";
};
};
};
}

View file

@ -1,7 +0,0 @@
{
# man page summaries (activate with tldr <command>)
programs.tealdeer = {
enable = true;
enableAutoUpdates = true;
};
}

View file

@ -1,127 +0,0 @@
{
inputs,
pkgs,
...
}:
let
yazi-plugins = pkgs.fetchFromGitHub {
owner = "yazi-rs";
repo = "plugins";
rev = "273019910c1111a388dd20e057606016f4bd0d17";
hash = "sha256-80mR86UWgD11XuzpVNn56fmGRkvj0af2cFaZkU8M31I=";
};
in
{
programs.yazi = {
enable = true;
package = inputs.yazi.packages.${pkgs.system}.default;
shellWrapperName = "y";
# yazi.toml
settings = {
manager = {
sort_by = "natural"; # Sort naturally, e.g. 1.md < 2.md < 10.md
sort_translit = true; # Transliterate filenames for sorting
show_hidden = true;
};
plugin = {
prepend_preloaders = [
{
mime = "{audio,video,image}/*";
run = "mediainfo";
}
{
mime = "application/subrip";
run = "mediainfo";
}
];
prepend_previewers = [
{
name = "*.md";
run = "glow";
}
{
mime = "{audio,video,image}/*";
run = "mediainfo";
}
{
mime = "application/subrip";
run = "mediainfo";
}
];
prepend_fetchers = [
{
id = "git";
name = "*";
run = "git";
}
{
id = "git";
name = "*/";
run = "git";
}
];
};
};
# ~/.config/yazi/keymap.toml
keymap = {
manager.prepend_keymap = [
{
on = "l";
run = "plugin smart-enter";
desc = "Enter the child directory or open the file.";
}
{
on = "M";
run = "plugin mount";
desc = "Open the mount.yazi menu.";
}
];
};
plugins = {
full-border = "${yazi-plugins}/full-border.yazi";
smart-enter = "${yazi-plugins}/smart-enter.yazi";
git = "${yazi-plugins}/git.yazi";
mount = "${yazi-plugins}/mount.yazi";
glow = pkgs.fetchFromGitHub {
owner = "Reledia";
repo = "glow.yazi";
rev = "c76bf4fb612079480d305fe6fe570bddfe4f99d3";
sha256 = "sha256-DPud1Mfagl2z490f5L69ZPnZmVCa0ROXtFeDbEegBBU=";
};
mediainfo = pkgs.fetchFromGitHub {
owner = "boydaihungst";
repo = "mediainfo.yazi";
rev = "447fe95239a488459cfdbd12f3293d91ac6ae0d7";
sha256 = "sha256-U6rr3TrFTtnibrwJdJ4rN2Xco4Bt4QbwEVUTNXlWRps=";
};
starship = pkgs.fetchFromGitHub {
owner = "Rolv-Apneseth";
repo = "starship.yazi";
rev = "6c639b474aabb17f5fecce18a4c97bf90b016512";
sha256 = "sha256-bhLUziCDnF4QDCyysRn7Az35RAy8ibZIVUzoPgyEO1A=";
};
};
initLua = ''
require("full-border"):setup()
require("git"):setup()
require("starship"):setup({
config_file = "${./yazi/starship.toml}",
})
'';
};
home.packages = with pkgs; [
jq # JSON preview
poppler_utils # PDF preview
_7zz # archive extraction and preview
ffmpeg
ffmpegthumbnailer # video thumbnails
fd # file searching
ripgrep # file content searching
fzf # quick file subtree navigation
zoxide # historical directories navigation
imagemagick # SVG, font, HEIC, JPEG preview
chafa # image/gif preview
glow # markdown preview
mediainfo # media metadata
];
}

View file

@ -1,12 +0,0 @@
{
programs.zellij = {
enable = true;
settings = {
mouse_mode = false;
keybinds.unbind = [
"Ctrl h"
];
};
};
home.sessionVariables.ZELLIJ_AUTO_ATTACH = "true";
}

View file

@ -1,6 +0,0 @@
{
programs.zoxide = {
enable = true;
};
}

View file

@ -1,37 +0,0 @@
{
pkgs,
osConfig,
type,
...
}:
{
programs.zsh = {
enable = true;
enableCompletion = true;
enableVteIntegration = true;
dirHashes = {
repos = "$HOME/GitRepos";
dl = "$HOME/Downloads";
};
initContent = # zsh
''
# Bind CTRL+Backspace to delete whole word
bindkey '^H' backward-kill-word
export SYSTEM_TYPE="${type}"
'';
# TODO: Look into whether we need to add the history attribute
profileExtra = # bash
''
if [ -z "$WAYLAND_DISPLAY" ] && [ "$XDG_VTNR" -eq 1 ]; then
dbus-run-session Hyprland
fi
'';
plugins = [
{
name = "vi-mode";
src = pkgs.zsh-vi-mode;
file = "share/zsh-vi-mode/zsh-vi-mode.plugin.zsh";
}
];
};
}