new nixos dotfile layout

Signed-off-by: Michał Czyż <mike@c2yz.com>
This commit is contained in:
2024-11-04 13:21:48 +01:00
parent cbfbe20592
commit 720c05f9b0
119 changed files with 3895 additions and 4549 deletions

View File

@@ -1,40 +0,0 @@
{
myAliases = {
".." = "cd ..";
"cd.." = "cd ..";
ls = "command eza";
grep = "grep --color=auto";
fgrep = "fgrep --color=auto";
egrep = "egrep --color=auto";
l = "eza -G --icons";
ll = "eza -l --icons";
lg = "eza -lG";
lall = "eza -lahF --icons --git";
lalg = "eza -laGhF --icons --git";
latree = "eza -laGghHT --git --icons";
la = "eza --git --icons -la";
lsd = "eza -laD";
cls = "clear";
# df="df -ahiT --total";
userlist = "cut -d: -f1 /etc/passwd";
free = "free -mt";
du = "du -ach | sort -h";
ps = "ps auxf";
sudo = "sudo ";
reload = "exec $SHELL -l";
xclip = "xclip -selection c";
mkdir = "mkdir -pv";
psmem = "ps -e -orss=,args= | sort -b -k1 -nr";
psmem10 = "ps -e -orss=,args= | sort -b -k1 -nr | head -10";
pscpu = "ps -e -o pcpu,cpu,nice,state,cputime,args|sort -k1,1n -nr";
pscpu10 = "ps -e -o pcpu,cpu,nice,state,cputime,args|sort -k1,1n -nr | head -10";
gua = "git remote | xargs -L1 git push --all";
};
}

View File

@@ -1,8 +0,0 @@
let
cli = import ./aliases.nix;
in {
programs.bash = {
enable = true;
shellAliases = cli.myAliases;
};
}

View File

@@ -1,22 +0,0 @@
{pkgs, ...}: {
imports = [
./bash.nix
./git.nix
./zsh
./gpg.nix
];
home.packages = with pkgs; [
killall
comma
distrobox
bc
bottom
ncdu
ltex-ls
nil
alejandra
timer
jq
diffsitter
];
}

View File

@@ -1,28 +0,0 @@
{
programs.git = {
enable = true;
userName = "Michał Czyż";
userEmail = "mike@c2yz.com";
signing = {
key = "78D4829A477DAB25";
signByDefault = true;
};
extraConfig = {
push = {
default = "simple";
};
rerere = {
enable = true;
};
column = {
ui = "auto";
};
branch = {
sort = "-committerdate";
};
init = {
defaultBranch = "main";
};
};
};
}

View File

@@ -1,7 +0,0 @@
{
services.gpg-agent = {
enable = true;
defaultCacheTtl = 1800;
enableSshSupport = true;
};
}

View File

