remove code under comments & add home-server basic config (WIP)

This commit is contained in:
2026-01-31 19:20:54 +03:00
parent c82a74c786
commit 94ab681057
17 changed files with 2008 additions and 129 deletions
+19
View File
@@ -0,0 +1,19 @@
# Nixos TODO
## General
- [ ] разобраться с firewall
- [ ] добавить плагинов для nemo проводника
- [ ] разобраться с оптимизацией питания
- [ ] разнести unsorted
- [ ] рефактор (многое не на своих местах)
- [ ] добавить опция для не-btrfs
## home-server configuration
- [ ] удалить экспорт home модуля
- [ ] добавить настройки для jellyfin, qbittorrent and so on
- [ ] изменить путь для p10k в zsh файле
- [ ] убрать действия при закрытии крышки
- [ ] auto-mount on startup
- [ ] make a pass for all home-server things
@@ -86,8 +86,9 @@
RCtrl, Return, exec, ~/.config/hypr/scripts/launch_first_available.sh "kitty" "foot" "alacritty" "wezterm" "konsole" "kgx" "uxterm" "xterm"
''
"${super}, T, exec, Telegram"
# ${super}, E, exec, ~/.config/hypr/scripts/launch_first_available.sh "thunar" "nemo" "nautilus" "dolphin" "kitty -1 zsh -c yazi"''
''
${super}, E, exec, ~/.config/hypr/scripts/launch_first_available.sh "thunar" "nemo" "nautilus" "dolphin" "kitty -1 zsh -c yazi"''
${super}, E, exec, ~/.config/hypr/scripts/launch_first_available.sh "nemo" "thunar" "nautilus" "dolphin" "kitty -1 zsh -c yazi"''
''
${super}, W, exec, ~/.config/hypr/scripts/launch_first_available.sh "google-chrome-stable" "zen" "firefox" "brave" "chromium" "microsoft-edge-stable" "opera" "librewolf"''
''
+1 -19
View File
@@ -38,25 +38,7 @@
# imports = [ inputs.zen-browser.homeModules.twilight ];
imports = [ inputs.zen-browser.homeModules.default ];
# inputs.zen-browser.homeModules.beta
# or inputs.zen-browser.homeModules.twilight
# or inputs.zen-browser.homeModules.twilight-official
programs.zen-browser = {
enable = true;
#profiles."Default Profile" = {
# search = {
# default = "Perplexity"; # Use the ID of your custom engine below
#engines = {
#"perplexity" = { # Custom engine ID (lowercase, no spaces)
#name = "Perplexity";
#urls = [{
# template = "https://www.perplexity.ai/search?q=%s";
#}];
#definedAliases = [ "@per" ];
#};
# };
#};
};
programs.zen-browser = { enable = true; };
xdg.mimeApps = let
value = let
-1
View File
@@ -1,7 +1,6 @@
{ config, pkgs, ... }:
{
programs.tmux = {
enable = true;
clock24 = true;
-1
View File
@@ -11,7 +11,6 @@
randomEncryption.enable = true;
}];
services.thermald.enable = true;
services.auto-cpufreq = { enable = true; }; # !!!
hardware.graphics.enable = true;
+62
View File
@@ -0,0 +1,62 @@
{ 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
+13
View File
@@ -0,0 +1,13 @@
{ config, pkgs, ... }:
{
programs.tmux = {
enable = true;
clock24 = true;
keyMode = "vi";
historyLimit = 5000;
mouse = true;
newSession = true;
shell = "${pkgs.zsh}/bin/zsh";
};
}
+161
View File
@@ -0,0 +1,161 @@
{ 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 -1
View File
@@ -14,7 +14,7 @@
./modules/timelang.nix
./modules/wm.nix
./modules/unsorted.nix
./modules/thunar.nix
./modules/thunar.nix # ! edit for nemo
];
}
+1 -1
View File
@@ -3,7 +3,7 @@
{
boot = {
plymouth = {
enable = true;
enable = lib.mkDefault true;
theme = "double";
themePackages = with pkgs;
[
+1 -1
View File
@@ -2,6 +2,6 @@
{
# zramSwap.enable = true;
services.btrfs.autoScrub.enable = true;
services.btrfs.autoScrub.enable = true; # i can use not only btrfs
services.btrfs.autoScrub.interval = "weekly";
}
+1 -1
View File
@@ -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 = false; # ! 🤡
}
+1 -69
View File
@@ -8,78 +8,10 @@
powerManagement.powertop.enable = true;
services.thermald.enable = true;
services.system76-scheduler.settings.cfsProfiles.enable = true;
# networking.networkmanager.wifi.powersave = true;
services.auto-cpufreq.enable = true;
hardware.intel-gpu-tools.enable = true;
### NixOS power management
# powerManagement = {
# enable = true;
# #cpufreq.min = 800000;
# #cpufreq.max = 2200000;
# # powertop.enable = true;
# #powerUpCommands =
# cpuFreqGovernor = "schedutil"; # power, performance, ondemand
# };
hardware.intel-gpu-tools.enable = true; # ! wtf
boot.kernelParams = [ "usbcore.autosuspend=0" ];
# services.tlp = {
# enable = true;
# settings = { # power saving priority
# CPU_ENERGY_PERF_POLICY_ON_AC = "balance_performance";
# CPU_ENERGY_PERF_POLICY_ON_BAT = "balance_power";
# CPU_ENERGY_PERF_POLICY_ON_SAV = "power";
# PLATFORM_PROFILE_ON_AC = "performance";
# PLATFORM_PROFILE_ON_BAT = "power";
# PLATFORM_PROFILE_ON_SAV = "low-power";
# CPU_BOOST_ON_AC = 1;
# CPU_BOOST_ON_BAT = 0;
# CPU_BOOST_ON_SAV = 0;
# CPU_HWP_DYN_BOOST_ON_AC = 1;
# CPU_HWP_DYN_BOOST_ON_BAT = 0;
# CPU_HWP_DYN_BOOST_ON_SAV = 0;
# AMDGPU_ABM_LEVEL_ON_AC = 0;
# AMDGPU_ABM_LEVEL_ON_BAT = 3;
# AMDGPU_ABM_LEVEL_ON_SAV = 3;
# # CPU_BOOST_ON_AC = 1;
# # CPU_BOOST_ON_BAT = 0;
# # CPU_HWP_DYN_BOOST_ON_AC = 1;
# # CPU_HWP_DYN_BOOST_ON_BAT = 0;
# # CPU_SCALING_GOVERNOR_ON_AC = "performance";
# # CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
# # CPU_SCALING_MIN_FREQ_ON_BAT = 0;
# # CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
# # CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
# # AMDGPU_ABM_LEVEL_ON_AC = 0;
# # AMDGPU_ABM_LEVEL_ON_BAT = 0;
# # PLATFORM_PROFILE_ON_AC = "performance";
# # PLATFORM_PROFILE_ON_BAT = "low-power";
# # PCIE_ASPM_ON_BAT = "powersupersave";
# # SATA_LINKPWR_ON_AC = "med_power_with_dipm";
# # SATA_LINKPWR_ON_BAT = "min_power";
# # RUNTIME_PM_ON_AC = "on";
# # RUNTIME_PM_ON_BAT = "auto";
# # SOUND_POWER_SAVE_ON_AC = 0;
# # SOUND_POWER_SAVE_ON_BAT = 1;
# # SOUND_POWER_SAVE_CONTROLLER = "Y";
# # CPU_MAX_PERF_ON_AC = 100;
# # CPU_MAX_PERF_ON_BAT = 50;
# # NMI_WATCHDOG = 0;
# # USB_AUTOSUSPEND = 0;
# # USB_BLACKLIST_BTUSB = 0;
# # START_CHARGE_THRESH_BAT0 = 0;
# # STOP_CHARGE_THRESH_BAT0 = 1;
# };
# };
}
+6 -5
View File
@@ -9,12 +9,13 @@
services.gnome.gcr-ssh-agent.enable = lib.mkForce false;
# Failed to restart network-addresses-vboxnet0.service
virtualisation.virtualbox.host.enable = true;
virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = 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 = true;
programs.firefox.enable = lib.mkDefault true;
programs.zsh.enable = true;
programs.neovim = {
enable = true;
@@ -36,7 +37,7 @@
};
programs.steam = {
enable = true;
enable = lib.mkDefault true;
remotePlay.openFirewall =
true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall =
+19 -28
View File
@@ -1,36 +1,27 @@
{ config, pkgs, ... }: {
# Thunar (use the module)
programs.thunar.enable = true; # :contentReference[oaicite:1]{index=1}
programs.thunar.enable = true;
# If you are NOT running full XFCE, you need xfconf or Thunar settings wont persist
programs.xfconf.enable = true; # :contentReference[oaicite:2]{index=2}
programs.xfconf.enable = true;
# Plugins (add them here, not in systemPackages)
programs.thunar.plugins = with pkgs.xfce; [
thunar-archive-plugin # right-click extract/compress
thunar-volman # removable media handling
]; # :contentReference[oaicite:3]{index=3}
# Mount/trash and thumbnails
services.gvfs.enable = true; # :contentReference[oaicite:4]{index=4}
services.tumbler.enable = true; # :contentReference[oaicite:5]{index=5}
# Removable drives typically rely on udisks2 + polkit
services.udisks2.enable = true; # :contentReference[oaicite:6]{index=6}
security.polkit.enable = true; # :contentReference[oaicite:7]{index=7}
# Usually already enabled, but harmless to be explicit on minimal installs
services.dbus.enable = true;
# Set default applications for Thunar (and others) via xdg-mime
environment.systemPackages = with pkgs; [
gdk-pixbuf # image thumbnailer :contentReference[oaicite:5]{index=5}
ffmpegthumbnailer # video thumbnails :contentReference[oaicite:6]{index=6}
ffmpeg-headless # decoding support often used alongside ffmpegthumbnailer :contentReference[oaicite:7]{index=7}
thunar-archive-plugin # ! not working
thunar-volman
];
# Make .thumbnailer definitions visible under the system profile
environment.pathsToLink =
[ "share/thumbnailers" ]; # :contentReference[oaicite:8]{index=8}
services.gvfs.enable = true;
services.tumbler.enable = true;
services.udisks2.enable = true;
security.polkit.enable = true;
services.dbus.enable = true;
environment.systemPackages = with pkgs; [
gdk-pixbuf
ffmpegthumbnailer
ffmpeg-headless
];
environment.pathsToLink = [ "share/thumbnailers" ];
}
-1
View File
@@ -10,7 +10,6 @@
services.displayManager.gdm.enable = lib.mkDefault true;
services.desktopManager.gnome.enable = lib.mkDefault false;
# programs.uwsm.enable = true;
programs.hyprland = {
enable = lib.mkDefault true;
withUWSM = false;