diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 4de8a2d..37f42ec 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -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; + }; }; } diff --git a/nixos/fastfetch/default.nix b/nixos/fastfetch/default.nix new file mode 100644 index 0000000..d156c4b --- /dev/null +++ b/nixos/fastfetch/default.nix @@ -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" + ]; + }; + }; +} diff --git a/nixos/fastfetch/nixos.png b/nixos/fastfetch/nixos.png new file mode 100644 index 0000000..571410a Binary files /dev/null and b/nixos/fastfetch/nixos.png differ diff --git a/nixos/home.nix b/nixos/home.nix index ab2da58..801a1dd 100644 --- a/nixos/home.nix +++ b/nixos/home.nix @@ -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 diff --git a/nixos/hyprland/hypridle.nix b/nixos/hyprland/hypridle.nix index 32c318b..edc701c 100644 --- a/nixos/hyprland/hypridle.nix +++ b/nixos/hyprland/hypridle.nix @@ -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; }; diff --git a/nixos/hyprland/hyprland.nix b/nixos/hyprland/hyprland.nix index 3371a8d..f7a24c1 100644 --- a/nixos/hyprland/hyprland.nix +++ b/nixos/hyprland/hyprland.nix @@ -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 &" diff --git a/nixos/hyprland/hyprlock.nix b/nixos/hyprland/hyprlock.nix index 86e4b85..4695e2a 100644 --- a/nixos/hyprland/hyprlock.nix +++ b/nixos/hyprland/hyprlock.nix @@ -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 = "Input Password..."; diff --git a/nixos/hyprland/profile-image.png b/nixos/hyprland/profile-image.png new file mode 100644 index 0000000..571410a Binary files /dev/null and b/nixos/hyprland/profile-image.png differ diff --git a/nixos/nvidia.nix b/nixos/nvidia.nix index 935780c..aacf9d4 100644 --- a/nixos/nvidia.nix +++ b/nixos/nvidia.nix @@ -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;