@@ -1,47 +0,0 @@
{
config,
pkgs,
...
}: let
cli = import ../aliases.nix;
in {
home.packages = with pkgs; [
];
programs.zsh = {
enable = true;
enableCompletion = true;
history.size = 10000000;
history.path = "${config.xdg.dataHome}/zsh/history";
shellAliases = cli.myAliases;
plugins = [
{
name = "powerlevel10k";
src = pkgs.zsh-powerlevel10k;
file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
}
];
enableAutosuggestions = true;
syntaxHighlighting = {
enable = true;
};
historySubstringSearch = {
enable = true;
};
initExtra = ''
[[ ! -f ${./p10k.zsh} ]] || source ${./p10k.zsh}
eval "$(zoxide init --cmd cd zsh)"
if [ -x "$(command -v tmux)" ] && [ -n "$DISPLAY" ] && [ -z "$TMUX" ]; then
# exec tmux new-session -A -s $USER >/dev/null 2>&1
exec tmux new-session -t $USER >/dev/null 2>&1 | tmux new-session -A -s $USER >/dev/null 2>&1
fi
'';
};
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,18 +0,0 @@
{
lib,
pkgs,
config,
...
}: {
imports = [
];
# dconf.settings."org/gnome/desktop/interface".color-scheme =
# if config.colorscheme.variant == "dark"
# then "prefer-dark"
# else if config.colorscheme.variant == "light"
# then "prefer-light"
# else "default";
# xdg.portal.enable = true;
}

View File

@@ -1,29 +0,0 @@
{pkgs, ...}: {
imports = [];
xdg.mimeApps.enable = true;
home.packages = with pkgs; [
grim
gtk3
imv
mimeo
# primary-xwayland
pulseaudio
slurp
waypipe
wf-recorder
wl-clipboard
wl-mirror
# wl-mirror-pick
xdg-utils
ydotool
];
home.sessionVariables = {
MOZ_ENABLE_WAYLAND = 1;
QT_QPA_PLATFORM = "wayland";
LIBSEAT_BACKEND = "logind";
};
# xdg.portal.extraPortals = [pkgs.xdg-desktop-portal-wlr];
}

View File

@@ -1,143 +0,0 @@
#!/bin/sh
# screenlayout setup for odin
autorandr -c
# start some nice programs
# if [ -d /etc/X11/xinit/xinitrc.d ] ; then
# for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
# # shellcheck source=/dev/null
# [ -x "$f" ] && . "$f"
# done
# unset f
# fi
xset -b # disable bell
export SSH_AUTH_SOCK;
# export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
# ssh-agent -d &
# ssh agent setup
#eval `/usr/bin/ssh-agent`
#
#if test -f /usr/lib/openssh/x11-ssh-askpass # Archlinux
#then
# SSH_ASKPASS=/usr/lib/openssh/x11-ssh-askpass ssh-add < /dev/null
#fi
#
#if test -f /usr/lib/ssh/x11-ssh-askpass # Debian
#then
# SSH_ASKPASS=/usr/lib/ssh/x11-ssh-askpass ssh-add < /dev/null
#fi
# theming
export QT_QPA_PLATFORMTHEME=qt5ct
export DESKTOP_SESSION=plasma
export XDG_CURRENT_DESKTOP=dwm
# IMF configuration (fcitx5)
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
export GLFW_IM_MODULE=ibus
# compositor
picom -b --vsync &
# fix android studio interface
export _JAVA_AWT_WM_NONREPARENTING=1 &
# set keyboard layout
setxkbmap pl &
# IMF daemon
# fcitx5 -d &
# enable local fonts in .fonts directory
# xset +fp /usr/share/fonts/local &
# xset +fp /usr/share/fonts/misc &
# xset +fp ~/.fonts &
# xset fp rehash &
# fc-cache -fv &
# powersaving options
# xset s off &
# xset s noblank &
# xset s noexpose &
# xset s on &
# xset -dpms &
# xset s 900 &
xset +dpms &
xset dpms 1200 1800 2100 &
xset s on &
xset s 900 &
# auths
# /usr/lib/mate-polkit/polkit-mate-authentication-agent-1 &
# gnome-keyring-daemon &
# source /etc/X11/xinit/xinitrc.d/50-systemd-user.sh
## Map super key to trigger rofi when used alone
# xcape -e 'Super_L=Super_L|Shift_L|space' &
# wallpaper engine and theming
# nitrogen --restore &
# wal --backend colorz -i $HOME/.dots/nitrogen/.config/nitrogen/pexels-engin-akyurt-1435752.jpg &
. ~/.fehbg &
## Set screen locker
xss-lock -v -- betterlockscreen -l --time-format '%I:%M %p' &
## Desktop portal
/usr/lib/xdg-desktop-portal-gtk &
# notification daemon
dunst &
## Screenshot daemon
flameshot &
# Easyeffects daemon
# easyeffects --gapplication-service &
## Telegram daemon
# telegram-desktop -startintray &
## Caffeine-ng
# caffeine >/dev/null 2>&1 &
## Ulauncher
# ulauncher --hide-window --no-window-shadow >/dev/null 2>&1 &
# Emacs Server
# emacs --daemon &
# Theme changing service
# xsettingsd &
# Theming service
# dusk &
# Alacritty config
# $HOME/.config/alacritty/theme-patcher.sh &
## THINKPAD-SPECIFIC
#hash dockd && dockd --daemon &
# status bar
bash bar.sh & disown
dbus-update-activation-environment --systemd DBUS_SESSION_BUS_ADDRESS DISPLAY XAUTHORITY
# . /etc/X11/Xsession
# redshift &
# some merges
# xrdb merge .Xresources &
# xsetroot -cursor_name left_ptr &
# start dwm
exec dwm

View File

@@ -1,3 +0,0 @@
if [ "$(tty)" = "/dev/tty1" ];then
exec startx
fi

View File

@@ -1,181 +0,0 @@
#!/bin/bash
function lighten_color() {
offset=20
hex_color=$1
hex_color=${hex_color:1}
red=${hex_color:0:2}
green=${hex_color:2:2}
blue=${hex_color:4:2}
red_dec=$(printf "%d" 0x$red)
green_dec=$(printf "%d" 0x$green)
blue_dec=$(printf "%d" 0x$blue)
if [[ $red_dec -lt 128 ]]; then
red_dec_l=$((red_dec+offset))
green_dec_l=$((green_dec+offset))
blue_dec_l=$((blue_dec+offset))
else
red_dec_l=$((red_dec-offset))
green_dec_l=$((green_dec-offset))
blue_dec_l=$((blue_dec-offset))
fi
red=$(printf "%02X" $red_dec_l)
green=$(printf "%02X" $green_dec_l)
blue=$(printf "%02X" $blue_dec_l)
echo "#$red$green$blue"
}
# ^c$var^ = fg color
# ^b$var^ = bg color
interval=0
# load colors
# . ~/.config/bar_themes/onedark
# colors
rosewater=#f4dbd6
flamingo=#f0c6c6
pink=#f5bde6
mauve=#c6a0f6
red=#fb4934
maroon=#ee99a0
peach=#f5a97f
yellow=#eed49f
green=#b8bb26
teal=#8bd5ca
sky=#91d7e3
sapphire=#7dc4e4
blue=#8aadf4
lavender=#b7bdf8
text=#cad3f5
subtext1=#b8c0e0
subtext0=#a5adcb
overlay2=#939ab7
overlay1=#8087a2
overlay0=#6e738d
surface2=#5b6078
surface1=#494d64
surface0=#363a4f
base=#24273a
mantle=#1e2030
crust=#181926
# Special
background=#282828
foreground=#ebdbb2
cursor=#ebdbb2
# Colors
color0=#05090e
color1=#425965
color2=#016b86
color3=#1f7284
color4=#48717a
color5=#358292
color6=#79796b
color7=#828486
color8=#43464a
color9=#597787
color10=#028FB3
color11=#2A99B1
color12=#6097A3
color13=#47AEC3
color14=#A2A28F
color15=#c0c1c2
background0=$(lighten_color $background)
background1=$(lighten_color $background0)
background2=$(lighten_color $background1)
pulse () {
VOL=$(pamixer --get-volume)
STATE=$(pamixer --get-mute)
printf "%s" "$SEP1"
if [ "$STATE" = "true" ] || [ "$VOL" -eq 0 ]; then
printf "AMUT%%"
elif [ "$VOL" -gt 0 ] && [ "$VOL" -le 33 ]; then
printf "A%s%%" "$VOL"
elif [ "$VOL" -gt 33 ] && [ "$VOL" -le 66 ]; then
printf "A%s%%" "$VOL"
else
printf "A%s%%" "$VOL"
fi
printf "%s\n" "$SEP2"
}
cpu() {
cpu_val=$(grep -o "^[^ ]*" /proc/loadavg)
printf "^c$background^ ^b$yellow^ 󰇄 "
printf "^c$background^ ^b$yellow^$cpu_val"
}
battery() {
capacity_0="$(cat /sys/class/power_supply/BAT0/capacity)"
capacity_1="$(cat /sys/class/power_supply/BAT1/capacity)"
capacity="$capacity_0+$capacity_1"
# capacity=$(((capacity_0 + capacity_1) / 2))
printf " B$capacity%% "
}
brightness() {
value=$(cat /sys/class/backlight/*/brightness)
percentage=$(echo "scale=2; $value / 8.54" | bc)
printf "L%.0f%%" "$percentage"
}
mem() {
printf "^c$background^^b$green^  "
printf "^c$background^^b$green^ $(free -h | awk '/^Mem/ { print $3 }' | sed s/i//g)"
}
wlan() {
case "$(cat /sys/class/net/wl*/operstate 2>/dev/null)" in
up) printf "^c$background^ ^b$blue^ 󰤨 ^c$background^ ^b$blue^Connected" ;;
down) printf "^c$background^ ^b$blue^ 󰤭 ^c$background^ ^b$blue^Disconnected" ;;
esac
}
clock() {
printf " $(date '+%I:%M %P') "
}
today() {
printf " $(date '+%b %e') "
}
net() {
if nc -zw1 c2yz.com 443; then
printf "^c$background^^b$green^ i "
else
printf "^c$background^^b$red^ ! "
fi
}
while true; do
# [ $interval = 0 ] || [ $(($interval % 3600)) = 0 ] && updates=$(pkg_updates)
# interval=$((interval + 1))
# sleep 1 && xsetroot -name "$updates $(battery) $(brightness) $(cpu) $(mem) $(wlan) $(clock)"
# sleep 1 && xsetroot -name "$(battery) $(brightness) $(cpu) $(mem) $(wlan) $(clock)"
# if hash dockd 2>/dev/null; then
# sleep 1 && xsetroot -name "^c$foreground^^b$background1^ $(brightness) ^b$background0^ $(battery) $(net)^c$foreground^^b$background0^ $(today) ^b$background1^ $(clock) ^b$background2^ $(pulse) "
# else
sleep 1 && xsetroot -name "^c$foreground^$(net)^c$foreground^^b$background0^ $(today) ^b$background1^ $(clock) ^b$background2^ $(pulse) "
xsetroot -cursor_name left_ptr
# fi
done

