aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/hosts/adam/flake-parts.nix4
-rw-r--r--modules/system/sway.nix72
-rw-r--r--modules/users/schererleander/hm-linux.nix2
3 files changed, 78 insertions, 0 deletions
diff --git a/modules/hosts/adam/flake-parts.nix b/modules/hosts/adam/flake-parts.nix
index 77ed51d..738ec43 100644
--- a/modules/hosts/adam/flake-parts.nix
+++ b/modules/hosts/adam/flake-parts.nix
@@ -3,10 +3,14 @@
flake.nixosConfigurations."adam" = inputs.nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; };
modules = with inputs.self.modules.nixos; [
+ {
+ nixpkgs.overlays = [ inputs.nixpkgs-wayland.overlays.default ];
+ }
adam
home-manager
plymouth
kde
+ sway
dns
bluetooth
mullvad-vpn
diff --git a/modules/system/sway.nix b/modules/system/sway.nix
new file mode 100644
index 0000000..d89847c
--- /dev/null
+++ b/modules/system/sway.nix
@@ -0,0 +1,72 @@
+{
+ flake.modules.nixos.sway =
+ { pkgs, ... }:
+ {
+ services.gnome.gnome-keyring.enable = true;
+
+ programs.sway = {
+ enable = true;
+ wrapperFeatures.gtk = true;
+ extraPackages = with pkgs; [
+ wl-clipboard
+ havoc
+ ];
+ };
+
+ services.greetd = {
+ enable = true;
+ settings = {
+ default_session = {
+ command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd sway";
+ user = "greeter";
+ };
+ };
+ };
+ };
+
+ flake.modules.homeManager.sway =
+ { lib, pkgs, ... }:
+ {
+ wayland.windowManager.sway = {
+ enable = true;
+ wrapperFeatures.gtk = true;
+ config = rec {
+ modifier = "Mod4";
+ terminal = "${pkgs.havoc}/bin/havoc";
+
+ input = {
+ "*" = {
+ xkb_layout = "de";
+ };
+ };
+
+ output = {
+ DP-1 = {
+ resolution = "2160x1440@240Hz";
+ };
+ };
+
+ gaps = {
+ inner = 15;
+ };
+
+ window = {
+ titlebar = false;
+ border = 0;
+ };
+
+ keybindings = lib.mkOptionDefault {
+ "XF86AudioPlay" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
+ "XF86AudioPrev" = "exec ${pkgs.playerctl}/bin/playerctl previous";
+ "XF86AudioNext" = "exec ${pkgs.playerctl}/bin/playerctl next";
+ "XF86AudioRaiseVolume" = "exec ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_DEVICE@ +5%";
+ "XF86AudioLowerVolume" = "exec ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_DEVICE@ -5%";
+ "XF86AudioMute" = "exec ${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_DEVICE@ toggle";
+ };
+
+ menu = "${pkgs.wmenu}/bin/wmenu-run -b";
+ defaultWorkspace = "workspace number 1";
+ };
+ };
+ };
+}
diff --git a/modules/users/schererleander/hm-linux.nix b/modules/users/schererleander/hm-linux.nix
index 80bb3b4..168a38f 100644
--- a/modules/users/schererleander/hm-linux.nix
+++ b/modules/users/schererleander/hm-linux.nix
@@ -4,6 +4,8 @@
{
imports = [
inputs.self.modules.homeManager.schererleander-base
+ inputs.self.modules.homeManager.sway
+ inputs.self.modules.homeManager.firefox
inputs.self.modules.homeManager.firefox
inputs.self.modules.homeManager.opencode
inputs.self.modules.homeManager.nixcord