summaryrefslogtreecommitdiff
path: root/machines
diff options
context:
space:
mode:
Diffstat (limited to 'machines')
-rw-r--r--machines/common/base.nix2
-rw-r--r--machines/common/x11.nix23
-rw-r--r--machines/magician/configuration.nix28
3 files changed, 50 insertions, 3 deletions
diff --git a/machines/common/base.nix b/machines/common/base.nix
index 46c82d9..4146d98 100644
--- a/machines/common/base.nix
+++ b/machines/common/base.nix
@@ -3,6 +3,8 @@
enable = true;
};
+ security.polkit.enable = true;
+
nix.settings.experimental-features = [
"nix-command"
"flakes"
diff --git a/machines/common/x11.nix b/machines/common/x11.nix
index ed2084a..7fca346 100644
--- a/machines/common/x11.nix
+++ b/machines/common/x11.nix
@@ -1,4 +1,25 @@
-{...}: {
+{pkgs, ...}: {
+ environment.systemPackages = [pkgs.brightnessctl];
+
+ # brightness keys, handled at the evdev level so they work in any WM
+ services.actkbd = {
+ enable = true;
+ bindings = [
+ {
+ # XF86MonBrightnessUp
+ keys = [225];
+ events = ["key"];
+ command = "${pkgs.brightnessctl}/bin/brightnessctl set 5%+";
+ }
+ {
+ # XF86MonBrightnessDown
+ keys = [224];
+ events = ["key"];
+ command = "${pkgs.brightnessctl}/bin/brightnessctl set 5%-";
+ }
+ ];
+ };
+
services.displayManager.ly = {
enable = true;
x11Support = true;
diff --git a/machines/magician/configuration.nix b/machines/magician/configuration.nix
index 01734eb..6f085c5 100644
--- a/machines/magician/configuration.nix
+++ b/machines/magician/configuration.nix
@@ -7,6 +7,24 @@
services.upower.enable = true;
+ swapDevices = [{
+ device = "/var/lib/swapfile";
+ size = 16*1024; # 16 GB
+ }];
+
+ services.tlp = {
+ enable = true;
+ settings = {
+ CPU_SCALING_GOVERNOR_ON_AC = "performance";
+ CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
+ };
+ };
+
+ hardware.bluetooth = {
+ enable = true;
+ powerOnBoot = true;
+ };
+
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
@@ -21,11 +39,17 @@
xrandr --output eDP-1 --mode 2880x1920 --rate 120.00
'';
- services.xserver.dpi = 192;
+ services.xserver.dpi = 168;
networking.hostName = "magician";
- services.libinput.enable = true;
+ services.libinput = {
+ enable = true;
+ mouse.tapping = false;
+ # No bottom-right corner right-click; use two-finger click instead.
+ touchpad.clickMethod = "clickfinger";
+ touchpad.naturalScrolling = true;
+ };
# This option defines the first version of NixOS you have installed on this particular machine,
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.