View File

@@ -1,6 +0,0 @@
{pkgs, ...}: {
services.betterlockscreen = {
enable = true;
package = pkgs.unstable.betterlockscreen;
};
}

View File

@@ -1,22 +0,0 @@
#version 330
in vec2 texcoord;
uniform float opacity;
uniform bool invert_color;
uniform sampler2D tex;
vec4 window_shader() {
vec4 c = texelFetch(tex, ivec2(texcoord), 0);
{
// Change vec4(1.0, 1.0, 1.0, 1.0) to your desired color
vec4 vdiff = abs(vec4(0.0, 0.0, 0.0, 1.0) - c);
float diff = max(max(max(vdiff.r, vdiff.g), vdiff.b), vdiff.a);
// Change 0.8 to your desired opacity
if (diff < 0.001)
c *= 0;
}
if (invert_color)
c = vec4(vec3(c.a, c.a, c.a) - vec3(c), c.a);
c *= opacity;
// vec4 default_post_processing(vec4 c);
return c;
}

View File

@@ -1,93 +0,0 @@
{
lib,
config,
pkgs,
...
}: {
imports = [
./picom.nix
./rofi.nix
./flameshot.nix
./betterlockscreen.nix
./easyeffects.nix
./theming.nix
];
home.packages = with pkgs; [
dmenu
st
dunst
xss-lock
xdg-desktop-portal-gtk
xorg.xrdb
xorg.xrandr
xorg.xset
xorg.xsetroot
xorg.setxkbmap
xorg.xbacklight
xorg.libX11
xorg.libX11.dev
xorg.libxcb
xorg.libXft
xorg.libXinerama
xorg.xinit
xorg.xinput
brightnessctl
xclip
# gnome.gnome-keyring
feh
alsaUtils
cinnamon.nemo
pulseaudioFull
arandr
neomutt
ncmpcpp
ncspot
ncpamixer
lf
pamixer
w3m
bat
efibootmgr
eww
fontconfig
freetype
fuse-common
gimp
gnugrep
gnumake
gparted
nfs-utils
ninja
nodejs
openssl
nerdfonts
polkit_gnome
qemu
ripgrep
stdenv
tldr
variety
virt-manager
xfce.thunar
dconf
];
home.file = {
".xinitrc" = {
source = ./.xinitrc;
};
".zprofile" = {
source = ./.zprofile;
};
".config/picom/black_to_transparent.frag" = {
source = ./black_to_transparent.frag;
};
# ".Xresources" = {
# text = ''
# Xcursor.theme: "Bibata-Modern-Classic"
# Xcursor.size: 18
# '';
# };
};
}

