flake/nixos/profiles/common/graphical/default.nix

93 lines
2.3 KiB
Nix
Raw Normal View History

2024-01-17 04:47:27 +00:00
{
pkgs,
lib,
...
}: {
### home-manager
home-manager.users.guanranwang = import ./home;
2024-01-09 18:13:52 +00:00
# plymouth
2024-02-02 07:00:26 +00:00
#boot.plymouth.enable = true;
2024-01-09 18:13:52 +00:00
# xserver
services.xserver = {
enable = true;
excludePackages = with pkgs; [xterm];
displayManager.startx.enable = true;
};
# gnome keyring
programs.seahorse.enable = true;
# polkit
security.polkit.enable = true;
environment.systemPackages = with pkgs; [polkit_gnome];
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;
};
};
2024-01-17 04:47:27 +00:00
### Options
myFlake.boot.noLoaderMenu = lib.mkDefault true;
fonts.enableDefaultPackages = false;
security.pam.services.swaylock = {};
xdg.portal = {
enable = true;
2024-05-27 17:06:06 +00:00
xdgOpenUsePortal = true;
2024-01-17 04:47:27 +00:00
wlr.enable = true;
extraPortals = with pkgs; [xdg-desktop-portal-gtk];
2024-05-27 17:06:06 +00:00
# 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";
2024-01-17 04:47:27 +00:00
};
};
services = {
gvfs.enable = true;
gnome = {
gnome-keyring.enable = true;
sushi.enable = true;
gnome-online-accounts.enable = true;
};
};
programs = {
kdeconnect = {
2024-04-23 08:08:11 +00:00
enable = true;
2024-01-17 04:47:27 +00:00
#package = pkgs.gnomeExtensions.gsconnect;
package = pkgs.valent;
};
};
services.libinput = {
2024-01-17 04:47:27 +00:00
touchpad = {
accelProfile = "flat";
naturalScrolling = true;
middleEmulation = false;
};
mouse = {
accelProfile = "flat";
naturalScrolling = true;
middleEmulation = false;
};
};
### 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
'';
2023-09-19 00:17:43 +00:00
}