summaryrefslogtreecommitdiff
path: root/os/pc/modules/wayland.nix
diff options
context:
space:
mode:
authorsinanmohd <sinan@sinanmohd.com>2025-06-10 15:55:54 +0530
committersinanmohd <sinan@sinanmohd.com>2025-06-10 22:55:04 +0530
commita41037ef644dbacb3d577933fb3d93c210439b38 (patch)
treea262750bcb1357785ad8cb68b232a5ca242ee671 /os/pc/modules/wayland.nix
parentcfccbd1e4026d568e23a47c060ae3ae042cceb4c (diff)
chore(repo): reformat with nixfmt-rfc-style
Diffstat (limited to 'os/pc/modules/wayland.nix')
-rw-r--r--os/pc/modules/wayland.nix34
1 files changed, 20 insertions, 14 deletions
diff --git a/os/pc/modules/wayland.nix b/os/pc/modules/wayland.nix
index 33f25c8..6787e9a 100644
--- a/os/pc/modules/wayland.nix
+++ b/os/pc/modules/wayland.nix
@@ -1,11 +1,12 @@
-{ config, pkgs, ... }: let
+{ config, pkgs, ... }:
+let
user = config.global.userdata.name;
fontSans = config.global.font.sans.name;
fontMonospace = config.global.font.monospace.name;
- fontPackages = config.global.font.monospace.packages
- ++ config.global.font.sans.packages;
-in {
+ fontPackages = config.global.font.monospace.packages ++ config.global.font.sans.packages;
+in
+{
fonts = {
packages = fontPackages;
enableDefaultPackages = true;
@@ -32,7 +33,10 @@ in {
};
systemd.services.swaynag_battery = {
- path = [ pkgs.sway pkgs.systemd ];
+ path = [
+ pkgs.sway
+ pkgs.systemd
+ ];
environment = {
# TODO: don't hardcode them
WAYLAND_DISPLAY = "wayland-1";
@@ -46,19 +50,21 @@ in {
systemctl hibernate
'';
};
- services.udev.extraRules = let
- start = "${pkgs.systemd}/bin/systemctl start swaynag_battery";
- stop = "${pkgs.systemd}/bin/systemctl stop swaynag_battery";
- in ''
- SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", ATTR{capacity}=="[0-9]", RUN+="${start}"
- SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="1", RUN+="${stop}"
- SUBSYSTEM=="power_supply", ATTR{status}=="Charging", RUN+="${stop}"
- '';
+ services.udev.extraRules =
+ let
+ start = "${pkgs.systemd}/bin/systemctl start swaynag_battery";
+ stop = "${pkgs.systemd}/bin/systemctl stop swaynag_battery";
+ in
+ ''
+ SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", ATTR{capacity}=="[0-9]", RUN+="${start}"
+ SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}=="1", RUN+="${stop}"
+ SUBSYSTEM=="power_supply", ATTR{status}=="Charging", RUN+="${stop}"
+ '';
hardware.graphics = {
enable = true;
enable32Bit = true;
};
- security.pam.services.swaylock = {};
+ security.pam.services.swaylock = { };
}