dustbowl: improve sway-systemd-wlsunset integration
This commit is contained in:
parent
12391b0cc9
commit
5cf53bac27
1 changed files with 25 additions and 8 deletions
|
|
@ -119,10 +119,10 @@
|
|||
defaultLocale = "en_US.UTF-8";
|
||||
};
|
||||
|
||||
# Set location (e.g. for redshift)
|
||||
# Set location (for wlsunset)
|
||||
location = {
|
||||
latitude = 1.3766;
|
||||
longitude = 103.8160;
|
||||
latitude = 49.5;
|
||||
longitude = 8.4;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
|
@ -247,8 +247,8 @@
|
|||
serviceConfig = {
|
||||
ExecStart = ''
|
||||
${pkgs.wlsunset}/bin/wlsunset \
|
||||
-l 49.5 \
|
||||
-L 8.4 \
|
||||
-l ${toString config.location.latitude} \
|
||||
-L ${toString config.location.longitude} \
|
||||
-t 2000 \
|
||||
'';
|
||||
RestartSec = 3;
|
||||
|
|
@ -256,14 +256,13 @@
|
|||
};
|
||||
};
|
||||
|
||||
# Hardware
|
||||
|
||||
# Enable sound.
|
||||
sound.enable = true;
|
||||
|
||||
# Bluetooth
|
||||
hardware.bluetooth.enable = true;
|
||||
|
||||
# Enable experimental features in bluetoothd with -E flag
|
||||
systemd.services.bluetooth.serviceConfig.ExecStart =
|
||||
let args = [ "-f" "/etc/bluetooth/main.conf" "-E" ];
|
||||
in lib.mkForce [ "" "${config.hardware.bluetooth.package}/libexec/bluetooth/bluetoothd ${lib.escapeShellArgs args}" ];
|
||||
|
|
@ -288,7 +287,25 @@
|
|||
};
|
||||
|
||||
# Sway
|
||||
programs.sway.enable = true;
|
||||
programs.sway = {
|
||||
extraSessionCommands = ''
|
||||
export XCURSOR_THEME=Adwaita
|
||||
'';
|
||||
wrapperFeatures.gtk = true;
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# Sway systemd integration
|
||||
# https://wiki.archlinux.org/title/Sway#Manage_Sway-specific_daemons_with_systemd
|
||||
systemd.user.targets.sway-session = {
|
||||
description = "Sway compositor session";
|
||||
bindsTo = [ "graphical-session.target" ];
|
||||
wants = [ "graphical-session-pre.target" ];
|
||||
after = [ "graphical-session-pre.target" ];
|
||||
};
|
||||
environment.etc."sway/config.d/systemd.conf".source = pkgs.writeText "systemd.conf" ''
|
||||
exec_always "systemctl --user start sway-session.target"
|
||||
'';
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue