aristotle: cleanup
This commit is contained in:
parent
7aa07d02fa
commit
8187a57f01
7 changed files with 63 additions and 85 deletions
|
@ -15,39 +15,83 @@
|
|||
time.timeZone = "Asia/Shanghai";
|
||||
system.stateVersion = "23.11";
|
||||
|
||||
home-manager.users.guanranwang = import ./home;
|
||||
|
||||
services.tailscale = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
yubikey-manager
|
||||
localsend
|
||||
];
|
||||
|
||||
networking.firewall.allowedTCPPorts = [53317];
|
||||
networking.firewall.allowedUDPPorts = [53317];
|
||||
|
||||
programs.adb.enable = true;
|
||||
programs.anime-game-launcher.enable = true;
|
||||
programs.seahorse.enable = true;
|
||||
programs.steam.enable = true;
|
||||
programs.kdeconnect = {
|
||||
enable = true;
|
||||
package = pkgs.valent;
|
||||
};
|
||||
|
||||
services.power-profiles-daemon.enable = true;
|
||||
services.gvfs.enable = true;
|
||||
services.gnome = {
|
||||
gnome-keyring.enable = true;
|
||||
gnome-online-accounts.enable = true;
|
||||
sushi.enable = true;
|
||||
};
|
||||
|
||||
# https://wiki.archlinux.org/title/Gamepad#Connect_Xbox_Wireless_Controller_with_Bluetooth
|
||||
hardware.xone.enable = true; # via wired or wireless dongle
|
||||
hardware.xpadneo.enable = true; # via Bluetooth
|
||||
|
||||
### https://wiki.archlinux.org/title/Gaming#Improving_performance
|
||||
systemd.tmpfiles.rules = [
|
||||
"w /proc/sys/vm/min_free_kbytes - - - - 1048576"
|
||||
"w /proc/sys/vm/swappiness - - - - 10"
|
||||
"w /sys/kernel/mm/lru_gen/enabled - - - - 5"
|
||||
"w /proc/sys/vm/zone_reclaim_mode - - - - 0"
|
||||
"w /proc/sys/vm/page_lock_unfairness - - - - 1"
|
||||
"w /proc/sys/kernel/sched_child_runs_first - - - - 0"
|
||||
"w /proc/sys/kernel/sched_autogroup_enabled - - - - 1"
|
||||
"w /proc/sys/kernel/sched_cfs_bandwidth_slice_us - - - - 500"
|
||||
"w /sys/kernel/debug/sched/latency_ns - - - - 1000000"
|
||||
"w /sys/kernel/debug/sched/migration_cost_ns - - - - 500000"
|
||||
"w /sys/kernel/debug/sched/min_granularity_ns - - - - 500000"
|
||||
"w /sys/kernel/debug/sched/wakeup_granularity_ns - - - - 0"
|
||||
"w /sys/kernel/debug/sched/nr_migrate - - - - 8"
|
||||
];
|
||||
|
||||
# yubikey
|
||||
environment.systemPackages = [pkgs.yubikey-manager];
|
||||
services.pcscd.enable = true;
|
||||
services.udev.packages = [pkgs.yubikey-personalization];
|
||||
|
||||
# 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";
|
||||
};
|
||||
};
|
||||
|
||||
### 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
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -1,65 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
### home-manager
|
||||
home-manager.users.guanranwang = import ./home;
|
||||
|
||||
# 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
|
||||
'';
|
||||
}
|
|
@ -5,11 +5,10 @@
|
|||
}: {
|
||||
imports =
|
||||
[
|
||||
./fonts
|
||||
./theme.nix
|
||||
./xdg-mime.nix
|
||||
]
|
||||
++ map (n: ../../../../home/applications/${n}) [
|
||||
++ map (n: ../../../home/applications/${n}) [
|
||||
"fcitx5"
|
||||
"firefox"
|
||||
"foot"
|
Loading…
Reference in a new issue