diff options
| author | Leander Scherer <leander@schererleander.de> | 2026-03-16 20:50:58 +0100 |
|---|---|---|
| committer | Leander Scherer <leander@schererleander.de> | 2026-03-16 20:50:58 +0100 |
| commit | efe7df76d681b9f019a8680532105469737e8f58 (patch) | |
| tree | fffd176a533b868a8a00e6e0143e39f3f67d74cc | |
| parent | 4540d015d68d468d0022c97153ba9ebfac5f0c83 (diff) | |
feat(sway): setup sway with nixpkgs-wayland for newest version
| -rw-r--r-- | flake.lock | 94 | ||||
| -rw-r--r-- | flake.nix | 3 | ||||
| -rw-r--r-- | modules/hosts/adam/flake-parts.nix | 4 | ||||
| -rw-r--r-- | modules/system/sway.nix | 72 | ||||
| -rw-r--r-- | modules/users/schererleander/hm-linux.nix | 2 |
5 files changed, 145 insertions, 30 deletions
@@ -36,6 +36,21 @@ "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" } }, + "flake-compat_2": { + "locked": { + "lastModified": 1761640442, + "narHash": "sha256-AtrEP6Jmdvrqiv4x2xa5mrtaIp3OEe8uBYCDZDS+hu8=", + "owner": "nix-community", + "repo": "flake-compat", + "rev": "4a56054d8ffc173222d09dad23adf4ba946c8884", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "flake-compat", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": "nixpkgs-lib" @@ -125,6 +140,25 @@ "type": "github" } }, + "lib-aggregate": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs-lib": "nixpkgs-lib_3" + }, + "locked": { + "lastModified": 1773579712, + "narHash": "sha256-cvxFTYuOvvmpLJz5nB8iREmMGsDksY6gmZFf74UKD1Q=", + "owner": "nix-community", + "repo": "lib-aggregate", + "rev": "c23c52797845b8e4f273ddb5ccdf8622b5d98284", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "lib-aggregate", + "type": "github" + } + }, "nix-darwin": { "inputs": { "nixpkgs": [ @@ -213,19 +247,40 @@ "type": "github" } }, - "nixpkgs_2": { + "nixpkgs-lib_3": { "locked": { - "lastModified": 1759381078, - "narHash": "sha256-gTrEEp5gEspIcCOx9PD8kMaF1iEmfBcTbO0Jag2QhQs=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "7df7ff7d8e00218376575f0acdcc5d66741351ee", + "lastModified": 1773538553, + "narHash": "sha256-hohiyWALn8cXqk3FPnE3UADy03lRMaTV5iRzKCU86zM=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "a5ed666a3c206de0019b4c9dafc3a51f352bc7e3", "type": "github" }, "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, + "nixpkgs-wayland": { + "inputs": { + "flake-compat": "flake-compat_2", + "lib-aggregate": "lib-aggregate", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1773669724, + "narHash": "sha256-qJHuYLtsF1cffvdwc/joy+WyTH0kgu+srrxfTDbH2Zc=", + "owner": "nix-community", + "repo": "nixpkgs-wayland", + "rev": "16a4e68f213a696ad70cd14a60415614bc708379", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs-wayland", "type": "github" } }, @@ -238,30 +293,11 @@ "nix-darwin": "nix-darwin", "nixcord": "nixcord", "nixpkgs": "nixpkgs", - "site": "site", + "nixpkgs-wayland": "nixpkgs-wayland", "sops-nix": "sops-nix", "spicetify-nix": "spicetify-nix" } }, - "site": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs_2" - }, - "locked": { - "lastModified": 1772997831, - "narHash": "sha256-58W+m8Kz32NSxqQH8O7MfXpm20fS2sbV7fzPwFfHozo=", - "owner": "schererleander", - "repo": "site", - "rev": "9debc47ad434a3b5204361367342198e8e305e1e", - "type": "github" - }, - "original": { - "owner": "schererleander", - "repo": "site", - "type": "github" - } - }, "sops-nix": { "inputs": { "nixpkgs": [ @@ -16,7 +16,8 @@ sops-nix.url = "github:Mic92/sops-nix"; sops-nix.inputs.nixpkgs.follows = "nixpkgs"; - site.url = "github:schererleander/site"; + nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland"; + nixpkgs-wayland.inputs.nixpkgs.follows = "nixpkgs"; spicetify-nix.url = "github:Gerg-L/spicetify-nix"; spicetify-nix.inputs.nixpkgs.follows = "nixpkgs"; 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 |
