aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hosts/caladan/default.nix3
-rw-r--r--hosts/common/optional/services/wayland.nix117
2 files changed, 119 insertions, 1 deletions
diff --git a/hosts/caladan/default.nix b/hosts/caladan/default.nix
index 0ff9b33..0010569 100644
--- a/hosts/caladan/default.nix
+++ b/hosts/caladan/default.nix
@@ -69,7 +69,8 @@
../common/optional/sdr.nix
../common/optional/services/chrony.nix
../common/optional/services/openssh.nix
- ../common/optional/services/xorg.nix
+ ../common/optional/services/wayland.nix
+ #../common/optional/services/xorg.nix
../common/optional/sound.nix
../common/optional/wdt.nix
../common/optional/zfs.nix
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;
+ };
+ };
+ };
+}