diff --git a/flake.nix b/flake.nix index 8aabbf8..e7bcadf 100644 --- a/flake.nix +++ b/flake.nix @@ -65,7 +65,6 @@ specialArgs = {inherit inputs;}; modules = [ ./hosts/JWST/configuration.nix - ./modules/sway.nix nixos-hardware.nixosModules.dell-xps-15-9520 nixos-hardware.nixosModules.common-gpu-nvidia-disable { nixpkgs.overlays = overlays; } diff --git a/hosts/JWST/configuration.nix b/hosts/JWST/configuration.nix index ccc317d..5e7b78a 100644 --- a/hosts/JWST/configuration.nix +++ b/hosts/JWST/configuration.nix @@ -92,12 +92,12 @@ brightnessctl ]; - # programs.sway.enable = true; - # programs.sway.extraPackages = with pkgs; [ - # swaylock - # swayidle - # brightnessctl - # ]; + programs.sway.enable = true; + programs.sway.extraPackages = with pkgs; [ + swaylock + swayidle + brightnessctl + ]; # programs.waybar.enable = true; # programs.nm-applet.enable = true; diff --git a/modules/sway.nix b/modules/sway.nix deleted file mode 100644 index a1d5b9c..0000000 --- a/modules/sway.nix +++ /dev/null @@ -1,63 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: let - # bash script to let dbus know about important env variables and - # propagate them to relevent services run at the end of sway config - # see - # https://github.com/emersion/xdg-desktop-portal-wlr/wiki/"It-doesn't-work"-Troubleshooting-Checklist - # note: this is pretty much the same as /etc/sway/config.d/nixos.conf but also restarts - # some user services to make sure they have the correct environment variables - dbus-sway-environment = pkgs.writeTextFile { - name = "dbus-sway-environment"; - destination = "/bin/dbus-sway-environment"; - executable = true; - - text = '' - dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway - systemctl --user stop pipewire xdg-desktop-portal xdg-desktop-portal-wlr xdg-desktop-portal-gtk - systemctl --user start pipewire xdg-desktop-portal xdg-desktop-portal-wlr xdg-desktop-portal-gtk - ''; - }; - - # currently, there is some friction between sway and gtk: - # https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland - # the suggested way to set gtk settings is with gsettings - # for gsettings to work, we need to tell it where the schemas are - # using the XDG_DATA_DIR environment variable - # run at the end of sway config - configure-gtk = pkgs.writeTextFile { - name = "configure-gtk"; - destination = "/bin/configure-gtk"; - executable = true; - text = let - schema = pkgs.gsettings-desktop-schemas; - datadir = "${schema}/share/gsettings-schemas/${schema.name}"; - in '' - export XDG_DATA_DIRS=${datadir}:$XDG_DATA_DIRS - gnome_schema=org.gnome.desktop.interface - # gsettings set $gnome_schema gtk-theme 'Dracula' - ''; - }; -in { - # environment.systemPackages = [ - # dbus-sway-environment - # configure-gtk - # ]; - - # enable sway window manager - programs.sway = { - enable = true; - wrapperFeatures.gtk = true; - extraPackages = with pkgs; [ - dbus-sway-environment - configure-gtk - swaylock - swayidle - brightnessctl - ]; - }; - # programs.waybar.enable = true; -} diff --git a/users/tacocat/helix/languages.nix b/users/tacocat/helix/languages.nix index f8594a6..a6b8031 100644 --- a/users/tacocat/helix/languages.nix +++ b/users/tacocat/helix/languages.nix @@ -44,10 +44,10 @@ texlab = { command = "${pkgs.texlab}/bin/texlab"; config.texlab = { - forwardSearch.executable = lib.getExe pkgs.zathura; + forwardSearch.executable = "${pkgs.zathura}"; forwardSearch.args = ["--synctex-forward" "%l:1:%f"]; build = { - executable = lib.getExe pkgs.tectonic; + executable = "${pkgs.tectonic}/bin/tectonic"; onSave = true; auxDirectory = "build"; logDirectory = "build"; diff --git a/users/tacocat/wayland/default.nix b/users/tacocat/wayland/default.nix index 751eb50..1f07dc8 100644 --- a/users/tacocat/wayland/default.nix +++ b/users/tacocat/wayland/default.nix @@ -21,10 +21,6 @@ xdg.configFile."sway/background.jpg".source = ../background.jpg; - # wayland.windowManager.sway = { - # enable = true; - # }; - home.packages = with pkgs; [ wl-clipboard # swaylock diff --git a/users/tacocat/wayland/sway/config b/users/tacocat/wayland/sway/config index 3994c7e..8a8e620 100755 --- a/users/tacocat/wayland/sway/config +++ b/users/tacocat/wayland/sway/config @@ -1,13 +1,13 @@ # Default config for sway +include ~/.config/sway/config.d/* +include /etc/sway/config.d/* + # # Copy this to ~/.config/sway/config and edit it to your liking. # # Read `man 5 sway` for a complete reference. -exec dbus-sway-environment -# exec configure-gtk - ### Variables # # Logo key. Use Mod1 for Alt. @@ -53,6 +53,7 @@ client.unfocused $unfocus $unfocus $unfocus $unfocus # Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/) output * bg ~/.config/sway/background.jpg fill +bar swaybar_command waybar # # Example configuration: # @@ -236,23 +237,20 @@ bindsym $mod+r mode "resize" # # Status Bar: -bar { - - swaybar_command swaybar # # Read `man 5 sway-bar` for more information about this section. - position top +# position top # # When the status_command prints a new line to stdout, swaybar updates. # # The default just shows the current date and time. - status_command while date +'%Y-%m-%d %I:%M:%S %p'; do sleep 1; done +# status_command while date +'%Y-%m-%d %I:%M:%S %p'; do sleep 1; done - colors { - statusline #ffffff - background #323232 - inactive_workspace #32323200 #32323200 #5c5c5c - } - } +# colors { +# statusline #ffffff +# background #323232 +# inactive_workspace #32323200 #32323200 #5c5c5c +# } +# } # # Player @@ -280,9 +278,4 @@ bar { # SwayFX # blur on -xwayland enable - - -# include /etc/sway/config.d/* - -include ~/.config/sway/config.d/* +# xwayland enable diff --git a/users/tacocat/wayland/sway/config.d/autostart b/users/tacocat/wayland/sway/config.d/autostart index 4e8dcb8..ef2e24b 100755 --- a/users/tacocat/wayland/sway/config.d/autostart +++ b/users/tacocat/wayland/sway/config.d/autostart @@ -1,7 +1,7 @@ exec nm-applet +# exec waybar exec gammastep-indicator exec dunst -# exec waybar #exec swayidle -w \ # timeout 600 'swaylock -f -c 14171d' \ # before-sleep 'swaylock -f -c 14171d' diff --git a/users/tacocat/wayland/waybar/default.nix b/users/tacocat/wayland/waybar/default.nix index 99eafaa..0dd7995 100644 --- a/users/tacocat/wayland/waybar/default.nix +++ b/users/tacocat/wayland/waybar/default.nix @@ -2,7 +2,6 @@ programs.waybar = { enable = true; style = ./style.css; - # systemd.enable = true; settings = { mainBar = { layer = "top";