View File

@@ -1,5 +0,0 @@
{pkgs, ...}: {
services.easyeffects = {
enable = true;
};
}

View File

@@ -1,10 +0,0 @@
{pkgs, ...}: {
services.flameshot = {
enable = true;
settings = {
General = {
showStartupLaunchMessage = false;
};
};
};
}

View File

@@ -1,99 +0,0 @@
{
lib,
config,
pkgs,
...
}: {
services.picom = {
enable = true;
package = pkgs.unstable.picom;
backend = "glx";
shadow = true;
shadowOpacity = 0.2;
shadowOffsets = [1 1];
shadowExclude = [
"name = 'Notification'"
"class_g = 'Conky'"
"_GTK_FRAME_EXTENTS@:c"
"override_redirect = 1 && !WM_CLASS@:s"
"class_g ?= 'Dmenu'"
"class_g ?= 'Dunst'"
"_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
"_GTK_FRAME_EXTENTS@:c"
"_NET_WM_STATE@:32a *= '_NET_WM_STATE_STICKY'"
"class_g ?= 'i3-frame'"
"class_g = 'Rofi'"
];
fade = true;
fadeSteps = [0.08 0.05];
vSync = true;
settings = {
shadow = {
radius = 3;
};
corner-radius = 9;
rounder-corners-exclude = [
"window_type = 'dock'"
"window_type = 'desktop'"
"class_g = 'Dunst'"
];
blur = {
method = "dual_kawase";
strength = 10;
background = false;
background-frame = false;
background-fixed = false;
};
blur-kern = "3x3box";
# xprop | grep -i 'class'
opacity-rule = [
"90:class_g = 'neovide'"
"90:class_g = 'code-oss'"
"90:class_g = 'discord'"
"90:class_g = 'Emacs'"
"90:class_g = 'TelegramDesktop'"
"90:class_g = 'Spotify'"
"90:class_g = 'easyeffects'"
"90:class_g = 'kitty'"
"90:class_g = 'Nemo'"
"97:class_g = 'firefox'"
];
# Exclude conditions for background blur.
# blur-background-exclude = []
blur-background-exclude = [
"window_type = 'dock'"
"window_type = 'desktop'"
"_GTK_FRAME_EXTENTS@:c"
];
mark-wmwin-focused = true;
mark-ovredir-focused = true;
detect-rounded-corners = true;
detect-client-opacity = true;
unredir-if-possible = false;
detect-transient = true;
detect-client-leader = true;
use-damage = true;
window-shader-fg-rule = [
# "black_to_transparent.frag:class_g = 'stalonetray'",
# "black_to_transparent.frag:class_g = 'Minecraft 1.7.10'",
# "black_to_transparent.frag:class_g = 'i3lock'"
# "black_to_transparent.frag:focused = true",
# "black_to_transparent.frag:focused != true",
#"sphere.glsl:focused != true"
#"nordify.glsl:class_g = 'miru'"
];
};
};
}

