From 55ebfd3406969151813ba8b772f0b969224fcff6 Mon Sep 17 00:00:00 2001 From: Jonni Liljamo Date: Mon, 8 Dec 2025 20:04:47 +0200 Subject: [PATCH] feat: greetd --- modules/group/compositor.nix | 1 + modules/hyprland.nix | 2 ++ modules/nixos/greetd.nix | 27 +++++++++++++++++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 modules/nixos/greetd.nix diff --git a/modules/group/compositor.nix b/modules/group/compositor.nix index a4165d5..75da588 100644 --- a/modules/group/compositor.nix +++ b/modules/group/compositor.nix @@ -6,6 +6,7 @@ Common dependencies for Wayland compositors imports = with config.flake.modules.nixos; [ fonts foot + greetd mako ]; }; diff --git a/modules/hyprland.nix b/modules/hyprland.nix index 304de96..bd3a339 100644 --- a/modules/hyprland.nix +++ b/modules/hyprland.nix @@ -13,6 +13,8 @@ in { ++ [config.flake.modules.nixos.groupCompositor]; programs.hyprland.enable = true; + + arta.greetd.command = "hyprland"; }; flake.modules.homeManager.hyprland = { diff --git a/modules/nixos/greetd.nix b/modules/nixos/greetd.nix new file mode 100644 index 0000000..e841e11 --- /dev/null +++ b/modules/nixos/greetd.nix @@ -0,0 +1,27 @@ +{ + flake.modules.nixos.greetd = { + config, + lib, + pkgs, + ... + }: let + cfg = config.arta.greetd; + in { + options.arta.greetd = { + command = lib.mkOption { + type = lib.types.str; + }; + }; + + config = { + services.greetd = { + enable = true; + settings = { + default_session = { + command = "${pkgs.greetd}/bin/agreety --cmd ${cfg.command}"; + }; + }; + }; + }; + }; +} -- 2.44.1