stable version. add scripts for fast update
This commit is contained in:
+24
-1
@@ -9,7 +9,7 @@
|
||||
hyprlock
|
||||
vscode
|
||||
# gnomeExtensions.paperwm
|
||||
nixfmt
|
||||
nixfmt-classic
|
||||
];
|
||||
|
||||
imports = [
|
||||
@@ -29,6 +29,29 @@
|
||||
# };
|
||||
# };
|
||||
|
||||
home.pointerCursor =
|
||||
let
|
||||
getFrom = url: hash: name: {
|
||||
gtk.enable = true;
|
||||
x11.enable = true;
|
||||
name = name;
|
||||
size = 48;
|
||||
package =
|
||||
pkgs.runCommand "moveUp" {} ''
|
||||
mkdir -p $out/share/icons
|
||||
ln -s ${pkgs.fetchzip {
|
||||
url = url;
|
||||
hash = hash;
|
||||
}} $out/share/icons/${name}
|
||||
'';
|
||||
};
|
||||
in
|
||||
getFrom
|
||||
"https://github.com/ful1e5/fuchsia-cursor/releases/download/v2.0.0/Fuchsia-Pop.tar.gz"
|
||||
"sha256-BvVE9qupMjw7JRqFUj1J0a4ys6kc9fOLBPx2bGaapTk="
|
||||
"Fuchsia-Pop";
|
||||
|
||||
|
||||
home.username = "krosh";
|
||||
home.homeDirectory = "/home/krosh";
|
||||
home.stateVersion = "25.05";
|
||||
|
||||
@@ -53,6 +53,6 @@
|
||||
|
||||
home.packages = with pkgs; [
|
||||
kitty
|
||||
(pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
|
||||
# (pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
|
||||
];
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
amnezia-vpn
|
||||
# amnezia-vpn
|
||||
telegram-desktop
|
||||
firefox
|
||||
];
|
||||
|
||||
@@ -1,22 +1,38 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
zsh-powerlevel10k
|
||||
fzf
|
||||
fd
|
||||
];
|
||||
home.packages = with pkgs; [ zsh-powerlevel10k fzf fd eza zoxide ];
|
||||
|
||||
programs.zsh = {
|
||||
loginShell = true;
|
||||
enable = true;
|
||||
|
||||
autocd = true;
|
||||
enableCompletion = true;
|
||||
autosuggestions.enable = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
|
||||
history = {
|
||||
append = true;
|
||||
ignoreAllDups = true;
|
||||
ignoreDups = true;
|
||||
saveNoDups = 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;
|
||||
theme = "powerlevel10k/powerlevel10k"; # agnoster refined nicoulaj
|
||||
plugins = [
|
||||
"git"
|
||||
"python"
|
||||
@@ -39,7 +55,7 @@
|
||||
addpath = "export PATH=$PATH:$1";
|
||||
tree = "eza --tree";
|
||||
|
||||
gitpa = "f() { git add -A && git commit -m \"$1\" && git push; }; f";
|
||||
gitpa = ''f() { git add -A && git commit -m "$1" && git push; }; f'';
|
||||
|
||||
home-cnfg = "nvim ~/.config/home-manager/home.nix";
|
||||
home-rr = "home-manager switch";
|
||||
@@ -47,26 +63,13 @@
|
||||
rr = "sudo nixos-rebuild switch";
|
||||
};
|
||||
|
||||
initExtraBeforeCompInit = ''
|
||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
'';
|
||||
|
||||
initExtra = ''
|
||||
initContent = ''
|
||||
zstyle ':omz:plugins:eza' 'git-status' yes
|
||||
zstyle ':omz:plugins:eza' 'header' yes
|
||||
zstyle ':omz:plugins:eza' 'icons' yes
|
||||
|
||||
ZOXIDE_CMD_OVERRIDE=cd
|
||||
|
||||
### --- HISTORY SETTINGS ------------------------------
|
||||
HISTSIZE=5000
|
||||
SAVEHIST=5000
|
||||
HISTFILE=~/.zsh_history
|
||||
setopt HIST_IGNORE_DUPS
|
||||
setopt HIST_IGNORE_ALL_DUPS
|
||||
setopt HIST_SAVE_NO_DUPS
|
||||
setopt SHARE_HISTORY
|
||||
|
||||
### --- COMPLETION TUNING -----------------------------
|
||||
autoload -Uz compinit && compinit
|
||||
zstyle ':completion:*' menu select
|
||||
@@ -94,10 +97,12 @@
|
||||
export FZF_DEFAULT_OPTS='--height 40% --layout=reverse --border'
|
||||
fi
|
||||
|
||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
eval "$(zoxide init zsh --cmd cd)"
|
||||
|
||||
'';
|
||||
};
|
||||
|
||||
home.file.".config/zsh/p10k.zsh".source = ./p10k.zsh;
|
||||
home.file.".p10k.zsh".source = config.home.homeDirectory + "/.config/zsh/p10k.zsh";
|
||||
home.file.".p10k.zsh".source = ./p10k.zsh;
|
||||
|
||||
}
|
||||
|
||||
@@ -58,8 +58,9 @@
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver.xkb = {
|
||||
layout = "us";
|
||||
layout = "us,ru";
|
||||
variant = "";
|
||||
options = "grp:win_space_toggle";
|
||||
};
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
@@ -92,23 +93,18 @@
|
||||
"networkmanager"
|
||||
"wheel"
|
||||
];
|
||||
packages = with pkgs; [
|
||||
# thunderbird
|
||||
];
|
||||
};
|
||||
|
||||
# Install firefox.
|
||||
programs.firefox.enable = true;
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||
# wget
|
||||
pkgs.kitty
|
||||
pkgs.hiddify-app
|
||||
];
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
@@ -168,6 +164,9 @@
|
||||
# xwayland.enable = true; # Xwayland can be disabled.
|
||||
};
|
||||
|
||||
programs.zsh.enable = true;
|
||||
users.users.krosh.shell = pkgs.zsh;
|
||||
|
||||
boot = {
|
||||
|
||||
plymouth = {
|
||||
|
||||
Executable
+23
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# ---------------- CONFIG ----------------
|
||||
SRC_FOLDER="./home-manager" # source folder in your repo
|
||||
DEST_FOLDER="$HOME/.config/home-manager" # target folder
|
||||
# ----------------------------------------
|
||||
|
||||
# Create backup if destination exists
|
||||
if [ -d "$DEST_FOLDER" ]; then
|
||||
BACKUP_DIR="$DEST_FOLDER.bak.$(date +%Y%m%d%H%M%S)"
|
||||
echo "Creating backup of existing configuration at $BACKUP_DIR..."
|
||||
cp -r "$DEST_FOLDER" "$BACKUP_DIR"
|
||||
fi
|
||||
|
||||
echo "Copying Home Manager configuration from '$SRC_FOLDER' to '$DEST_FOLDER'..."
|
||||
mkdir -p "$DEST_FOLDER"
|
||||
cp -a "$SRC_FOLDER/." "$DEST_FOLDER/"
|
||||
|
||||
echo "Running home-manager switch..."
|
||||
home-manager switch
|
||||
|
||||
echo "Done! Backup (if any) stored at $BACKUP_DIR"
|
||||
Executable
+30
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# ---------------- CONFIG ----------------
|
||||
SRC_FOLDER="./nixos" # folder in your repo
|
||||
DEST_FOLDER="/etc/nixos" # target folder
|
||||
# ----------------------------------------
|
||||
|
||||
# Check for root
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
echo "This script must be run as root (sudo)." 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Copying files from '$SRC_FOLDER' to '$DEST_FOLDER'..."
|
||||
|
||||
# Backup existing /etc/nixos (optional)
|
||||
BACKUP_DIR="/etc/nixos.bak.$(date +%Y%m%d%H%M%S)"
|
||||
echo "Backing up current /etc/nixos to $BACKUP_DIR"
|
||||
cp -r "$DEST_FOLDER" "$BACKUP_DIR"
|
||||
|
||||
# Copy files
|
||||
cp -a "$SRC_FOLDER/." "$DEST_FOLDER/"
|
||||
|
||||
echo "Done! Files from '$SRC_FOLDER' have been copied to '$DEST_FOLDER'."
|
||||
# echo "You may now run 'sudo nixos-rebuild switch' if needed."
|
||||
|
||||
nixos-rebuild switch
|
||||
|
||||
echo "Done!"
|
||||
Reference in New Issue
Block a user