big refactor

This commit is contained in:
Asaki Yuki 2026-04-09 10:36:32 +07:00
commit 76d68230f6
81 changed files with 3065 additions and 0 deletions

View file

@ -0,0 +1,62 @@
{ lib, osconfig, ... }: {
programs.bash = {
enable = true;
shellAliases = {
cls = "clear";
cleanup = "sudo nix-collect-garbage -d";
cls-log = "sudo journalctl --vacuum-time=1s";
logout = "pkill -KILL -u $USER";
nrs = "sudo nixos-rebuild switch --flake /etc/nixos#${osconfig.device.flake-name}";
wss = "waydroid session stop; exit;";
flake-upgrade = "nix flake update";
spf = "superfile";
};
shellOptions = [
"histappend"
"checkwinsize"
"extglob"
"globstar"
"checkjobs"
"autocd"
];
initExtra = ''
function git-commit() {
git add .
git commit -m "$1"
}
function git-push() {
git-commit "$1"
git push origin HEAD
}
function git-pull() {
git fetch origin HEAD
git pull origin HEAD
}
function get-hash() {
nix hash to-sri --type sha256 $(nix-prefetch-url --unpack "$1")
}
'' +
lib.optionalString osconfig.device.programs.tmux.enable ''
allowed_terms=("xterm-kitty" "xterm-ghostty")
should_run_tmux=false
for term in "${"$" + "{allowed_terms[@]" + "}"}"; do
if [[ "$TERM" == "$term" ]]; then
should_run_tmux=true
break
fi
done
if [ -z "$TMUX" ] && [ "$should_run_tmux" = true ]; then
exec tmux
fi
'';
};
}

View file

@ -0,0 +1,176 @@
{ lib, osconfig, ... }:
{
programs.fastfetch = lib.mkIf osconfig.device.programs.fastfetch.enable {
enable = true;
settings = {
logo = {
padding.top = 1;
color = {
"1" = "#89b4fa";
"2" = "#cdd6f4";
"3" = "#89b4fa";
"4" = "#cdd6f4";
"5" = "#89b4fa";
"6" = "#cdd6f4";
};
};
display = {
color = {
title = "#cdd6f4";
output = "#cdd6f4";
separator = "black";
};
bar = {
width = 10;
charTotal = " ";
border.left = "[";
border.right = "]";
char.elapsed = "";
color = {
border = "green";
elapsed = "green";
total = "black";
};
};
percent = {
type = 3;
color = {
green = "green";
yellow = "yellow";
red = "red";
};
};
separator = " ";
brightColor = true;
};
modules = [
{
type = "title";
format = " {user-name}@{host-name}";
outputColor = "bright_yellow";
}
{
type = "separator";
string = "";
length = 24;
outputColor = "white";
}
{
type = "os";
key = "";
keyColor = "green";
}
{
type = "kernel";
key = "󰌽";
keyColor = "green";
}
{
type = "shell";
key = "";
keyColor = "green";
}
{
type = "packages";
key = "󰆧";
keyColor = "green";
}
{
type = "uptime";
key = "󱑁";
keyColor = "green";
}
"break"
{
type = "host";
keyColor = "blue";
key = "󰧨";
}
{
type = "cpu";
key = "";
keyColor = "blue";
}
{
type = "gpu";
key = "";
keyColor = "blue";
}
{
type = "sound";
key = "";
format = "{name}";
keyColor = "blue";
}
{
type = "memory";
format = "{percentage-bar} {used} / {total}";
key = "";
keyColor = "blue";
}
{
type = "disk";
format = "{size-percentage-bar} {name} ({mountpoint}) {size-used} / {size-total} - {filesystem}";
key = "󰋊";
keyColor = "blue";
}
{
type = "localip";
key = "";
keyColor = "blue";
}
"break"
{
type = "terminal";
key = "";
keyColor = "yellow";
}
{
type = "wm";
key = "󰨇";
keyColor = "yellow";
}
{
type = "de";
key = "󰨇";
keyColor = "yellow";
}
{
type = "bios";
key = "";
keyColor = "yellow";
}
{
type = "theme";
key = "󱓓";
keyColor = "yellow";
}
{
type = "icons";
key = "󱓓";
keyColor = "yellow";
}
{
type = "cursor";
key = "󱓓";
keyColor = "yellow";
}
"break"
"colors"
];
};
};
}

View file

