This commit is contained in:
Vivian 2024-12-30 10:19:30 +01:00
parent 8413ab2e0f
commit afa692e17d
5 changed files with 56 additions and 32 deletions

View file

@ -1,4 +1,9 @@
{ lib, inputs, pkgs, ... }: {
lib,
inputs,
pkgs,
...
}:
{ {
imports = [ imports = [
./users ./users
@ -75,23 +80,25 @@
''; '';
}; };
services = {
# Limit the systemd journal to 100 MB of disk or the # Limit the systemd journal to 100 MB of disk or the
# last 7 days of logs, whichever happens first. # last 7 days of logs, whichever happens first.
services.journald.extraConfig = '' journald.extraConfig = ''
SystemMaxUse=100M SystemMaxUse=100M
MaxFileSec=7day MaxFileSec=7day
''; '';
services.dbus.implementation = "broker"; dbus.implementation = "broker";
# Enable SSH # Enable SSH
services.openssh = { openssh = {
enable = true; enable = true;
settings = { settings = {
PasswordAuthentication = lib.mkDefault false; PasswordAuthentication = lib.mkDefault false;
PermitRootLogin = lib.mkDefault "no"; PermitRootLogin = lib.mkDefault "no";
}; };
}; };
};
# Debloat # Debloat
documentation = { documentation = {

View file

@ -112,6 +112,7 @@ in
element-desktop element-desktop
firefox firefox
discord discord
obsidian
]; ];
}; };

View file

