about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-02-13 11:30:06 -0800
committerFranck Cuny <franck@fcuny.net>2022-02-13 11:30:06 -0800
commited169135af3b36742deb0bca304bfb39425dc26d (patch)
tree547d718277c86e7e34ed4e4fd569454be2e47a55
parenthosts: install linux perf tools for the host (diff)
downloadworld-ed169135af3b36742deb0bca304bfb39425dc26d.tar.gz
sway: first attempt at configuring sway
Let's switch right away to sway instead, now that there's an emacs
package to support wayland.
-rw-r--r--hosts/common/desktop/xserver.nix14
-rw-r--r--users/fcuny/desktop/default.nix2
-rw-r--r--users/fcuny/desktop/sway.nix40
-rw-r--r--users/fcuny/desktop/wofi.nix5
4 files changed, 48 insertions, 13 deletions
diff --git a/hosts/common/desktop/xserver.nix b/hosts/common/desktop/xserver.nix
index 6532aaf..1935e06 100644
--- a/hosts/common/desktop/xserver.nix
+++ b/hosts/common/desktop/xserver.nix
@@ -4,20 +4,12 @@
   services.xserver = {
     enable = true;
     layout = "us";
-    xkbOptions = "eurosign:e,ctrl:swapcaps";
     libinput.enable = true;
 
-    desktopManager = {
-      xterm.enable = false;
-    };
-
     displayManager = {
-      lightdm.enable = true;
-      defaultSession = "none+i3";
-    };
-
-    windowManager = {
-      i3.enable = true;
+      gdm.enable = true;
+      gdm.wayland = true;
+      defaultSession = "sway"
     };
   };
 
diff --git a/users/fcuny/desktop/default.nix b/users/fcuny/desktop/default.nix
index 0b9c0a2..65542e8 100644
--- a/users/fcuny/desktop/default.nix
+++ b/users/fcuny/desktop/default.nix
@@ -4,9 +4,7 @@
   imports = [
     ./browser.nix
     ./gtk.nix
-    ./i3.nix
     ./media.nix
-    ./redshift.nix
     ./terminal.nix
     ./trust
     ./xdg.nix
diff --git a/users/fcuny/desktop/sway.nix b/users/fcuny/desktop/sway.nix
new file mode 100644
index 0000000..0f1631e
--- /dev/null
+++ b/users/fcuny/desktop/sway.nix
@@ -0,0 +1,40 @@
+{ config, lib, pkgs, ... }:
+
+{
+  imorts = [
+    ./swayidle.nix
+    ./wofi.nix
+  ]
+
+  home.packages = with pkgs; [
+    pavucontrol
+    wofi
+    wl-clipboard
+    wf-recorder
+  ];
+
+  home.sessionVariables = {
+    MOZ_ENABLE_WAYLAND = true;
+    LIBSEAT_BACKEND = "logind";
+  };
+
+  wayland.windowManager.sway = {
+    enable = true;
+    systemdIntegration = true;
+    wrapperFeatures.gtk = true;
+    config = rec {
+      modifier = "Mod4";
+      terminal = "${config.programs.alacritty.package}/bin/alacritty";
+      menu = "${pkgs.wofi}/bin/wofi -S run";
+    };
+    defaultWorkspace = "workspace number 1";
+    startup = [
+      # Initial lock
+      { command = "${pkgs.swaylock-effects}/bin/swaylock"; }
+      # Start idle daemon
+      { command = "${pkgs.swayidle}/bin/swayidle -w"; }
+      # Start waybar
+      { command = "${pkgs.waybar}/bin/waybar"; }
+    ];
+  };
+}
diff --git a/users/fcuny/desktop/wofi.nix b/users/fcuny/desktop/wofi.nix
new file mode 100644
index 0000000..efdf3fd
--- /dev/null
+++ b/users/fcuny/desktop/wofi.nix
@@ -0,0 +1,5 @@
+{ pkgs, config, ... }: {
+  home.packages = with pkgs; [
+    wofi
+  ];
+}