@ -0,0 +1,50 @@
{ lib, osconfig, ... }: {
programs.ghostty = lib.mkIf (osconfig.device.programs.terminal == "ghostty") {
enable = true;
settings = {
theme = "catppuccin-mocha";
font-size = 10;
font-family = "SauceCodePro NFP Bold";
window-width = 230;
window-height = 68;
window-padding-x = 5;
window-padding-y = 0;
keybind = [
"ctrl+shift+n=unbind"
"ctrl+shift+i=unbind"
];
};
themes = {
catppuccin-mocha = {
background = "1e1e2e";
cursor-color = "f5e0dc";
foreground = "cdd6f4";
palette = [
"0=#45475a"
"1=#f38ba8"
"2=#a6e3a1"
"3=#f9e2af"
"4=#89b4fa"
"5=#f5c2e7"
"6=#94e2d5"
"7=#bac2de"
"8=#585b70"
"9=#f38ba8"
"10=#a6e3a1"
"11=#f9e2af"
"12=#89b4fa"
"13=#f5c2e7"
"14=#94e2d5"
"15=#a6adc8"
];
selection-background = "353749";
selection-foreground = "cdd6f4";
};
};
};
}

View file

@ -0,0 +1,75 @@
{ lib, osconfig, ... }: {
programs.kitty = lib.mkIf (osconfig.device.programs.terminal == "kitty") {
enable = true;
keybindings = {
"ctrl+c" = "copy_to_clipboard";
"ctrl+v" = "paste_from_clipboard";
};
settings = {
window_padding_width = 2;
window_padding_height = 2;
cursor_shape = "beam";
# background_opacity = 0.5;
font_family = "Tahoma";
font_size = 9;
foreground = "#cdd6f4";
background = "#1e1e2e";
selection_foreground = "#1e1e2e";
selection_background = "#f5e0dc";
cursor = "#f5e0dc";
cursor_text_color = "#1e1e2e";
url_color = "#f5e0dc";
active_border_color = "#b4befe";
inactive_border_color = "#6c7086";
bell_border_color = "#f9e2af";
wayland_titlebar_color = "system";
macos_titlebar_color = "system";
active_tab_foreground = "#11111b";
active_tab_background = "#cba6f7";
inactive_tab_foreground = "#cdd6f4";
inactive_tab_background = "#181825";
tab_bar_background = "#11111b";
mark1_foreground = "#1e1e2e";
mark1_background = "#b4befe";
mark2_foreground = "#1e1e2e";
mark2_background = "#cba6f7";
mark3_foreground = "#1e1e2e";
mark3_background = "#74c7ec";
color0 = "#45475a";
color8 = "#585b70";
color1 = "#f38ba8";
color9 = "#f38ba8";
color2 = "#a6e3a1";
color10 = "#a6e3a1";
color3 = "#f9e2af";
color11 = "#f9e2af";
color4 = "#89b4fa";
color12 = "#89b4fa";
color5 = "#f5c2e7";
color13 = "#f5c2e7";
color6 = "#94e2d5";
color14 = "#94e2d5";
color7 = "#bac2de";
color15 = "#a6adc8";
};
};
}

View file

@ -0,0 +1,11 @@
{ osconfig, lib, ... }: {
programs.niri = lib.mkIf osconfig.device.wm.niri.enable {
enable = true;
settings = {
binds = {
# "Ctrl+Alt+T" = "ghostty";
# "Mod+D" = "fuzzel";
};
};
};
}

View file

@ -0,0 +1,5 @@
{ pkgs, custom, lib, osconfig, ... }:
lib.mkIf osconfig.device.programs.obs-studio.enable {
programs.obs-studio.enable = true;
home.file.".config/obs-studio/themes".source = pkgs.callPackage custom.catppuccin-obs { };
}

View file

@ -0,0 +1,14 @@
{
pkgs,
lib,
osconfig,
...
}:
{
home.packages = with pkgs; [
hyprshot
antigravity
(lib.mkIf osconfig.device.programs.cider-2.enable cider-2)
];
}

View file

@ -0,0 +1,81 @@
{ lib, osconfig, ... }: {
programs.starship = lib.mkIf osconfig.device.programs.starship.enable {
enable = true;
settings = {
add_newline = true;
scan_timeout = 10;
format = ''
$os $shell $cmake$java$nodejs$git_branch$character
$cmd_duration$sudo$directory > '';
sudo = {
format = "[$symbol]($style) ";
symbol = "";
disabled = false;
};
java = {
format = "[$symbol $version]($style) ";
symbol = "";
};
cmake = {
format = "[$symbol $version](bold blue) ";
symbol = "";
};
nodejs = {
format = "[$symbol $version](bold green) ";
symbol = "󰎙";
};
git_branch = {
format = "[$symbol $branch]($style) ";
symbol = "";
style = "red";
disabled = false;
};
directory = {
format = "[$read_only]($read_only_style)[$path]($style)";
style = "#2e8be8";
truncation_length = 2;
read_only = "󰌾 ";
};
character = {
success_symbol = "[](green)";
error_symbol = "[](red)";
disabled = false;
};
cmd_duration = {
min_time = 1;
format = "[\\[$duration\\]]($style) ";
style = "#C0C0C0";
show_milliseconds = true;
};
shell = {
disabled = false;
bash_indicator = "bash";
fish_indicator = "fish";
zsh_indicator = "zsh";
powershell_indicator = "pwsh";
format = "[$indicator]($style)";
style = "white";
};
os = {
format = "[$symbol]($style)";
disabled = false;
symbols = {
Arch = "[󰣇](bold blue)";
Windows = "[](bold blue)";
NixOS = "[](bold blue)";
};
};
};
};
}

