67 lines
1.7 KiB
Nix
67 lines
1.7 KiB
Nix
{ config, pkgs, lib, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
dbus-sway-environment = pkgs.writeTextFile {
|
|
name = "dbus-sway-environment";
|
|
destination = "/bin/dbus-sway-environment";
|
|
executable = true;
|
|
|
|
text = ''
|
|
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
|
|
systemctl --user stop pipewire pipewire-media-session xdg-desktop-portal xdg-desktop-portal-wlr
|
|
systemctl --user start pipewire pipewire-media-session xdg-desktop-portal xdg-desktop-portal-wlr
|
|
systemctl --user import-environment DISPLAY
|
|
export GDK_BACKEND=x11
|
|
export STEAM_RUNTIME=0
|
|
'';
|
|
};
|
|
|
|
|
|
sway-conf = builtins.readFile ./sway.conf + ''
|
|
exec swaybg -m center -c 252525 -i ~/.wallpaper.png
|
|
'';
|
|
in {
|
|
environment.systemPackages = with pkgs; [
|
|
dbus-sway-environment
|
|
rofi-rbw-wayland
|
|
swaybg
|
|
sway-launcher-desktop
|
|
swayidle
|
|
swaylock
|
|
waybar
|
|
wayland
|
|
wofi
|
|
];
|
|
|
|
programs.sway = {
|
|
enable = true;
|
|
wrapperFeatures.gtk = true;
|
|
extraOptions = [
|
|
"--unsupported-gpu"
|
|
];
|
|
};
|
|
|
|
environment.etc = {
|
|
"sway/config".text = sway-conf;
|
|
"wofi/style.css".text = builtins.readFile ./wofi.css;
|
|
"xdg/waybar/config".text = builtins.readFile ./waybar.conf;
|
|
"xdg/waybar/style.css".text = builtins.readFile ./waybar.css;
|
|
"xdg/foot/foot.ini".text = builtins.readFile ./foot.ini;
|
|
|
|
# dark mode
|
|
"xdg/gtk-2.0/gtkrc".text = "gtk-error-bell=0";
|
|
"xdg/gtk-3.0/settings.ini".text = ''
|
|
[Settings]
|
|
gtk-error-bell=false
|
|
gtk-application-prefer-dark-theme=1
|
|
'';
|
|
"xdg/gtk-4.0/settings.ini".text = ''
|
|
[Settings]
|
|
gtk-error-bell=false
|
|
gtk-application-prefer-dark-theme=1
|
|
'';
|
|
};
|
|
}
|