flake/hosts/aristotle/graphical/default.nix
2024-07-20 17:04:40 +08:00

72 lines
1.9 KiB
Nix

{pkgs, ...}: {
### home-manager
home-manager.users.guanranwang = import ./home;
# xserver
services.xserver = {
enable = true;
excludePackages = with pkgs; [xterm];
displayManager.startx.enable = true;
};
# gnome keyring
programs.seahorse.enable = true;
# polkit
security.polkit.enable = true;
systemd.user.services.polkit-gnome-authentication-agent-1 = {
description = "polkit-gnome-authentication-agent-1";
wantedBy = ["graphical-session.target"];
wants = ["graphical-session.target"];
after = ["graphical-session.target"];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
Restart = "on-failure";
RestartSec = 1;
TimeoutStopSec = 10;
};
};
fonts.enableDefaultPackages = false;
security.pam.services.swaylock = {};
xdg.portal = {
enable = true;
xdgOpenUsePortal = true;
wlr.enable = true;
extraPortals = [pkgs.xdg-desktop-portal-gtk];
# https://gitlab.archlinux.org/archlinux/packaging/packages/sway/-/blob/main/sway-portals.conf
config."sway" = {
default = "gtk";
"org.freedesktop.impl.portal.ScreenCast" = "wlr";
"org.freedesktop.impl.portal.Screenshot" = "wlr";
"org.freedesktop.impl.portal.Inhibit" = "none";
};
};
services = {
gvfs.enable = true;
gnome = {
gnome-keyring.enable = true;
gnome-online-accounts.enable = true;
sushi.enable = true;
};
};
programs.kdeconnect = {
enable = true;
package = pkgs.valent;
};
environment.systemPackages = [pkgs.localsend];
networking.firewall.allowedTCPPorts = [53317];
networking.firewall.allowedUDPPorts = [53317];
### Removes debounce time
# https://www.reddit.com/r/linux_gaming/comments/ku6gth
environment.etc."libinput/local-overrides.quirks".text = ''
[Never Debounce]
MatchUdevType=mouse
ModelBouncingKeys=1
'';
}