This commit is contained in:
Charlie Root 2024-07-22 22:46:11 +02:00
commit 46d79f6f18
12 changed files with 151 additions and 57 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 748 KiB

View file

@ -8,7 +8,6 @@
]; ];
imports = [ imports = [
inputs.treefmt-nix.flakeModule inputs.treefmt-nix.flakeModule
# inputs.flake-parts.flakeModules.easyOverlay
# #./flake/pre-commit # #./flake/pre-commit
./parts/shell.nix ./parts/shell.nix
./parts/fmt.nix ./parts/fmt.nix

View file

@ -39,10 +39,8 @@ in {
#gadacz #gadacz
gcc gcc
gdb gdb
gnome.nautilus
gnumake gnumake
grc grc
grimblast
git git
helvum helvum
hmm hmm
@ -52,7 +50,6 @@ in {
impala impala
imv imv
inetutils inetutils
jetbrains.idea-community-bin
jrnl jrnl
keepassxc keepassxc
lazygit lazygit
@ -61,7 +58,6 @@ in {
mapscii mapscii
mars-mips mars-mips
moc moc
musikcube
ncmpcpp ncmpcpp
neofetch neofetch
networkmanagerapplet networkmanagerapplet
@ -86,6 +82,7 @@ in {
python3 python3
qbittorrent qbittorrent
ripgrep ripgrep
rnote
rustdesk rustdesk
scc scc
scummvm scummvm

View file

@ -102,6 +102,7 @@
newsboat.enable = true; newsboat.enable = true;
fish.enable = true; fish.enable = true;
nh.enable = true; nh.enable = true;
steam.enable = true;
waybar.enable = true; waybar.enable = true;
}; };
services = { services = {
@ -109,7 +110,7 @@
}; };
theming = { theming = {
quickshell.enable = true; quickshell.enable = true;
gtk.enable = false; gtk.enable = true;
qt = { qt = {
enable = false; enable = false;
package = pkgs.kde-gruvbox; package = pkgs.kde-gruvbox;

View file

@ -27,11 +27,9 @@ in {
evince evince
eza eza
fastfetch fastfetch
feh
ffmpeg-full ffmpeg-full
fftw fftw
fzf fzf
grimblast
gcc gcc
gdb gdb
gnumake gnumake
@ -41,11 +39,9 @@ in {
gthumb gthumb
git git
helvum helvum
hmm
heroic heroic
httpie httpie
i3lock imagemagickBig
imagemagick
img2pdf img2pdf
impala impala
imv imv
@ -86,13 +82,13 @@ in {
python3 python3
qbittorrent qbittorrent
ripgrep ripgrep
rnote
scc scc
scummvm scummvm
sherlock sherlock
shotwell shotwell
signal-desktop-beta signal-desktop-beta
smartmontools smartmontools
steam
strawberry strawberry
teamspeak_client teamspeak_client
telegram-desktop telegram-desktop
@ -113,8 +109,6 @@ in {
ventoy-full ventoy-full
vlc vlc
vscodium vscodium
weechat
wezterm
wget wget
wine wine
winetricks winetricks

View file

@ -29,7 +29,6 @@ in {
}; };
home-manager.users.${username} = { home-manager.users.${username} = {
home.packages = with pkgs; [nix-output-monitor];
programs = { programs = {
zoxide.enable = true; zoxide.enable = true;
zoxide.enableFishIntegration = true; zoxide.enableFishIntegration = true;
@ -45,10 +44,10 @@ in {
name = "done"; name = "done";
inherit (pkgs.fishPlugins.done) src; inherit (pkgs.fishPlugins.done) src;
} }
# { {
# name = "tide"; name = "puffer";
# inherit (pkgs.fishPlugins.tide) src; inherit (pkgs.fishPlugins.puffer) src;
# } }
]; ];
shellAbbrs = shellAbbrs =
{ {
@ -62,13 +61,10 @@ in {
kys = "shutdown now"; kys = "shutdown now";
lg = "lazygit"; lg = "lazygit";
cd = "z"; cd = "z";
"..." = "cd ../..";
v = "nvim"; v = "nvim";
h = "hx"; h = "hx";
k = "kak"; k = "kak";
e = "emacs"; e = "emacs";
update = ''nh os switch "${gitPath}"'';
flake = "cd '${gitPath}'";
} }
// cfg.extraAliases; // cfg.extraAliases;
}; };

View file

@ -1,7 +1,7 @@
{ {
programs.neovim-flake.settings.vim.maps = { programs.neovim-flake.settings.vim.maps = {
normal = { normal = {
"<leader>gg".action = "<cmd>LazyGit<CR>"; # "<leader>gg".action = "<cmd>LazyGit<CR>";
# General # General
"<leader>fd".action = "<cmd>lua vim.g.formatsave = not vim.g.formatsave<CR>"; "<leader>fd".action = "<cmd>lua vim.g.formatsave = not vim.g.formatsave<CR>";
"<leader>zt".action = ":<C-U>let g:default_terminal = v:count1<CR>"; "<leader>zt".action = ":<C-U>let g:default_terminal = v:count1<CR>";

View file

@ -17,12 +17,12 @@ in {
enable = true; enable = true;
spotifyPackage = pkgs.spotify; spotifyPackage = pkgs.spotify;
#theme = spicePkgs.themes.Onepunch; #theme = spicePkgs.themes.Onepunch;
colorScheme = "mocha"; #colorScheme = "mocha";
enabledExtensions = with spicePkgs.extensions; [ enabledExtensions = with spicePkgs.extensions; [
shuffle #shuffle
adblock adblock
genre #genre
playlistIcons #playlistIcons
]; ];
}; };
}; };

View file

@ -1,6 +1,7 @@
{ {
config, config,
lib, lib,
pkgs,
... ...
}: }:
with lib; let with lib; let

View file

@ -20,6 +20,11 @@
; ;
in { in {
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
programs.hyprland = {
enable = true;
inherit (cfg) package;
portalPackage = inputs'.hyprland.packages.xdg-desktop-portal-hyprland;
};
# xdg Portal # xdg Portal
xdg.portal = { xdg.portal = {
enable = true; enable = true;
@ -30,16 +35,21 @@ in {
pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-gtk
inputs'.hyprland.packages.xdg-desktop-portal-hyprland inputs'.hyprland.packages.xdg-desktop-portal-hyprland
]; ];
config = {
common.default = ["hyprland"];
};
#config.common.default = "hyprland"; #config.common.default = "hyprland";
}; };
home-manager.users.${username} = { home-manager.users.${username} = {
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
inherit (cfg) package; inherit (cfg) package;
# Split-monitor-workspaces provides awesome-like workspace behaviour # Split-monitor-workspaces provides awesome-like workspace behaviour
plugins = [ plugins = [
split-monitor-workspaces split-monitor-workspaces
]; ];
# Xwayland for X applications # Xwayland for X applications
xwayland.enable = true; xwayland.enable = true;
# No idea why I set this # No idea why I set this
@ -122,21 +132,25 @@ in {
kb_rules = ""; kb_rules = "";
follow_mouse = true; follow_mouse = true;
repeat_rate = 50; repeat_rate = 50;
repeat_delay = 250; repeat_delay = 250;
touchpad = { touchpad = {
disable_while_typing = true; disable_while_typing = true;
}; };
}; };
general = { general = {
sensitivity = 1.0; sensitivity = 1.0;
gaps_in = 0; gaps_in = 5;
gaps_out = 0; gaps_out = 2;
border_size = 2; border_size = 2;
no_border_on_floating = true;
}; };
#Decoration settings #Decoration settings
decoration = { decoration = {
rounding = 0; rounding = 10;
blur = { blur = {
enabled = true; enabled = true;
size = 3; size = 3;
@ -169,8 +183,6 @@ in {
}; };
dwindle = {no_gaps_when_only = true;}; dwindle = {no_gaps_when_only = true;};
debug.disable_logs = false;
cursor = { cursor = {
hide_on_key_press = true; hide_on_key_press = true;
no_hardware_cursors = true; no_hardware_cursors = true;
@ -201,7 +213,7 @@ in {
]; ];
# Keybinds # Keybinds
bind = [ bind = [
"$mainMod, RETURN, exec, ${foot}/bin/foot -D ~" "$mainMod, RETURN, exec, ${foot}/bin/foot"
"$mainMod, Q, killactive" "$mainMod, Q, killactive"
"$mainMod, F, fullscreen, 0" "$mainMod, F, fullscreen, 0"
"$mainMod, D, exec, ${pkgs.procps}/bin/pkill anyrun || ${anyrun}/bin/anyrun" "$mainMod, D, exec, ${pkgs.procps}/bin/pkill anyrun || ${anyrun}/bin/anyrun"
@ -264,6 +276,7 @@ in {
# File manager # File manager
"$mainMod, E, exec, ${pkgs.xfce.thunar}/bin/thunar" "$mainMod, E, exec, ${pkgs.xfce.thunar}/bin/thunar"
# Toggle the four different special workspaces. # Toggle the four different special workspaces.
"$mainMod, B, togglespecialworkspace, btop" "$mainMod, B, togglespecialworkspace, btop"
"$mainMod, V, togglespecialworkspace, pipewire" "$mainMod, V, togglespecialworkspace, pipewire"
@ -272,9 +285,11 @@ in {
# Reload hyprland # Reload hyprland
"$mainMod, R, exec, ${cfg.package}/bin/hyprctl reload" "$mainMod, R, exec, ${cfg.package}/bin/hyprctl reload"
# Restart waybar # Restart waybar
"$mainMod CONTROL, B, exec, ${pkgs.procps}/bin/pkill waybar || ${pkgs.waybar}/bin/waybar" "$mainMod CONTROL, B, exec, ${pkgs.procps}/bin/pkill waybar || ${pkgs.waybar}/bin/waybar"
]; ];
binde = [ binde = [
# window focus # window focus
"$mainMod, H, movefocus, l" "$mainMod, H, movefocus, l"
@ -282,6 +297,7 @@ in {
"$mainMod, K, movefocus, u" "$mainMod, K, movefocus, u"
"$mainMod, L, movefocus, r" "$mainMod, L, movefocus, r"
]; ];
# Media controls # Media controls
bindl = let bindl = let
play-pause = "${pkgs.playerctl}/bin/playerctl play-pause"; play-pause = "${pkgs.playerctl}/bin/playerctl play-pause";
@ -311,6 +327,7 @@ in {
"$mainMod, mouse:272, movewindow" "$mainMod, mouse:272, movewindow"
"$mainMod, mouse:273, resizewindow" "$mainMod, mouse:273, resizewindow"
]; ];
# Some more movement-related settings # Some more movement-related settings
binds = { binds = {
pass_mouse_when_bound = false; pass_mouse_when_bound = false;
@ -319,16 +336,16 @@ in {
# Programs which get executed at Hyprland start. # Programs which get executed at Hyprland start.
exec-once = [ exec-once = [
#start waybar #start waybar
# "${waybar}/bin/waybar" "${pkgs.waybar}/bin/waybar"
# run persistent special workspace windows # run persistent special workspace windows
"[workspace special:nixos; silent;tile] ${foot}/bin/foot -D ~/projects/nichts nvim" "[workspace special:nixos; silent;tile] ${foot}/bin/foot -D ~/projects/nichts nix develop"
"[workspace special:keepassxc; silent;tile] ${pkgs.keepassxc}/bin/keepassxc" "[workspace special:keepassxc; silent;tile] ${pkgs.keepassxc}/bin/keepassxc"
"${swww}/bin/swww-daemon" "${swww}/bin/swww-daemon"
"${wlsunset}/bin/wlsunset -S 06:00 -s 20:00" "${wlsunset}/bin/wlsunset -S 06:00 -s 20:00"
"${pkgs.waybar}/bin/waybar"
]; ];
exec = [ exec = [
@ -336,7 +353,7 @@ in {
"${pkgs.procps}/bin/pkill btop" "${pkgs.procps}/bin/pkill btop"
"${pkgs.procps}/bin/pkill pavucontrol" "${pkgs.procps}/bin/pkill pavucontrol"
# and run it all again # and run it all again
"[workspace special:btop;silent;tile] ${foot}/bin/foot ${pkgs.btop}/bin/btop" "[workspace special:btop silent;tile] ${foot}/bin/foot -e ${pkgs.btop}/bin/btop"
# "[workspace special:pipewire silent;tile] ${pkgs.helvum}/bin/helvum" # "[workspace special:pipewire silent;tile] ${pkgs.helvum}/bin/helvum"
"[workspace special:pipewire;silent;tile] ${pkgs.pavucontrol}/bin/pavucontrol" "[workspace special:pipewire;silent;tile] ${pkgs.pavucontrol}/bin/pavucontrol"
@ -345,6 +362,5 @@ in {
}; };
}; };
}; };
environment.systemPackages = with pkgs; [libnotify];
}; };
} }

View file

@ -0,0 +1,96 @@
{
config,
inputs,
inputs',
lib,
pkgs,
...
}: let
cfg = config.myOptions.programs.hypr.lock;
inherit (config.myOptions.other.system) username;
inherit (lib) mkEnableOption mkIf mkOption;
inherit (lib.types) attrs;
text_color = "rgba(eae0e4FF)";
in {
options.myOptions.programs.hypr.lock = {
enable = mkEnableOption "hiper zamek";
extraSettings = mkOption {
type = attrs;
description = "extra per host hyprlock settings";
default = {};
};
};
config = mkIf cfg.enable {
home-manager.users.${username} = {
imports = [inputs.hyprlock.homeManagerModules.default];
programs.hyprlock = {
enable = true;
package = inputs'.hyprlock.packages.hyprlock;
general = {
grace = 2;
};
backgrounds = [
{
color = "rgba(120f1177)";
path = "screenshot";
blur_size = 5;
blur_passes = 4;
}
];
input-fields = [
{
size = {
width = 600;
height = 50;
};
outline_thickness = 3;
dots_size = 0.1;
dots_spacing = 0.3;
outer_color = "rgba(9a8d9555)";
inner_color = "rgba(120f1111)";
font_color = "rgba(d1c2cbff)";
fade_on_empty = true;
position = {
x = 0;
y = 20;
};
halign = "center";
valign = "center";
}
];
labels = [
{
# clock
text = "$TIME";
color = text_color;
font_size = 65;
position = {
x = 0;
y = 300;
};
halign = "center";
valign = "center";
}
{
# battery
text = "cmd[update:1000] echo \"$(cat /sys/class/power_supply/BAT0/capacity)%\"";
color = text_color;
font_size = 30;
position = {
x = 0;
y = 200;
};
halign = "center";
valign = "center";
}
];
};
};
};
}

View file

@ -4,43 +4,37 @@
... ...
}: let }: let
cfg = config.modules.wms.wayland; cfg = config.modules.wms.wayland;
hyprland = config.modules.wms.wayland.hyprland; inherit (lib) mkIf mkEnableOption;
in { in {
options.modules.wms.wayland.enable = lib.mkEnableOption "wayland"; options.modules.wms.wayland.enable = mkEnableOption "wayland";
# options.modules.wms.wayland.hyprland.enable = mkEnableOption "hyprland"; config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
# lib.mkMerge [
# {
environment.variables = { environment.variables = {
NIXOS_OZONE_WL = "1"; NIXOS_OZONE_WL = "1";
__GL_GSYNC_ALLOWED = "0"; __GL_GSYNC_ALLOWED = "0";
__GL_VRR_ALLOWED = "0"; __GL_VRR_ALLOWED = "0";
DISABLE_QT5_COMPAT = "0";
GDK_BACKEND = "wayland"; GDK_BACKEND = "wayland";
ANKI_WAYLAND = "1";
#WLR_DRM_NO_ATOMIC = "1";
#QT_AUTO_SCREEN_SCALE_FACTOR = "1";
QT_QPA_PLATFORM = "wayland"; QT_QPA_PLATFORM = "wayland";
DISABLE_QT_COMPAT = "0";
#QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
MOZ_ENABLE_WAYLAND = "1"; MOZ_ENABLE_WAYLAND = "1";
XDG_SESSION_TYPE = "wayland";
SDL_VIDEODRIVER = "wayland"; SDL_VIDEODRIVER = "wayland";
CLUTTER_BACKEND = "wayland"; CLUTTER_BACKEND = "wayland";
# Session variables for Hyprland
# (lib.mkIf (hyprland.enable) {
# environment.variables = {
LIBVA_DRIVER_NAME = "nvidia"; LIBVA_DRIVER_NAME = "nvidia";
GTK_USE_PORTAL = "1"; GTK_USE_PORTAL = "1";
NIXOS_XDG_OPEN_USE_PORTAL = "1"; NIXOS_XDG_OPEN_USE_PORTAL = "1";
XDG_CURRENT_DESKTOP = "Hyprland"; XDG_CURRENT_DESKTOP = "Hyprland";
XDG_SESSION_DESKTOP = "Hyprland"; XDG_SESSION_DESKTOP = "Hyprland";
XDG_SESSION_TYPE = "wayland";
ELECTRON_OZONE_PLATFORM_HINT = "auto"; ELECTRON_OZONE_PLATFORM_HINT = "auto";
WLR_RENDERER_ALLOW_SOFTWARE = "1"; WLR_RENDERER_ALLOW_SOFTWARE = "1";
# Needed anymore?
LIBSEAT_BACKEND = "logind"; LIBSEAT_BACKEND = "logind";
}; };
# })
# ];
}; };
} }