From 0074ed43c1993833f712adfef0c07f9caeacf681 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Tue, 5 Apr 2022 11:09:37 +0200 Subject: [PATCH] :rocket: add barebones sway config --- modules/desktop/default.nix | 4 ++-- modules/desktop/sway/default.nix | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 modules/desktop/sway/default.nix diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index 74b25bc..e78e6a3 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -1,12 +1,12 @@ { config, lib, pkgs, ... }: let cfg = config.modules.desktop; in { - imports = [ ./apps ./bspwm ./gtk.nix ./xmonad ]; + imports = [ ./apps ./bspwm ./gtk.nix ./xmonad ./sway ]; options.modules.desktop = { name = lib.mkOption { default = "bspwm"; - type = lib.types.enum [ "bspwm" "xmonad" ]; + type = lib.types.enum [ "bspwm" "xmonad" "sway" ]; }; }; diff --git a/modules/desktop/sway/default.nix b/modules/desktop/sway/default.nix new file mode 100644 index 0000000..9d0b951 --- /dev/null +++ b/modules/desktop/sway/default.nix @@ -0,0 +1,23 @@ +{ config, lib, pkgs, ... }: + +with lib; +let cfg = config.modules.desktop; +in { + config = mkIf (cfg.name == "sway") { + hardware.opengl = { + enable = true; + driSupport = true; + }; + home-manager.users.moritz = { + wayland.windowManager.sway = { + enable = true; + terminal = "kitty"; + menu = "wofi --show run"; + bars = [{ + fonts.size = 15.0; + positiom = "bottom"; + }]; + }; + }; + }; +}