Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4a7cdf4be2b2
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f319c7fc89c6
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Nov 3, 2018

  1. sway-beta module: add missing pieces

    gnidorah committed Nov 3, 2018
    Copy the full SHA
    15c2fb7 View commit details

Commits on Nov 4, 2018

  1. Merge pull request #49687 from gnidorah/sway

    sway-beta module: add missing pieces
    primeos authored Nov 4, 2018

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f319c7f View commit details
Showing with 29 additions and 4 deletions.
  1. +29 −4 nixos/modules/programs/sway-beta.nix
33 changes: 29 additions & 4 deletions nixos/modules/programs/sway-beta.nix
Original file line number Diff line number Diff line change
@@ -5,6 +5,15 @@ with lib;
let
cfg = config.programs.sway-beta;
swayPackage = cfg.package;

swayWrapped = pkgs.writeShellScriptBin "sway" ''
${cfg.extraSessionCommands}
exec ${pkgs.dbus.dbus-launch} --exit-with-session ${swayPackage}/bin/sway
'';
swayJoined = pkgs.symlinkJoin {
name = "sway-joined";
paths = [ swayWrapped swayPackage ];
};
in {
options.programs.sway-beta = {
enable = mkEnableOption ''
@@ -20,13 +29,30 @@ in {
'';
};

extraSessionCommands = mkOption {
type = types.lines;
default = "";
example = ''
export SDL_VIDEODRIVER=wayland
# needs qt5.qtwayland in systemPackages
export QT_QPA_PLATFORM=wayland
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
# Fix for some Java AWT applications (e.g. Android Studio),
# use this if they aren't displayed properly:
export _JAVA_AWT_WM_NONREPARENTING=1
'';
description = ''
Shell commands executed just before Sway is started.
'';
};

extraPackages = mkOption {
type = with types; listOf package;
default = with pkgs; [
xwayland dmenu
xwayland rxvt_unicode dmenu
];
defaultText = literalExample ''
with pkgs; [ xwayland dmenu ];
with pkgs; [ xwayland rxvt_unicode dmenu ];
'';
example = literalExample ''
with pkgs; [
@@ -42,7 +68,7 @@ in {
};

config = mkIf cfg.enable {
environment.systemPackages = [ swayPackage ] ++ cfg.extraPackages;
environment.systemPackages = [ swayJoined ] ++ cfg.extraPackages;
security.pam.services.swaylock = {};
hardware.opengl.enable = mkDefault true;
fonts.enableDefaultFonts = mkDefault true;
@@ -51,4 +77,3 @@ in {

meta.maintainers = with lib.maintainers; [ gnidorah primeos colemickens ];
}