View File

@@ -1,15 +0,0 @@
{
lib,
config,
pkgs,
...
}: {
programs.rofi = {
enable = true;
plugins = with pkgs; [
rofi-calc
];
location = "center";
theme = "gruvbox-dark-soft";
};
}

View File

@@ -1,54 +0,0 @@
{
lib,
config,
pkgs,
...
}: {
# enable gtk
gtk = {
enable = true;
cursorTheme = {
name = "Bibata-Modern-Classic";
package = pkgs.bibata-cursors;
};
theme = {
name = "gruvbox-dark";
package = pkgs.gruvbox-dark-gtk;
};
iconTheme = {
name = "oomox-gruvbox-dark";
package = pkgs.gruvbox-dark-icons-gtk;
};
};
# enable qt
qt = {
enable = true;
platformTheme = "qtct";
style = {
name = "kvantum";
};
};
xdg.configFile = {
"Kvantum/kvantum.kvconfig".text = ''
[General]
theme=GraphiteNordDark
'';
"Kvantum/GraphiteNord".source = "${pkgs.graphite-kde-theme}/share/Kvantum/GraphiteNord";
};
home.pointerCursor = {
gtk.enable = true;
x11.enable = true;
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Classic";
size = 18;
};
xsession.pointerCursor = {
name = "Bibata-Modern-Classic";
size = 18;
};
}

