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";
|
defaultLocale = "en_US.UTF-8";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Set location (e.g. for redshift)
|
# Set location (for wlsunset)
|
||||||
location = {
|
location = {
|
||||||
latitude = 1.3766;
|
latitude = 49.5;
|
||||||
longitude = 103.8160;
|
longitude = 8.4;
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
|
@ -247,8 +247,8 @@
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = ''
|
ExecStart = ''
|
||||||
${pkgs.wlsunset}/bin/wlsunset \
|
${pkgs.wlsunset}/bin/wlsunset \
|
||||||
-l 49.5 \
|
-l ${toString config.location.latitude} \
|
||||||
-L 8.4 \
|
-L ${toString config.location.longitude} \
|
||||||
-t 2000 \
|
-t 2000 \
|
||||||
'';
|
'';
|
||||||
RestartSec = 3;
|
RestartSec = 3;
|
||||||
|
|
@ -256,14 +256,13 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Hardware
|
|
||||||
|
|
||||||
# Enable sound.
|
# Enable sound.
|
||||||
sound.enable = true;
|
sound.enable = true;
|
||||||
|
|
||||||
# Bluetooth
|
# Bluetooth
|
||||||
hardware.bluetooth.enable = true;
|
hardware.bluetooth.enable = true;
|
||||||
|
|
||||||
|
# Enable experimental features in bluetoothd with -E flag
|
||||||
systemd.services.bluetooth.serviceConfig.ExecStart =
|
systemd.services.bluetooth.serviceConfig.ExecStart =
|
||||||
let args = [ "-f" "/etc/bluetooth/main.conf" "-E" ];
|
let args = [ "-f" "/etc/bluetooth/main.conf" "-E" ];
|
||||||
in lib.mkForce [ "" "${config.hardware.bluetooth.package}/libexec/bluetooth/bluetoothd ${lib.escapeShellArgs args}" ];
|
in lib.mkForce [ "" "${config.hardware.bluetooth.package}/libexec/bluetooth/bluetoothd ${lib.escapeShellArgs args}" ];
|
||||||
|
|
@ -288,7 +287,25 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
# Sway
|
# 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 = {
|
xdg.portal = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue