Home Gen505 @ 2025-05-03-01:35 by jonas@comfy-station

This commit is contained in:
Jonas Röger 2025-05-03 01:35:34 +02:00
parent 7add5e0db6
commit 9a5d27a7b1
13 changed files with 396 additions and 400 deletions

View File

@ -123,6 +123,7 @@
({...}: {nixpkgs.config.allowUnfree = true;}) ({...}: {nixpkgs.config.allowUnfree = true;})
inputs.plasma-manager.homeManagerModules.plasma-manager inputs.plasma-manager.homeManagerModules.plasma-manager
inputs.sops-nix.homeManagerModules.sops inputs.sops-nix.homeManagerModules.sops
./modules
(./home + "/jonas@comfy-station.nix") (./home + "/jonas@comfy-station.nix")
]; ];
@ -141,6 +142,7 @@
modules = [ modules = [
({...}: {nixpkgs.overlays = [overlay-unstable];}) ({...}: {nixpkgs.overlays = [overlay-unstable];})
({...}: {nixpkgs.config.allowUnfree = true;}) ({...}: {nixpkgs.config.allowUnfree = true;})
./modules
(./home + "/jonas@harbor.nix") (./home + "/jonas@harbor.nix")
]; ];
@ -159,6 +161,7 @@
modules = [ modules = [
({...}: {nixpkgs.overlays = [overlay-unstable];}) ({...}: {nixpkgs.overlays = [overlay-unstable];})
({...}: {nixpkgs.config.allowUnfree = true;}) ({...}: {nixpkgs.config.allowUnfree = true;})
./modules
(./home + "/jonas@monolith.nix") (./home + "/jonas@monolith.nix")
]; ];
@ -177,6 +180,7 @@
modules = [ modules = [
({...}: {nixpkgs.overlays = [overlay-unstable];}) ({...}: {nixpkgs.overlays = [overlay-unstable];})
({...}: {nixpkgs.config.allowUnfree = true;}) ({...}: {nixpkgs.config.allowUnfree = true;})
./modules
./home/jroeger.nix ./home/jroeger.nix
]; ];

View File

