rework
This commit is contained in:
+3
-62
@@ -2,9 +2,6 @@
|
||||
|
||||
# TODO: add OCR keybind on gnome
|
||||
{
|
||||
programs.home-manager.enable = true;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
imports = [
|
||||
./modules/zsh/zsh.nix
|
||||
./modules/kitty.nix
|
||||
@@ -13,10 +10,13 @@
|
||||
./modules/tmux.nix
|
||||
./modules/cursor.nix
|
||||
./modules/ssh.nix
|
||||
./modules/mimeapps.nix
|
||||
] ++ lib.optional (builtins.getEnv "DISABLE_HYPR" != "1")
|
||||
./modules/hypr/hypr.nix
|
||||
++ lib.optional (builtins.pathExists ./modules/my.nix) ./modules/my.nix;
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
home.username = username;
|
||||
home.homeDirectory = "/home/${username}";
|
||||
home.stateVersion = "25.11";
|
||||
@@ -27,66 +27,7 @@
|
||||
name = "Nordzy";
|
||||
package = pkgs.nordzy-icon-theme;
|
||||
};
|
||||
# iconTheme = {
|
||||
# name = "kora";
|
||||
# package = pkgs.kora-icon-theme;
|
||||
# };
|
||||
# iconTheme = {
|
||||
# name = "suru";
|
||||
# package = pkgs.lomiri.suru-icon-theme;
|
||||
# };
|
||||
};
|
||||
home.sessionVariables.QS_ICON_THEME = "Nordzy";
|
||||
|
||||
home.packages = with pkgs; [ vlc imv eog ];
|
||||
|
||||
xdg.mimeApps = {
|
||||
enable = true;
|
||||
|
||||
associations.added = {
|
||||
"image/jpeg" = [ "imv.desktop" ];
|
||||
"image/png" = [ "imv.desktop" ];
|
||||
"video/mp4" = [ "vlc.desktop" ];
|
||||
};
|
||||
|
||||
defaultApplications = {
|
||||
# Images
|
||||
"image/jpeg" = "imv.desktop";
|
||||
"image/png" = "imv.desktop";
|
||||
"image/webp" = "imv.desktop";
|
||||
"image/gif" = "imv.desktop";
|
||||
"image/svg+xml" = "org.gnome.eog.desktop";
|
||||
|
||||
# Videos
|
||||
"video/mp4" = "vlc.desktop";
|
||||
"video/x-matroska" = "vlc.desktop"; # mkv
|
||||
"video/x-msvideo" = "vlc.desktop"; # avi
|
||||
"video/quicktime" = "vlc.desktop"; # mov
|
||||
"video/webm" = "vlc.desktop";
|
||||
|
||||
"audio/mpeg" = "vlc.desktop";
|
||||
"audio/flac" = "vlc.desktop";
|
||||
"audio/ogg" = "vlc.desktop";
|
||||
|
||||
"text/plain" = "code.desktop";
|
||||
|
||||
"x-scheme-handler/http" = "zen-beta.desktop";
|
||||
"x-scheme-handler/https" = "zen-beta.desktop";
|
||||
"x-scheme-handler/chrome" = "zen-beta.desktop";
|
||||
|
||||
"text/html" = "zen-beta.desktop";
|
||||
"application/xhtml+xml" = "zen-beta.desktop";
|
||||
"application/x-extension-htm" = "zen-beta.desktop";
|
||||
"application/x-extension-html" = "zen-beta.desktop";
|
||||
"application/x-extension-shtml" = "zen-beta.desktop";
|
||||
"application/x-extension-xhtml" = "zen-beta.desktop";
|
||||
"application/x-extension-xht" = "zen-beta.desktop";
|
||||
|
||||
"x-scheme-handler/tg" = "org.telegram.desktop.desktop";
|
||||
"x-scheme-handler/tonsite" = "org.telegram.desktop.desktop";
|
||||
|
||||
"application/pdf" = "zen-beta.desktop";
|
||||
"application/zip" = "userapp-unzip-WB99H3.desktop";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
{ config, pkgs, lib, username, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [ vlc imv eog ];
|
||||
|
||||
xdg.mimeApps = {
|
||||
enable = true;
|
||||
|
||||
associations.added = {
|
||||
"image/jpeg" = [ "imv.desktop" ];
|
||||
"image/png" = [ "imv.desktop" ];
|
||||
"video/mp4" = [ "vlc.desktop" ];
|
||||
};
|
||||
|
||||
defaultApplications = {
|
||||
# Images
|
||||
"image/jpeg" = "imv.desktop";
|
||||
"image/png" = "imv.desktop";
|
||||
"image/webp" = "imv.desktop";
|
||||
"image/gif" = "imv.desktop";
|
||||
"image/svg+xml" = "org.gnome.eog.desktop";
|
||||
|
||||
# Videos
|
||||
"video/mp4" = "vlc.desktop";
|
||||
"video/x-matroska" = "vlc.desktop"; # mkv
|
||||
"video/x-msvideo" = "vlc.desktop"; # avi
|
||||
"video/quicktime" = "vlc.desktop"; # mov
|
||||
"video/webm" = "vlc.desktop";
|
||||
|
||||
"audio/mpeg" = "vlc.desktop";
|
||||
"audio/flac" = "vlc.desktop";
|
||||
"audio/ogg" = "vlc.desktop";
|
||||
|
||||
"text/plain" = "code.desktop";
|
||||
|
||||
"x-scheme-handler/http" = "zen-beta.desktop";
|
||||
"x-scheme-handler/https" = "zen-beta.desktop";
|
||||
"x-scheme-handler/chrome" = "zen-beta.desktop";
|
||||
|
||||
"text/html" = "zen-beta.desktop";
|
||||
"application/xhtml+xml" = "zen-beta.desktop";
|
||||
"application/x-extension-htm" = "zen-beta.desktop";
|
||||
"application/x-extension-html" = "zen-beta.desktop";
|
||||
"application/x-extension-shtml" = "zen-beta.desktop";
|
||||
"application/x-extension-xhtml" = "zen-beta.desktop";
|
||||
"application/x-extension-xht" = "zen-beta.desktop";
|
||||
|
||||
"x-scheme-handler/tg" = "org.telegram.desktop.desktop";
|
||||
"x-scheme-handler/tonsite" = "org.telegram.desktop.desktop";
|
||||
|
||||
"application/pdf" = "zen-beta.desktop";
|
||||
"application/zip" = "userapp-unzip-WB99H3.desktop";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -4,6 +4,7 @@
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
|
||||
|
||||
matchBlocks = {
|
||||
"kr0sh.ru" = {
|
||||
host = "kr0sh.ru";
|
||||
@@ -17,6 +18,22 @@
|
||||
identityFile = [ "~/.ssh/id" ];
|
||||
};
|
||||
|
||||
"homeserver" = {
|
||||
host = "homeserver";
|
||||
hostname = "192.168.3.71";
|
||||
port = 2006;
|
||||
user = "krosh";
|
||||
identityFile = [ "~/.ssh/id_ed25519_sk" ];
|
||||
};
|
||||
|
||||
"homeserver-wg" = {
|
||||
host = "homeserver-wg";
|
||||
hostname = "10.10.0.10";
|
||||
port = 2006;
|
||||
user = "krosh";
|
||||
identityFile = [ "~/.ssh/id_ed25519_sk" ];
|
||||
};
|
||||
|
||||
"polus" = {
|
||||
host = "polus";
|
||||
hostname = "polus.hpc.cs.msu.ru";
|
||||
@@ -37,5 +54,20 @@
|
||||
};
|
||||
};
|
||||
|
||||
programs.ssh.enableDefaultConfig = false;
|
||||
|
||||
programs.ssh.matchBlocks."*" = {
|
||||
forwardAgent = false;
|
||||
addKeysToAgent = "no";
|
||||
compression = false;
|
||||
serverAliveInterval = 0;
|
||||
serverAliveCountMax = 3;
|
||||
hashKnownHosts = false;
|
||||
userKnownHostsFile = "~/.ssh/known_hosts";
|
||||
controlMaster = "no";
|
||||
controlPath = "~/.ssh/master-%r@%n:%p";
|
||||
controlPersist = "no";
|
||||
};
|
||||
|
||||
# services.ssh-agent.enable = true;
|
||||
}
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
{ config, pkgs, gitName, gitEmail, ... }:
|
||||
|
||||
# i have to use other home manager module (without telegram and so on)
|
||||
# i don't need home-manager.
|
||||
|
||||
# TODO Actions on lid close
|
||||
|
||||
{
|
||||
networking.hostName = "home-server";
|
||||
imports = [
|
||||
../../nixos/custom.nix
|
||||
./hardware-configuration.nix
|
||||
./zsh.nix
|
||||
./tmux.nix
|
||||
];
|
||||
|
||||
fileSystems."/".options = [ "noatime" "compress=zstd" ];
|
||||
swapDevices = [{
|
||||
device = "/swapfile";
|
||||
size = 8 * 1024;
|
||||
randomEncryption.enable = false;
|
||||
}];
|
||||
|
||||
# --- Disable useless shit ---
|
||||
services.displayManager.gdm.enable = false;
|
||||
programs.hyprland.enable = false;
|
||||
programs.steam.enable = false;
|
||||
programs.firefox.enable = false;
|
||||
|
||||
virtualisation.virtualbox.host.enable = false;
|
||||
virtualisation.libvirtd.enable = false;
|
||||
virtualisation.spiceUSBRedirection.enable = false;
|
||||
programs.virt-manager.enable = false;
|
||||
|
||||
boot.plymouth.enable = false;
|
||||
|
||||
# --- End ---
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
pull.rebase = true;
|
||||
user = {
|
||||
name = gitName;
|
||||
email = gitEmail;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = { PasswordAuthentication = false; };
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
qbittorrent-nox # config for webui port
|
||||
jellyfin
|
||||
|
||||
];
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,13 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
clock24 = true;
|
||||
keyMode = "vi";
|
||||
historyLimit = 5000;
|
||||
mouse = true;
|
||||
newSession = true;
|
||||
shell = "${pkgs.zsh}/bin/zsh";
|
||||
};
|
||||
}
|
||||
@@ -1,161 +0,0 @@
|
||||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
zsh-powerlevel10k
|
||||
fzf
|
||||
fd
|
||||
eza
|
||||
zoxide
|
||||
bat
|
||||
neofetch
|
||||
yazi
|
||||
zenity
|
||||
figlet
|
||||
|
||||
bat
|
||||
ripgrep
|
||||
entr
|
||||
ddgr
|
||||
|
||||
cava
|
||||
github-copilot-cli
|
||||
];
|
||||
|
||||
# home.file.".p10k.zsh".source = ./p10k.zsh; # !! edit path
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
|
||||
autocd = true;
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
|
||||
history = {
|
||||
append = true;
|
||||
ignoreAllDups = true;
|
||||
ignoreDups = true;
|
||||
saveNoDups = true;
|
||||
share = true;
|
||||
};
|
||||
|
||||
plugins = with pkgs; [
|
||||
{
|
||||
file = "powerlevel10k.zsh-theme";
|
||||
name = "powerlevel10k";
|
||||
src = "${zsh-powerlevel10k}/share/zsh-powerlevel10k";
|
||||
}
|
||||
{
|
||||
file = "p10k.zsh";
|
||||
name = "powerlevel10k-config";
|
||||
src = ./p10k.zsh;
|
||||
}
|
||||
];
|
||||
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
plugins = [
|
||||
"git"
|
||||
"python"
|
||||
"ssh"
|
||||
"eza"
|
||||
"zoxide"
|
||||
"fzf"
|
||||
"command-not-found"
|
||||
"colored-man-pages"
|
||||
];
|
||||
};
|
||||
|
||||
shellAliases = {
|
||||
ll = "ls -lh";
|
||||
la = "ls -la";
|
||||
".." = "cd ..";
|
||||
"..." = "cd ../..";
|
||||
|
||||
c = "clear";
|
||||
addpath = "export PATH=$PATH:$1";
|
||||
tree = "eza --tree";
|
||||
kk = "sudo kill -9";
|
||||
grepps = "ps -A | grep";
|
||||
try = ''f() { nix-shell -p "$@" --run zsh; unset -f f; }; f'';
|
||||
|
||||
wttr = "curl wttr.in/Ramenki\\?p1MQ";
|
||||
|
||||
og = ''f() { z github "$@" && code . && exit; unset -f f; }; f'';
|
||||
wf = ''f() { watch -t -n1 "$@ | figlet -c -t -f doh"; unset -f f; }; f'';
|
||||
|
||||
cnfg = "cd nixos-config && code . && exit";
|
||||
x = "select_command";
|
||||
u = "update_git_config";
|
||||
|
||||
mv_w = "move_wallpaper";
|
||||
next_w = "next_wallpaper";
|
||||
next_wr = "next_wallpaper -r";
|
||||
next_wf = ''
|
||||
next_wallpaper -f $(zenity --title "Pick a wallpaper" --file-selection --file-filter \*.png)'';
|
||||
mv_avatar = "move_avatar";
|
||||
|
||||
t = "todo";
|
||||
ta = ''f() { todo add "$*"; todo; unset -f f; }; f'';
|
||||
tr = ''f() { todo rm "$@"; todo; unset -f f; }; f'';
|
||||
td = ''f() { todo done "$@"; todo; unset -f f; }; f'';
|
||||
|
||||
s = ''
|
||||
(){ local val=''${1:-true} vault=''${2:-default}; local file="$HOME/stats/''${vault}.tsv"; mkdir -p "''${file:h}"; printf "%s\t%s\n" "$(date "+%Y-%m-%d %H:%M:%S")" "$val" >> "$file"; }'';
|
||||
};
|
||||
|
||||
initContent = ''
|
||||
(cat ~/.cache/wal/sequences &)
|
||||
zstyle ':omz:plugins:eza' 'git-status' yes
|
||||
zstyle ':omz:plugins:eza' 'header' yes
|
||||
zstyle ':omz:plugins:eza' 'icons' yes
|
||||
|
||||
ZOXIDE_CMD_OVERRIDE=cd
|
||||
|
||||
### --- COMPLETION TUNING -----------------------------
|
||||
autoload -Uz compinit && compinit
|
||||
zstyle ':completion:*' menu select
|
||||
zstyle ':completion:*' list-colors ""
|
||||
|
||||
### --- KEYBINDINGS ----------------------------------
|
||||
# bindkey -e # Emacs-style bindings
|
||||
# bindkey -v # Vim-style bindings
|
||||
|
||||
### --- ENVIRONMENT VARS ------------------------------
|
||||
export EDITOR="nvim"
|
||||
export VISUAL="nvim"
|
||||
export PAGER="less"
|
||||
export LESS="-R"
|
||||
|
||||
# --- fzf configuration ---
|
||||
if command -v fzf >/dev/null 2>&1; then
|
||||
# Enable key bindings and auto-completion
|
||||
[ -f "${pkgs.fzf}/share/fzf/key-bindings.zsh" ] && source "${pkgs.fzf}/share/fzf/key-bindings.zsh"
|
||||
[ -f "${pkgs.fzf}/share/fzf/completion.zsh" ] && source "${pkgs.fzf}/share/fzf/completion.zsh"
|
||||
|
||||
# Example of optional fzf tuning
|
||||
export FZF_DEFAULT_COMMAND='fd --type f --hidden --follow --exclude .git'
|
||||
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
|
||||
export FZF_DEFAULT_OPTS='--height 40% --layout=reverse --border'
|
||||
fi
|
||||
|
||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
eval "$(zoxide init zsh --cmd cd)"
|
||||
|
||||
# Автоматически выполнять ls после любого перехода в каталог (только в интерактивной оболочке)
|
||||
autoload -Uz add-zsh-hook
|
||||
|
||||
_ls_after_cd() {
|
||||
ls
|
||||
}
|
||||
|
||||
if [[ -o interactive ]]; then
|
||||
add-zsh-hook chpwd _ls_after_cd
|
||||
fi
|
||||
|
||||
|
||||
'';
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,6 +1,10 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
pavucontrol
|
||||
];
|
||||
|
||||
services.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
@@ -8,5 +12,6 @@
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
wireplumber.enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -6,5 +6,5 @@
|
||||
networking.networkmanager.enable = true;
|
||||
networking.nameservers = [ "8.8.8.8" "1.1.1.1" ];
|
||||
networking.networkmanager.insertNameservers = [ "1.1.1.1" "8.8.8.8" ];
|
||||
networking.firewall.enable = false; # ! 🤡
|
||||
networking.firewall.enable = mkDefault false; # ! 🤡
|
||||
}
|
||||
|
||||
@@ -1,19 +1,26 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
#! KROSH MENTION
|
||||
|
||||
{
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [ kitty qbittorrent ncdu ];
|
||||
environment.systemPackages = with pkgs; [
|
||||
kitty
|
||||
qbittorrent
|
||||
ncdu
|
||||
wireguard-tools
|
||||
jellyfin
|
||||
gcc
|
||||
toybox
|
||||
];
|
||||
|
||||
programs.ssh.startAgent = true;
|
||||
services.gnome.gcr-ssh-agent.enable = lib.mkForce false;
|
||||
|
||||
# Failed to restart network-addresses-vboxnet0.service
|
||||
virtualisation.virtualbox.host.enable = lib.mkDefault true;
|
||||
# virtualisation.virtualbox.host.enable = lib.mkDefault true;
|
||||
virtualisation.libvirtd.enable = lib.mkDefault true;
|
||||
virtualisation.spiceUSBRedirection.enable = lib.mkDefault true;
|
||||
programs.virt-manager.enable = lib.mkDefault true;
|
||||
# users.extraGroups.vboxusers.members = [ "krosh" ];
|
||||
|
||||
programs.firefox.enable = lib.mkDefault true;
|
||||
programs.zsh.enable = true;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
networking.firewall.enable = true;
|
||||
|
||||
services.udev.packages = [ pkgs.yubikey-personalization ];
|
||||
environment.systemPackages = with pkgs; [
|
||||
fprintd
|
||||
@@ -13,6 +15,7 @@
|
||||
programs.gnupg.agent = { enable = true; };
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
|
||||
security.rtkit.enable = true;
|
||||
services.fprintd.enable = true;
|
||||
security.pam.services.sudo.fprintAuth = true;
|
||||
security.pam.services.login.fprintAuth = lib.mkForce true;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
# KROSH mention
|
||||
# ! KROSH mention
|
||||
|
||||
{
|
||||
system.stateVersion = "25.11";
|
||||
@@ -31,18 +31,13 @@
|
||||
(writeShellScriptBin "power_max" (builtins.readFile ../scripts/max.sh))
|
||||
(writeShellScriptBin "power_min" (builtins.readFile ../scripts/min.sh))
|
||||
(writeShellScriptBin "reload" (builtins.readFile ../scripts/reload.sh))
|
||||
# papirus-icon-theme
|
||||
kora-icon-theme
|
||||
# kora-icon-theme
|
||||
nordzy-icon-theme
|
||||
adwaita-icon-theme
|
||||
# adwaita-icon-theme
|
||||
hicolor-icon-theme
|
||||
lomiri.suru-icon-theme
|
||||
# lomiri.suru-icon-theme
|
||||
];
|
||||
|
||||
programs.nix-ld.enable = true;
|
||||
programs.nix-ld.libraries = with pkgs;
|
||||
[
|
||||
# Add any missing dynamic libraries for unpackaged programs
|
||||
# here, NOT in environment.systemPackages
|
||||
];
|
||||
programs.nix-ld.libraries = with pkgs; [ ];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user