refactor!: massively overhaul configuration and bring it to the modern
age
This commit is contained in:
parent
1310dd7b7a
commit
9a081df74a
16 changed files with 492 additions and 251 deletions
6
users/kaitotlex/de/default.nix
Normal file
6
users/kaitotlex/de/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./sway
|
||||
./waybar
|
||||
];
|
||||
}
|
5
users/kaitotlex/de/sway/default.nix
Normal file
5
users/kaitotlex/de/sway/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
173
users/kaitotlex/de/waybar/default.nix
Normal file
173
users/kaitotlex/de/waybar/default.nix
Normal file
|
@ -0,0 +1,173 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
style = ./style.css;
|
||||
systemd.enable = true;
|
||||
settings = {
|
||||
mainBar = {
|
||||
name = "bar0";
|
||||
|
||||
layer = "top";
|
||||
position = "top";
|
||||
|
||||
height = 28;
|
||||
# "width" = 1920;
|
||||
|
||||
"margin" = "5px 10px 0px 10px";
|
||||
"spacing" = 10;
|
||||
|
||||
"mode" = "top";
|
||||
# "exclusive" = true;
|
||||
|
||||
# "output" = "eDP-1";
|
||||
|
||||
reload_style_on_change = true;
|
||||
|
||||
modules-left = [
|
||||
"hyprland/workspaces"
|
||||
"hyprland/window"
|
||||
];
|
||||
modules-right = [
|
||||
"tray"
|
||||
"idle_inhibitor"
|
||||
"backlight"
|
||||
"wireplumber"
|
||||
"network"
|
||||
"battery"
|
||||
"disk"
|
||||
"memory"
|
||||
"cpu"
|
||||
"temperature"
|
||||
"clock"
|
||||
];
|
||||
|
||||
idle_inhibitor = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
activated = " ";
|
||||
deactivated = " ";
|
||||
};
|
||||
};
|
||||
|
||||
network = {
|
||||
format = "{ifname}";
|
||||
format-wifi = "{icon}{essid}";
|
||||
format-ethernet = " {essid}";
|
||||
format-disconnected = " Disconnected";
|
||||
format-icons = [
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
];
|
||||
tooltip-format = " {bandwidthUpBits} | {bandwidthDownBits}";
|
||||
tooltip-format-wifi = " {bandwidthUpBits} | {bandwidthDownBits} | {signalStrength}";
|
||||
};
|
||||
|
||||
backlight = {
|
||||
interval = 2;
|
||||
format = " {percent}%";
|
||||
on-scroll-up = "${pkgs.brightnessctl}/bin/brightnessctl set +4";
|
||||
on-scroll-down = "${pkgs.brightnessctl}/bin/brightnessctl set 4-";
|
||||
};
|
||||
|
||||
wireplumber = {
|
||||
format = "{icon} {volume}%";
|
||||
format-muted = " ";
|
||||
on-click = "pamixer -t";
|
||||
on-scroll-up = "${pkgs.pamixer}/bin/pamixer set 5%+";
|
||||
on-scroll-down = "${pkgs.pamixer}/bin/pamixer set 5%-";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
|
||||
battery = {
|
||||
interval = 10;
|
||||
format = "{icon} {capacity}%";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
tooltip = true;
|
||||
tooltip-format = "{timeTo}";
|
||||
};
|
||||
|
||||
disk = {
|
||||
intervel = 30;
|
||||
format = " {percentage_used}%";
|
||||
tooltip-format = "{used} used out of {total} on \"{path}\" ({percentage_used}%)";
|
||||
};
|
||||
|
||||
memory = {
|
||||
interval = 10;
|
||||
format = " {used}";
|
||||
tooltip-format = "{used}GiB used of {total}GiB ({percentage}%)";
|
||||
};
|
||||
|
||||
cpu = {
|
||||
interval = 10;
|
||||
format = " {usage}%";
|
||||
};
|
||||
|
||||
temperature = {
|
||||
interval = 10;
|
||||
};
|
||||
|
||||
clock = {
|
||||
interval = 1;
|
||||
format = "{:%H:%M:%S}";
|
||||
};
|
||||
|
||||
"hyprland/workspaces" = {
|
||||
show-special = true;
|
||||
persistent-workspaces = {
|
||||
"*" = [
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
];
|
||||
};
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
active = "";
|
||||
empty = "";
|
||||
default = "";
|
||||
urgent = "";
|
||||
special = "";
|
||||
};
|
||||
};
|
||||
"hyprland/window" = {
|
||||
icon = true;
|
||||
icon-size = 20;
|
||||
max-length = 50;
|
||||
rewrite = {
|
||||
"(.*) — LibreWolf" = "$1";
|
||||
"(.*) — Zen Browser" = "$1";
|
||||
"^$" = "👾";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
75
users/kaitotlex/de/waybar/style.css
Normal file
75
users/kaitotlex/de/waybar/style.css
Normal file
|
@ -0,0 +1,75 @@
|
|||
window#waybar {
|
||||
font-family: "CaskaydiaCove Nerd Font";
|
||||
background-color: rgba(0,0,0,0);
|
||||
font-size: 0.8rem;
|
||||
border-radius: 0.5rem;
|
||||
}
|
||||
|
||||
.modules-left {
|
||||
opacity: 1;
|
||||
background: linear-gradient(45deg, rgb(214, 39, 200), rgb(5, 83, 252));
|
||||
border-radius: 0.5rem;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.modules-center {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.modules-right {
|
||||
opacity: 1;
|
||||
background-color: rgba(0,0,0,0.5);
|
||||
border-radius: 0.5rem;
|
||||
padding: 2px 2px 2px 10px
|
||||
}
|
||||
|
||||
/* label.module {
|
||||
margin-left: -1px;
|
||||
} */
|
||||
|
||||
#workspaces {
|
||||
background-color: rgba(0,0,0,0.5);
|
||||
border-radius: 0.5rem;
|
||||
padding: 0 2px;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
font-size: 0.6rem;
|
||||
padding: 0 0.3rem 0 0;
|
||||
}
|
||||
|
||||
#window {
|
||||
background-color: rgba(0,0,0,0.5);
|
||||
border-radius: 0.5rem;
|
||||
padding: 2px 5px;
|
||||
}
|
||||
|
||||
#clock {
|
||||
font-weight: bolder;
|
||||
border-radius: 0.5rem;
|
||||
padding: 0 3px 0 0;
|
||||
}
|
||||
|
||||
#battery {
|
||||
color: lightgreen;
|
||||
}
|
||||
|
||||
#memory {
|
||||
color: lightpink;
|
||||
}
|
||||
|
||||
#disk {
|
||||
color: lightskyblue;
|
||||
}
|
||||
|
||||
#cpu {
|
||||
color: lightgoldenrodyellow;
|
||||
}
|
||||
|
||||
#temperature {
|
||||
color: lightslategray;
|
||||
}
|
||||
|
||||
#network {
|
||||
color: lightsteelblue;
|
||||
}
|
7
users/kaitotlex/default.nix
Normal file
7
users/kaitotlex/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
imports = [
|
||||
./home.nix
|
||||
./spicetify.nix
|
||||
./de
|
||||
];
|
||||
}
|
293
users/kaitotlex/home.nix
Normal file
293
users/kaitotlex/home.nix
Normal file
|
@ -0,0 +1,293 @@
|
|||
{ pkgs, inputs, ... }:
|
||||
{
|
||||
home.username = "kaitotlex";
|
||||
home.homeDirectory = "/home/kaitotlex";
|
||||
|
||||
# link the configuration file in current directory to the specified location in home directory
|
||||
# home.file.".config/i3/wallpaper.jpg".source = ./wallpaper.jpg;
|
||||
|
||||
# link all files in `./scripts` to `~/.config/i3/scripts`
|
||||
# home.file.".config/i3/scripts" = {
|
||||
# source = ./scripts;
|
||||
# recursive = true; # link recursively
|
||||
# executable = true; # make all files executable
|
||||
# };
|
||||
|
||||
# encode the file content in nix configuration file directly
|
||||
# home.file.".xxx".text = ''
|
||||
# xxx
|
||||
# '';
|
||||
|
||||
# Packages that should be installed to the user profile.
|
||||
home.packages = with pkgs; [
|
||||
# here is some command line tools I use frequently
|
||||
# feel free to add your own or remove some of them
|
||||
neofetch
|
||||
polychromatic
|
||||
openrazer-daemon
|
||||
wineWowPackages.waylandFull
|
||||
wget
|
||||
|
||||
gparted
|
||||
gnumake
|
||||
|
||||
manga-cli
|
||||
|
||||
clang
|
||||
macchanger
|
||||
ani-cli
|
||||
mpv
|
||||
sherlock
|
||||
|
||||
notion-app-enhanced
|
||||
# archives
|
||||
zip
|
||||
xz
|
||||
unzip
|
||||
p7zip
|
||||
|
||||
# utils
|
||||
jq # A lightweight and flexible command-line JSON processor
|
||||
yq-go # yaml processor https://github.com/mikefarah/yq
|
||||
emacs # full featured everything
|
||||
wl-clipboard
|
||||
|
||||
# networking tools
|
||||
mtr # A network diagnostic tool
|
||||
iperf3
|
||||
dnsutils # `dig` + `nslookup`
|
||||
ldns # replacement of `dig`, it provide the command `drill`
|
||||
aria2 # A lightweight multi-protocol & multi-source command-line download utility
|
||||
socat # replacement of openbsd-netcat
|
||||
nmap # A utility for network discovery and security auditing
|
||||
ipcalc # it is a calculator for the IPv4/v6 addresses
|
||||
|
||||
# misc
|
||||
cowsay
|
||||
file
|
||||
which
|
||||
tree
|
||||
gnused
|
||||
gnutar
|
||||
gawk
|
||||
zstd
|
||||
gnupg
|
||||
python3
|
||||
rustc
|
||||
arduino-cli
|
||||
jdk
|
||||
|
||||
# nix related
|
||||
#
|
||||
# it provides the command `nom` works just like `nix`
|
||||
# with more details log output
|
||||
nix-output-monitor
|
||||
# productivity
|
||||
glow # markdown previewer in terminal
|
||||
obsidian # markdown previewer
|
||||
thunderbird-unwrapped # Full Feature Email Client
|
||||
|
||||
# LaTeX stuff
|
||||
texliveFull
|
||||
texlivePackages.pdflatexpicscale
|
||||
texlivePackages.babel
|
||||
texlivePackages.csquotes
|
||||
texlivePackages.biblatex
|
||||
texlivePackages.geometry
|
||||
texlivePackages.times
|
||||
texlivePackages.hyperref
|
||||
texlivePackages.setspace
|
||||
texlivePackages.fancyhdr
|
||||
texlivePackages.biblatex
|
||||
texlivePackages.csquotes
|
||||
texlivePackages.csquotes-de
|
||||
texlivePackages.collection-latexextra
|
||||
|
||||
#ViM config
|
||||
|
||||
btop # replacement of htop/nmon
|
||||
iotop # io monitoring
|
||||
iftop # network monitoring
|
||||
|
||||
waydroid
|
||||
|
||||
# system call monitoring
|
||||
strace # system call monitoring
|
||||
ltrace # library call monitoring
|
||||
lsof # list open files
|
||||
|
||||
#Rice
|
||||
kanagawa-gtk-theme
|
||||
kanagawa-icon-theme
|
||||
|
||||
# system tools
|
||||
sysstat
|
||||
lm_sensors # for `sensors` command
|
||||
ethtool
|
||||
pciutils # lspci
|
||||
usbutils # lsusb
|
||||
|
||||
# messaging apps
|
||||
vesktop
|
||||
signal-desktop
|
||||
gh
|
||||
|
||||
#Pentest
|
||||
netcat
|
||||
nmap
|
||||
metasploit
|
||||
john
|
||||
lynis
|
||||
hydra-cli
|
||||
ghidra
|
||||
social-engineer-toolkit
|
||||
aircrack-ng
|
||||
|
||||
];
|
||||
|
||||
services.dunst.enable = true;
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "KaitoTLex";
|
||||
userEmail = "warrenlin1688@gmail.com";
|
||||
delta.enable = true;
|
||||
extraConfig = {
|
||||
init.defaultBranch = "main";
|
||||
};
|
||||
};
|
||||
|
||||
programs.neovim.defaultEditor = true;
|
||||
|
||||
programs.lazygit.enable = true;
|
||||
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableFishIntegration = true;
|
||||
};
|
||||
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
theme = "Tokyo Night";
|
||||
font.name = "CaskaydiaCove Nerd Font";
|
||||
settings = {
|
||||
font_size = 12;
|
||||
window_padding_width = "8 8 0";
|
||||
confirm_os_window_close = -1;
|
||||
shell_integration = "enabled";
|
||||
};
|
||||
};
|
||||
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
package = pkgs.firefox-devedition;
|
||||
};
|
||||
|
||||
programs.ripgrep.enable = true;
|
||||
|
||||
programs.oh-my-posh = {
|
||||
enable = true;
|
||||
# enableZshIntegration = true;
|
||||
enableFishIntegration = true;
|
||||
enableBashIntegration = true;
|
||||
useTheme = "gruvbox";
|
||||
};
|
||||
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
};
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
shellAliases = {
|
||||
rebuild = "sudo nixos-rebuild switch";
|
||||
ls = "eza -l --icons=auto";
|
||||
};
|
||||
functions = {
|
||||
update-nixos = {
|
||||
description = "Update the system flake and attempt to build and switch to the new configuration.";
|
||||
body = ''
|
||||
cd /etc/nixos
|
||||
nix flake update
|
||||
sudo nixos-rebuild switch
|
||||
'';
|
||||
};
|
||||
};
|
||||
interactiveShellInit = ''
|
||||
fish_vi_key_bindings
|
||||
set -g fish_greeting
|
||||
oh-my-posh disable notice
|
||||
'';
|
||||
plugins = [
|
||||
{
|
||||
name = "autopair";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "jorgebucaran";
|
||||
repo = "autopair.fish";
|
||||
rev = "4d1752ff5b39819ab58d7337c69220342e9de0e2";
|
||||
hash = "sha256-qt3t1iKRRNuiLWiVoiAYOu+9E7jsyECyIqZJ/oRIT1A=";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "fzf";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "PatrickF1";
|
||||
repo = "fzf.fish";
|
||||
rev = "8920367cf85eee5218cc25a11e209d46e2591e7a";
|
||||
hash = "sha256-T8KYLA/r/gOKvAivKRoeqIwE2pINlxFQtZJHpOy9GMM=";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "sponge";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "meaningful-ooo";
|
||||
repo = "sponge";
|
||||
rev = "384299545104d5256648cee9d8b117aaa9a6d7be";
|
||||
hash = "sha256-MdcZUDRtNJdiyo2l9o5ma7nAX84xEJbGFhAVhK+Zm1w=";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "done";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "franciscolourenco";
|
||||
repo = "done";
|
||||
rev = "eb32ade85c0f2c68cbfcff3036756bbf27a4f366";
|
||||
hash = "sha256-DMIRKRAVOn7YEnuAtz4hIxrU93ULxNoQhW6juxCoh4o=";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
programs.fd.enable = true;
|
||||
|
||||
programs.btop = {
|
||||
enable = true;
|
||||
settings = {
|
||||
color_theme = "tokyo-night";
|
||||
vim_keys = true;
|
||||
theme_background = false;
|
||||
};
|
||||
};
|
||||
|
||||
programs.eza = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
enableBashIntegration = true;
|
||||
};
|
||||
|
||||
programs.fzf.enable = true;
|
||||
|
||||
# This value determines the home Manager release that your
|
||||
# configuration is compatible with. This helps avoid breakage
|
||||
# when a new home Manager release introduces backwards
|
||||
# incompatible changes.
|
||||
home.stateVersion = "24.05";
|
||||
#
|
||||
# You can update home Manager without changing this value. See
|
||||
# the home Manager release notes for a list of state version
|
||||
# changes in each release.
|
||||
|
||||
# Let home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
}
|
18
users/kaitotlex/spicetify.nix
Normal file
18
users/kaitotlex/spicetify.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ inputs, pkgs, ... }:
|
||||
let
|
||||
spicepkgs = inputs.spicetify.legacyPackages.${pkgs.system};
|
||||
in
|
||||
{
|
||||
imports = [ inputs.spicetify.homeManagerModules.default ];
|
||||
|
||||
programs.spicetify = {
|
||||
enable = true;
|
||||
theme = spicepkgs.themes.dribbblish;
|
||||
colorScheme = "rosepine";
|
||||
enabledExtensions = with spicepkgs.extensions; [
|
||||
lastfm
|
||||
fullAppDisplayMod
|
||||
];
|
||||
enabledCustomApps = with spicepkgs.apps; [ lyricsPlus ];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue