Reorganise desktop settings

Move some settings/packages from desktop.nix that should have been in
hyprland.nix and make desktop properly generally relevant - switch
gamescope.nix to import from desktop.nix now for less duplication

Remove xserver/lightdm to just use greetd again, less overhead needed

Switch gtklock back to swaylock, some issue with WLR implementations
after update but swaylock still works fine
This commit is contained in:
Evie Litherland-Smith 2024-01-03 15:40:21 +00:00
parent b45bbc5360
commit a6f84783ab
6 changed files with 54 additions and 92 deletions

View file

@ -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;

View file

@ -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

View file

@ -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;

View file

@ -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;

View file

@ -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 = ''
greetd.settings = let
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;
};
};
in {
default_session = { inherit command; };
initial_session = { inherit command; };
};
};
programs.steam.gamescopeSession.enable = true;

View file

@ -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 ];
};
};
}