View File

@@ -1 +0,0 @@
{imports = [../common];}

View File

@@ -1,99 +0,0 @@
{lib, ...}: {
wayland.windowManager.hyprland.settings = {
bindm = [
"SUPER,mouse:272,movewindow"
"SUPER,mouse:273,resizewindow"
];
bind = let
workspaces = [
"0"
"1"
"2"
"3"
"4"
"5"
"6"
"7"
"8"
"9"
"F1"
"F2"
"F3"
"F4"
"F5"
"F6"
"F7"
"F8"
"F9"
"F10"
"F11"
"F12"
];
# Map keys (arrows and hjkl) to hyprland directions (l, r, u, d)
directions = rec {
left = "l";
right = "r";
up = "u";
down = "d";
h = left;
l = right;
k = up;
j = down;
};
in
[
"SUPERSHIFT,q,killactive"
"SUPERSHIFT,e,exit"
"SUPER,s,togglesplit"
"SUPER,f,fullscreen,1"
"SUPERSHIFT,f,fullscreen,0"
"SUPERSHIFT,space,togglefloating"
"SUPER,minus,splitratio,-0.25"
"SUPERSHIFT,minus,splitratio,-0.3333333"
"SUPER,equal,splitratio,0.25"
"SUPERSHIFT,equal,splitratio,0.3333333"
"SUPER,g,togglegroup"
"SUPER,t,lockactivegroup,toggle"
"SUPER,tab,changegroupactive,f"
"SUPERSHIFT,tab,changegroupactive,b"
"SUPER,apostrophe,workspace,previous"
"SUPER,u,togglespecialworkspace"
"SUPERSHIFT,u,movetoworkspacesilent,special"
"SUPER,i,pseudo"
]
++
# Change workspace
(map (n: "SUPER,${n},workspace,name:${n}") workspaces)
++
# Move window to workspace
(map (n: "SUPERSHIFT,${n},movetoworkspacesilent,name:${n}") workspaces)
++
# Move focus
(lib.mapAttrsToList (key: direction: "SUPER,${key},movefocus,${direction}") directions)
++
# Swap windows
(lib.mapAttrsToList (key: direction: "SUPERSHIFT,${key},swapwindow,${direction}") directions)
++
# Move windows
(lib.mapAttrsToList (
key: direction: "SUPERCONTROL,${key},movewindoworgroup,${direction}"
)
directions)
++
# Move monitor focus
(lib.mapAttrsToList (key: direction: "SUPERALT,${key},focusmonitor,${direction}") directions)
++
# Move workspace to other monitor
(lib.mapAttrsToList (
key: direction: "SUPERALTSHIFT,${key},movecurrentworkspacetomonitor,${direction}"
)
directions);
};
}

View File

@@ -1,43 +0,0 @@
{
lib,
config,
pkgs,
...
}: let
# hyprland = pkgs.inputs.hyprland.hyprland.override {wrapRuntimeDeps = false;};
# xdhp = pkgs.inputs.hyprland.xdg-desktop-portal-hyprland.override {inherit hyprland;};
in {
imports = [
../common
../common/wayland-wm
];
# xdg.portal = {
# extraPortals = [xdhp];
# configPackages = [hyprland];
# };
home.packages = with pkgs; [
# inputs.hyprwm-contrib.grimblast
# hyprslurp
hyprpicker
hyprpaper
waybar
xdg-desktop-portal-hyprland
];
# wayland.windowManger.hyprland = {
# enable = true;
# # package = hyprland;
# systemd = {
# enable = true;
# # Same as default but stop graphical-session too
# extraCommands = lib.mkBefore [
# "systemctl --user stop graphical-session.target"
# "systemctl --user start hyprland-session.target"
# ];
# };
#
# #TODO: Add hyprland config
# };
}

View File