View file

@ -0,0 +1,50 @@
{ pkgs, lib, ... }:
let
catppuccin-gtk = pkgs.catppuccin-gtk.override {
variant = "mocha";
accents = [ "sapphire" ];
size = "compact";
};
in
{
home.activation.copyGtkTheme = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
mkdir -p "$HOME/.themes/"
if [ ! -d "$HOME/.themes/catppuccin-mocha-sapphire-compact" ]; then
cp -r "${catppuccin-gtk}/share/themes/catppuccin-mocha-sapphire-compact" "$HOME/.themes/"
fi
if [ ! -d "$HOME/.themes/catppuccin-mocha-sapphire-compact-hdpi" ]; then
cp -r "${catppuccin-gtk}/share/themes/catppuccin-mocha-sapphire-compact-hdpi" "$HOME/.themes/"
fi
if [ ! -d "$HOME/.themes/catppuccin-mocha-sapphire-compact-xhdpi" ]; then
cp -r "${catppuccin-gtk}/share/themes/catppuccin-mocha-sapphire-compact-xhdpi" "$HOME/.themes/"
fi
'';
# QT
qt = {
enable = true;
platformTheme.name = "qtct";
style = {
package = with pkgs; [
catppuccin-qt5ct
catppuccin-kde
kdePackages.breeze
];
};
};
# GTK
gtk.theme.name = "catppuccin-mocha-sapphire-compact";
# Catppuccin
catppuccin = {
accent = "blue";
flavor = "mocha";
fcitx5.enable = true;
obs.enable = true;
};
}

View file

@ -0,0 +1,81 @@
{ lib, osconfig, pkgs, ... }:
let
TOP_PANEL = ''
set -g pane-border-status top
set -g pane-border-lines single
set -g pane-border-indicators colour
set -g pane-border-format "#{E:@asa-module-icon} #{pane_index} #{E:@asa-module-text} #{pane_current_path} #[default]"
'';
OPTIONS = ''
set-option -g destroy-unattached on
set -g allow-passthrough on
'';
BINDS = ''
unbind r
bind r source-file ~/.config/tmux/tmux.conf;
'';
BOTTOM_PANEL = ''
set -g status-justify "centre"
set -g window-status-format "#{E:@asa-module-icon} #I #{E:@asa-module-text} #W "
set -g window-status-current-format "#{E:@asa-module-icon} #I #{E:@asa-module-text} #W "
set -gg status-left "#{E:@asa-module-text} %A %d/%m/%Y #[default] "
set -ag status-left "#{E:@asa-module-text} %I:%M %p #[default] "
set -g status-left-length 100
set -g status-right "#{E:@asa-module-icon} #{E:@asa-module-text} #S #[default] "
set -ag status-right "#{E:@asa-module-icon} CPU #{E:@asa-module-text} #{cpu_percentage} #[default] "
set -ag status-right "#{E:@asa-module-icon} RAM #{E:@asa-module-text} #{ram_percentage} "
set -g status-right-length 100
setw -g automatic-rename off
'';
CATPPUCCIN = ''
set -g @catppuccin_flavor 'mocha'
set -ogq @asa-module-icon "#[bg=#{E:@thm_sapphire},fg=#{E:@thm_surface_0}]"
set -ogq @asa-module-text "#[bg=#{E:@thm_surface_0},fg=#{E:@thm_fg}]"
'';
YANK = ''
set -g @yank_selection 'primary'
set -g @yank_selection_mouse 'primary'
'';
EXTRA_CONFIG = ''
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi V send-keys -X select-line
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
'';
in
{
programs.tmux = lib.mkIf osconfig.device.programs.tmux.enable {
enable = true;
keyMode = "vi";
disableConfirmationPrompt = true;
prefix = "c-a";
extraConfig = TOP_PANEL + OPTIONS + BINDS + EXTRA_CONFIG;
plugins = with pkgs.tmuxPlugins; [
{
plugin = yank;
extraConfig = YANK;
}
{
plugin = catppuccin;
extraConfig = CATPPUCCIN;
}
{
plugin = cpu;
extraConfig = BOTTOM_PANEL;
}
];
};
}

View file

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

View file

