From c757a97296b98155ed105d30ae3b82449935d9bf Mon Sep 17 00:00:00 2001 From: Michael Thomson Date: Fri, 18 Apr 2025 16:44:25 -0400 Subject: [PATCH] update: sway and mathpix --- hosts/thinkpad/configuration.nix | 3 ++- hosts/thinkpad/home.nix | 4 +++- modules/home-manager/emacs/default.nix | 1 + modules/home-manager/sway.nix | 27 ++++++++++++++++++++++++++ modules/nixos/sway.nix | 5 +++++ result | 1 + 6 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 modules/home-manager/sway.nix create mode 100644 modules/nixos/sway.nix create mode 120000 result diff --git a/hosts/thinkpad/configuration.nix b/hosts/thinkpad/configuration.nix index 7b54e91..9424abb 100644 --- a/hosts/thinkpad/configuration.nix +++ b/hosts/thinkpad/configuration.nix @@ -16,7 +16,8 @@ ../../modules/nixos/user.nix ../../modules/nixos/ssh.nix ../../modules/nixos/bluetooth.nix - ../../modules/nixos/hyprland.nix + #../../modules/nixos/hyprland.nix + ../../modules/nixos/sway.nix ../../modules/nixos/nm.nix ../../modules/nixos/sound.nix ../../modules/nixos/steam.nix diff --git a/hosts/thinkpad/home.nix b/hosts/thinkpad/home.nix index a27506d..dc561b2 100644 --- a/hosts/thinkpad/home.nix +++ b/hosts/thinkpad/home.nix @@ -4,7 +4,8 @@ ... }: { imports = [ - ../../modules/home-manager/hyprland.nix + #../../modules/home-manager/hyprland.nix + ../../modules/home-manager/sway.nix ../../modules/home-manager/git.nix ../../modules/home-manager/nixvim.nix ../../modules/home-manager/kitty.nix @@ -22,6 +23,7 @@ ../../modules/home-manager/lazygit.nix ../../modules/home-manager/man.nix ../../modules/home-manager/gpg.nix + ../../modules/home-manager/emacs ]; home.username = "mthomson"; home.homeDirectory = "/home/mthomson"; diff --git a/modules/home-manager/emacs/default.nix b/modules/home-manager/emacs/default.nix index df051a3..3726d6b 100644 --- a/modules/home-manager/emacs/default.nix +++ b/modules/home-manager/emacs/default.nix @@ -13,6 +13,7 @@ typescript-language-server typescript nodejs + mathpix-snipping-tool ]; programs.emacs = { diff --git a/modules/home-manager/sway.nix b/modules/home-manager/sway.nix new file mode 100644 index 0000000..8bbc748 --- /dev/null +++ b/modules/home-manager/sway.nix @@ -0,0 +1,27 @@ +{ +pkgs, +config, +lib, +... +}: { + services.gnome-keyring.enable = true; + wayland.windowManager.sway = { + enable = true; + wrapperFeatures.gtk = true; # Fixes common issues with GTK 3 apps + config = rec { + modifier = "Mod4"; + # Use kitty as default terminal + terminal = "kitty"; + startup = [ + # Launch Firefox on start + {command = "firefox";} + ]; + }; + }; + + services = { + dunst = { + enable = true; + }; + }; +} diff --git a/modules/nixos/sway.nix b/modules/nixos/sway.nix new file mode 100644 index 0000000..bb2f697 --- /dev/null +++ b/modules/nixos/sway.nix @@ -0,0 +1,5 @@ +{ pkgs, inputs, ... }: + +{ + security.polkit.enable = true; +} diff --git a/result b/result new file mode 120000 index 0000000..e5faef8 --- /dev/null +++ b/result @@ -0,0 +1 @@ +/nix/store/z7hnmxvi31i682y1dz47m4k3ssa390w6-nixos-system-thinkpad-25.05.20250412.2631b0b \ No newline at end of file