Restructure configuration

This commit is contained in:
tx0 2025-03-02 17:14:39 +05:00
parent 58ff0046c6
commit b1d604c496
43 changed files with 49 additions and 368 deletions

View file

@ -3,14 +3,14 @@
path = ./.; path = ./.;
include = [ include = [
./packages/default.nix ./system/packages/default.nix
./waybar/default.nix ./programs/graphical/waybar/default.nix
]; ];
exclude = [ exclude = [
./default.nix ./default.nix
./packages ./system/packages
./waybar ./programs/graphical/waybar
]; ];
}; };
} }

View file

@ -9,32 +9,23 @@
stateVersion = "24.11"; stateVersion = "24.11";
sessionVariables = { sessionVariables = {
EDITOR = "${config.home.homeDirectory}/.nix-profile/bin/nvim"; EDITOR = "${config.home.homeDirectory}/.nix-profile/bin/nvim";
HYPRSHOT_DIR = "$HOME/Pictures/Screenshots/"; HYPRSHOT_DIR = "${config.home.homeDirectory}/Pictures/Screenshots/";
FLAKE = "/home/tx0/nixos/"; FLAKE = "${config.home.homeDirectory}/nixos/";
NIXOS_OZONE_WL = 1; NIXOS_OZONE_WL = 1;
ELECTRON_OZONE_PLATFORM_HINT = 1; ELECTRON_OZONE_PLATFORM_HINT = 1;
MOZ_ENABLE_WAYLAND = 1; MOZ_ENABLE_WAYLAND = 1;
fish_greeting = ""; fish_greeting = "";
}; };
sessionPath = ["$HOME/.local/bin"]; sessionPath = ["${config.home.homeDirectory}/.local/bin"];
}; };
gtk.gtk3.bookmarks = [ gtk.gtk3.bookmarks = [
"file:///mnt/data/" "file:///mnt/data/"
"file:///home/tx0/Downloads/" "file://${config.home.homeDirectory}/Downloads/"
"file:///home/tx0/Documents/" "file://${config.home.homeDirectory}/Documents/"
"file:///home/tx0/Pictures/Screenshots" "file://${config.home.homeDirectory}/Pictures/Screenshots"
]; ];
services.udiskie = {
enable = false;
settings = {
program_options = {
file_manager = "${pkgs.nautilus}/bin/nautilus";
};
};
};
universe.alacritty.enable = true; universe.alacritty.enable = true;
} }

View file