@ -62,7 +62,10 @@ with lib;
plugins = { plugins = {
nvim-surround.enable = true; nvim-surround.enable = true;
dap.enable = true; dap.enable = true;
image.enable = true; image = {
enable = true;
backend = "kitty";
};
web-devicons.enable = true; web-devicons.enable = true;
bufferline.enable = true; bufferline.enable = true;
nix.enable = true; nix.enable = true;

View file

@ -23,6 +23,9 @@ in
rofi = { rofi = {
enable = true; enable = true;
package = pkgs.rofi-wayland; package = pkgs.rofi-wayland;
theme = {
listview.columns = 1;
};
}; };
hyprlock = { hyprlock = {
@ -50,7 +53,7 @@ in
inner_color = "rgba(242, 243, 244, 0)"; inner_color = "rgba(242, 243, 244, 0)";
font_color = "rgba(242, 243, 244, 0.75)"; font_color = "rgba(242, 243, 244, 0.75)";
fade_on_empty = false; fade_on_empty = false;
placeholder_text = "Start typing or scan fingerprint"; # Text rendered in the input box when it's empty. placeholder_text = "Enter password or scan fingerprint.."; # Text rendered in the input box when it's empty.
hide_input = false; hide_input = false;
check_color = "rgba(204, 136, 34, 0)"; check_color = "rgba(204, 136, 34, 0)";
fail_color = "rgba(204, 34, 34, 0)"; # if authentication failed, changes outer_color and fail message color fail_color = "rgba(204, 34, 34, 0)"; # if authentication failed, changes outer_color and fail message color
@ -122,10 +125,14 @@ in
on-timeout = "loginctl lock-session"; on-timeout = "loginctl lock-session";
} }
{ {
timeout = 600; # 10 mins timeout = 600; # 10 mins, screen off
on-timeout = "hyprctl dispatch dpms off"; on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on"; on-resume = "hyprctl dispatch dpms on";
} }
{
timeout = 1800; # 30 mins
on-timeout = "systemctl suspend";
}
]; ];
}; };
}; };
@ -165,7 +172,7 @@ in
# Autostart now handled by xdg.autoStart # Autostart now handled by xdg.autoStart
startup = pkgs.writeScriptBin "startup.sh" '' startup = pkgs.writeScriptBin "startup.sh" ''
#!${pkgs.stdenv.shell} #!${pkgs.stdenv.shell}
echo "Starting up" uwsm app -- ${pkgs.wl-clip-persist}/bin/wl-clip-persist -c both &
''; '';
in in
{ {
@ -181,7 +188,7 @@ in
inherit (builtins) genList concatLists toString; inherit (builtins) genList concatLists toString;
wpctl = "${pkgs.wireplumber}/bin/wpctl"; wpctl = "${pkgs.wireplumber}/bin/wpctl";
brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl"; brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl";
menu = "${config.programs.rofi.package}/bin/rofi -show combi -modes combi -combi-modes \"window,drun,run\""; menu = "${config.programs.rofi.package}/bin/rofi -columns 1 -show combi -modes combi -combi-modes \"window,drun,run\"";
fileManager = "${pkgs.nautilus}/bin/nautilus"; fileManager = "${pkgs.nautilus}/bin/nautilus";
in in
{ {
@ -270,12 +277,16 @@ in
}; };
windowrulev2 = [ windowrulev2 = [
"suppressevent maximize, class:.* # You'll probably like this." "suppressevent maximize, class:.*"
"workspace 1 silent, class:^(Element)$" "workspace 1 silent, class:^(Element)$"
"workspace 1 silent, class:^(discord)$" "workspace 1 silent, class:^(discord)$"
"group, class:^(Element|discord)$,workspace:1" "group, class:^(Element|discord)$,workspace:1"
"workspace 2 silent, class:^(firefox)$" "workspace 2 silent, class:^(firefox)$"
"float,class:^(firefox)$,title:^(Picture-in-Picture)$" "float,class:^(firefox)$,title:^(Picture-in-Picture)$"
"workspace special:obsidian silent, class:^(obsidian)$"
]; ];
# l -> works when screen is locked # l -> works when screen is locked
@ -287,16 +298,16 @@ in
",XF86MonBrightnessDown,exec,${brightnessctl} -q s 5%-" ",XF86MonBrightnessDown,exec,${brightnessctl} -q s 5%-"
]; ];
bindl = [ ",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" ]; bindl = [ ",XF86AudioMute, exec, ${wpctl} set-mute @DEFAULT_AUDIO_SINK@ toggle" ];
bind = bind =
[ [
"$mod, RETURN, exec, ${terminal}" "$mod, RETURN, exec, uwsm app -- ${terminal}"
"$mod, Q, killactive," "$mod, Q, killactive,"
"$mod SHIFT, Q, exec, uwsm stop," "$mod SHIFT, Q, exec, uwsm stop,"
"$mod, E, exec, ${fileManager}" "$mod, E, exec, uwsm app -- ${fileManager}"
"$mod, V, togglefloating," "$mod, V, togglefloating,"
"$mod, D, exec, ${menu}" "$mod, D, exec, uwsm app -- ${menu}"
"$mod, P, pseudo, # dwindle" "$mod, P, pseudo, # dwindle"
"$mod, J, togglesplit, # dwindle" "$mod, J, togglesplit, # dwindle"
"$mod,m,fullscreen" "$mod,m,fullscreen"
@ -312,15 +323,19 @@ in
"$mod, down, movefocus, d" "$mod, down, movefocus, d"
# Scratch workspace # Scratch workspace
"$mod, S, togglespecialworkspace, magic" "$mod, S, togglespecialworkspace, scratch"
"$mod SHIFT, S, movetoworkspace, special:magic" "$mod SHIFT, S, movetoworkspace, special:scratch"
# Obsidian Workspace
"$mod, O, togglespecialworkspace, obsidian"
"$mod SHIFT, O, movetoworkspace, special:obsidian"
# Groups aka Tabs # Groups aka Tabs
"$mod,g,togglegroup" "$mod,g,togglegroup"
"$mod,tab,changegroupactive" "$mod,tab,changegroupactive"
# PrintScreen # PrintScreen
",Print,exec,${pkgs.grimblast}/bin/grimblast copysave area /home/vivian/cloud/Pictures/Screenshots/$(date +%s).png" ",Print,exec,uwsm app -- ${pkgs.grimblast}/bin/grimblast copysave area /home/vivian/cloud/Pictures/Screenshots/$(date +%s).png"
# Toggle Mirror for external displays on/off # Toggle Mirror for external displays on/off
",XF86Display,exec,${toggle_mirror}/bin/toggle_mirror.sh" ",XF86Display,exec,${toggle_mirror}/bin/toggle_mirror.sh"
] ]

View file

@ -5,11 +5,9 @@ in
{ {
programs.waybar = { programs.waybar = {
enable = true; enable = true;
systemd = { systemd.enable = true;
enable = true;
# target = "wayland-session@Hyprland.target";
};
style = ./waybar.css; style = ./waybar.css;
settings = { settings = {
mainBar = { mainBar = {
layer = "top"; layer = "top";
@ -43,7 +41,7 @@ in
format-ethernet = "󰈀 {ifname}: {ipaddr}/{cidr}"; format-ethernet = "󰈀 {ifname}: {ipaddr}/{cidr}";
format-disconnected = "󰌙 "; format-disconnected = "󰌙 ";
tooltip-format = "{ifname}: {ipaddr}"; tooltip-format = "{ifname}: {ipaddr}";
on-click = "touch ~/a && ${terminal} --execute ${nmtui}/bin/nmtui.sh"; on-click = "${terminal} --execute ${nmtui}/bin/nmtui.sh";
}; };
power-profiles-daemon = { power-profiles-daemon = {