this is shaping up already

This commit is contained in:
jacekpoz 2023-07-07 20:13:49 +02:00
parent e5af40f111
commit 352b3b11c6
4 changed files with 674 additions and 25 deletions

View file

@ -1,5 +1,102 @@
{
"nodes": {
"beautysh": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixpkgs"
],
"poetry2nix": "poetry2nix",
"utils": "utils"
},
"locked": {
"lastModified": 1680308980,
"narHash": "sha256-aUEHV0jk2qIFP3jlsWYWhBbm+w/N9gzH3e4I5DcdB5s=",
"owner": "lovesegfault",
"repo": "beautysh",
"rev": "9845efc3ea3e86cc0d41465d720a47f521b2799c",
"type": "github"
},
"original": {
"owner": "lovesegfault",
"repo": "beautysh",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1687709756,
"narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1685518550,
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"nixvim",
"pre-commit-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1660459072,
"narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "a20de23b925fd8264fd7fad6454652e142fd7f73",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -78,6 +175,22 @@
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1685801374,
"narHash": "sha256-otaSUoFEMM+LjBI1XL/xGB5ao6IwnZOXc47qhIgJe8U=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c37ca420157f4abc31e26f436c1145f8951ff373",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1688590700,
@ -94,11 +207,146 @@
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1688500189,
"narHash": "sha256-djYYiY4lzJOlXOnTHytH6BUugrxHDZjuGxTSrU4gt4M=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "78419edadf0fabbe5618643bd850b2f2198ed060",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixvim": {
"inputs": {
"beautysh": "beautysh",
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_3",
"pre-commit-hooks": "pre-commit-hooks"
},
"locked": {
"lastModified": 1688709814,
"narHash": "sha256-4VRfLCNiU0IXsB2OK34E/hQ+xQBFFoAYrYEurWqm/wU=",
"owner": "pta2002",
"repo": "nixvim",
"rev": "3ef05b4f13b427b271a477b7368c9efc1f3a1b73",
"type": "github"
},
"original": {
"owner": "pta2002",
"repo": "nixvim",
"type": "github"
}
},
"poetry2nix": {
"inputs": {
"flake-utils": [
"nixvim",
"beautysh",
"utils"
],
"nixpkgs": [
"nixvim",
"beautysh",
"nixpkgs"
]
},
"locked": {
"lastModified": 1658665240,
"narHash": "sha256-/wkx7D7enyBPRjIkK0w7QxLQhzEkb3UxNQnjyc3FTUI=",
"owner": "nix-community",
"repo": "poetry2nix",
"rev": "8b8edc85d24661d5a6d0d71d6a7011f3e699780f",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "poetry2nix",
"type": "github"
}
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils_2",
"gitignore": "gitignore",
"nixpkgs": [
"nixvim",
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1688473851,
"narHash": "sha256-j+ViA3lh4uQGIDqB6TjM4+wijX2M5mfNb6MVJVekpAs=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "f6a6863a3bcb61e846a9e4777b90ee365607a925",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"hyprland": "hyprland",
"nixpkgs": "nixpkgs_2"
"nixpkgs": "nixpkgs_2",
"nixvim": "nixvim"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"utils": {
"locked": {
"lastModified": 1678901627,
"narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"wlroots": {

View file

@ -1,5 +1,5 @@
{
description = "Jacekpoz's Nixos Configurations";
description = "the poz";
outputs = {
self,
@ -21,5 +21,6 @@
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nixvim.url = "github:pta2002/nixvim";
};
}

View file

@ -1,27 +1,380 @@
{
config,
inputs,
lib,
pkgs,
...
}: {
# your home-manager configuration goes in this file
programs = {
zsh.enable = true; # enable zsh on home-manager's end
home-manager.enable = true; # let home-manager enable itself
};
home = {
username = "jacek";
homeDirectory = "/home/jacek";
packages = with pkgs; [
neofetch
tree
git
librewolf-wayland
foot
keepassxc
neovim
];
stateVersion = lib.mkDefault "23.11";
imports = [
inputs.hyprland.homeManagerModules.default
];
config = {
programs = {
home-manager.enable = true; # let home-manager enable itself
git = {
enable = true;
userName = "jacekpoz";
userEmail = "jacekpoz@cock.li";
};
zsh = {
enable = true;
shellAliases = {
cl = "clear";
cp = "cp -ivr";
mv = "mv -iv";
rm = "trash -v";
l = "ls -A --color=auto";
ll = "exa -lha --git";
untar = "tar -xvf";
untargz = "tar -xzf";
mnt = "udisksctl mount -b";
umnt = "udisksctl unmount -b";
v = "nvim";
kys = "shutdown now";
gpl = "curl https://www.gnu.org/licenses/gpl-3.0.txt -o LICENSE";
agpl = "curl https://www.gnu.org/licenses/agpl-3.0.txt -o LICENSE";
wget = "wget --hsts-file=\"${config.xdg.dataHome}/wget-hsts\"";
};
initExtra = ''
bindkey '^H' backward-kill-word
'';
history = {
path = "${config.xdg.dataHome}/zsh/zsh_history";
size = 999999999;
extended = true;
ignoreSpace = true;
};
enableAutosuggestions = true;
enableCompletion = true;
autocd = false;
dotDir = ".config/zsh";
plugins = [
{
name = "fast-syntax-highlighting";
file = "fast-syntax-highlighting.plugin.zsh";
src = pkgs.fetchFromGitHub {
owner = "zdharma-continuum";
repo = "fast-syntax-highlighting";
rev = "cf318e06a9b7c9f2219d78f41b46fa6e06011fd9";
sha256 = "sha256-RVX9ZSzjBW3LpFs2W86lKI6vtcvDWP6EPxzeTcRZua4=";
};
}
];
};
zoxide = {
enable = true;
enableZshIntegration = true;
};
starship = {
enable = true;
enableZshIntegration = true;
settings = {
add_newline = false;
command_timeout = 1000;
line_break = {
disabled = true;
};
directory = {
truncation_length = 3;
truncate_to_repo = false;
truncation_symbol = ".../";
read_only = "";
};
};
};
waybar = {
enable = true;
#package = pkgs.waybar.overrideAttrs (oldAttrs: {
# mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
#});
settings = {
bar = {
gtk-layer-shell = true;
layer = "top";
modules-left = [ "custom/launcher" "custom/power_profile" "custom/xwayland" "tray" "wlr/workspaces" ];
modules-center = [ "hyprland/window" ];
modules-right = [ "custom/dnd" "backlight" "cava" "pulseaudio" "clock" "battery" "custom/power" ];
pulseaudio = {
tooltip = false;
scroll-step = "1";
format = " {icon} {volume}%";
format-muted = " 󰸈 {volume}%";
format-icons = {
default = ["󰕿" "󰖀" "󰕾"];
};
on-click = "pactl set-sink-mute @DEFAULT_SINK@ toggle";
};
};
};
};
};
home = {
username = "jacek";
homeDirectory = "/home/jacek";
packages = with pkgs; [
neofetch
git
librewolf-wayland
firefox-wayland
foot
keepassxc
neovim
exa
waybar
];
stateVersion = lib.mkDefault "23.11";
};
wayland.windowManager.hyprland = {
enable = true;
extraConfig = ''
#laptop
#monitor=eDP-1,2560@1440@165,0x0,1
#workspace=eDP-1,1
#second monitor
#monitor=HDMI-A-1,2560x1440@144,2560x0,1
#workspace=HDMI-A-1,11
workspace = 1, monitor: eDP-1
workspace = 2, monitor: eDP-1
workspace = 3, monitor: eDP-1
workspace = 4, monitor: eDP-1
workspace = 5, monitor: eDP-1
workspace = 6, monitor: eDP-1
workspace = 7, monitor: eDP-1
workspace = 8, monitor: eDP-1
workspace = 9, monitor: eDP-1
workspace = 10, monitor: eDP-1
#wsbind = 11, HDMI-a-1
#wsbind = 12, HDMI-a-1
#wsbind = 13, HDMI-a-1
#wsbind = 14, HDMI-a-1
#wsbind = 15, HDMI-a-1
#wsbind = 16, HDMI-a-1
#wsbind = 17, HDMI-a-1
#wsbind = 18, HDMI-a-1
#wsbind = 19, HDMI-a-1
#wsbind = 20, HDMI-a-1
input {
kb_layout=pl
kb_variant=
kb_model=
kb_options=
kb_rules=
follow_mouse=1
touchpad {
disable_while_typing=true
}
}
general {
sensitivity=1.0 # for mouse cursor
gaps_in=5
gaps_out=5
#gaps_in=0
#gaps_out=0
border_size=2
#border_size=1
col.active_border=0xFFCC241D
col.inactive_border=0xFF928374
col.group_border_active=0xFF98971A
col.group_border=0xFF928374
apply_sens_to_raw=0 # whether to apply the sensitivity to raw input (e.g. used by games where you aim using your mouse)
#no_border_on_floating=true
}
decoration {
#rounding=0
rounding=10
blur=1
blur_size=3
blur_passes=2
blur_new_optimizations=1
drop_shadow=1
shadow_range=15
shadow_render_power=2
shadow_ignore_window=1
shadow_offset= 2 4
shadow_scale=1
col.shadow=0xAF282828
}
gestures {
workspace_swipe=1
workspace_swipe_distance=200
workspace_swipe_invert=1
workspace_swipe_min_speed_to_force=20
workspace_swipe_cancel_ratio=0.5
}
bezier=dupa, 0.1, 0.9, 0.1, 1.05
animations {
enabled=1
animation=windows,1,4,dupa,popin
animation=windowsOut,1,7,dupa,slide
animation=border,1,15,default
animation=fade,1,10,default
animation=workspaces,1,5,dupa,slidevert
}
dwindle {
no_gaps_when_only=1
}
misc {
enable_swallow=0
swallow_regex=foot
focus_on_activate=true
vrr=1
animate_manual_resizes=false
animate_mouse_windowdragging=false
}
windowrulev2 = float, class:^(Tor Browser)$
windowrulev2 = float, class:^(foot)$
windowrulev2 = float, class:^(mpv)$
windowrulev2 = float, class:^(imv)$
windowrulev2 = float, class:^(Vieb)$
windowrulev2 = float, title:^(Picture-in-Picture)$
windowrulev2 = float, class:^(code), title: ^(Open*)
windowrulev2 = size 70% 70%, class:^(code), title: ^(Open*)
windowrulev2 = center, class: ^(code), title: ^(Open*)
windowrulev2 = float, class:^(org.keepassxc.KeePassXC)$
windowrulev2 = size 960 670, title:^(ROG Control Center)$
bind = SUPER, RETURN, exec, footclient
bind = SUPER, W, exec, librewolf
bind = SUPERSHIFT, W, exec, firefox
bind = SUPER, Q, killactive
bind = SUPER, F, fullscreen, 0
bind = SUPER, M, fullscreen, 1
bind = SUPER, D, exec, ~/.config/rofi/launchers/type-4/launcher.sh
bind = SUPER, SPACE, togglefloating,
bind = SUPER, C, exec, rofi -show calc -modi calc -no-show-match -no-sort
bind = SUPERSHIFT, C, centerwindow
bind = SUPER, R, bringactivetotop
binde = SUPER, H, exec, hyprsome focus l
binde = SUPER, J, exec, hyprsome focus d
binde = SUPER, K, exec, hyprsome focus u
binde = SUPER, L, exec, hyprsome focus r
binde = SUPERCTRL, J, focusmonitor, l
binde = SUPERCTRL, K, focusmonitor, r
bind = SUPER, 1, exec, hyprsome workspace 1
bind = SUPER, 2, exec, hyprsome workspace 2
bind = SUPER, 3, exec, hyprsome workspace 3
bind = SUPER, 4, exec, hyprsome workspace 4
bind = SUPER, 5, exec, hyprsome workspace 5
bind = SUPER, 6, exec, hyprsome workspace 6
bind = SUPER, 7, exec, hyprsome workspace 7
bind = SUPER, 8, exec, hyprsome workspace 8
bind = SUPER, 9, exec, hyprsome workspace 9
bind = SUPER, 0, exec, hyprsome workspace 10
bind = SUPERSHIFT, 1, exec, hyprsome move 1
bind = SUPERSHIFT, 2, exec, hyprsome move 2
bind = SUPERSHIFT, 3, exec, hyprsome move 3
bind = SUPERSHIFT, 4, exec, hyprsome move 4
bind = SUPERSHIFT, 5, exec, hyprsome move 5
bind = SUPERSHIFT, 6, exec, hyprsome move 6
bind = SUPERSHIFT, 7, exec, hyprsome move 7
bind = SUPERSHIFT, 8, exec, hyprsome move 8
bind = SUPERSHIFT, 9, exec, hyprsome move 9
bindle = , XF86MonBrightnessUp, exec, ~/Scripts/notif_brightness.sh set +5%
bindle = , XF86MonBrightnessDown, exec, ~/Scripts/notif_brightness.sh set 5%-
bindl = , XF86AudioMedia, exec, playerctl play-pause
bindl = , XF86AudioPlay, exec, playerctl play-pause
bindl = , XF86AudioStop, exec, playerctl stop
bindl = , XF86AudioPrev, exec, playerctl previous
bindl = , XF86AudioNext, exec, playerctl next
bindle = , XF86AudioRaiseVolume, exec, ~/Scripts/notif_volume.sh -ui 5
bindle = , XF86AudioLowerVolume, exec, ~/Scripts/notif_volume.sh -ud 5
bindl = , XF86AudioMute, exec, ~/Scripts/notif_volume.sh --toggle-mute
# https://github.com/n3oney/shadower
bind = SUPER, S, exec, grimblast save area - | shadower | tee "$(xdg-user-dir PICTURES)/Screenshots/$(date +'screenshot-%Y%m%d%H%M%S.png')" | wl-copy
bind = SUPERSHIFT, S, exec, grimblast save area - | swappy -f - -o - | shadower | tee "$(xdg-user-dir PICTURES)/Screenshots/$(date +'screenshot-%Y%m%d%H%M%S.png')" | wl-copy
bind = SUPERSHIFT, R, exec, hyprctl reload
bind = SUPER, P, pin
bind = , XF86Launch1, exec, rog-control-center
binde = , XF86Launch3, exec, asusctl led-mode -n
bind = , XF86Launch4, exec, asusctl profile -n; pkill -SIGRTMIN+8 waybar
binde = , XF86KbdBrightnessUp, exec, asusctl -n
binde = , XF86KbdBrightnessDown, exec, asusctl -p
bind = , XF86TouchpadToggle, exec,
bind = SUPER, T, exec, grim -g "$(slurp)" -t ppm - | tesseract -l pol - - | wl-copy && notify-send "Copied text: " "\"$(wl-paste)\""
bind = SUPER, SEMICOLON, exec, ~/.config/rofi/powermenu/type-2/powermenu.sh
bind = SUPER, X, exec, keepassxc
bind = SUPERSHIFT, M, exec, ~/Scripts/man.sh
bind = SUPER, E, exec, wl-paste | spd-say -e -w -i 10
bind = SUPERCONTROL, E, exec, wl-paste | spd-say -e -w -i 10 -l pl
bind = SUPERSHIFT, E, exec, spd-say -C
bind = SUPER, G, togglegroup
binde = SUPERSHIFT, G, changegroupactive, f
bind = SUPERCONTROL, R, exec, replay-sorcery save
bindm = SUPER, mouse:272, movewindow
bindm = SUPER, mouse:273, resizewindow
binds {
pass_mouse_when_bound=0
}
exec=killall -9 waybar; waybar
exec-once=foot --server
exec-once=hyprctl setcursor Bibata-Modern-Classic 24
exec-once=wl-paste --watch cliphist store
exec-once=hyprctl dispatch exec "swww init" && sleep 0.5
exec-once=swww img -o eDP-1 ~/wall0.jpg
exec-once=swww img -o HDMI-A-1 ~/wall1.jpg
exec-once=rog-control-center
exec-once=mullvad-vpn
exec-once=gammastep-indicator
exec-once=sleep 1 && keepassxc
exec-once=/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
#exec-once=foot -e nvim ~/todo.md
exec-once=nm-applet --indicator
exec-once=blueman-applet
exec-once=$HOME/.local/share/hyprload/hyprload.sh
# no black border on grimblast screenshots
layerrule = noanim, ^(selection)$
layerrule = blur, ^(waybar)$
# temporary fix to swaylock screenshoting rofi before locking
layerrule = noanim, ^(rofi)$
plugin {
csgo-vulkan-fix {
res_w = 2560
res_h = 1440
}
}
'';
};
};
}

View file

@ -4,10 +4,6 @@
inputs,
...
}: {
imports = [
inputs.hyprland.nixosModules.default
];
nixpkgs.config.allowUnfree = true;
# Use the GRUB 2 boot loader.
@ -54,7 +50,58 @@
shell = pkgs.zsh;
};
environment.shells = with pkgs; [zsh];
environment = {
shells = with pkgs; [zsh];
pathsToLink = [ "/share/zsh" ];
sessionVariables = rec {
TERM = "foot";
EDITOR = "nvim";
SSH_AUTH_SOCK = "\$XDG_RUNTIME_DIR/ssh-agent.socket";
GTK_IM_MODULE = "fcitx";
QT_IM_MODULE = "fcitx";
XMODIFIERS = "@im=fcitx";
LIBSEAT_BACKEND = "logind";
QT_STYLE_OVERRIDE = "kvantum";
QT_QPA_PLATFORMTHEME = "qt5ct";
#GOPATH = "${config.xdg.dataHome}/go";
XDG_CURRENT_DESKTOP = "Hyprland";
XDG_SESSION_TYPE = "wayland";
XDG_SESSION_DESKTOP = "Hyprland";
QT_QPA_PLATFORM = "wayland";
MOZ_ENABLE_WAYLAND = "1";
MOZ_DRM_DEVICE = "/dev/dri/card0";
SDL_VIDEODRIVER = "wayland";
_JAVA_AWT_WM_NONEREPARENTING = "1";
CLUTTER_BACKEND = "wayland";
GDK_BACKEND = "wayland";
XCURSOR_THEME = "Bibata-Modern-Classic";
XCURSOR_SIZE = "24";
SYSTEMD_TIMEDATED_NTP_SERVICES = "chronyd.service:systemd-timesyncd.service";
};
};
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
services.openssh = {
enable = true;
settings.PasswordAuthentication = true;
};
#environment.systemPackages = with pkgs; [
# neovim