@ -13,13 +13,6 @@ in {
enable = true; enable = true;
settings = { settings = {
general = {live_config_reload = true;}; general = {live_config_reload = true;};
# font = {
# normal = { family = "JetBrainsMono Nerd Font Mono"; style = "Regular"; };
# bold = { family = "JetBrainsMono Nerd Font Mono"; style = "Bold"; };
# italic = { family = "JetBrainsMono Nerd Font Mono"; style = "Italic"; };
# size = 14;
# };
font.glyph_offset = { font.glyph_offset = {
x = 0; x = 0;
y = 0; y = 0;

View file

Before

Width:  |  Height:  |  Size: 592 B

After

Width:  |  Height:  |  Size: 592 B

10
home/services/udiskie.nix Normal file
View file

@ -0,0 +1,10 @@
{pkgs, ...}: {
services.udiskie = {
enable = false;
settings = {
program_options = {
file_manager = "${pkgs.nautilus}/bin/nautilus";
};
};
};
}

View file

@ -1,6 +1,7 @@
{ {
inputs, inputs,
pkgs, pkgs,
config,
... ...
}: { }: {
nix = { nix = {
@ -22,7 +23,7 @@
builders-use-substitutes = true; builders-use-substitutes = true;
auto-optimise-store = true; auto-optimise-store = true;
trusted-users = [ trusted-users = [
"tx0" config.home.username
"root" "root"
"@wheel" "@wheel"
]; ];

View file

@ -1,6 +1,5 @@
{config, ...}: { {config, ...}: {
home.file = { home.file = {
# Create symbolic links for directories
Documents = { Documents = {
source = config.lib.file.mkOutOfStoreSymlink "/mnt/data_home/Documents"; source = config.lib.file.mkOutOfStoreSymlink "/mnt/data_home/Documents";
target = "${config.home.homeDirectory}/Documents"; target = "${config.home.homeDirectory}/Documents";

View file

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

View file

@ -1,60 +0,0 @@
{
pkgs,
config,
...
}: {
programs.fish = {
enable = true;
functions = {
_fetch = ''
bunnyfetch
printf "\n"
'';
filesize = ''
for file in $argv
if [ -f "$file" ]
echo "$file: $(stat -c %s "$file" | numfmt --to=iec)"
else
echo "$file: not found"
end
end
'';
y = ''
set tmp (mktemp -t "yazi-cwd.XXXXXX")
yazi $argv --cwd-file="$tmp"
if set cwd (command cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
builtin cd -- "$cwd"
end
rm -f -- "$tmp"
'';
arm64cc-env = ''
set -gx ARCH arm64
set -gx hardeningDisable all
set -gx CROSS_COMPILE aarch64-linux-gnu-
'';
};
shellAliases = {
ls = "eza";
cat = "bat";
v = "nvim";
V = "sudoedit";
":q" = "exit";
cdt = "cd (mktemp -d)";
};
interactiveShellInit = ''
${pkgs.any-nix-shell}/bin/any-nix-shell fish --info-right | source
bind \cl 'clear; _fetch; commandline -f repaint'
bind \cb ${pkgs.btop}/bin/btop
bind \cf 'fzf; commandline -f repaint'
bind \cs 'cdi; commandline -f repaint'
_fetch
'';
};
}

View file

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

View file

@ -1,7 +0,0 @@
{
programs.git = {
enable = true;
userEmail = "me@tx0.su";
userName = "tx0";
};
}

View file

@ -1,141 +0,0 @@
{
pkgs,
config,
lib,
...
}: let
inherit (config.lib.stylix) colors;
in {
programs.nvf = {
enable = true;
settings.vim = {
useSystemClipboard = true;
viAlias = true;
vimAlias = true;
theme = {
enable = true;
name = "base16";
style = "dark";
base16-colors = {
inherit (colors) base00 base01 base02 base03 base04 base05 base06 base07;
inherit (colors) base08 base09 base0A base0B base0C base0D base0E base0F;
};
transparent = true;
};
options = {
tabstop = 2;
expandtab = true;
softtabstop = 2;
shiftwidth = 2;
};
lsp = {
formatOnSave = true;
};
visuals = {
nvim-scrollbar.enable = true;
nvim-web-devicons.enable = true;
nvim-cursorline.enable = true;
fidget-nvim.enable = true;
};
statusline.lualine.enable = true;
autopairs.nvim-autopairs.enable = true;
autocomplete.nvim-cmp.enable = true;
tabline = {
nvimBufferline = {
enable = true;
mappings = {
cycleNext = "<tab>";
};
setupOpts.options = {
numbers = {
_type = "lua-inline";
expr = ''
function(opts)
return string.format('%s', opts.id)
end
'';
};
};
};
};
ui = {
borders.enable = true;
colorizer.enable = true;
};
binds.whichKey.enable = true;
treesitter.context.enable = false;
dashboard = {
dashboard-nvim.enable = true;
};
languages = {
enableLSP = true;
enableTreesitter = true;
enableFormat = true;
nix.enable = true;
python = {
enable = true;
# lsp.server = "pyright";
};
go.enable = true;
bash.enable = true;
css.enable = true;
html.enable = true;
lua.enable = true;
};
lazy.plugins = {
"vim-tmux-navigator" = {
package = pkgs.vimPlugins.vim-tmux-navigator;
setupModule = "vim-tmux-navigator";
cmd = [
"TmuxNavigateLeft"
"TmuxNavigateDown"
"TmuxNavigateUp"
"TmuxNavigateRight"
"TmuxNavigatePrevious"
"TmuxNavigatorProcessList"
];
keys = [
{
key = "<c-h>";
mode = "n";
action = "<cmd><C-U>TmuxNavigateLeft<cr>";
}
{
key = "<c-j>";
mode = "n";
action = "<cmd><C-U>TmuxNavigateDown<cr>";
}
{
key = "<c-k>";
mode = "n";
action = "<cmd><C-U>TmuxNavigateUp<cr>";
}
{
key = "<c-l>";
mode = "n";
action = "<cmd><C-U>TmuxNavigateRight<cr>";
}
{
key = "<c-\\>";
mode = "n";
action = "<cmd><C-U>TmuxNavigatePrevious<cr>";
}
];
};
};
};
};
}

View file

@ -1,44 +0,0 @@
{
pkgs,
config,
...
}: {
programs.tmux = {
enable = true;
shell = "${pkgs.fish}/bin/fish";
terminal = "tmux-256color";
historyLimit = 100000;
plugins = with pkgs.tmuxPlugins; [
vim-tmux-navigator
];
escapeTime = 0;
mouse = true;
extraConfig = ''
set -g destroy-unattached on
unbind C-b
set -g prefix C-Space
bind C-Space send-prefix
set -g base-index 1
set -g pane-base-index 1
set-window-option -g pane-base-index 1
set -g renumber-windows on
bind -n M-H previous-window
bind -n M-: next-window
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi C-v send-keys -X rectangle-selection
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
unbind %
unbind '"'
bind ']' split-window -v -c "#{pane_current_path}"
bind '\' split-window -h -c "#{pane_current_path}"
bind C-l send-keys 'C-l'
'';
};
}

View file

@ -1,40 +0,0 @@
{
programs.yazi = {
enable = true;
settings = {
opener = {
edit = [
{
run = ''$EDITOR "$@"'';
block = true;
for = "unix";
}
];
open = [
{
run = ''xdg-open "$@"'';
desc = "Open";
}
];
};
open = {
prepend_rules = [
{
mime = "text/*";
use = "edit";
}
{
name = "*.html";
use = ["open" "edit"];
}
];
append_rules = [
{
name = "*";
use = "open";
}
];
};
};
};
}

View file

@ -1,13 +0,0 @@
{
pkgs,
config,
...
}: {
programs.zoxide = {
enable = true;
enableFishIntegration = true;
options = [
"--cmd cd"
];
};
}

11
home/theming/dconf.nix Normal file
View file

@ -0,0 +1,11 @@
{...}: {
dconf.settings = {
"org/gnome/desktop/wm/preferences" = {
button-layout = ":";
};
"org.gnome.desktop.interface" = {
gtk-color-scheme = "prefer-dark";
color-scheme = "prefer-dark";
};
};
}

10
home/theming/gtk.nix Normal file
View file

@ -0,0 +1,10 @@
{pkgs, ...}: {
gtk = {
enable = true;
iconTheme = {
package = pkgs.papirus-icon-theme;
name = "Papirus-Dark";
};
};
}

6
home/theming/qt.nix Normal file
View file

@ -0,0 +1,6 @@
{...}: {
qt = {
# platformTheme.name = lib.mkForce "gtk3";
enable = true;
};
}

View file

@ -5,35 +5,11 @@
}: let }: let
enableLutgen = false; enableLutgen = false;
in { in {
dconf.settings = {
"org/gnome/desktop/wm/preferences" = {
button-layout = ":";
};
"org.gnome.desktop.interface" = {
gtk-color-scheme = "prefer-dark";
color-scheme = "prefer-dark";
};
};
home.pointerCursor = { home.pointerCursor = {
gtk.enable = true; gtk.enable = true;
x11.enable = true; x11.enable = true;
}; };
gtk = {
enable = true;
iconTheme = {
package = pkgs.papirus-icon-theme;
name = "Papirus-Dark";
};
};
qt = {
# platformTheme.name = lib.mkForce "gtk3";
enable = true;
};
stylix = { stylix = {
enable = true; enable = true;
base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-material-dark-medium.yaml"; base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-material-dark-medium.yaml";

View file

Before

Width:  |  Height:  |  Size: 1.7 MiB

After

Width:  |  Height:  |  Size: 1.7 MiB