@ -0,0 +1,14 @@
{ pkgs, lib, osconfig, ... }: {
xdg.portal = lib.mkIf osconfig.device.wm.hyprland.enable {
enable = true;
xdgOpenUsePortal = true;
config = {
common.default = ["gtk"];
hyprland.default = ["gtk" "hyprland"];
};
extraPortals = [
pkgs.xdg-desktop-portal-gtk
pkgs.xdg-desktop-portal-hyprland
];
};
}

View file

@ -0,0 +1,24 @@
{ inputs, pkgs, libs, ... }: let
background = libs.root "/assets/grub/background.png";
baseTheme = inputs.honkai-railway-grub-theme.packages.${pkgs.stdenv.hostPlatform.system}.cyrene-grub-theme;
in {
boot = {
loader = {
efi.canTouchEfiVariables = true;
grub = rec {
enable = true;
device = "nodev";
efiSupport = true;
useOSProber = true;
splashImage = background;
theme = pkgs.runCommand "my-grub-theme" { } ''
mkdir -p $out
cp -r ${baseTheme}/* $out/
chmod -R u+w $out
cp ${background} $out/background.png
'';
};
};
};
}

View file

@ -0,0 +1,5 @@
{ lib, config, ... }: {
services.flatpak = lib.mkIf config.device.flatpak.enable {
enable = true;
};
}

View file

@ -0,0 +1,5 @@
{ lib, config, ... }: {
services = lib.mkIf config.device.dm.gdm.enable {
displayManager.gdm.enable = true;
};
}

View file

@ -0,0 +1,5 @@
{ lib, config, ... }: {
services = lib.mkIf config.device.de.gnome.enable {
desktopManager.gnome.enable = true;
};
}

View file

@ -0,0 +1,5 @@
{ lib, config, ... }: {
programs.hyprland = lib.mkIf config.device.wm.hyprland.enable {
enable = true;
};
}

View file

@ -0,0 +1,10 @@
{ pkgs, ... }: {
i18n.inputMethod = {
enable = true;
type = "fcitx5";
fcitx5.addons = with pkgs; [
# fcitx5-bamboo
kdePackages.fcitx5-unikey
];
};
}

View file

@ -0,0 +1,6 @@
{ lib, config, ... }: {
services = lib.mkIf config.device.de.kdePlasma.enable {
desktopManager.plasma6.enable = true;
xserver.enable = true;
};
}

View file

@ -0,0 +1,4 @@
{ lib, config, ... }: {
programs.niri.enable = lib.mkIf config.device.wm.niri.enable true;
services.xserver.enable = lib.mkIf config.device.wm.niri.enable true;
}

View file

@ -0,0 +1,14 @@
{ pkgs, ... }: {
programs.nix-ld = {
enable = true;
libraries = with pkgs; [
stdenv.cc.cc
zlib
brotli
unixODBC
zstd
glib
stdenv.cc.cc.lib
];
};
}

View file

@ -0,0 +1,67 @@
{
pkgs,
lib,
config,
...
}:
{
environment.systemPackages =
with pkgs;
[
git
vim
wget
tree
btop
ffmpeg-full
nodejs
bun
brightnessctl
quickshell
bluetuith
lxqt.pavucontrol-qt
nwg-look
(pkgs.catppuccin-kde.override {
flavour = [ "mocha" ];
accents = [ "sapphire" ];
})
(pkgs.catppuccin-gtk.override {
variant = "mocha";
accents = [ "sapphire" ];
size = "compact";
})
]
++ (
with pkgs;
with kdePackages;
[
dolphin
kate
qt5compat
qtdeclarative
libsForQt5.qt5.qtgraphicaleffects
qtimageformats
qtsvg
qtmultimedia
kde-gtk-config
qtdeclarative
kirigami
ksvg
qtbase
plasma5support
qttools
plasma-sdk
]
)
++ (lib.optionals config.device.wm.hyprland.enable (
with pkgs;
[
xdg-desktop-portal
xdg-desktop-portal-wlr
xdg-desktop-portal-hyprland
]
));
}

View file

@ -0,0 +1,24 @@
{ pkgs, lib, config, ... }: let
custom-sddm-astronaut = pkgs.sddm-astronaut.override {
embeddedTheme = config.device.dm.sddm.theme;
};
in {
services.displayManager.sddm = lib.mkIf config.device.dm.sddm.enable {
enable = true;
wayland.enable = true;
extraPackages = with pkgs; [
custom-sddm-astronaut
];
theme = "sddm-astronaut-theme";
settings = {
Theme = {
Current = "sddm-astronaut-theme";
};
};
};
environment.systemPackages = with pkgs; [
custom-sddm-astronaut
kdePackages.qtmultimedia
];
}

View file

@ -0,0 +1,5 @@
{ lib, config, ... }: {
programs.steam = lib.mkIf config.device.programs.steam.enable {
enable = true;
};
}

86
modules/fonts.nix Normal file
View file

@ -0,0 +1,86 @@
{ pkgs, ... }:
let
fetch-fonts = {
segoe-ui = {
light = pkgs.fetchurl {
url = "https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/light/latest.ttf";
sha256 = "1bqbvpxqflh4an5ciawrkl0bxy58vqhxiynspcvpx1zyryxcjlhm";
};
semilight = pkgs.fetchurl {
url = "https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/semilight/latest.ttf";
sha256 = "1y6rfxdwwfq1bgk7fj4bvhck1di6whw5h0yby8gj7x6y1cv4ka1p";
};
normal = pkgs.fetchurl {
url = "https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/normal/latest.ttf";
sha256 = "0ac4hgmlxl6cgak7g39rvfk25gs3fm5wlnmc7mbpv38i7mkppiaf";
};
bold = pkgs.fetchurl {
url = "https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/bold/latest.ttf";
sha256 = "147mk64y2hihy6s29dlgimcrfi7ihi68qjcrfdzqk6cvk8kr3f0q";
};
semibold = pkgs.fetchurl {
url = "https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/semibold/latest.ttf";
sha256 = "0whxgk9q4j9pd3k462m0dyr39q7vk2lxla5whcckyfrks983c4nj";
};
};
};
custom = {
tahoma = pkgs.stdenv.mkDerivation {
pname = "tahoma";
version = "1.0";
dontUnpack = true;
src = pkgs.fetchurl {
url = "https://www.asakiyuki.com/static/fonts/Tahoma.ttf";
sha256 = "129l1cprplci2xmxi0gnsjrvprr48xqp8kr5s9lrwcnaxvb4z4ni";
};
installPhase = ''
mkdir -p $out/share/fonts/truetype
cp $src $out/share/fonts/truetype/
'';
};
segoe-ui = pkgs.stdenv.mkDerivation {
pname = "segoe-ui";
version = "1.0";
dontUnpack = true;
installPhase = ''
mkdir -p $out/share/fonts/truetype
cp ${fetch-fonts.segoe-ui.light} $out/share/fonts/truetype
cp ${fetch-fonts.segoe-ui.semilight} $out/share/fonts/truetype
cp ${fetch-fonts.segoe-ui.normal} $out/share/fonts/truetype
cp ${fetch-fonts.segoe-ui.bold} $out/share/fonts/truetype
cp ${fetch-fonts.segoe-ui.semibold} $out/share/fonts/truetype
'';
};
};
in
{
fonts.enableDefaultPackages = true;
fonts.packages = with pkgs; [
custom.tahoma
custom.segoe-ui
# Nerd fonts
nerd-fonts.sauce-code-pro
# Unicode fonts
noto-fonts
noto-fonts-cjk-sans
noto-fonts-color-emoji
liberation_ttf
fira-code
fira-code-symbols
mplus-outline-fonts.githubRelease
dina-font
proggyfonts
];
}

View file

@ -0,0 +1,3 @@
{ config, ... }: {
hardware.bluetooth.enable = config.device.bluetooth.enable;
}

View file

@ -0,0 +1,6 @@
{ ... }:
{
imports = [
./bluetooth.nix
];
}

7
modules/home-manager.nix Normal file
View file

@ -0,0 +1,7 @@
{ ... }: {
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
backupFileExtension = "bak";
};
}

View file

@ -0,0 +1,13 @@
{ lib, osconfig, ... }:
{
imports = [
./settings/default.nix
];
wayland.windowManager.hyprland = lib.mkIf osconfig.device.wm.hyprland.enable {
enable = true;
xwayland.enable = true;
};
}

View file

@ -0,0 +1,15 @@
{ osconfig, ... }:
{
imports = [
./key-bind.nix
./theme.nix
./exec.nix
./window-rules.nix
./input.nix
];
wayland.windowManager.hyprland.settings = {
monitor = osconfig.device.wm.hyprland.monitors;
};
}

View file

@ -0,0 +1,8 @@
{ ... }:
{
wayland.windowManager.hyprland.settings.exec-once = [
"quickshell"
"fcitx5"
];
}

View file

@ -0,0 +1,5 @@
{ ... }: {
wayland.windowManager.hyprland.settings.input = {
touchpad.natural_scroll = true;
};
}

View file

@ -0,0 +1,47 @@
{ osconfig, ... }:
{
wayland.windowManager.hyprland.settings.bind = [
"CTRL ALT, T, exec, ${osconfig.device.programs.terminal}"
"ALT, F4, killactive"
"SUPER SHIFT, L, exit,"
"SUPER SHIFT, TAB, togglefloating,"
"SUPER SHIFT, S, exec, hyprshot -m region -o '~/Pictures/Screenshot/' -z"
"SUPER, J, togglesplit,"
"SUPER, E, exec, dolphin"
"SUPER, left, movefocus, l"
"SUPER, right, movefocus, r"
"SUPER, up, movefocus, u"
"SUPER, down, movefocus, d"
"SUPER CTRL, left, movewindow, l"
"SUPER CTRL, right, movewindow, r"
"SUPER CTRL, up, movewindow, u"
"SUPER CTRL, down, movewindow, d"
"SUPER, tab, workspace, e+1"
"SUPER, mouse_down, workspace, e-1"
"SUPER, mouse_up, workspace, e+1"
"ALT, space, global, asakiyuki:launcher"
",XF86MonBrightnessDown, exec, brightnessctl s 5%-"
",XF86MonBrightnessUp, exec, brightnessctl s +5%"
]
++ builtins.concatLists (
builtins.genList (i: [
"SUPER, ${toString (i + 1)}, workspace,${toString (i + 1)}"
"SUPER SHIFT, ${toString (i + 1)}, movetoworkspace,${toString (i + 1)}"
]) 9
)
++ [
"SUPER, 0, workspace, 10"
"SUPER SHIFT, 0, movetoworkspace, 10"
];
wayland.windowManager.hyprland.settings.bindm = [
"SUPER, mouse:272, movewindow"
"SUPER, mouse:273, resizewindow"
];
}

View file

@ -0,0 +1,58 @@
{ ... }: {
wayland.windowManager.hyprland.settings = {
general = {
gaps_in = 5;
gaps_out = 10;
border_size = 1;
"col.active_border" = "rgb(cdd6f4)";
"col.inactive_border" = "rgb(7f849c)";
allow_tearing = true;
resize_on_border = true;
};
decoration = {
rounding = 5;
rounding_power = 5;
active_opacity = 1;
inactive_opacity = 1;
blur = {
enabled = true;
size = 2;
passes = 5;
vibrancy = 3;
};
};
animations = {
enabled = "yes";
bezier = [
"overshot, 0.05, 0.9, 0.1, 1.1"
"md3_decel, 0.05, 0.7, 0.1, 1"
];
animation = [
"windows, 1, 3, overshot, popin 60%"
"border, 1, 10, default"
"fade, 1, 2, default"
"workspaces, 1, 3.5, overshot, slidefade 15%"
"specialWorkspace, 1, 3, md3_decel, slidevert"
];
};
dwindle = {
pseudotile = true;
preserve_split = true;
};
master = {
new_status = "master";
};
misc = {
force_default_wallpaper = 1;
disable_hyprland_logo = true;
};
};
}

View file

@ -0,0 +1,15 @@
{ ... }:
{
wayland.windowManager.hyprland.settings.windowrule = [
"opacity 0.0 override, class:^(xwaylandvideobridge)$"
"noanim, class:^(xwaylandvideobridge)$"
"noinitialfocus, class:^(xwaylandvideobridge)$"
"maxsize 1 1, class:^(xwaylandvideobridge)$"
"noblur, class:^(xwaylandvideobridge)$"
"nofocus, class:^(xwaylandvideobridge)$"
];
wayland.windowManager.hyprland.settings.windowrulev2 = [
"tile, class:^(Chromium)$"
];
}

View file

@ -0,0 +1,44 @@
{ lib, osconfig, ... }:
{
programs.nixcord = lib.mkIf osconfig.device.programs.nixcord.enable {
enable = true;
discord = {
enable = true;
vencord.enable = true;
};
config = {
enableReactDevtools = true;
themeLinks = [ "https://catppuccin.github.io/discord/dist/catppuccin-mocha-blue.theme.css" ];
plugins = {
BlurNSFW.enable = true;
volumeBooster.enable = true;
ClearURLs.enable = true;
copyEmojiMarkdown.enable = true;
youtubeAdblock.enable = true;
experiments.enable = true;
fixCodeblockGap.enable = true;
fixImagesQuality.enable = true;
fixSpotifyEmbeds.enable = true;
fixYoutubeEmbeds.enable = true;
gameActivityToggle.enable = true;
imageZoom.enable = true;
memberCount.enable = true;
mentionAvatars.enable = true;
noDevtoolsWarning.enable = true;
noF1.enable = true;
openInApp.enable = true;
voiceDownload.enable = true;
validUser.enable = true;
translate.enable = true;
whoReacted.enable = true;
fakeNitro = {
enable = true;
enableEmojiBypass = false;
};
};
};
};
}

View file

@ -0,0 +1,14 @@
{ pkgs, config, ... }:
{
programs.nixvim.imports = [
./default.nix
./extra-packages.nix
./keymaps/_keymaps.nix
./plugins/_plugins.nix
./plugins/_extraPlugins.nix
./lua/_lua.nix
];
}

View file

@ -0,0 +1,20 @@
{ ... }:
{
enable = true;
vimdiffAlias = true;
colorschemes.catppuccin.enable = true;
opts = {
number = true;
relativenumber = true;
tabstop = 2;
shiftwidth = 2;
softtabstop = 2;
smartindent = true;
expandtab = true;
clipboard = "unnamedplus";
};
}

View file

@ -0,0 +1,6 @@
{ pkgs, ... }:
{
extraPackages = with pkgs; [
nodePackages.prettier
];
}

View file

@ -0,0 +1,26 @@
[
{
mode = "i";
key = "<A-h>";
action = "<Left>";
options.silent = true;
}
{
mode = "i";
key = "<A-j>";
action = "<Down>";
options.silent = true;
}
{
mode = "i";
key = "<A-k>";
action = "<Up>";
options.silent = true;
}
{
mode = "i";
key = "<A-l>";
action = "<Right>";
options.silent = true;
}
]

View file

@ -0,0 +1,11 @@
{ ... }:
{
globals.mapleader = " ";
keymaps =
[ ]
++ (import ./_default.nix)
++ (import ./barbar.nix)
++ (import ./toggleterm.nix)
++ (import ./nvim-tree-toggle.nix);
}

View file

@ -0,0 +1,39 @@
[
{
mode = "n";
key = "<A-,>";
action = "<cmd>BufferPrevious<CR>";
options.silent = true;
}
{
mode = "n";
key = "<A-.>";
action = "<cmd>BufferNext<CR>";
options.silent = true;
}
{
mode = "n";
key = "<A-<>";
action = "<cmd>BufferMovePrevious<CR>";
options.silent = true;
}
{
mode = "n";
key = "<A->>";
action = "<cmd>BufferMoveNext<CR>";
options.silent = true;
}
{
mode = "n";
key = "<A-c>";
action = "<Cmd>BufferClose<CR>";
options.silent = true;
}
]
++ (builtins.genList (i: {
mode = "n";
key = "<A-${toString (i + 1)}>";
action = "<cmd>BufferGoto ${toString (i + 1)}<CR>";
options.silent = true;
}) 9)

View file

@ -0,0 +1,8 @@
[
{
mode = "n";
key = "<C-b>";
action = "<cmd>NvimTreeToggle<CR>";
options.silent = true;
}
]

View file

@ -0,0 +1,63 @@
[
{
mode = "t";
key = "<esc>";
action = "<C-\\><C-n>";
}
{
mode = "t";
key = "jk";
action = "<C-\\><C-n>";
}
{
mode = "t";
key = "<C-w>";
action = "<C-\\><C-n><C-w>";
}
{
mode = "t";
key = "<C-l>";
action = "<Cmd>wincmd l<CR>";
}
{
mode = "t";
key = "<C-k>";
action = "<Cmd>wincmd k<CR>";
}
{
mode = "t";
key = "<C-j>";
action = "<Cmd>wincmd j<CR>";
}
{
mode = "t";
key = "<C-h>";
action = "<Cmd>wincmd h<CR>";
}
]
++ builtins.concatLists (
builtins.genList (i: [
{
mode = "n";
key = "<leader>th${toString (i + 1)}";
action = ":${toString (i + 1)}ToggleTerm direction=horizontal<CR>";
options.silent = true;
options.noremap = true;
}
{
mode = "n";
key = "<leader>tv${toString (i + 1)}";
action = ":${toString (i + 1)}ToggleTerm direction=vertical<CR>";
options.silent = true;
options.noremap = true;
}
{
mode = "n";
key = "<leader>tf${toString (i + 1)}";
action = ":${toString (i + 1)}ToggleTerm direction=float<CR>";
options.silent = true;
options.noremap = true;
}
]) 9
)

View file

@ -0,0 +1,4 @@
{ ... }:
{
}

View file

@ -0,0 +1,15 @@
{ pkgs, ... }:
let
EXTRA_PLUGINS = [
./extras/neocord.nix
./extras/mini-icons.nix
];
LUA = [
./lua/neocord.lua
];
in
{
extraPlugins = map (path: import path { plugins = pkgs.vimPlugins; }) EXTRA_PLUGINS;
extraConfigLua = builtins.concatStringsSep "\n" (map builtins.readFile LUA);
}

View file

@ -0,0 +1,33 @@
{ ... }@inputs:
{
plugins = {
nvim-tree = import ./nvimtree.nix inputs;
lsp = import ./lsp.nix inputs;
lspkind = import ./lspkind.nix inputs;
conform-nvim = import ./conform-nvim.nix inputs;
which-key = import ./which-key.nix inputs;
lint = import ./lint.nix inputs;
cmp = import ./cmp.nix inputs;
cmp-nvim-lsp.enable = true;
cmp-buffer.enable = true;
cmp-path.enable = true;
cmp_luasnip.enable = true;
web-devicons.enable = true;
lz-n.enable = true;
treesitter.enable = true;
lualine.enable = true;
neoscroll.enable = true;
image.enable = true;
nvim-autopairs.enable = true;
bufferline.enable = true;
luasnip.enable = true;
friendly-snippets.enable = true;
indent-blankline.enable = true;
barbar.enable = true;
toggleterm.enable = true;
auto-save.enable = true;
visual-multi.enable = true;
};
}

View file

@ -0,0 +1,25 @@
{ ... }: {
enable = true;
autoEnableSources = true;
settings = {
sources = [
{ name = "nvim_lsp"; }
{ name = "path"; }
{ name = "luasnip"; }
{ name = "buffer"; }
];
mapping = {
"<C-Space>" = "cmp.mapping.complete()";
"<C-d>" = "cmp.mapping.scroll_docs(-4)";
"<C-f>" = "cmp.mapping.scroll_docs(4)";
"<C-e>" = "cmp.mapping.abort()";
"<CR>" = "cmp.mapping.confirm({ select = true })";
"<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
"<S-Tab>" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})";
};
formatting.fields = [ "kind" "abbr" "menu" ];
};
}

View file

@ -0,0 +1,20 @@
{ ... }:
{
enable = true;
settings = {
formatters_by_ft = {
javascript = [ "prettier" ];
typescript = [ "prettier" ];
json = [ "prettier" ];
css = [ "prettier" ];
html = [ "prettier" ];
nix = [ "nixfmt" ];
php = [ "php_cs_fixer" ];
};
format_on_save = {
timeout_ms = 500;
lsp_fallback = true;
};
};
}

View file

@ -0,0 +1,4 @@
{ plugins, ... }:
{
plugin = plugins.mini-icons;
}

View file

@ -0,0 +1,4 @@
{ plugins, ... }:
{
plugin = plugins.neocord;
}

View file

@ -0,0 +1,6 @@
{ ... }:
{
enable = true;
lintersByFt = {
};
}

View file

@ -0,0 +1,12 @@
{ ... }:
{
enable = true;
servers = {
phpactor.enable = true;
nil_ls.enable = true;
pyright.enable = true;
ts_ls.enable = true;
html.enable = true;
cssls.enable = true;
};
}

View file

@ -0,0 +1,4 @@
{ ... }: {
enable = true;
cmp.enable = true;
}

View file

@ -0,0 +1,24 @@
require("neocord").setup({
-- General options
logo= "auto", -- "auto" or url
logo_tooltip= nil,-- nil or string
main_image= "language", -- "language" or "logo"
client_id = "1157438221865717891",-- Use your own Discord application client id (not recommended)
log_level = nil,-- Log messages at or above this level (one of the following: "debug", "info", "warn", "error")
debounce_timeout= 10, -- Number of seconds to debounce events (or calls to `:lua package.loaded.presence:update(<filename>, true)`)
blacklist = {}, -- A list of strings or Lua patterns that disable Rich Presence if the current file name, path, or workspace matches
file_assets = {}, -- Custom file asset definitions keyed by file names and extensions (see default config at `lua/presence/file_assets.lua` for reference)
show_time = true, -- Show the timer
global_timer= false,-- if set true, timer won't update when any event are triggered
buttons = nil,-- A list of buttons (objects with label and url attributes) or a function returning such list.
-- Rich Presence text options
editing_text= "Editing %s", -- Format string rendered when an editable file is loaded in the buffer (either string or function(filename: string): string)
file_explorer_text= "Browsing %s",-- Format string rendered when browsing a file explorer (either string or function(file_explorer_name: string): string)
git_commit_text = "Committing changes", -- Format string rendered when committing changes in git (either string or function(filename: string): string)
plugin_manager_text = "Managing plugins", -- Format string rendered when managing plugins (either string or function(plugin_manager_name: string): string)
reading_text= "Reading %s", -- Format string rendered when a read-only or unmodifiable file is loaded in the buffer (either string or function(filename: string): string)
workspace_text= "Working on %s",-- Format string rendered when in a git repository (either string or function(project_name: string|nil, filename: string): string)
line_number_text= "Line %s out of %s",-- Format string rendered when `enable_line_number` is set to true (either string or function(line_number: number, line_count: number): string)
terminal_text = "Using Terminal", -- Format string rendered when in terminal mode.
})

View file

@ -0,0 +1,5 @@
{ ... }: {
enable = true;
openOnSetupFile = true;
settings.auto_reload_on_write = true;
}

View file

@ -0,0 +1,7 @@
{ ... }:
{
enable = true;
settings = {
preset = "modern";
};
}

View file

@ -0,0 +1,6 @@
{ ... }: {
services.pipewire = {
enable = true;
pulse.enable = true;
};
}