diff options
author | Mark Nipper <nipsy@bitgnome.net> | 2025-06-28 15:45:32 -0700 |
---|---|---|
committer | Mark Nipper <nipsy@bitgnome.net> | 2025-06-28 15:45:32 -0700 |
commit | 01329351e57a86a61853ec995826cfcef42ba324 (patch) | |
tree | 5be20109dd322e84dba8fc529f434c35855cf37e /hosts/common/optional/services/wayland.nix | |
parent | 634599f87964d201052902cb840f039a65560ac5 (diff) | |
download | nix-01329351e57a86a61853ec995826cfcef42ba324.tar nix-01329351e57a86a61853ec995826cfcef42ba324.tar.gz nix-01329351e57a86a61853ec995826cfcef42ba324.tar.bz2 nix-01329351e57a86a61853ec995826cfcef42ba324.tar.lz nix-01329351e57a86a61853ec995826cfcef42ba324.tar.xz nix-01329351e57a86a61853ec995826cfcef42ba324.tar.zst nix-01329351e57a86a61853ec995826cfcef42ba324.zip |
Switch to Wayland and sway @caladan
Diffstat (limited to '')
-rw-r--r-- | hosts/common/optional/services/wayland.nix | 117 |
1 files changed, 117 insertions, 0 deletions
diff --git a/hosts/common/optional/services/wayland.nix b/hosts/common/optional/services/wayland.nix new file mode 100644 index 0000000..53bf6db --- /dev/null +++ b/hosts/common/optional/services/wayland.nix @@ -0,0 +1,117 @@ +{ config, lib, pkgs, ... }: +{ + environment.systemPackages = [ + pkgs.chafa + pkgs.evince + pkgs.feh + pkgs.gcr + pkgs.geeqie + pkgs.ghostty + pkgs.gimp + #pkgs.gimp-with-plugins + pkgs.google-chrome + pkgs.grim + pkgs.gv + pkgs.inkscape + pkgs.kdePackages.okular + pkgs.libreoffice + pkgs.libva-utils + pkgs.mako + pkgs.mesa-demos + pkgs.mpv + pkgs.polkit_gnome + pkgs.rdesktop + pkgs.read-edid + pkgs.slurp + pkgs.st + pkgs.sxiv + pkgs.tigervnc + pkgs.turbovnc + pkgs.vdpauinfo + pkgs.vlc + pkgs.vulkan-tools + pkgs.wireshark + pkgs.wl-clipboard + pkgs.x11vnc + pkgs.xclip + pkgs.xdotool + pkgs.xorg.appres + pkgs.xorg.editres + pkgs.xorg.xdpyinfo + pkgs.xorg.xev + pkgs.xscreensaver + pkgs.xsnow + pkgs.xterm + ]; + + programs = { + firefox = { + enable = true; + package = pkgs.master.firefox; + }; + + sway = { + enable = true; + wrapperFeatures.gtk = true; + }; + + waybar.enable = true; + }; + + services.greetd = { + enable = true; + settings = { + default_session = { + command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd sway"; + user = "greeter"; + }; + }; + }; + + security = { + pam.loginLimits = [ + { domain = "@users"; item = "rtprio"; type = "-"; value = 1; } + ]; + + polkit = { + enable = true; + extraConfig = '' + polkit.addRule(function(action, subject) { + if ( + subject.isInGroup("users") + && ( + action.id == "org.freedesktop.login1.reboot" || + action.id == "org.freedesktop.login1.reboot-multiple-sessions" || + action.id == "org.freedesktop.login1.power-off" || + action.id == "org.freedesktop.login1.power-off-multiple-sessions" + ) + ) + { + return polkit.Result.YES; + } + }) + ''; + }; + }; + + services = { + blueman.enable = true; + libinput.enable = true; + printing.enable = true; + + systemd = { + user.services.polkit-gnome-authentication-agent-1 = { + description = "polkit-gnome-authentication-agent-1"; + wantedBy = [ "graphical-session.target" ]; + wants = [ "graphical-session.target" ]; + after = [ "graphical-session.target" ]; + serviceConfig = { + Type = "simple"; + ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + }; +} |