@ -1,9 +1,7 @@
{config, ...}: rec { {config, ...}: rec {
imports = [ imports = [
../modules/home/borg.nix ../modules/home/borg.nix
../modules/home/doom
../modules/home/firefox.nix ../modules/home/firefox.nix
../modules/home/hyprland
../modules/home/kdeconnect.nix ../modules/home/kdeconnect.nix
../modules/home/kitty ../modules/home/kitty
../modules/home/nextcloud ../modules/home/nextcloud
@ -28,10 +26,11 @@
age.keyFile = "${home.homeDirectory}/.config/sops/age/keys.txt"; age.keyFile = "${home.homeDirectory}/.config/sops/age/keys.txt";
}; };
doom.enable = true; # hive modules
doom.enableCopilot = true; hive.doom.enable = true;
doom.withNixPkgs = true; hive.doom.enableCopilot = true;
doom.withShellPkgs = true; hive.doom.withNixPkgs = true;
hive.doom.withShellPkgs = true;
# Make session variables available in systemd units # Make session variables available in systemd units
# SEE: https://github.com/nix-community/home-manager/pull/5543 # SEE: https://github.com/nix-community/home-manager/pull/5543

View File

@ -1,6 +1,5 @@
{...}: { {...}: {
imports = [ imports = [
../modules/home/doom
../modules/home/ranger ../modules/home/ranger
../modules/home/zsh ../modules/home/zsh
]; ];
@ -10,9 +9,11 @@
home.username = "jonas"; home.username = "jonas";
home.homeDirectory = "/home/jonas"; home.homeDirectory = "/home/jonas";
doom.enable = true; # hive modules
doom.withNixPkgs = true; hive.nix-scripts.enable = true;
doom.withShellPkgs = true; hive.doom.enable = true;
hive.doom.withNixPkgs = true;
hive.doom.withShellPkgs = true;
# This value determines the Home Manager release that your configuration is # This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release # compatible with. This helps avoid breakage when a new Home Manager release

View File

@ -1,7 +1,6 @@
{config, ...}: rec { {config, ...}: rec {
imports = [ imports = [
../modules/home/borg.nix ../modules/home/borg.nix
../modules/home/doom
../modules/home/firefox.nix ../modules/home/firefox.nix
../modules/home/kdeconnect.nix ../modules/home/kdeconnect.nix
../modules/home/kitty ../modules/home/kitty
@ -21,10 +20,11 @@
age.keyFile = "${home.homeDirectory}/.config/sops/age/keys.txt"; age.keyFile = "${home.homeDirectory}/.config/sops/age/keys.txt";
}; };
doom.enable = true; # hive moduless
doom.enableCopilot = true; hive.doom.enable = true;
doom.withNixPkgs = true; hive.doom.enableCopilot = true;
doom.withShellPkgs = true; hive.doom.withNixPkgs = true;
hive.doom.withShellPkgs = true;
# Make session variables available in systemd units # Make session variables available in systemd units
# SEE: https://github.com/nix-community/home-manager/pull/5543 # SEE: https://github.com/nix-community/home-manager/pull/5543

View File

@ -1,6 +1,5 @@
{...}: { {...}: {
imports = [ imports = [
../modules/home/doom
../modules/home/kitty ../modules/home/kitty
../modules/home/ranger ../modules/home/ranger
../modules/home/yubikey.nix ../modules/home/yubikey.nix
@ -14,11 +13,12 @@
yubikey.pinentry = "gnome3"; yubikey.pinentry = "gnome3";
doom.enable = true; # hive modules
doom.enableCopilot = true; hive.doom.enable = true;
doom.withNixPkgs = true; hive.doom.enableCopilot = true;
doom.withShellPkgs = true; hive.doom.withNixPkgs = true;
doom.withCXXPkgs = true; hive.doom.withShellPkgs = true;
hive.doom.withCXXPkgs = true;
# This value determines the Home Manager release that your configuration is # This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release # compatible with. This helps avoid breakage when a new Home Manager release

View File

@ -1,20 +1,34 @@
{isHM ? null, ...}: { {
isHM ? null,
lib,
...
}: {
assertions = [ assertions = [
{ {
assertion = isHM != null; assertion = isHM != null;
message = "The \"home-manager\" flag isHM is required."; message = "The \"home-manager\" flag isHM is required.";
} }
]; ];
imports = [ imports =
./bin/nix-scripts.nix [
./desktop/de # modules containing both system and home-manager configs
./desktop/dm ./bin/nix-scripts.nix
./hardware/bluetooth.nix ]
./hardware/sound.nix ++ lib.optionals (! isHM) [
./hardware/yubikey.nix # pure system modules
./networking/wireguard ./desktop/de
./services/borg-server.nix ./desktop/dm
./services/nextcloud-instance.nix ./hardware/bluetooth.nix
./services/virt-manager.nix ./hardware/sound.nix
]; ./hardware/yubikey.nix
./networking/wireguard
./services/borg-server.nix
./services/nextcloud-instance.nix
./services/virt-manager.nix
]
++ lib.optionals isHM [
# pure home-manager modules
./home/doom
./home/hyprland
];
} }

View File

@ -4,7 +4,7 @@
lib, lib,
... ...
}: let }: let
cfg = config.doom; cfg = config.hive.doom;
doom-pkgs = with pkgs; [ doom-pkgs = with pkgs; [
fira fira
fira-code-nerdfont fira-code-nerdfont
@ -81,7 +81,7 @@
fi fi
''; '';
in { in {
options.doom = { options.hive.doom = {
enable = lib.mkEnableOption "Enable Doom Emacs"; enable = lib.mkEnableOption "Enable Doom Emacs";
enableCopilot = lib.mkEnableOption "Enable Copilot in Doom Emacs"; enableCopilot = lib.mkEnableOption "Enable Copilot in Doom Emacs";
withLatexPkgs = lib.mkEnableOption "Enable LaTeX packages in doom path"; withLatexPkgs = lib.mkEnableOption "Enable LaTeX packages in doom path";

View File

@ -1,29 +0,0 @@
{
config,
pkgs,
...
}: {
services.dunst.settings = {
global = {
origin = "top-right";
frame_color = "#33ccff";
transparency = 20;
background = "#000000";
timeout = 5;
offset = "20x50";
force_xwayland = false;
corner_radius = 15;
follow = "keyboard";
progress_bar = true;
dmenu = "${pkgs.wofi}/bin/wofi --dmenu";
mouse_left_click = "do_action, close_current";
mouse_middle_click = "close_current";
mouse_right_click = "close_all";
};
urgency_critical = {
timeout = 15;
background = "#500005";
};
};
}

View File

@ -1,6 +0,0 @@
{...}: {
imports = [
./config.nix
./dunst.nix
];
}

View File

@ -1,3 +0,0 @@
{...}: {
services.dunst.enable = true;
}

View File

@ -4,6 +4,7 @@
lib, lib,
... ...
}: let }: let
cfg = config.hive.hyprland;
screenshot = pkgs.writeShellScriptBin "screenshot" '' screenshot = pkgs.writeShellScriptBin "screenshot" ''
region=0 region=0
clip=0 clip=0
@ -31,330 +32,332 @@
fi fi
''; '';
in { in {
services.hypridle.settings = { config = lib.mkIf cfg.enable {
general = { services.hypridle.settings = {
# lock_cmd = notify-send "lock!" # dbus/sysd lock command (loginctl lock-session)
# unlock_cmd = notify-send "unlock!" # same as above, but unlock
ignore_dbus_inhibit = "false"; # whether to ignore dbus-sent idle-inhibit requests (used by e.g. firefox or steam)
lock_cmd = "pidof hyprlock || hyprlock"; # avoid starting multiple hyprlock instances.
before_sleep_cmd = "loginctl lock-session"; # lock before suspend.
after_sleep_cmd = "hyprctl dispatch dpms on"; # to avoid having to press a key twice to turn on the display.
};
listener = [
# Screenlock
{
timeout = 180; # in seconds
on-timeout = "hyprlock"; # command to run when timeout has passed
# on-resume = notify-send "Welcome back to your desktop!" # command to run when activity is detected after timeout has fired.
}
# Suspend
{
timeout = 360; # in seconds
on-timeout = "systemctl suspend"; # command to run when timeout has passed
# on-resume = notify-send "Welcome back to your desktop!" # command to run when activity is detected after timeout has fired.
}
];
};
programs.hyprlock = lib.mkIf config.wayland.windowManager.hyprland.enable {
enable = true;
settings = {
background = [
{
path = "screenshot"; # only png supported for now
# color = $color1
# all these options are taken from hyprland, see https://wiki.hyprland.org/Configuring/Variables/#blur for explanations
blur_size = 4;
blur_passes = 3; # 0 disables blurring
noise = 0.0117;
contrast = 1.3000; # Vibrant!!!
brightness = 0.8000;
vibrancy = 0.2100;
vibrancy_darkness = 0.0;
}
];
# Hours
label = [
{
text = ''cmd[update:1000] echo "<b><big> $(date +"%H") </big></b>"'';
#color = $color6
font_size = 112;
# font_family = Geist Mono 10
shadow_passes = 3;
shadow_size = 4;
position = "0, 220";
halign = "center";
valign = "center";
}
{
text = ''cmd[update:1000] echo "<b><big> $(date +"%M") </big></b>"'';
# color = $color6
font_size = 112;
# font_family = Geist Mono 10
shadow_passes = 3;
shadow_size = 4;
position = "0, 80";
halign = "center";
valign = "center";
}
{
text = ''cmd[update:18000000] echo "<b><big> "$(date +'%A')" </big></b>"'';
# color = $color7
font_size = 22;
# font_family = JetBrainsMono Nerd Font 10
position = "0, -10";
halign = "center";
valign = "center";
}
{
text = ''cmd[update:18000000] echo "<b> "$(${pkgs.coreutils-full}/bin/date +'%d %b')" </b>"'';
# color = $color7
font_size = 18;
#font_family = JetBrainsMono Nerd Font 10
position = "0, -40";
halign = "center";
valign = "center";
}
{
text = ''cmd[update:18000000] echo "<b>So ca. <big> $(${pkgs.curl}/bin/curl -s 'wttr.in?format=%t' | ${pkgs.coreutils-full}/bin/tr -d '+')</big> oder watt.</b>"'';
#color = $color7
font_size = 18;
# font_family = Geist Mono 10
position = "0, 40";
halign = "center";
valign = "bottom";
}
];
input-field = [
{
size = "250, 50";
outline_thickness = 3;
dots_size = 0.26; # Scale of input-field height, 0.2 - 0.8
dots_spacing = 0.64; # Scale of dots' absolute size, 0.0 - 1.0
dots_center = true;
dots_rouding = -1;
rounding = 22;
# outer_color = $color0
# inner_color = $color0
# font_color = $color6
fade_on_empty = true;
placeholder_text = ''<i>Password...</i>''; # Text rendered in the input box when it's empty.
position = "0, 120";
halign = "center";
valign = "bottom";
}
];
};
};
wayland.windowManager.hyprland = lib.mkIf config.wayland.windowManager.hyprland.enable {
settings = {
exec-once = [
"${pkgs.wpaperd}/bin/wpaperd &"
];
"$mod" = "SUPER";
bind =
[
"$mod, RETURN, exec, ${pkgs.kitty}/bin/kitty"
"$mod, d, exec, ${pkgs.wofi}/bin/wofi --show drun"
"$mod, h, movefocus, l"
"$mod, j, movefocus, d"
"$mod, k, movefocus, u"
"$mod, l, movefocus, r"
"$mod, LEFT, movefocus, l"
"$mod, DOWN, movefocus, d"
"$mod, UP, movefocus, u"
"$mod, RIGHT, movefocus, r"
"$mod SHIFT, h, movewindow, l"
"$mod SHIFT, j, movewindow, d"
"$mod SHIFT, k, movewindow, u"
"$mod SHIFT, l, movewindow, r"
"$mod SHIFT, LEFT, movewindow, l"
"$mod SHIFT, DOWN, movewindow, d"
"$mod SHIFT, UP, movewindow, u"
"$mod CTRL SHIFT, LEFT, moveactive, -10 0"
"$mod CTRL SHIFT, DOWN, moveactive, 0 10"
"$mod CTRL SHIFT, UP, moveactive, 0 -10"
"$mod CTRL SHIFT, RIGHT, moveactive, 10 0"
"$mod CTRL SHIFT, h, moveactive, -10 0"
"$mod CTRL SHIFT, j, moveactive, 0 10"
"$mod CTRL SHIFT, k, moveactive, 0 -10"
"$mod CTRL SHIFT, l, moveactive, 10 0"
"$mod SHIFT, q, killactive"
"$mod CTRL, h, resizeactive, -5% 0%"
"$mod CTRL, l, resizeactive, 5% 0%"
"$mod CTRL, j, resizeactive, 0% -5%"
"$mod CTRL, k, resizeactive, 0% 5%"
"$mod, SPACE, togglefloating, active"
"$mod SHIFT, SPACE, centerwindow"
"$mod, f, fullscreen, 1"
"$mod SHIFT, f, fullscreen, 0"
"$mod CTRL, f, fullscreenstate, -1 2"
"$mod SHIFT, s, pin"
"$mod SHIFT, x, exec, ${pkgs.hyprland}/bin/hyprctl kill"
", XF86AudioRaiseVolume, exec, ${pkgs.pulsemixer}/bin/pulsemixer --change-volume +5"
", XF86AudioLowerVolume, exec, ${pkgs.pulsemixer}/bin/pulsemixer --change-volume -5"
", XF86AudioMute, exec, ${pkgs.pulsemixer}/bin/pulsemixer --toggle-mute"
", XF86AudioMicMute, exec, ${pkgs.pulsemixer}/bin/pulsemixer --toggle-mute --id 1"
", XF86MonBrightnessUp, exec, ${pkgs.brightnessctl}/bin/brightnessctl set +5%"
", XF86MonBrightnessDown, exec, ${pkgs.brightnessctl}/bin/brightnessctl set 5%-"
"$mod, 9, exec, ${pkgs.hyprlock}/bin/hyprlock"
"$mod, 0, exec, ${pkgs.wlogout}/bin/wlogout -b 5"
"$mod, n, exec, ${pkgs.swaynotificationcenter}/bin/swaync-client -t"
", Print, exec, ${screenshot}/bin/screenshot"
"CTRL, Print, exec, ${screenshot}/bin/screenshot --region"
"SHIFT, Print, exec, ${screenshot}/bin/screenshot --clip"
"CTRL SHIFT, Print, exec, ${screenshot}/bin/screenshot --region --clip"
]
++ (
# workspaces
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
builtins.concatLists (builtins.genList (
x: let
ws = builtins.toString (x + 1);
in [
"$mod, ${ws}, workspace, ${ws}"
"$mod SHIFT, ${ws}, movetoworkspace, ${ws}"
"$mod CTRL, ${ws}, movetoworkspacesilent, ${ws}"
]
)
8)
);
# See https://wiki.hyprland.org/Configuring/Monitors/
monitor = ",preferred,auto,1";
env = [
"GDK_SCALE,1"
"XCURSOR_SIZE,12"
];
xwayland = {
force_zero_scaling = true;
};
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
# Execute your favorite apps at launch
# exec-once = waybar & hyprpaper & firefox
# Source a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input = {
kb_layout = "de";
kb_variant = "deadacute";
kb_model = "";
kb_options = "caps:ctrl_modifier";
kb_rules = "";
repeat_delay = 250;
repeat_rate = 30;
follow_mouse = 1;
touchpad = {
natural_scroll = "yes";
};
sensitivity = 0; # -1.0 - 1.0, 0 means no modification.
};
general = { general = {
# See https://wiki.hyprland.org/Configuring/Variables/ for more # lock_cmd = notify-send "lock!" # dbus/sysd lock command (loginctl lock-session)
# unlock_cmd = notify-send "unlock!" # same as above, but unlock
gaps_in = 5; ignore_dbus_inhibit = "false"; # whether to ignore dbus-sent idle-inhibit requests (used by e.g. firefox or steam)
gaps_out = 10; lock_cmd = "pidof hyprlock || hyprlock"; # avoid starting multiple hyprlock instances.
border_size = 2; before_sleep_cmd = "loginctl lock-session"; # lock before suspend.
"col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg"; after_sleep_cmd = "hyprctl dispatch dpms on"; # to avoid having to press a key twice to turn on the display.
"col.inactive_border" = "rgba(595959aa)";
layout = "dwindle";
# Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
allow_tearing = false;
}; };
layerrule = [ listener = [
# blur for wlogout # Screenlock
"blur, logout_dialog" {
timeout = 180; # in seconds
# blur for swaync on-timeout = "hyprlock"; # command to run when timeout has passed
"blur, swaync-control-center" # on-resume = notify-send "Welcome back to your desktop!" # command to run when activity is detected after timeout has fired.
"blur, swaync-notification-window" }
"ignorezero, swaync-control-center" # Suspend
"ignorezero, swaync-notification-window" {
"ignorealpha 0.5, swaync-control-center" timeout = 360; # in seconds
"ignorealpha 0.5, swaync-notification-window" on-timeout = "systemctl suspend"; # command to run when timeout has passed
# on-resume = notify-send "Welcome back to your desktop!" # command to run when activity is detected after timeout has fired.
}
]; ];
};
decoration = { programs.hyprlock = {
# See https://wiki.hyprland.org/Configuring/Variables/ for more enable = true;
settings = {
background = [
{
path = "screenshot"; # only png supported for now
# color = $color1
rounding = 10; # all these options are taken from hyprland, see https://wiki.hyprland.org/Configuring/Variables/#blur for explanations
blur_size = 4;
blur_passes = 3; # 0 disables blurring
noise = 0.0117;
contrast = 1.3000; # Vibrant!!!
brightness = 0.8000;
vibrancy = 0.2100;
vibrancy_darkness = 0.0;
}
];
blur = { # Hours
enabled = true; label = [
size = 8; {
passes = 1; text = ''cmd[update:1000] echo "<b><big> $(date +"%H") </big></b>"'';
new_optimizations = true; #color = $color6
}; font_size = 112;
}; # font_family = Geist Mono 10
shadow_passes = 3;
shadow_size = 4;
animations = { position = "0, 220";
enabled = "yes"; halign = "center";
valign = "center";
}
{
text = ''cmd[update:1000] echo "<b><big> $(date +"%M") </big></b>"'';
# color = $color6
font_size = 112;
# font_family = Geist Mono 10
shadow_passes = 3;
shadow_size = 4;
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more position = "0, 80";
halign = "center";
valign = "center";
}
{
text = ''cmd[update:18000000] echo "<b><big> "$(date +'%A')" </big></b>"'';
# color = $color7
font_size = 22;
# font_family = JetBrainsMono Nerd Font 10
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05"; position = "0, -10";
halign = "center";
valign = "center";
}
{
text = ''cmd[update:18000000] echo "<b> "$(${pkgs.coreutils-full}/bin/date +'%d %b')" </b>"'';
# color = $color7
font_size = 18;
#font_family = JetBrainsMono Nerd Font 10
animation = [ position = "0, -40";
"windows, 1, 7, myBezier" halign = "center";
"windowsOut, 1, 7, default, popin 80%" valign = "center";
"border, 1, 10, default" }
"borderangle, 1, 8, default" {
"fade, 1, 7, default" text = ''cmd[update:18000000] echo "<b>So ca. <big> $(${pkgs.curl}/bin/curl -s 'wttr.in?format=%t' | ${pkgs.coreutils-full}/bin/tr -d '+')</big> oder watt.</b>"'';
"workspaces, 1, 6, default" #color = $color7
font_size = 18;
# font_family = Geist Mono 10
position = "0, 40";
halign = "center";
valign = "bottom";
}
];
input-field = [
{
size = "250, 50";
outline_thickness = 3;
dots_size = 0.26; # Scale of input-field height, 0.2 - 0.8
dots_spacing = 0.64; # Scale of dots' absolute size, 0.0 - 1.0
dots_center = true;
dots_rouding = -1;
rounding = 22;
# outer_color = $color0
# inner_color = $color0
# font_color = $color6
fade_on_empty = true;
placeholder_text = ''<i>Password...</i>''; # Text rendered in the input box when it's empty.
position = "0, 120";
halign = "center";
valign = "bottom";
}
]; ];
}; };
};
dwindle = { wayland.windowManager.hyprland = {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more settings = {
pseudotile = "yes"; # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below exec-once = [
preserve_split = "yes"; # you probably want this "${pkgs.wpaperd}/bin/wpaperd &"
];
"$mod" = "SUPER";
bind =
[
"$mod, RETURN, exec, ${pkgs.kitty}/bin/kitty"
"$mod, d, exec, ${pkgs.wofi}/bin/wofi --show drun"
"$mod, h, movefocus, l"
"$mod, j, movefocus, d"
"$mod, k, movefocus, u"
"$mod, l, movefocus, r"
"$mod, LEFT, movefocus, l"
"$mod, DOWN, movefocus, d"
"$mod, UP, movefocus, u"
"$mod, RIGHT, movefocus, r"
"$mod SHIFT, h, movewindow, l"
"$mod SHIFT, j, movewindow, d"
"$mod SHIFT, k, movewindow, u"
"$mod SHIFT, l, movewindow, r"
"$mod SHIFT, LEFT, movewindow, l"
"$mod SHIFT, DOWN, movewindow, d"
"$mod SHIFT, UP, movewindow, u"
"$mod CTRL SHIFT, LEFT, moveactive, -10 0"
"$mod CTRL SHIFT, DOWN, moveactive, 0 10"
"$mod CTRL SHIFT, UP, moveactive, 0 -10"
"$mod CTRL SHIFT, RIGHT, moveactive, 10 0"
"$mod CTRL SHIFT, h, moveactive, -10 0"
"$mod CTRL SHIFT, j, moveactive, 0 10"
"$mod CTRL SHIFT, k, moveactive, 0 -10"
"$mod CTRL SHIFT, l, moveactive, 10 0"
"$mod SHIFT, q, killactive"
"$mod CTRL, h, resizeactive, -5% 0%"
"$mod CTRL, l, resizeactive, 5% 0%"
"$mod CTRL, j, resizeactive, 0% -5%"
"$mod CTRL, k, resizeactive, 0% 5%"
"$mod, SPACE, togglefloating, active"
"$mod SHIFT, SPACE, centerwindow"
"$mod, f, fullscreen, 1"
"$mod SHIFT, f, fullscreen, 0"
"$mod CTRL, f, fullscreenstate, -1 2"
"$mod SHIFT, s, pin"
"$mod SHIFT, x, exec, ${pkgs.hyprland}/bin/hyprctl kill"
", XF86AudioRaiseVolume, exec, ${pkgs.pulsemixer}/bin/pulsemixer --change-volume +5"
", XF86AudioLowerVolume, exec, ${pkgs.pulsemixer}/bin/pulsemixer --change-volume -5"
", XF86AudioMute, exec, ${pkgs.pulsemixer}/bin/pulsemixer --toggle-mute"
", XF86AudioMicMute, exec, ${pkgs.pulsemixer}/bin/pulsemixer --toggle-mute --id 1"
", XF86MonBrightnessUp, exec, ${pkgs.brightnessctl}/bin/brightnessctl set +5%"
", XF86MonBrightnessDown, exec, ${pkgs.brightnessctl}/bin/brightnessctl set 5%-"
"$mod, 9, exec, ${pkgs.hyprlock}/bin/hyprlock"
"$mod, 0, exec, ${pkgs.wlogout}/bin/wlogout -b 5"
"$mod, n, exec, ${pkgs.swaynotificationcenter}/bin/swaync-client -t"
", Print, exec, ${screenshot}/bin/screenshot"
"CTRL, Print, exec, ${screenshot}/bin/screenshot --region"
"SHIFT, Print, exec, ${screenshot}/bin/screenshot --clip"
"CTRL SHIFT, Print, exec, ${screenshot}/bin/screenshot --region --clip"
]
++ (
# workspaces
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
builtins.concatLists (builtins.genList (
x: let
ws = builtins.toString (x + 1);
in [
"$mod, ${ws}, workspace, ${ws}"
"$mod SHIFT, ${ws}, movetoworkspace, ${ws}"
"$mod CTRL, ${ws}, movetoworkspacesilent, ${ws}"
]
)
8)
);
# See https://wiki.hyprland.org/Configuring/Monitors/
monitor = ",preferred,auto,1";
env = [
"GDK_SCALE,1"
"XCURSOR_SIZE,12"
];
xwayland = {
force_zero_scaling = true;
};
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
# Execute your favorite apps at launch
# exec-once = waybar & hyprpaper & firefox
# Source a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input = {
kb_layout = "de";
kb_variant = "deadacute";
kb_model = "";
kb_options = "caps:ctrl_modifier";
kb_rules = "";
repeat_delay = 250;
repeat_rate = 30;
follow_mouse = 1;
touchpad = {
natural_scroll = "yes";
};
sensitivity = 0; # -1.0 - 1.0, 0 means no modification.
};
general = {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
gaps_in = 5;
gaps_out = 10;
border_size = 2;
"col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg";
"col.inactive_border" = "rgba(595959aa)";
layout = "dwindle";
# Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
allow_tearing = false;
};
layerrule = [
# blur for wlogout
"blur, logout_dialog"
# blur for swaync
"blur, swaync-control-center"
"blur, swaync-notification-window"
"ignorezero, swaync-control-center"
"ignorezero, swaync-notification-window"
"ignorealpha 0.5, swaync-control-center"
"ignorealpha 0.5, swaync-notification-window"
];
decoration = {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
rounding = 10;
blur = {
enabled = true;
size = 8;
passes = 1;
new_optimizations = true;
};
};
animations = {
enabled = "yes";
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
animation = [
"windows, 1, 7, myBezier"
"windowsOut, 1, 7, default, popin 80%"
"border, 1, 10, default"
"borderangle, 1, 8, default"
"fade, 1, 7, default"
"workspaces, 1, 6, default"
];
};
dwindle = {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
pseudotile = "yes"; # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = "yes"; # you probably want this
};
master = {
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
# new_is_master = true;
};
gestures = {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
workspace_swipe = "off";
};
misc = {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
force_default_wallpaper = 0; # Set to 0 to disable the anime mascot wallpapers
};
# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
# "device:epic-mouse-v1" = {
# sensitivity = -0.5;
# };
}; };
master = {
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
# new_is_master = true;
};
gestures = {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
workspace_swipe = "off";
};
misc = {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
force_default_wallpaper = 0; # Set to 0 to disable the anime mascot wallpapers
};
# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
# "device:epic-mouse-v1" = {
# sensitivity = -0.5;
# };
}; };
}; };
} }

View File

@ -1,4 +1,8 @@
{...}: { {lib, ...}: {
options.hive.hyprland = {
enable = lib.mkEnableOption "Enable Hyprland configuration";
};
imports = [ imports = [
./config.nix ./config.nix
./hyprland.nix ./hyprland.nix

View File

@ -1,22 +1,31 @@
{pkgs, ...}: { {
wayland.windowManager.hyprland = { config,
enable = true; lib,
systemd.enable = false; pkgs,
systemd.variables = ["--all"]; ...
xwayland.enable = true; }: let
}; cfg = config.hive.hyprland;
in {
config = lib.mkIf cfg.enable {
wayland.windowManager.hyprland = {
enable = true;
systemd.enable = false;
systemd.variables = ["--all"];
xwayland.enable = true;
};
home.packages = with pkgs; [ home.packages = with pkgs; [
wl-clipboard wl-clipboard
]; ];
services.hypridle.enable = true; services.hypridle.enable = true;
programs.wpaperd = { programs.wpaperd = {
enable = true; enable = true;
settings = { settings = {
default = { default = {
path = ../../../static/wallpaper/stones.jpg; path = ../../../static/wallpaper/stones.jpg;
};
}; };
}; };
}; };