diff --git a/modules/applications/default.nix b/modules/applications/default.nix index a1a2f93..cc37767 100644 --- a/modules/applications/default.nix +++ b/modules/applications/default.nix @@ -14,6 +14,5 @@ ./zeal.nix ./i3 - ./sway ]; } diff --git a/modules/applications/dunst.nix b/modules/applications/dunst.nix index 6d6887c..7f2d48c 100644 --- a/modules/applications/dunst.nix +++ b/modules/applications/dunst.nix @@ -1,13 +1,12 @@ { options, config, lib, pkgs, ... }: let cfg = config.this.application.dunst; - sway = config.this.application.sway; i3 = config.this.application.i3; graphical = config.this.graphical; in with lib; { options = { this.application.dunst.enable = mkOption { - default = i3.enable || sway.enable; + default = i3.enable; type = with types; bool; }; }; @@ -81,7 +80,7 @@ in with lib; { systemd.user.services.dunst = { enable = true; description = "Notifications "; - wantedBy = [ "sway-session.target" ]; + wantedBy = [ "i3-session.target" ]; partOf = [ "graphical-session.target" ]; serviceConfig = { ExecStart = "${pkgs.dunst}/bin/dunst"; diff --git a/modules/applications/firefox.nix b/modules/applications/firefox.nix index a1b1b1d..dcda96b 100644 --- a/modules/applications/firefox.nix +++ b/modules/applications/firefox.nix @@ -2,7 +2,6 @@ let cfg = config.this.application.firefox; graphical = config.this.graphical; - sway_cfg = config.this.application.sway; in with lib; { options = { this.application.firefox.enable = mkOption { @@ -18,12 +17,8 @@ in with lib; { home-manager.users.james = { programs.firefox = { enable = true; - package = pkgs.firefox.override { - cfg = { - enableTridactylNative = true; - forceWayland = sway_cfg.enable; - }; - }; + package = + pkgs.firefox.override { cfg = { enableTridactylNative = true; }; }; extensions = with pkgs.nur.repos.rycee.firefox-addons; [ https-everywhere diff --git a/modules/applications/gammastep.nix b/modules/applications/gammastep.nix index 769648d..766d8c2 100644 --- a/modules/applications/gammastep.nix +++ b/modules/applications/gammastep.nix @@ -1,12 +1,11 @@ { options, config, lib, pkgs, ... }: let cfg = config.this.application.gammastep; - sway = config.this.application.sway; i3 = config.this.application.i3; in with lib; { options = { this.application.gammastep.enable = mkOption { - default = i3.enable || sway.enable; + default = i3.enable; type = with types; bool; }; }; @@ -25,7 +24,7 @@ in with lib; { systemd.user.services.gammastep = { enable = true; description = "Nightly color shifting"; - wantedBy = [ "sway-session.target" "i3-session.target" ]; + wantedBy = [ "i3-session.target" ]; partOf = [ "graphical-session.target" ]; serviceConfig = { ExecStart = '' diff --git a/modules/applications/sway/default.nix b/modules/applications/sway/default.nix deleted file mode 100644 index d07721e..0000000 --- a/modules/applications/sway/default.nix +++ /dev/null @@ -1 +0,0 @@ -{ config, pkgs, ... }: { imports = [ ./sway.nix ./mako.nix ./waybar.nix ]; } diff --git a/modules/applications/sway/mako.nix b/modules/applications/sway/mako.nix deleted file mode 100644 index 4c8250f..0000000 --- a/modules/applications/sway/mako.nix +++ /dev/null @@ -1,65 +0,0 @@ -{ options, config, lib, pkgs, ... }: -let - cfg = config.this.application.mako; - sway = config.this.application.sway; -in with lib; { - options = { - this.application.mako.enable = mkOption { - default = false; - type = with types; bool; - description = "testing one two three"; - }; - }; - - config = mkIf cfg.enable { - home-manager.users.james = { - systemd.user.startServices = true; - programs.mako = { - enable = true; - width = 450; - padding = "20,20"; - backgroundColor = "#161720ee"; - borderColor = "#12151a"; - textColor = "#d6e5fb"; - defaultTimeout = 8000; - progressColor = "over #d6e5fb"; - layer = "overlay"; - groupBy = "summary"; - extraConfig = '' - [hidden] - background-color=#bfbfbfff - format=+ %h - - [urgency=high] - background-color=#1f212eee - border-color=#f0185a00 - text-color=#f0185a - ignore-timeout=true - default-timeout=0 - - [!expiring] - background-color=#555555ff - text-color=#eeeeeeff - - [grouped] - format=%s ✖ %g\n%b - ''; - }; - - home.packages = with pkgs; [ libnotify ]; - }; - systemd.user.services.mako = { - enable = true; - description = "Mako foo"; - wantedBy = [ "sway-session.target" ]; - partOf = [ "graphical-session.target" ]; - serviceConfig = { - ExecStart = '' - ${pkgs.mako}/bin/mako - ''; - RestartSec = 5; - Restart = "always"; - }; - }; - }; -} diff --git a/modules/applications/sway/sway.nix b/modules/applications/sway/sway.nix deleted file mode 100644 index 24e88f1..0000000 --- a/modules/applications/sway/sway.nix +++ /dev/null @@ -1,168 +0,0 @@ -{ config, lib, pkgs, ... }: -let - cfg = config.this.application.sway; - power = config.this.system.power; - graphical = config.this.graphical; - modifier = "Mod4"; - wallpaper = pkgs.fetchurl { - url = - "https://raw.githubusercontent.com/catppuccin/wallpapers/main/landscapes/evening-sky.png"; - sha256 = "sha256-fYMzoY3un4qGOSR4DMqVUAFmGGil+wUze31rLLrjcAc="; - }; - -in with lib; { - options = { - this.application.sway.enable = mkOption { - default = false; - type = with types; bool; - }; - }; - - config = mkIf cfg.enable { - home-manager.users.james = { - home.sessionVariables = { XDG_CURRENT_DESKTOP = "sway"; }; - systemd.user.sessionVariables = { XDG_CURRENT_DESKTOP = "sway"; }; - wayland.windowManager.sway = { - enable = true; - package = null; - wrapperFeatures.gtk = true; - config = { - # bars = [ ]; - colors = { - focusedInactive = { - background = "#1E1E2E"; - border = "#1E1E2E"; - childBorder = "#1E1E2E"; - indicator = "#1E1E2E"; - text = "#C9CBFF"; - }; - unfocused = { - background = "#1E1E2E"; - border = "#1E1E2E"; - childBorder = "#1E1E2E"; - indicator = "#1E1E2E"; - text = "#C9CBFF"; - }; - focused = { - background = "#131020"; - border = "#131020"; - childBorder = "#131020"; - indicator = "#131020"; - text = "#ABE9B3"; - }; - urgent = { - background = "#F28FAD"; - border = "#F28FAD"; - childBorder = "#F28FAD"; - indicator = "#F28FAD"; - text = "#ABE9B3"; - }; - }; - fonts = { - names = [ "Alegreya" "FontAwesome" ]; - size = 9.0; - }; - input = { - "1133:45079:MX_Master_Mouse" = { - natural_scroll = "enable"; - accel_profile = "adaptive"; - pointer_accel = "-0.3"; - }; - "1:1:AT_Translated_Set_2_keyboard" = { - xkb_options = "ctrl:nocaps"; - }; - "2:7:SynPS/2_Synaptics_TouchPad" = { - dwt = "enabled"; - click_method = "clickfinger"; - natural_scroll = "enabled"; - middle_emulation = "enabled"; - }; - }; - gaps = { - inner = 5; - outer = 2; - }; - # And import and scripts as scene here would be good. - keybindings = mkOptionDefault { - "${modifier}+q" = "kill"; - "${modifier}+d" = "focus mode_toggle"; - "${modifier}+a" = "focus parent"; - "${modifier}+shift+s" = "sticky toggle"; - "${modifier}+shift+f" = "floating toggle"; - "${modifier}+space" = - "exec $(${pkgs.dmenu}/bin/dmenu_path | ${pkgs.dmenu}/bin/dmenu)"; - Pause = "exec ${pkgs.playerctl}/bin/playerctl play-pause"; - XF86AudioLowerVolume = "exec ${pkgs.volume-sh}/bin/volume.sh down"; - XF86AudioMute = "exec ${pkgs.volume-sh}/bin/volume.sh mute"; - XF86AudioRaiseVolume = "exec ${pkgs.volume-sh}/bin/volume.sh up"; - XF86MonBrightnessDown = - "exec ${pkgs.brightness-sh}/bin/brightness.sh down"; - XF86MonBrightnessUp = - "exec ${pkgs.brightness-sh}/bin/brightness.sh up"; - }; - # https://github.com/gytis-ivaskevicius/nixfiles/blob/master/home-manager/i3-sway.nix - modifier = "Mod4"; - output = { "eDP-1" = { bg = "${wallpaper} fill"; }; }; - terminal = "${pkgs.kitty}/bin/kitty"; - # https://rycee.gitlab.io/home-manager/options.html#opt-wayland.windowManager.sway.config.window.commands - # window = { }; - startup = [{ command = "${pkgs.autotiling}/bin/autotiling"; }]; - }; - }; - - home.packages = with pkgs; [ - autotiling - brightness-sh - dmenu - grim - imagemagick - playerctl - slurp - sway-entry - swayidle - swaylock - volume-sh - wl-clipboard - wofi - ]; - }; - - programs.light.enable = true; - programs.sway = { - enable = true; - wrapperFeatures.gtk = true; - }; - - systemd.user = { - targets.sway-session = { - description = "Sway compositor session"; - documentation = [ "man:systemd.special(7)" ]; - bindsTo = [ "graphical-session.target" ]; - wants = [ "graphical-session-pre.target" ]; - after = [ "graphical-session-pre.target" ]; - }; - services.sway = { - enable = true; - description = "Sway - Wayland window manager"; - documentation = [ "man:sway(5)" ]; - bindsTo = [ "default.target" ]; - wants = [ "graphical-session-pre.target" ]; - after = [ "graphical-session-pre.target" ]; - environment.PATH = lib.mkForce null; - serviceConfig = { - Type = "simple"; - ExecStart = - "${pkgs.dbus}/bin/dbus-run-session ${pkgs.sway}/bin/sway --debug"; - ExecStopPost = - "/usr/bin/env systemctl --user unset-environment SWAYSOCK DISPLAY I3SOCK WAYLAND_DISPLAY"; - NotifyAccess = "all"; - Restart = "on-failure"; - RestartSec = 1; - TimeoutStopSec = 10; - }; - }; - }; - - users.users.james.extraGroups = [ "video" "audio" ]; - }; -} diff --git a/modules/applications/sway/waybar.nix b/modules/applications/sway/waybar.nix deleted file mode 100644 index 5ab28c3..0000000 --- a/modules/applications/sway/waybar.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ options, config, lib, pkgs, ... }: -let - cfg = config.this.application.waybar; - sway_cfg = config.this.application.sway; -in with lib; { - options = { - this.application.waybar.enable = mkOption { - default = sway_cfg.enable; - type = with types; bool; - description = "testing one two three"; - }; - }; - - config = mkIf cfg.enable { - home-manager.users.james = { home.packages = with pkgs; [ waybar ]; }; - }; -} diff --git a/pkgs/default.nix b/pkgs/default.nix index 7e4ab7f..b3ceae3 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,6 +1,5 @@ self: super: { brightness-sh = super.callPackage ./brightness.nix { inherit super; }; battery-notify = super.callPackage ./battery-notify.nix { inherit super; }; - sway-entry = super.callPackage ./sway-entry.nix { inherit super; }; volume-sh = super.callPackage ./volume.nix { inherit super; }; } diff --git a/pkgs/sway-entry.nix b/pkgs/sway-entry.nix deleted file mode 100644 index d66ecb2..0000000 --- a/pkgs/sway-entry.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ pkgs, ... }: -let -in pkgs.writeShellScriptBin "sway-entry" '' - #! ${pkgs.bash}/bin/bash - - # first import environment variables from the login manager - # function is currently deprecated. It should be rolled back in the future - systemctl --user import-environment - - # then start the service - exec systemctl --user start sway.service -''