@@ -1,58 +0,0 @@
{
config,
pkgs,
lib,
...
}: let
hyprbars =
(pkgs.inputs.hyprland-plugins.hyprbars.override {
# Make sure it's using the same hyprland package as we are
hyprland = config.wayland.windowManager.hyprland.package;
})
.overrideAttrs
(old: {
# Yeet the initialization notification (I hate it)
postPatch =
(old.postPatch or "")
+ ''
${lib.getExe pkgs.gnused} -i '/Initialized successfully/d' main.cpp
'';
});
in {
wayland.windowManager.hyprland = {
plugins = [hyprbars];
settings = {
"plugin:hyprbars" = {
bar_height = 25;
#bar_color = "0xdd${config.colorscheme.colors.base00}";
#"col.text" = "0xee${config.colorscheme.colors.base05}";
#bar_text_font = config.fontProfiles.regular.family;
bar_text_size = 12;
bar_part_of_window = true;
hyprbars-button = let
closeAction = "hyprctl dispatch killactive";
isOnSpecial = ''hyprctl activewindow -j | jq -re 'select(.workspace.name == "special")' >/dev/null'';
moveToSpecial = "hyprctl dispatch movetoworkspacesilent special";
moveToActive = "hyprctl dispatch movetoworkspacesilent name:$(hyprctl -j activeworkspace | jq -re '.name')";
minimizeAction = "${isOnSpecial} && ${moveToActive} || ${moveToSpecial}";
maximizeAction = "hyprctl dispatch togglefloating";
in [
# Red close button
#"rgb(${config.colorscheme.colors.base08}),12,,${closeAction}"
# Yellow "minimize" (send to special workspace) button
#"rgb(${config.colorscheme.colors.base0A}),12,,${minimizeAction}"
# Green "maximize" (togglefloating) button
#"rgb(${config.colorscheme.colors.base0B}),12,,${maximizeAction}"
];
};
bind = let
barsEnabled = "hyprctl -j getoption plugin:hyprbars:bar_height | ${lib.getExe pkgs.jq} -re '.int != 0'";
setBarHeight = height: "hyprctl keyword plugin:hyprbars:bar_height ${toString height}";
toggleOn = setBarHeight config.wayland.windowManager.hyprland.settings."plugin:hyprbars".bar_height;
toggleOff = setBarHeight 0;
in ["SUPER,m,exec,${barsEnabled} && ${toggleOff} || ${toggleOn}"];
};
};
}

View File

@@ -1,6 +0,0 @@
{pkgs, ...}: {
programs.emacs = {
enable = true;
package = pkgs.unstable.emacs;
};
}

View File

@@ -1,18 +0,0 @@
{ pkgs, ... }: {
programs.helix = {
enable = true;
settings = {
theme = "gruvbox_dark_soft";
editor.cursor-shape = {
normal = "block";
insert = "bar";
select = "underline";
};
};
languages.language = [{
name = "nix";
auto-format = true;
formatter.command = "${pkgs.nixfmt}/bin/nixfmt";
}];
};
}

View File

@@ -1,19 +0,0 @@
{
programs.kitty = {
enable = true;
font = {
name = "FiraCode Nerd Font";
size = 12;
};
theme = "Gruvbox Dark";
settings = {
confirm_os_window_close = 0;
detect_urls = true;
enable_audio_bell = false;
resize_in_steps = true;
# window_padding_width = 16;
};
};
}

View File

@@ -1,17 +0,0 @@
{pkgs, ...}: {
home.packages = with pkgs; [
neovide
];
home.file = {
".config/neovide/config.toml" = {
text = ''
vsync = true
[font]
normal = ["FiraCode Nerd Font"]
size = 14
'';
};
};
}

View File

@@ -1,20 +0,0 @@
{
inputs,
pkgs,
...
}: {
nixpkgs.overlays = [
inputs.neovim-nightly-overlay.overlay
];
programs.neovim = {
enable = true;
package = pkgs.neovim-nightly;
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
defaultEditor = true;
};
}

View File

