Finally (hopefully) fixed hyprlock. Updated nvidia drivers and kernel, added fastfetch config and hyprlock profile logo

This commit is contained in:
Aleksandr Lebedev 2024-12-01 22:18:48 +01:00
parent 4f16b2182d
commit c78bcba9b1
9 changed files with 149 additions and 8 deletions

View file

@ -175,6 +175,8 @@
];
programs.kdeconnect.enable = true;
programs.kdeconnect.package = pkgs.kdePackages.kdeconnect-kde;
programs.hyprlock.enable = true;
xdg = {
menus.enable = true;
mime.enable = true;
@ -372,6 +374,9 @@
};
# services.displayManager.sddm.wayland.enable = true;
nix = {
settings.experimental-features = ["nix-command" "flakes"];
settings = {
experimental-features = ["nix-command" "flakes"];
auto-optimise-store = true;
};
};
}

113
nixos/fastfetch/default.nix Normal file
View file

@ -0,0 +1,113 @@
{
programs.fastfetch = {
enable = true;
settings = {
display = {
color = {
keys = "35";
output = "1000";
};
};
logo = {
source = ./nixos.png;
type = "kitty-direct";
height = 15;
width = 30;
padding = {
top = 3;
left = 3;
};
};
modules = [
"break"
{
type = "custom";
format = "Hardware";
}
{
type = "cpu";
key = " ";
}
{
type = "gpu";
key = " 󰍛 ";
}
{
type = "memory";
key = " 󰑭 ";
}
{
type = "custom";
format = "";
}
"break"
{
type = "custom";
format = "Software";
}
{
type = "custom";
format = " OS -> NixOS btw";
}
{
type = "kernel";
key = " ";
}
{
type = "packages";
key = " 󰏖 ";
}
{
type = "shell";
key = " ";
}
"break"
{
type = "wm";
key = " WM";
}
{
type = "wmtheme";
key = " 󰉼 ";
}
{
type = "terminal";
key = " ";
}
{
type = "custom";
format = "";
}
"break"
{
type = "custom";
format = "Uptime / Age";
}
{
type = "command";
key = " ";
text = #bash
''
birth_install=$(stat -c %W /)
current=$(date +%s)
delta=$((current - birth_install))
delta_days=$((delta / 86400))
echo $delta_days days
'';
}
{
type = "uptime";
key = " ";
}
{
type = "custom";
format = "";
}
"break"
];
};
};
}

BIN
nixos/fastfetch/nixos.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

View file

@ -15,6 +15,7 @@
[
./hyprland/hyprland.nix
./nixvim
./fastfetch
#"${if hostname != "nixosbtw" then ./macos/homemac.nix else ./empty.nix }"
];
# Home Manager needs a bit of information about you and the paths it should

View file

@ -17,7 +17,7 @@ services.hypridle = {
general = {
lock_cmd="pidof hyprlock || hyprlock";
before_sleep_cmd = "loginctl lock-session && sleep 3s"; # lock before suspend.
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.
ignore_dbus_inhibit = false;
};

View file

@ -16,7 +16,12 @@ in
monitor = if hwconfig.hostname == "${username}-homepc" then [
"DP-1,2560x1440@75,1600x0,1.6"
"DP-3,2560x1440@75,0x0,1.6"
] else ",highres,auto,1.6";
] else [",highres,auto,1.6"]
++
[
"FALLBACK,1920x1080@60,auto,1" #to fix crash on hyprlock https://github.com/hyprwm/hyprlock/issues/434#issuecomment-2341710088
]
;
xwayland = {
force_zero_scaling = true;
@ -29,7 +34,7 @@ in
"${pkgs.networkmanagerapplet}/bin/nm-applet &"
"${pkgs.swaynotificationcenter}/bin/swaync &"
"${pkgs.solaar}/bin/solaar -w hide &"
"${pkgs.hypridle}/bin/hypridle &"
#"${pkgs.hypridle}/bin/hypridle &"
"${pkgs.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1 &" #https://nixos.wiki/wiki/Polkit
"${pkgs.clipse}/bin/clipse -listen &"
"${pkgs.swww}/bin/swww-daemon &"

View file

@ -1,10 +1,17 @@
{ pkgs, lib, ... }:
let
profile-image = ./profile-image.png;
in
{
programs.hyprlock = {
enable = true;
settings = {
general = {
enable_fingerprint = true;
#enable_fingerprint = true;
disable_loading_bar = true;
hide_cursor = true;
no_fade_in = false;
grace = 10;
};
background = {
blur_passes = 1;
@ -15,12 +22,22 @@
vibrancy = 0.1696;
vibrancy_darkness = 0.0;
};
image = {
path = "${profile-image}";
size = 150;
border_size = 4;
#border_color = "rgb(0C96F9)";
rounding = -1; # Negative means circle
position = "0, 220";
halign = "center";
valign = "center";
};
input-field = {
size = "600, 100";
outline_thickness = 3;
dots_size = 0.33;
dots_spacing = 0.15;
dots_center = false;
dots_center = true;
dots_rounding = -1;
dots_fade_time = 200;
placeholder_text = "<i>Input Password...</i>";

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

View file

@ -1,6 +1,6 @@
{ config, pkgs, ... }:
{
boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_11;#pkgs.linuxPackages_latest;
boot.kernelPackages = pkgs.linuxPackages_latest;
hardware = {
graphics = {
enable = true;
@ -37,7 +37,7 @@
nvidiaSettings = true;
# Optionally, you may need to select the appropriate driver version for your specific GPU.
package = config.boot.kernelPackages.nvidiaPackages.stable;
package = config.boot.kernelPackages.nvidiaPackages.beta;
};
logitech.wireless.enable = true;