about summary refs log tree commit diff
path: root/users/fcuny/desktop/sway.nix
diff options
context:
space:
mode:
Diffstat (limited to 'users/fcuny/desktop/sway.nix')
-rw-r--r--users/fcuny/desktop/sway.nix40
1 files changed, 40 insertions, 0 deletions
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"; }
+    ];
+  };
+}