about summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2017-10-19 16:28:12 +0100
committerGitHub <noreply@github.com>2017-10-19 16:28:12 +0100
commite09f070951aab4959d84d300300fc7e9bd5a4b02 (patch)
tree9fe91f12095f9137509476a83c326916f772cfea /nixos/modules
parent9d82aa696ccc80f059197c49ae79fe92808ceed7 (diff)
parentf8085cb1dd8f86253e57330371f00147a98ac3ae (diff)
downloadnixlib-e09f070951aab4959d84d300300fc7e9bd5a4b02.tar
nixlib-e09f070951aab4959d84d300300fc7e9bd5a4b02.tar.gz
nixlib-e09f070951aab4959d84d300300fc7e9bd5a4b02.tar.bz2
nixlib-e09f070951aab4959d84d300300fc7e9bd5a4b02.tar.lz
nixlib-e09f070951aab4959d84d300300fc7e9bd5a4b02.tar.xz
nixlib-e09f070951aab4959d84d300300fc7e9bd5a4b02.tar.zst
nixlib-e09f070951aab4959d84d300300fc7e9bd5a4b02.zip
Merge pull request #30493 from disassembler/sway
sway: 0.13.0 -> 0.14.0
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/module-list.nix1
-rw-r--r--nixos/modules/programs/sway.nix19
2 files changed, 20 insertions, 0 deletions
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index a8cb957ffe21..e8fecafb2c83 100644
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
@@ -99,6 +99,7 @@
   ./programs/ssh.nix
   ./programs/ssmtp.nix
   ./programs/sysdig.nix
+  ./programs/sway.nix
   ./programs/thefuck.nix
   ./programs/tmux.nix
   ./programs/venus.nix
diff --git a/nixos/modules/programs/sway.nix b/nixos/modules/programs/sway.nix
new file mode 100644
index 000000000000..fc8a06d106ae
--- /dev/null
+++ b/nixos/modules/programs/sway.nix
@@ -0,0 +1,19 @@
+{ config, pkgs, lib, ... }:
+
+with lib;
+{
+  options.programs.sway.enable = mkEnableOption "sway";
+
+  config = mkIf config.programs.sway.enable {
+    environment.systemPackages = [ pkgs.sway pkgs.xwayland ];
+    security.wrappers.sway = {
+      source = "${pkgs.sway}/bin/sway";
+      capabilities = "cap_sys_ptrace,cap_sys_tty_config=eip";
+      owner = "root";
+      group = "sway";
+      permissions = "u+rx,g+rx";
+    };
+
+    users.extraGroups.sway = {};
+  };
+}