@@ -1,49 +0,0 @@
{pkgs, ...}: {
programs.tmux = {
enable = true;
mouse = true;
prefix = "C-Space";
keyMode = "vi";
terminal = "screen-256color";
baseIndex = 1;
plugins = with pkgs.tmuxPlugins; [
sensible
vim-tmux-navigator
gruvbox
yank
];
extraConfig = ''
# history limit
set -g history-limit 5000
# increase repeat time
set -g repeat-time 1000
# decrese command delay
set -sg escape-time 1
# faster key repetition
set -s escape-time 0
setw -g aggressive-resize on
# reload tmux while using tmux
bind r source-file ~/.config/tmux/tmux.conf \; display "Reloaded!"
# Shift Alt vim keys to switch windows
bind -n M-H previous-window
bind -n M-L next-window
# Vim like yank
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
# Open panes in current directory
bind '"' split-window -v -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
'';
};
}

View File

@@ -1,180 +0,0 @@
# This is your home-manager configuration file
# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
{ inputs, outputs, pkgs, ... }: {
# You can import other home-manager modules here
imports = [
# If you want to use modules your own flake exports (from modules/home-manager):
# outputs.homeManagerModules.example
# Or modules exported from other flakes (such as nix-colors):
inputs.nix-colors.homeManagerModules.default
# You can also split up your configuration and import pieces of it here:
# ./nvim.nix
./features/cli
./features/desktop/dwm
./features/kitty.nix
./features/neovim.nix
./features/tmux.nix
./features/neovide.nix
./features/emacs.nix
./features/helix.nix
];
colorScheme = inputs.nix-colors.colorSchemes.gruvbox-dark-medium;
nixpkgs = {
# You can add overlays here
overlays = [
# Add overlays your own flake exports (from overlays and pkgs dir):
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.unstable-packages
# You can also add overlays exported from other flakes:
# neovim-nightly-overlay.overlays.default
# Or define it inline, for example:
# (final: prev: {
# hi = final.hello.overrideAttrs (oldAttrs: {
# patches = [ ./change-hello-to-hi.patch ];
# });
# })
];
# Configure your nixpkgs instance
config = {
# Disable if you don't want unfree packages
allowUnfree = true;
# Workaround for https://github.com/nix-community/home-manager/issues/2942
allowUnfreePredicate = _: true;
};
};
# Username to manage
home = {
username = "mike";
homeDirectory = "/home/mike";
file = {
# Building this configuration will create a copy of 'dotfiles/screenrc' in
# the Nix store. Activating the configuration will then make '~/.screenrc' a
# symlink to the Nix store copy.
# ".screenrc".source = dotfiles/screenrc;
# You can also set the file content immediately.
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
};
};
# The home.packages option allows you to install Nix packages into your
# environment.
home.packages = with pkgs; [
# > graphics <
tuxpaint
krita
# > terminal <
kitty
kitty-themes
# > tools <
git
wget
eza
yt-dlp
ffmpeg
# texliveFull
texlive.combined.scheme-full
pgf-umlcd
fastfetch
pgf-umlsd
zoxide
neofetch
pavucontrol
htop
woeusb
steam-run
unzip
gnome.adwaita-icon-theme
R
openvpn
wol
direnv
p7zip
czkawka
insomnia
# > media <
spotify
vlc
mpv
obs-studio
okular
# > desktop <
firefox
discord
telegram-desktop
libreoffice-fresh
# vscodium
unstable.vscode
google-chrome
lunarvim
unstable.evolution
rstudio
unstable.obsidian
foliate
helio-workstation
# > gaming <
prismlauncher
classicube
steam
# > development <
docker
docker-compose
gnome.seahorse
lmstudio
unstable.arduino-ide
iwgtk
kwallet-pam
kwalletcli
kwalletmanager
];
services.gnome-keyring = {
enable = true;
components = [ "ssh" "secrets" "pkcs11" ];
};
# programs.keychain = {
# enable = true;
# enableZshIntegration = true;
# keys = [
# "id_rsa"
# ];
# enableXsessionIntegration = true;
# };
# systemd.user.sessionVariables.SSH_AUTH_SOCK = "/run/user/1000/keyring/ssh";
home.sessionVariables = { EDITOR = "nvim"; };
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
# Nicely reload system units when changing configs
systemd.user.startServices = "sd-switch";
# 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.
#
# You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
home.stateVersion = "23.11"; # Please read the comment before changing.
}