From 743dd01070c0136b5695c52dd81a9c0826edfc88 Mon Sep 17 00:00:00 2001 From: Elisiei Yehorov Date: Thu, 12 Mar 2026 14:51:01 +0100 Subject: [PATCH] back to black <3 --- Makefile | 33 -- home/home.nix | 3 +- home/modules/ide/nvim/lsp/default.nix | 1 + home/modules/ide/nvim/lsp/web.nix | 12 + home/modules/ide/nvim/options.nix | 9 + home/modules/shell/fish/config.fish | 2 +- home/modules/shell/fish/default.nix | 1 + home/modules/shell/fish/grompt.json | 6 +- home/modules/terminal/foot/default.nix | 18 +- home/modules/terminal/st/config.h | 475 ++++++++++++++++++ home/modules/terminal/st/default.nix | 35 +- .../{shell => user}/direnv/default.nix | 2 +- home/modules/user/firefox/default.nix | 3 +- home/modules/user/git/default.nix | 8 +- home/modules/user/spotify/default.nix | 21 +- home/modules/user/stylix/default.nix | 2 +- home/modules/user/stylix/pitchblack.yaml | 21 + home/modules/wm/hyprland/default.nix | 177 ------- home/modules/wm/sway/default.nix | 10 +- nixos/configuration.nix | 2 +- nixos/modules/localization.nix | 21 +- nixos/modules/programs.nix | 1 + nixos/modules/xserver.nix | 25 +- 23 files changed, 618 insertions(+), 270 deletions(-) create mode 100644 home/modules/ide/nvim/lsp/web.nix create mode 100644 home/modules/terminal/st/config.h rename home/modules/{shell => user}/direnv/default.nix (65%) create mode 100644 home/modules/user/stylix/pitchblack.yaml delete mode 100644 home/modules/wm/hyprland/default.nix diff --git a/Makefile b/Makefile index a09c1b6..89749ad 100644 --- a/Makefile +++ b/Makefile @@ -1,77 +1,44 @@ -############################################################################### -# πŸ› οΈ NixOS & System Management Commands -# -# These commands help manage the system configuration using Nix flakes. -############################################################################### - .PHONY: copy-config deploy home upgrade debug up upp test history repl clean gc-sudo gc gcboot -# πŸ›‘ Utility function: copy ~/nixos to /etc/nixos copy-config: sudo rm -rf /etc/nixos/* sudo cp -r ~/nixos/* /etc/nixos/ -# πŸš€ Deploy the current system configuration and make it the default on boot. -# Usage: make deploy deploy: copy-config sudo nixos-rebuild switch --flake .#nixos -# 🏑 Same as `deploy`, but with a custom flake target (e.g., for home-manager). -# Usage: make home home: copy-config sudo nixos-rebuild switch --flake /etc/nixos#nixos -# ⬆️ Upgrade system packages and apply the latest flake changes. -# Usage: make upgrade upgrade: copy-config sudo nixos-rebuild switch --upgrade --flake /etc/nixos -# πŸ› Like `deploy`, but with verbose logs and error traces for debugging. -# Usage: make debug debug: copy-config sudo nixos-rebuild switch --flake /etc/nixos --show-trace --verbose -# 🌐 Update all flake inputs to their latest versions. -# Usage: make up up: sudo nix flake update --flake /etc/nixos -# πŸ” Update a specific flake input (e.g., `make upp i=home-manager`) -# Usage: make upp i=home-manager upp: nix flake update ~/nixos/${i} -# πŸ§ͺ Test the configuration without setting it as the default boot entry. -# Usage: make test test: copy-config sudo nixos-rebuild test --flake /etc/nixos -# πŸ•“ Show system profile history. -# Usage: make history history: nix profile history --profile /nix/var/nix/profiles/system -# πŸ’» Launch the Nix REPL with nixpkgs from the flake. -# Usage: make repl repl: nix repl -f flake:nixpkgs -# 🧹 Clean up system profile history older than 1 day. -# Usage: make clean clean: sudo nix profile wipe-history --profile /nix/var/nix/profiles/system --older-than 1d -# 🧼 Collect and delete old garbage as root. -# Usage: make gc-sudo gc-sudo: sudo nix-collect-garbage -d -# 🧽 Same as above, but for the current user. -# Usage: make gc gc: nix-collect-garbage -d -# πŸ₯Ύ Boot into a specific configuration without switching immediately. -# Usage: make gcboot gcboot: sudo /run/current-system/bin/switch-to-configuration boot diff --git a/home/home.nix b/home/home.nix index f0cc25f..a7323dc 100644 --- a/home/home.nix +++ b/home/home.nix @@ -10,13 +10,14 @@ # terminal stuff ./modules/terminal/foot/default.nix + ./modules/terminal/st/default.nix # shell stuff ./modules/shell/bash/default.nix - ./modules/shell/direnv/default.nix ./modules/shell/fish/default.nix # user stuff + ./modules/user/direnv/default.nix ./modules/user/tofi/default.nix ./modules/user/dunst/default.nix ./modules/user/git/default.nix diff --git a/home/modules/ide/nvim/lsp/default.nix b/home/modules/ide/nvim/lsp/default.nix index bbe21a3..bb29c6a 100644 --- a/home/modules/ide/nvim/lsp/default.nix +++ b/home/modules/ide/nvim/lsp/default.nix @@ -3,6 +3,7 @@ ./nixd.nix ./go.nix ./v.nix + ./web.nix ]; plugins = { lsp = { diff --git a/home/modules/ide/nvim/lsp/web.nix b/home/modules/ide/nvim/lsp/web.nix new file mode 100644 index 0000000..320634f --- /dev/null +++ b/home/modules/ide/nvim/lsp/web.nix @@ -0,0 +1,12 @@ +{ + plugins.lsp = { + servers = { + svelte = { + enable = true; + }; + ts_ls = { + enable = true; + }; + }; + }; +} diff --git a/home/modules/ide/nvim/options.nix b/home/modules/ide/nvim/options.nix index 212b6a2..aa97c21 100644 --- a/home/modules/ide/nvim/options.nix +++ b/home/modules/ide/nvim/options.nix @@ -25,10 +25,19 @@ globals.mapleader = " "; extraPackages = with pkgs; [ + # lsp + typescript + typescript-language-server + svelte-language-server + # misc stylua nixfmt-rfc-style vlang ]; + extraPlugins = with pkgs; [ + vimPlugins.vim-crystal + ]; + extraConfigLua = builtins.readFile ./config.lua; } diff --git a/home/modules/shell/fish/config.fish b/home/modules/shell/fish/config.fish index f2a1eef..7f14841 100644 --- a/home/modules/shell/fish/config.fish +++ b/home/modules/shell/fish/config.fish @@ -5,7 +5,7 @@ direnv hook fish | source source ~/.config/fish/aliases/git.fish # path -fish_add_path -g ~/bin ~/.config/v-analyzer/bin +fish_add_path -g ~/bin ~/go/bin ~/.config/v-analyzer/bin # custom function vir diff --git a/home/modules/shell/fish/default.nix b/home/modules/shell/fish/default.nix index 3def9de..21e5430 100644 --- a/home/modules/shell/fish/default.nix +++ b/home/modules/shell/fish/default.nix @@ -12,6 +12,7 @@ shellAliases = { nv = "nvim"; cls = "clear"; + unfetch = "unfetch -distro=eyes -art-dir=/home/elisiei/.config/unfetch -pkg=nix -fields=title,separator,os,kernel,uptime,shell,terminal,memory,packages"; }; functions = { diff --git a/home/modules/shell/fish/grompt.json b/home/modules/shell/fish/grompt.json index 4880e20..bfe72f8 100644 --- a/home/modules/shell/fish/grompt.json +++ b/home/modules/shell/fish/grompt.json @@ -1,7 +1,7 @@ [ - "fg:green", + "fg:yellow", "${spwd}", - "fg:yellow", + "fg:green", "exec:fish -c 'git_branch'", { "git_status_noclean": ["fg:red", " (+)"] @@ -11,7 +11,7 @@ }, "fg:blue", "exec:fish -c 'nix_shell'", - "fg:red", + "fg:green", ": " ] diff --git a/home/modules/terminal/foot/default.nix b/home/modules/terminal/foot/default.nix index 8031dc5..9b08da4 100644 --- a/home/modules/terminal/foot/default.nix +++ b/home/modules/terminal/foot/default.nix @@ -1,14 +1,28 @@ -{lib, ...}: { +{ + lib, + pkgs, + ... +}: { programs.foot = { enable = true; settings = { main = { shell = "fish"; - pad = "0x0center"; + pad = "4x4center"; font = lib.mkForce "Maple Mono NF:size=12"; }; scrollback = { lines = 100000; + multiplier = 3; + indicator-position = "relative"; + indicator-format = "line"; + }; + url = { + launch = "${pkgs.xdg-utils}/bin/xdg-open \${url}"; + }; + cursor = { + style = "beam"; + beam-thickness = 1; }; }; }; diff --git a/home/modules/terminal/st/config.h b/home/modules/terminal/st/config.h new file mode 100644 index 0000000..4b34c46 --- /dev/null +++ b/home/modules/terminal/st/config.h @@ -0,0 +1,475 @@ +/* See LICENSE file for copyright and license details. */ + +/* + * appearance + * + * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html + */ +static char *font = "Maple Mono NF:pixelsize=16:antialias=true:autohint=true"; +static int borderpx = 5; + +/* + * What program is execed by st depends of these precedence rules: + * 1: program passed with -e + * 2: scroll and/or utmp + * 3: SHELL environment variable + * 4: value of shell in /etc/passwd + * 5: value of shell in config.h + */ +static char *shell = "fish"; +char *utmp = NULL; +/* scroll program: to enable use a string like "scroll" */ +char *scroll = NULL; +char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400"; + +/* identification sequence returned in DA and DECID */ +char *vtiden = "\033[?6c"; + +/* Kerning / character bounding-box multipliers */ +static float cwscale = 1.0; +static float chscale = 1.0; + +/* + * word delimiter string + * + * More advanced example: L" `'\"()[]{}" + */ +wchar_t *worddelimiters = L" "; + +/* selection timeouts (in milliseconds) */ +static unsigned int doubleclicktimeout = 300; +static unsigned int tripleclicktimeout = 600; + +/* alt screens */ +int allowaltscreen = 1; + +/* allow certain non-interactive (insecure) window operations such as: + setting the clipboard text */ +int allowwindowops = 0; + +/* + * draw latency range in ms - from new content/keypress/etc until drawing. + * within this range, st draws when content stops arriving (idle). mostly it's + * near minlatency, but it waits longer for slow updates to avoid partial draw. + * low minlatency will tear/flicker more, as it can "detect" idle too early. + */ +static double minlatency = 2; +static double maxlatency = 33; + +/* + * blinking timeout (set to 0 to disable blinking) for the terminal blinking + * attribute. + */ +static unsigned int blinktimeout = 800; + +/* + * thickness of underline and bar cursors + */ +static unsigned int cursorthickness = 1; + +/* + * bell volume. It must be a value between -100 and 100. Use 0 for disabling + * it + */ +static int bellvolume = 0; + +/* default TERM value */ +char *termname = "st"; + +/* + * spaces per tab + * + * When you are changing this value, don't forget to adapt the Β»itΒ« value in + * the st.info and appropriately install the st.info in the environment where + * you use this st version. + * + * it#$tabspaces, + * + * Secondly make sure your kernel is not expanding tabs. When running `stty + * -a` Β»tab0Β« should appear. You can tell the terminal to not expand tabs by + * running following command: + * + * stty tabs + */ +unsigned int tabspaces = 8; + +/* Terminal colors (16 first used in escape sequence) */ +static const char *colorname[] = { + /* 8 normal colors */ + "black", + "red3", + "green3", + "yellow3", + "blue2", + "magenta3", + "cyan3", + "gray90", + + /* 8 bright colors */ + "gray50", + "red", + "green", + "yellow", + "#5c5cff", + "magenta", + "cyan", + "white", + + [255] = 0, + + /* more colors can be added after 255 to use with DefaultXX */ + "#cccccc", + "#555555", + "gray90", /* default foreground colour */ + "black", /* default background colour */ +}; + + +/* + * Default colors (colorname index) + * foreground, background, cursor, reverse cursor + */ +unsigned int defaultfg = 258; +unsigned int defaultbg = 259; +unsigned int defaultcs = 256; +static unsigned int defaultrcs = 257; + +/* + * Default shape of cursor + * 2: Block ("β–ˆ") + * 4: Underline ("_") + * 6: Bar ("|") + * 7: Snowman ("β˜ƒ") + */ +static unsigned int cursorshape = 2; + +/* + * Default columns and rows numbers + */ + +static unsigned int cols = 80; +static unsigned int rows = 24; + +/* + * Default colour and shape of the mouse cursor + */ +static unsigned int mouseshape = XC_xterm; +static unsigned int mousefg = 7; +static unsigned int mousebg = 0; + +/* + * Color used to display font attributes when fontconfig selected a font which + * doesn't match the ones requested. + */ +static unsigned int defaultattr = 11; + +/* + * Force mouse select/shortcuts while mask is active (when MODE_MOUSE is set). + * Note that if you want to use ShiftMask with selmasks, set this to an other + * modifier, set to 0 to not use it. + */ +static uint forcemousemod = ShiftMask; + +/* + * Internal mouse shortcuts. + * Beware that overloading Button1 will disable the selection. + */ +static MouseShortcut mshortcuts[] = { + /* mask button function argument release */ + { XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 }, + { ShiftMask, Button4, ttysend, {.s = "\033[5;2~"} }, + { XK_ANY_MOD, Button4, ttysend, {.s = "\031"} }, + { ShiftMask, Button5, ttysend, {.s = "\033[6;2~"} }, + { XK_ANY_MOD, Button5, ttysend, {.s = "\005"} }, +}; + +/* Internal keyboard shortcuts. */ +#define MODKEY Mod1Mask +#define TERMMOD (ControlMask|ShiftMask) + +static Shortcut shortcuts[] = { + /* mask keysym function argument */ + { XK_ANY_MOD, XK_Break, sendbreak, {.i = 0} }, + { ControlMask, XK_Print, toggleprinter, {.i = 0} }, + { ShiftMask, XK_Print, printscreen, {.i = 0} }, + { XK_ANY_MOD, XK_Print, printsel, {.i = 0} }, + { TERMMOD, XK_Prior, zoom, {.f = +1} }, + { TERMMOD, XK_Next, zoom, {.f = -1} }, + { TERMMOD, XK_Home, zoomreset, {.f = 0} }, + { TERMMOD, XK_C, clipcopy, {.i = 0} }, + { TERMMOD, XK_V, clippaste, {.i = 0} }, + { TERMMOD, XK_Y, selpaste, {.i = 0} }, + { ShiftMask, XK_Insert, selpaste, {.i = 0} }, + { TERMMOD, XK_Num_Lock, numlock, {.i = 0} }, +}; + +/* + * Special keys (change & recompile st.info accordingly) + * + * Mask value: + * * Use XK_ANY_MOD to match the key no matter modifiers state + * * Use XK_NO_MOD to match the key alone (no modifiers) + * appkey value: + * * 0: no value + * * > 0: keypad application mode enabled + * * = 2: term.numlock = 1 + * * < 0: keypad application mode disabled + * appcursor value: + * * 0: no value + * * > 0: cursor application mode enabled + * * < 0: cursor application mode disabled + * + * Be careful with the order of the definitions because st searches in + * this table sequentially, so any XK_ANY_MOD must be in the last + * position for a key. + */ + +/* + * If you want keys other than the X11 function keys (0xFD00 - 0xFFFF) + * to be mapped below, add them to this array. + */ +static KeySym mappedkeys[] = { -1 }; + +/* + * State bits to ignore when matching key or button events. By default, + * numlock (Mod2Mask) and keyboard layout (XK_SWITCH_MOD) are ignored. + */ +static uint ignoremod = Mod2Mask|XK_SWITCH_MOD; + +/* + * This is the huge key array which defines all compatibility to the Linux + * world. Please decide about changes wisely. + */ +static Key key[] = { + /* keysym mask string appkey appcursor */ + { XK_KP_Home, ShiftMask, "\033[2J", 0, -1}, + { XK_KP_Home, ShiftMask, "\033[1;2H", 0, +1}, + { XK_KP_Home, XK_ANY_MOD, "\033[H", 0, -1}, + { XK_KP_Home, XK_ANY_MOD, "\033[1~", 0, +1}, + { XK_KP_Up, XK_ANY_MOD, "\033Ox", +1, 0}, + { XK_KP_Up, XK_ANY_MOD, "\033[A", 0, -1}, + { XK_KP_Up, XK_ANY_MOD, "\033OA", 0, +1}, + { XK_KP_Down, XK_ANY_MOD, "\033Or", +1, 0}, + { XK_KP_Down, XK_ANY_MOD, "\033[B", 0, -1}, + { XK_KP_Down, XK_ANY_MOD, "\033OB", 0, +1}, + { XK_KP_Left, XK_ANY_MOD, "\033Ot", +1, 0}, + { XK_KP_Left, XK_ANY_MOD, "\033[D", 0, -1}, + { XK_KP_Left, XK_ANY_MOD, "\033OD", 0, +1}, + { XK_KP_Right, XK_ANY_MOD, "\033Ov", +1, 0}, + { XK_KP_Right, XK_ANY_MOD, "\033[C", 0, -1}, + { XK_KP_Right, XK_ANY_MOD, "\033OC", 0, +1}, + { XK_KP_Prior, ShiftMask, "\033[5;2~", 0, 0}, + { XK_KP_Prior, XK_ANY_MOD, "\033[5~", 0, 0}, + { XK_KP_Begin, XK_ANY_MOD, "\033[E", 0, 0}, + { XK_KP_End, ControlMask, "\033[J", -1, 0}, + { XK_KP_End, ControlMask, "\033[1;5F", +1, 0}, + { XK_KP_End, ShiftMask, "\033[K", -1, 0}, + { XK_KP_End, ShiftMask, "\033[1;2F", +1, 0}, + { XK_KP_End, XK_ANY_MOD, "\033[4~", 0, 0}, + { XK_KP_Next, ShiftMask, "\033[6;2~", 0, 0}, + { XK_KP_Next, XK_ANY_MOD, "\033[6~", 0, 0}, + { XK_KP_Insert, ShiftMask, "\033[2;2~", +1, 0}, + { XK_KP_Insert, ShiftMask, "\033[4l", -1, 0}, + { XK_KP_Insert, ControlMask, "\033[L", -1, 0}, + { XK_KP_Insert, ControlMask, "\033[2;5~", +1, 0}, + { XK_KP_Insert, XK_ANY_MOD, "\033[4h", -1, 0}, + { XK_KP_Insert, XK_ANY_MOD, "\033[2~", +1, 0}, + { XK_KP_Delete, ControlMask, "\033[M", -1, 0}, + { XK_KP_Delete, ControlMask, "\033[3;5~", +1, 0}, + { XK_KP_Delete, ShiftMask, "\033[2K", -1, 0}, + { XK_KP_Delete, ShiftMask, "\033[3;2~", +1, 0}, + { XK_KP_Delete, XK_ANY_MOD, "\033[P", -1, 0}, + { XK_KP_Delete, XK_ANY_MOD, "\033[3~", +1, 0}, + { XK_KP_Multiply, XK_ANY_MOD, "\033Oj", +2, 0}, + { XK_KP_Add, XK_ANY_MOD, "\033Ok", +2, 0}, + { XK_KP_Enter, XK_ANY_MOD, "\033OM", +2, 0}, + { XK_KP_Enter, XK_ANY_MOD, "\r", -1, 0}, + { XK_KP_Subtract, XK_ANY_MOD, "\033Om", +2, 0}, + { XK_KP_Decimal, XK_ANY_MOD, "\033On", +2, 0}, + { XK_KP_Divide, XK_ANY_MOD, "\033Oo", +2, 0}, + { XK_KP_0, XK_ANY_MOD, "\033Op", +2, 0}, + { XK_KP_1, XK_ANY_MOD, "\033Oq", +2, 0}, + { XK_KP_2, XK_ANY_MOD, "\033Or", +2, 0}, + { XK_KP_3, XK_ANY_MOD, "\033Os", +2, 0}, + { XK_KP_4, XK_ANY_MOD, "\033Ot", +2, 0}, + { XK_KP_5, XK_ANY_MOD, "\033Ou", +2, 0}, + { XK_KP_6, XK_ANY_MOD, "\033Ov", +2, 0}, + { XK_KP_7, XK_ANY_MOD, "\033Ow", +2, 0}, + { XK_KP_8, XK_ANY_MOD, "\033Ox", +2, 0}, + { XK_KP_9, XK_ANY_MOD, "\033Oy", +2, 0}, + { XK_Up, ShiftMask, "\033[1;2A", 0, 0}, + { XK_Up, Mod1Mask, "\033[1;3A", 0, 0}, + { XK_Up, ShiftMask|Mod1Mask,"\033[1;4A", 0, 0}, + { XK_Up, ControlMask, "\033[1;5A", 0, 0}, + { XK_Up, ShiftMask|ControlMask,"\033[1;6A", 0, 0}, + { XK_Up, ControlMask|Mod1Mask,"\033[1;7A", 0, 0}, + { XK_Up,ShiftMask|ControlMask|Mod1Mask,"\033[1;8A", 0, 0}, + { XK_Up, XK_ANY_MOD, "\033[A", 0, -1}, + { XK_Up, XK_ANY_MOD, "\033OA", 0, +1}, + { XK_Down, ShiftMask, "\033[1;2B", 0, 0}, + { XK_Down, Mod1Mask, "\033[1;3B", 0, 0}, + { XK_Down, ShiftMask|Mod1Mask,"\033[1;4B", 0, 0}, + { XK_Down, ControlMask, "\033[1;5B", 0, 0}, + { XK_Down, ShiftMask|ControlMask,"\033[1;6B", 0, 0}, + { XK_Down, ControlMask|Mod1Mask,"\033[1;7B", 0, 0}, + { XK_Down,ShiftMask|ControlMask|Mod1Mask,"\033[1;8B",0, 0}, + { XK_Down, XK_ANY_MOD, "\033[B", 0, -1}, + { XK_Down, XK_ANY_MOD, "\033OB", 0, +1}, + { XK_Left, ShiftMask, "\033[1;2D", 0, 0}, + { XK_Left, Mod1Mask, "\033[1;3D", 0, 0}, + { XK_Left, ShiftMask|Mod1Mask,"\033[1;4D", 0, 0}, + { XK_Left, ControlMask, "\033[1;5D", 0, 0}, + { XK_Left, ShiftMask|ControlMask,"\033[1;6D", 0, 0}, + { XK_Left, ControlMask|Mod1Mask,"\033[1;7D", 0, 0}, + { XK_Left,ShiftMask|ControlMask|Mod1Mask,"\033[1;8D",0, 0}, + { XK_Left, XK_ANY_MOD, "\033[D", 0, -1}, + { XK_Left, XK_ANY_MOD, "\033OD", 0, +1}, + { XK_Right, ShiftMask, "\033[1;2C", 0, 0}, + { XK_Right, Mod1Mask, "\033[1;3C", 0, 0}, + { XK_Right, ShiftMask|Mod1Mask,"\033[1;4C", 0, 0}, + { XK_Right, ControlMask, "\033[1;5C", 0, 0}, + { XK_Right, ShiftMask|ControlMask,"\033[1;6C", 0, 0}, + { XK_Right, ControlMask|Mod1Mask,"\033[1;7C", 0, 0}, + { XK_Right,ShiftMask|ControlMask|Mod1Mask,"\033[1;8C",0, 0}, + { XK_Right, XK_ANY_MOD, "\033[C", 0, -1}, + { XK_Right, XK_ANY_MOD, "\033OC", 0, +1}, + { XK_ISO_Left_Tab, ShiftMask, "\033[Z", 0, 0}, + { XK_Return, Mod1Mask, "\033\r", 0, 0}, + { XK_Return, XK_ANY_MOD, "\r", 0, 0}, + { XK_Insert, ShiftMask, "\033[4l", -1, 0}, + { XK_Insert, ShiftMask, "\033[2;2~", +1, 0}, + { XK_Insert, ControlMask, "\033[L", -1, 0}, + { XK_Insert, ControlMask, "\033[2;5~", +1, 0}, + { XK_Insert, XK_ANY_MOD, "\033[4h", -1, 0}, + { XK_Insert, XK_ANY_MOD, "\033[2~", +1, 0}, + { XK_Delete, ControlMask, "\033[M", -1, 0}, + { XK_Delete, ControlMask, "\033[3;5~", +1, 0}, + { XK_Delete, ShiftMask, "\033[2K", -1, 0}, + { XK_Delete, ShiftMask, "\033[3;2~", +1, 0}, + { XK_Delete, XK_ANY_MOD, "\033[P", -1, 0}, + { XK_Delete, XK_ANY_MOD, "\033[3~", +1, 0}, + { XK_BackSpace, XK_NO_MOD, "\177", 0, 0}, + { XK_BackSpace, Mod1Mask, "\033\177", 0, 0}, + { XK_Home, ShiftMask, "\033[2J", 0, -1}, + { XK_Home, ShiftMask, "\033[1;2H", 0, +1}, + { XK_Home, XK_ANY_MOD, "\033[H", 0, -1}, + { XK_Home, XK_ANY_MOD, "\033[1~", 0, +1}, + { XK_End, ControlMask, "\033[J", -1, 0}, + { XK_End, ControlMask, "\033[1;5F", +1, 0}, + { XK_End, ShiftMask, "\033[K", -1, 0}, + { XK_End, ShiftMask, "\033[1;2F", +1, 0}, + { XK_End, XK_ANY_MOD, "\033[4~", 0, 0}, + { XK_Prior, ControlMask, "\033[5;5~", 0, 0}, + { XK_Prior, ShiftMask, "\033[5;2~", 0, 0}, + { XK_Prior, XK_ANY_MOD, "\033[5~", 0, 0}, + { XK_Next, ControlMask, "\033[6;5~", 0, 0}, + { XK_Next, ShiftMask, "\033[6;2~", 0, 0}, + { XK_Next, XK_ANY_MOD, "\033[6~", 0, 0}, + { XK_F1, XK_NO_MOD, "\033OP" , 0, 0}, + { XK_F1, /* F13 */ ShiftMask, "\033[1;2P", 0, 0}, + { XK_F1, /* F25 */ ControlMask, "\033[1;5P", 0, 0}, + { XK_F1, /* F37 */ Mod4Mask, "\033[1;6P", 0, 0}, + { XK_F1, /* F49 */ Mod1Mask, "\033[1;3P", 0, 0}, + { XK_F1, /* F61 */ Mod3Mask, "\033[1;4P", 0, 0}, + { XK_F2, XK_NO_MOD, "\033OQ" , 0, 0}, + { XK_F2, /* F14 */ ShiftMask, "\033[1;2Q", 0, 0}, + { XK_F2, /* F26 */ ControlMask, "\033[1;5Q", 0, 0}, + { XK_F2, /* F38 */ Mod4Mask, "\033[1;6Q", 0, 0}, + { XK_F2, /* F50 */ Mod1Mask, "\033[1;3Q", 0, 0}, + { XK_F2, /* F62 */ Mod3Mask, "\033[1;4Q", 0, 0}, + { XK_F3, XK_NO_MOD, "\033OR" , 0, 0}, + { XK_F3, /* F15 */ ShiftMask, "\033[1;2R", 0, 0}, + { XK_F3, /* F27 */ ControlMask, "\033[1;5R", 0, 0}, + { XK_F3, /* F39 */ Mod4Mask, "\033[1;6R", 0, 0}, + { XK_F3, /* F51 */ Mod1Mask, "\033[1;3R", 0, 0}, + { XK_F3, /* F63 */ Mod3Mask, "\033[1;4R", 0, 0}, + { XK_F4, XK_NO_MOD, "\033OS" , 0, 0}, + { XK_F4, /* F16 */ ShiftMask, "\033[1;2S", 0, 0}, + { XK_F4, /* F28 */ ControlMask, "\033[1;5S", 0, 0}, + { XK_F4, /* F40 */ Mod4Mask, "\033[1;6S", 0, 0}, + { XK_F4, /* F52 */ Mod1Mask, "\033[1;3S", 0, 0}, + { XK_F5, XK_NO_MOD, "\033[15~", 0, 0}, + { XK_F5, /* F17 */ ShiftMask, "\033[15;2~", 0, 0}, + { XK_F5, /* F29 */ ControlMask, "\033[15;5~", 0, 0}, + { XK_F5, /* F41 */ Mod4Mask, "\033[15;6~", 0, 0}, + { XK_F5, /* F53 */ Mod1Mask, "\033[15;3~", 0, 0}, + { XK_F6, XK_NO_MOD, "\033[17~", 0, 0}, + { XK_F6, /* F18 */ ShiftMask, "\033[17;2~", 0, 0}, + { XK_F6, /* F30 */ ControlMask, "\033[17;5~", 0, 0}, + { XK_F6, /* F42 */ Mod4Mask, "\033[17;6~", 0, 0}, + { XK_F6, /* F54 */ Mod1Mask, "\033[17;3~", 0, 0}, + { XK_F7, XK_NO_MOD, "\033[18~", 0, 0}, + { XK_F7, /* F19 */ ShiftMask, "\033[18;2~", 0, 0}, + { XK_F7, /* F31 */ ControlMask, "\033[18;5~", 0, 0}, + { XK_F7, /* F43 */ Mod4Mask, "\033[18;6~", 0, 0}, + { XK_F7, /* F55 */ Mod1Mask, "\033[18;3~", 0, 0}, + { XK_F8, XK_NO_MOD, "\033[19~", 0, 0}, + { XK_F8, /* F20 */ ShiftMask, "\033[19;2~", 0, 0}, + { XK_F8, /* F32 */ ControlMask, "\033[19;5~", 0, 0}, + { XK_F8, /* F44 */ Mod4Mask, "\033[19;6~", 0, 0}, + { XK_F8, /* F56 */ Mod1Mask, "\033[19;3~", 0, 0}, + { XK_F9, XK_NO_MOD, "\033[20~", 0, 0}, + { XK_F9, /* F21 */ ShiftMask, "\033[20;2~", 0, 0}, + { XK_F9, /* F33 */ ControlMask, "\033[20;5~", 0, 0}, + { XK_F9, /* F45 */ Mod4Mask, "\033[20;6~", 0, 0}, + { XK_F9, /* F57 */ Mod1Mask, "\033[20;3~", 0, 0}, + { XK_F10, XK_NO_MOD, "\033[21~", 0, 0}, + { XK_F10, /* F22 */ ShiftMask, "\033[21;2~", 0, 0}, + { XK_F10, /* F34 */ ControlMask, "\033[21;5~", 0, 0}, + { XK_F10, /* F46 */ Mod4Mask, "\033[21;6~", 0, 0}, + { XK_F10, /* F58 */ Mod1Mask, "\033[21;3~", 0, 0}, + { XK_F11, XK_NO_MOD, "\033[23~", 0, 0}, + { XK_F11, /* F23 */ ShiftMask, "\033[23;2~", 0, 0}, + { XK_F11, /* F35 */ ControlMask, "\033[23;5~", 0, 0}, + { XK_F11, /* F47 */ Mod4Mask, "\033[23;6~", 0, 0}, + { XK_F11, /* F59 */ Mod1Mask, "\033[23;3~", 0, 0}, + { XK_F12, XK_NO_MOD, "\033[24~", 0, 0}, + { XK_F12, /* F24 */ ShiftMask, "\033[24;2~", 0, 0}, + { XK_F12, /* F36 */ ControlMask, "\033[24;5~", 0, 0}, + { XK_F12, /* F48 */ Mod4Mask, "\033[24;6~", 0, 0}, + { XK_F12, /* F60 */ Mod1Mask, "\033[24;3~", 0, 0}, + { XK_F13, XK_NO_MOD, "\033[1;2P", 0, 0}, + { XK_F14, XK_NO_MOD, "\033[1;2Q", 0, 0}, + { XK_F15, XK_NO_MOD, "\033[1;2R", 0, 0}, + { XK_F16, XK_NO_MOD, "\033[1;2S", 0, 0}, + { XK_F17, XK_NO_MOD, "\033[15;2~", 0, 0}, + { XK_F18, XK_NO_MOD, "\033[17;2~", 0, 0}, + { XK_F19, XK_NO_MOD, "\033[18;2~", 0, 0}, + { XK_F20, XK_NO_MOD, "\033[19;2~", 0, 0}, + { XK_F21, XK_NO_MOD, "\033[20;2~", 0, 0}, + { XK_F22, XK_NO_MOD, "\033[21;2~", 0, 0}, + { XK_F23, XK_NO_MOD, "\033[23;2~", 0, 0}, + { XK_F24, XK_NO_MOD, "\033[24;2~", 0, 0}, + { XK_F25, XK_NO_MOD, "\033[1;5P", 0, 0}, + { XK_F26, XK_NO_MOD, "\033[1;5Q", 0, 0}, + { XK_F27, XK_NO_MOD, "\033[1;5R", 0, 0}, + { XK_F28, XK_NO_MOD, "\033[1;5S", 0, 0}, + { XK_F29, XK_NO_MOD, "\033[15;5~", 0, 0}, + { XK_F30, XK_NO_MOD, "\033[17;5~", 0, 0}, + { XK_F31, XK_NO_MOD, "\033[18;5~", 0, 0}, + { XK_F32, XK_NO_MOD, "\033[19;5~", 0, 0}, + { XK_F33, XK_NO_MOD, "\033[20;5~", 0, 0}, + { XK_F34, XK_NO_MOD, "\033[21;5~", 0, 0}, + { XK_F35, XK_NO_MOD, "\033[23;5~", 0, 0}, +}; + +/* + * Selection types' masks. + * Use the same masks as usual. + * Button1Mask is always unset, to make masks match between ButtonPress. + * ButtonRelease and MotionNotify. + * If no match is found, regular selection is used. + */ +static uint selmasks[] = { + [SEL_RECTANGULAR] = Mod1Mask, +}; + +/* + * Printable characters in ASCII, used to estimate the advance width + * of single wide characters. + */ +static char ascii_printable[] = + " !\"#$%&'()*+,-./0123456789:;<=>?" + "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_" + "`abcdefghijklmnopqrstuvwxyz{|}~"; + diff --git a/home/modules/terminal/st/default.nix b/home/modules/terminal/st/default.nix index e10b49d..36b0aaf 100644 --- a/home/modules/terminal/st/default.nix +++ b/home/modules/terminal/st/default.nix @@ -1,27 +1,20 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { home.packages = with pkgs; [ - (st.overrideAttrs (oldAttrs: { - src = fetchFromGitHub { - owner = "elisiei"; - repo = "st"; - rev = "dd154987103b12df593a424fd238713201fbce54"; - sha256 = "sha256-/++WajhlI6zlE18DlslOn+qtoqxROxnZb63NK4MTeX0="; - }; - - nativeBuildInputs = oldAttrs.nativeBuildInputs or [ ] ++ [ pkg-config ]; - buildInputs = oldAttrs.buildInputs ++ [ - imlib2 - zlib - harfbuzz + (st.overrideAttrs (oldAttrs: rec { + buildInputs = oldAttrs.buildInputs ++ [harfbuzz]; + patches = [ + (fetchpatch { + url = "https://st.suckless.org/patches/scrollback/st-scrollback-ringbuffer-0.9.2.diff"; + sha256 = "1r23q4mi5bkam49ld5c3ccwaa1li7bbjx0ndjgm207p02az9h4cn"; + }) + (fetchpatch { + url = "https://st.suckless.org/patches/scrollback/st-scrollback-mouse-0.9.2.diff"; + sha256 = "068s5rjvvw2174y34i5xxvpw4jvjy58akd1kgf025h1153hmf7jy"; + }) ]; - preBuild = '' - cp config.def.h config.h - ''; - - makeFlags = [ "CC=${pkgs.gcc}/bin/gcc" ]; - installFlags = [ "PREFIX=$(out)" ]; + configFile = writeText "config.def.h" (builtins.readFile ./config.h); + postPatch = "${oldAttrs.postPatch}\n cp ${configFile} config.def.h"; })) ]; } diff --git a/home/modules/shell/direnv/default.nix b/home/modules/user/direnv/default.nix similarity index 65% rename from home/modules/shell/direnv/default.nix rename to home/modules/user/direnv/default.nix index c1ba232..9f73981 100644 --- a/home/modules/shell/direnv/default.nix +++ b/home/modules/user/direnv/default.nix @@ -1,7 +1,7 @@ { programs.direnv = { enable = true; - enableNushellIntegration = true; silent = true; + nix-direnv.enable = true; }; } diff --git a/home/modules/user/firefox/default.nix b/home/modules/user/firefox/default.nix index 0f7103f..a03721d 100644 --- a/home/modules/user/firefox/default.nix +++ b/home/modules/user/firefox/default.nix @@ -1,5 +1,6 @@ -{ +{pkgs, ...}: { programs.firefox = { enable = true; + package = pkgs.wrapFirefox (pkgs.firefox-unwrapped.override {pipewireSupport = true;}) {}; }; } diff --git a/home/modules/user/git/default.nix b/home/modules/user/git/default.nix index 28021ec..1cc11ac 100644 --- a/home/modules/user/git/default.nix +++ b/home/modules/user/git/default.nix @@ -21,12 +21,12 @@ fetch.prune = true; # @elisiei - url."git@github.com-elisiei:".insteadOf = "https://github.com/elisiei/"; - url."git@github.com-elisiei:".pushInsteadOf = "https://github.com/elisiei/"; + # url."git@github.com-elisiei:".insteadOf = "https://github.com/elisiei/"; + # url."git@github.com-elisiei:".pushInsteadOf = "https://github.com/elisiei/"; # @yehorovye - url."git@github.com-yehorovye:".insteadOf = "https://github.com/yehorovye/"; - url."git@github.com-yehorovye:".pushInsteadOf = "https://github.com/yehorovye/"; + # url."git@github.com-yehorovye:".insteadOf = "https://github.com/yehorovye/"; + # url."git@github.com-yehorovye:".pushInsteadOf = "https://github.com/yehorovye/"; }; }; } diff --git a/home/modules/user/spotify/default.nix b/home/modules/user/spotify/default.nix index 35a120f..a6d069c 100644 --- a/home/modules/user/spotify/default.nix +++ b/home/modules/user/spotify/default.nix @@ -12,10 +12,27 @@ in { enabledExtensions = with spicePkgs.extensions; [ adblock hidePodcasts - shuffle - beautifulLyrics ]; theme = lib.mkForce spicePkgs.themes.text; + colorScheme = "custom"; + customColorScheme = { + text = "FFFFFF"; + subtext = "C0C0C0"; + sidebar-text = "FFFFFF"; + main = "000000"; + sidebar = "1A1A1A"; + player = "000000"; + card = "121212"; + shadow = "000000"; + selected-row = "404040"; + button = "B0B0B0"; + button-active = "FFFFFF"; + button-disabled = "4A4A4A"; + tab-active = "FFFFFF"; + notification = "121212"; + notification-error = "FFFFFF"; + misc = "000000"; + }; }; } diff --git a/home/modules/user/stylix/default.nix b/home/modules/user/stylix/default.nix index 15f6456..5e0dee0 100644 --- a/home/modules/user/stylix/default.nix +++ b/home/modules/user/stylix/default.nix @@ -3,7 +3,7 @@ enable = true; autoEnable = true; polarity = "dark"; - base16Scheme = "${pkgs.base16-schemes}/share/themes/tokyodark.yaml"; + base16Scheme = ./pitchblack.yaml; icons = { enable = true; diff --git a/home/modules/user/stylix/pitchblack.yaml b/home/modules/user/stylix/pitchblack.yaml new file mode 100644 index 0000000..a6f1ec7 --- /dev/null +++ b/home/modules/user/stylix/pitchblack.yaml @@ -0,0 +1,21 @@ +system: "base16" +name: "pitch black" +author: "elisiei" +variant: "dark" +palette: + base00: "#000000" + base01: "#121212" + base02: "#262626" + base03: "#3a3a3a" + base04: "#9a9a9a" + base05: "#cfcfcf" + base06: "#e6e6e6" + base07: "#ffffff" + base08: "#7a7a7a" + base09: "#8c8c8c" + base0A: "#a6a6a6" + base0B: "#949494" + base0C: "#8a8a8a" + base0D: "#707070" + base0E: "#7c7c7c" + base0F: "#5c5c5c" diff --git a/home/modules/wm/hyprland/default.nix b/home/modules/wm/hyprland/default.nix deleted file mode 100644 index 87e35e5..0000000 --- a/home/modules/wm/hyprland/default.nix +++ /dev/null @@ -1,177 +0,0 @@ -{ pkgs, ... }: -let - wallpaperScript = pkgs.writeShellScriptBin "random-wallpaper" '' - pkill swaybg 2>/dev/null || true - WALP=$(find "$HOME/wallpapers" -type f \( -iname "*.jpg" -o -iname "*.png" \) | shuf -n 1) - [ -n "$WALP" ] && ${pkgs.swaybg}/bin/swaybg -i "$WALP" --mode fill - ''; - startupScript = pkgs.writeShellScriptBin "start" '' - ${wallpaperScript}/bin/random-wallpaper - ''; -in -{ - home.packages = [ wallpaperScript ]; - - wayland.windowManager.hyprland = { - enable = true; - xwayland.enable = true; - settings = { - monitor = [ - ",1920x1080,auto,1,bitdepth,8" - ",preferred,auto,1,mirror,eDP-1,bitdepth,8" - ]; - - xwayland = { - force_zero_scaling = "true"; - }; - - exec-once = [ "${startupScript}/bin/start" ]; - - "$term" = "foot"; - "$browser" = "librewolf"; - "$menu" = "exec $(tofi-drun)"; - - env = [ - "XCURSOR_THEME,macOS" - "XCURSOR_SIZE,24" - ]; - - general = { - gaps_in = "0"; - gaps_out = "0"; - border_size = "0"; - "col.active_border" = "rgba(0,0,0,0)"; - "col.inactive_border" = "rgba(0,0,0,0)"; - resize_on_border = "false"; - allow_tearing = "false"; - layout = "dwindle"; - }; - - debug = { - disable_logs = false; - }; - - decoration = { - rounding = "0"; - active_opacity = "1"; - inactive_opacity = "0.95"; - shadow.enabled = false; - blur = { - enabled = false; - xray = false; - special = true; - new_optimizations = true; - size = 10; - passes = 3; - brightness = 0.9; - noise = 2.0e-2; - contrast = 1.1; - popups = true; - popups_ignorealpha = 0.5; - - vibrancy = 0.2; - vibrancy_darkness = 0.1; - }; - }; - - animations = { - enabled = false; - animations = { - bezier = [ - "easeOutQuint, 0.23, 1, 0.32, 1" - "easeInOutCubic, 0.65, 0.05, 0.36, 1" - "linear, 0, 0, 1, 1" - "almostLinear, 0.5, 0.5, 0.75, 1.0" - "quick, 0.15, 0, 0.1, 1" - ]; - animation = [ - "global, 1, 10, default" - "border, 1, 5.39, easeOutQuint" - "windows, 1, 4.79, easeOutQuint" - "windowsIn, 1, 4.1, easeOutQuint, popin 87%" - "windowsOut, 1, 1.49, linear, popin 87%" - "fadeIn, 1, 1.73, almostLinear" - "fadeOut, 1, 1.46, almostLinear" - "fade, 1, 3.03, quick" - "layers, 1, 3.81, easeOutQuint" - "layersIn, 1, 4, easeOutQuint, fade" - "layersOut, 1, 1.5, linear, fade" - "fadeLayersIn, 1, 1.79, almostLinear" - "fadeLayersOut, 1, 1.39, almostLinear" - "workspaces, 1, 1.94, almostLinear, fade" - "workspacesIn, 1, 1.21, almostLinear, fade" - "workspacesOut, 1, 1.94, almostLinear, fade" - "zoomFactor, 1, 7, quick" - ]; - }; - }; - - misc = { - force_default_wallpaper = "0"; - disable_hyprland_logo = "true"; - middle_click_paste = "false"; - vfr = "true"; - }; - - gestures.workspace_swipe = "false"; - - device = { - name = "epic-mouse-v1"; - sensitivity = "-0.5"; - }; - - "$mainMod" = "SUPER"; - - bind = [ - "$mainMod SHIFT, PRINT, exec, ~/bin/grimblast copy screen" # whole screen - "$mainMod, PRINT, exec, ~/bin/grimblast copy area" # selection - "$mainMod, SPACE, exec, $menu" - "$mainMod, W, exec, random-wallpaper" - "$mainMod, S, pin" - "$mainMod, T, exec, $term" - "$mainMod, Z, exec, $browser" - # "$mainMod, K, exec, st" # CHANGE THIS SDBHFDSFSFHJ - "$mainMod, Q, killactive" - "$mainMod SHIFT, M, exit" - "$mainMod, V, togglefloating" - "$mainMod, left, movefocus, l" - "$mainMod, right, movefocus, r" - "$mainMod, up, movefocus, u" - "$mainMod, down, movefocus, d" - "$mainMod, 1, workspace, 1" - "$mainMod, 2, workspace, 2" - "$mainMod, 3, workspace, 3" - "$mainMod, 4, workspace, 4" - "$mainMod, 5, workspace, 5" - "$mainMod, 6, workspace, 6" - "$mainMod, 7, workspace, 7" - "$mainMod, 8, workspace, 8" - "$mainMod, 9, workspace, 9" - "$mainMod, 0, workspace, 10" - "$mainMod SHIFT, 1, movetoworkspace, 1" - "$mainMod SHIFT, 2, movetoworkspace, 2" - "$mainMod SHIFT, 3, movetoworkspace, 3" - "$mainMod SHIFT, 4, movetoworkspace, 4" - "$mainMod SHIFT, 5, movetoworkspace, 5" - "$mainMod SHIFT, 6, movetoworkspace, 6" - "$mainMod SHIFT, 7, movetoworkspace, 7" - "$mainMod SHIFT, 8, movetoworkspace, 8" - "$mainMod SHIFT, 9, movetoworkspace, 9" - "$mainMod SHIFT, 0, movetoworkspace, 10" - ]; - - input = { - kb_layout = "es,ru"; - kb_options = "grp:alt_space_toggle"; - numlock_by_default = true; - }; - - bindm = [ - "$mainMod, mouse:272, movewindow" # left click - "$mainMod, mouse:273, resizewindow" # right click - ]; - - windowrulev2 = "suppressevent maximize, class:.*"; - }; - }; -} diff --git a/home/modules/wm/sway/default.nix b/home/modules/wm/sway/default.nix index 36c4af8..e4ad3b1 100644 --- a/home/modules/wm/sway/default.nix +++ b/home/modules/wm/sway/default.nix @@ -16,8 +16,8 @@ in { wayland.windowManager.sway = { enable = true; xwayland = true; - config = rec { + # vars modifier = "Mod4"; terminal = "foot"; menu = "exec $(tofi-run)"; @@ -56,14 +56,15 @@ in { # keybindings keybindings = lib.mkOptionDefault { # screenshots - "${modifier}+Shift+Print" = "exec ~/bin/grimblast copy screen"; - "${modifier}+Print" = "exec ~/bin/grimblast --freeze copy area"; + "${modifier}+Shift+Print" = "exec ~/bin/sss screen"; + "${modifier}+Print" = "exec ~/bin/sss area"; # launchers "${modifier}+space" = "exec ${menu}"; "${modifier}+w" = "exec ${wallpaperScript}/bin/random-wallpaper"; "${modifier}+t" = "exec ${terminal}"; "${modifier}+z" = "exec firefox"; + "${modifier}+r" = "exec st"; # window "${modifier}+q" = "kill"; @@ -115,7 +116,7 @@ in { }; extraConfig = '' - set $opacity 1 + set $opacity 0.99 for_window [class=".*"] opacity $opacity for_window [app_id=".*"] opacity $opacity @@ -142,5 +143,6 @@ in { home.sessionVariables = { XCURSOR_THEME = "macOS"; XCURSOR_SIZE = "24"; + XDG_CURRENT_DESKTOP = "sway"; }; } diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 1c6a1e2..f144ca7 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -13,7 +13,7 @@ ./modules/fonts.nix # gaming shi - ./modules/gaming.nix + # ./modules/gaming.nix ]; nix.settings.experimental-features = [ diff --git a/nixos/modules/localization.nix b/nixos/modules/localization.nix index 7430171..90821ec 100644 --- a/nixos/modules/localization.nix +++ b/nixos/modules/localization.nix @@ -4,14 +4,17 @@ i18n.defaultLocale = "en_US.UTF-8"; i18n.extraLocaleSettings = { - LC_ADDRESS = "es_ES.UTF-8"; - LC_IDENTIFICATION = "es_ES.UTF-8"; - LC_MEASUREMENT = "es_ES.UTF-8"; - LC_MONETARY = "es_ES.UTF-8"; - LC_NAME = "es_ES.UTF-8"; - LC_NUMERIC = "es_ES.UTF-8"; - LC_PAPER = "es_ES.UTF-8"; - LC_TELEPHONE = "es_ES.UTF-8"; - LC_TIME = "es_ES.UTF-8"; + LC_ADDRESS = "en_US.UTF-8"; + LC_IDENTIFICATION = "en_US.UTF-8"; + LC_MEASUREMENT = "en_US.UTF-8"; + LC_MONETARY = "en_US.UTF-8"; + LC_NAME = "en_US.UTF-8"; + LC_NUMERIC = "en_US.UTF-8"; + LC_PAPER = "en_US.UTF-8"; + LC_TELEPHONE = "en_US.UTF-8"; + LC_TIME = "en_US.UTF-8"; }; + + documentation.enable = false; + i18n.supportedLocales = ["en_US.UTF-8/UTF-8"]; } diff --git a/nixos/modules/programs.nix b/nixos/modules/programs.nix index b75c911..1810514 100644 --- a/nixos/modules/programs.nix +++ b/nixos/modules/programs.nix @@ -2,6 +2,7 @@ environment.sessionVariables = { WLR_NO_HARDWARE_CURSORS = "1"; NIXOS_OZONE_WL = "1"; + XDG_CURRENT_DESKTOP = "sway"; }; security.polkit.enable = true; diff --git a/nixos/modules/xserver.nix b/nixos/modules/xserver.nix index ab7205d..5f33569 100644 --- a/nixos/modules/xserver.nix +++ b/nixos/modules/xserver.nix @@ -1,8 +1,10 @@ -{ config, pkgs, ... }: { - services.xserver.enable = true; - services.xserver.videoDrivers = [ "nvidia" ]; - + config, + pkgs, + ... +}: { + services.xserver.enable = false; + services.xserver.videoDrivers = ["nvidia"]; hardware.graphics = { enable = true; enable32Bit = true; @@ -19,11 +21,6 @@ }; }; - services.xserver.xkb = { - layout = "es,ru"; - variant = ""; - }; - services.greetd = { enable = true; settings = rec { @@ -37,6 +34,16 @@ console.keyMap = "es"; + xdg = { + portal = { + enable = true; + extraPortals = with pkgs; [ + xdg-desktop-portal-wlr + xdg-desktop-portal-gtk + ]; + }; + }; + #environment.etc."xdg/sessions/hyprland.desktop".text = '' # [Desktop Entry] # Name=Hyprland