diff --git a/home/default.nix b/home/default.nix index d95f28f6..62db6283 100644 --- a/home/default.nix +++ b/home/default.nix @@ -5,6 +5,7 @@ fzf.enable = true; mako.enable = true; rofi.enable = true; + swaylock.enable = true; xresources.enable = true; zathura.enable = true; zellij.enable = true; diff --git a/home/hyprland/config.nix b/home/hyprland/config.nix index a658ed86..6971a07c 100644 --- a/home/hyprland/config.nix +++ b/home/hyprland/config.nix @@ -80,7 +80,7 @@ in '' xwayland:force_zero_scaling = true # See https://wiki.hyprland.org/Configuring/Keywords/ for more - bind = SUPER, F1, exec, ${pkgs.gtklock}/bin/gtklock + bind = SUPER, F1, exec, swaylock bind = SUPER, Q, killactive, bind = SUPER SHIFT, Q, exec, rofi -replace -show power-menu bind = SUPER, V, togglefloating @@ -180,7 +180,7 @@ in '' bind = SUPER, T, moveworkspacetomonitor, name:term current bind = SUPER, T, workspace, name:term bind = SUPER SHIFT, T, movetoworkspace, name:term - bind = SUPER ALT, T, exec, [workspace name:term] foot -e zellij + bind = SUPER ALT, T, exec, [workspace name:term] foot bind = SUPER, S, moveworkspacetomonitor, name:system current bind = SUPER, S, workspace, name:system diff --git a/home/hyprland/default.nix b/home/hyprland/default.nix index 6f283820..5a33c408 100644 --- a/home/hyprland/default.nix +++ b/home/hyprland/default.nix @@ -83,6 +83,16 @@ display-combi = " 󰛡 Combi "; }; }; + swaylock = { + enable = true; + settings = { + indicator-caps-lock = true; + indicator-radius = 100; + indicator-thickness = 7; + ignore-empty-password = true; + show-failed-attempts = true; + }; + }; }; gtk = { enable = true; @@ -111,26 +121,6 @@ preload = ${config.stylix.image} wallpaper = ,${config.stylix.image} ''; - "gtklock/config.ini".text = let - powerbar = - "${pkgs.gtklock-powerbar-module}/lib/gtklock/powerbar-module.so"; - playerctl = - "${pkgs.gtklock-playerctl-module}/lib/gtklock/playerctl-module.so"; - in '' - [main] - start-hidden=true - modules=${powerbar};${playerctl} - - [powerbar] - reboot-command=systemctl reboot - poweroff-command=systemctl -i poweroff - suspend-command=systemctl suspend - logout-command=hyprctl dispatch exit - - [playerctl] - art-size=64 - position=below-clock - ''; }; mimeApps = rec { enable = true; diff --git a/system/desktop.nix b/system/desktop.nix index 0522386b..f60b97aa 100644 --- a/system/desktop.nix +++ b/system/desktop.nix @@ -1,28 +1,13 @@ -{ config, pkgs, user, ... }: - -{ - imports = - [ ./default.nix ./emacs.nix ./nyxt.nix ./firefox.nix ./chromium.nix ]; +{ pkgs, user, ... }: { + imports = [ ./default.nix ]; environment.systemPackages = with pkgs; [ dex mesa libnotify glib gsettings-desktop-schemas - protonvpn-cli - protonvpn-gui - transmission-gtk - mplayer - tagger - libreoffice - remmina - minesweep-rs ]; - - security = { - rtkit.enable = true; - pam.services.gtklock.enableGnomeKeyring = true; - }; + security.rtkit.enable = true; sound.enable = true; hardware = { pulseaudio.enable = false; @@ -32,6 +17,10 @@ accounts-daemon.enable = true; dbus.packages = with pkgs; [ gcr ]; gnome.gnome-keyring.enable = true; + greetd = { + enable = true; + settings.initial_session = { inherit user; }; + }; pipewire = { enable = true; alsa.enable = true; @@ -39,26 +28,12 @@ pulse.enable = true; }; xserver = { - enable = true; layout = "gb"; xkbVariant = ""; xkbOptions = "ctrl:nocaps"; - displayManager.lightdm = { - enable = true; - greeters.gtk = { - inherit (config.home-manager.users.${user}.gtk) - cursorTheme iconTheme theme; - enable = true; - }; - }; }; }; - programs = { - seahorse.enable = true; - dconf.enable = true; - light.enable = true; - noisetorch.enable = true; - }; + programs.dconf.enable = true; gtk.iconCache.enable = true; qt = { enable = true; diff --git a/system/gamescope.nix b/system/gamescope.nix index 019ccbc7..76becc72 100644 --- a/system/gamescope.nix +++ b/system/gamescope.nix @@ -1,32 +1,16 @@ -{ user, ... }: { - imports = [ ./default.nix ./steam.nix ]; - sound.enable = true; - hardware = { - pulseaudio.enable = false; - bluetooth.enable = true; - }; +{ ... }: { + imports = [ ./desktop.nix ./steam.nix ]; services = { - accounts-daemon.enable = true; - pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - }; - greetd = { - enable = true; - settings = rec { - default_session.command = '' - gamescope\ - --nested-refresh 60\ - --scaler auto --filter fsr --fsr-sharpness 10\ - --hide-cursor-delay 5 --steam -- steam -gamepadui - ''; - initial_session = { - inherit user; - inherit (default_session) command; - }; - }; + greetd.settings = let + command = '' + gamescope\ + --nested-refresh 60\ + --scaler auto --filter fsr --fsr-sharpness 10\ + --hide-cursor-delay 5 --steam -- steam -gamepadui + ''; + in { + default_session = { inherit command; }; + initial_session = { inherit command; }; }; }; programs.steam.gamescopeSession.enable = true; diff --git a/system/hyprland.nix b/system/hyprland.nix index a3b1bd96..93333ba6 100644 --- a/system/hyprland.nix +++ b/system/hyprland.nix @@ -1,5 +1,6 @@ { pkgs, ... }: { - imports = [ ./desktop.nix ]; + imports = + [ ./desktop.nix ./emacs.nix ./nyxt.nix ./firefox.nix ./chromium.nix ]; nixpkgs.config.chromium.commandLineArgs = "--enable-features=UseOzonePlatform --ozone-platform=wayland"; environment = { @@ -12,8 +13,8 @@ }; systemPackages = with pkgs; [ libsForQt5.polkit-kde-agent + swaylock xdg-utils - wlr-randr hyprpaper pipewire wireplumber @@ -28,26 +29,37 @@ brightnessctl networkmanagerapplet bluez + protonvpn-cli + protonvpn-gui + transmission-gtk + mplayer + tagger + libreoffice + remmina webcord teams-for-linux ]; }; + security.pam.services.swaylock = { }; services = { blueman.enable = true; udisks2.enable = true; - gvfs.enable = true; - tumbler.enable = true; - xserver.displayManager.defaultSession = "hyprland"; + xserver.enable = false; + greetd.settings = let command = "Hyprland"; + in { + default_session = { inherit command; }; + initial_session = { inherit command; }; + }; }; xdg.portal.enable = true; programs = { + seahorse.enable = true; + dconf.enable = true; + light.enable = true; + noisetorch.enable = true; hyprland = { enable = true; xwayland.enable = true; }; - thunar = { - enable = true; - plugins = with pkgs.xfce; [ thunar-archive-plugin thunar-volman ]; - }; }; }