aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nixos/configuration.nix11
-rw-r--r--nixos/nvidia.nix6
-rw-r--r--nixos/services/avahi.service.nix2
-rw-r--r--nixos/services/laptop.preset.nix3
-rw-r--r--nixos/services/logind.service.nix15
-rw-r--r--nixos/services/seatd.service.nix10
6 files changed, 40 insertions, 7 deletions
diff --git a/nixos/configuration.nix b/nixos/configuration.nix
index 7de01f9..1639b76 100644
--- a/nixos/configuration.nix
+++ b/nixos/configuration.nix
@@ -22,9 +22,14 @@
FLAKE = config.myConfigLocation;
GTK_IM_MODULE = lib.mkForce "";
};
+ programs.gamescope = {
+ enable = true;
+ capSysNice = true;
+ };
security.pam.services.hyprlock = {};
i18n.inputMethod = {
- enabled = "fcitx5";
+ type = "fcitx5";
+ enable = true;
fcitx5.addons = with pkgs; [
fcitx5-mozc
fcitx5-gtk
@@ -65,9 +70,7 @@
true; # Open ports in the firewall for Source Dedicated Server
localNetworkGameTransfers.openFirewall =
true; # Open ports in the firewall for Steam Local Network Game Transfers
- gamescopeSession = {
- enable = true;
- };
+ extraCompatPackages = with pkgs; [proton-ge-bin];
};
programs.gamemode.enable = true;
boot = {
diff --git a/nixos/nvidia.nix b/nixos/nvidia.nix
index 72df31b..e28d41e 100644
--- a/nixos/nvidia.nix
+++ b/nixos/nvidia.nix
@@ -24,18 +24,20 @@
};
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = {
+ dynamicBoost.enable = true;
prime = {
offload.enable = false;
sync = {
enable = true;
};
- amdgpuBusId = "PCI:5:0:0";
+ amdgpuBusId = "PCI:6:0:0";
nvidiaBusId = "PCI:1:0:0";
};
forceFullCompositionPipeline = true;
+ powerManagement.enable = true;
modesetting.enable = true;
open = true;
nvidiaSettings = true;
- package = config.boot.kernelPackages.nvidiaPackages.beta;
+ package = config.boot.kernelPackages.nvidiaPackages.latest;
};
}
diff --git a/nixos/services/avahi.service.nix b/nixos/services/avahi.service.nix
index 54bf88c..4187309 100644
--- a/nixos/services/avahi.service.nix
+++ b/nixos/services/avahi.service.nix
@@ -1,7 +1,7 @@
{...}: {
services.avahi = {
enable = true;
- nssmdns = true;
+ nssmdns4 = true;
openFirewall = true;
};
}
diff --git a/nixos/services/laptop.preset.nix b/nixos/services/laptop.preset.nix
index 5b61276..17f72ae 100644
--- a/nixos/services/laptop.preset.nix
+++ b/nixos/services/laptop.preset.nix
@@ -7,5 +7,8 @@
./avahi.service.nix
./printing.service.nix
./tailscale.service.nix
+ ./power_management.service.nix
+ ./seatd.service.nix
+ ./logind.service.nix
];
}
diff --git a/nixos/services/logind.service.nix b/nixos/services/logind.service.nix
new file mode 100644
index 0000000..5b7abb8
--- /dev/null
+++ b/nixos/services/logind.service.nix
@@ -0,0 +1,15 @@
+{
+ pkgs,
+ config,
+ lib,
+ ...
+}: {
+ services.logind.extraConfig = ''
+ # don't shutdown in short press
+ HandlePowerKey=ignore
+ IdleAction=suspend
+
+ # Milliseconds
+ IdleActionSec=600
+ '';
+}
diff --git a/nixos/services/seatd.service.nix b/nixos/services/seatd.service.nix
new file mode 100644
index 0000000..8207217
--- /dev/null
+++ b/nixos/services/seatd.service.nix
@@ -0,0 +1,10 @@
+{
+ pkgs,
+ config,
+ lib,
+ ...
+}: {
+ services.seatd = {
+ enable = true;
+ };
+}