From 7f6b2cf10eece2108c137de6f36a23d56a959ad3 Mon Sep 17 00:00:00 2001 From: Alexander Heldt Date: Sat, 7 Oct 2023 12:26:30 +0200 Subject: [PATCH] pinwheel: Add `greetd` module with auto-login --- hosts/pinwheel/configuration.nix | 1 + hosts/pinwheel/modules/greetd/default.nix | 28 +++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 hosts/pinwheel/modules/greetd/default.nix diff --git a/hosts/pinwheel/configuration.nix b/hosts/pinwheel/configuration.nix index 6d81f4c..9d527a6 100644 --- a/hosts/pinwheel/configuration.nix +++ b/hosts/pinwheel/configuration.nix @@ -114,6 +114,7 @@ config-manager.flakePath = "/home/alex/config"; mod = { + greetd.enable = true; git.enable = true; openvpn.enable = true; go.enable = true; diff --git a/hosts/pinwheel/modules/greetd/default.nix b/hosts/pinwheel/modules/greetd/default.nix new file mode 100644 index 0000000..82c44fa --- /dev/null +++ b/hosts/pinwheel/modules/greetd/default.nix @@ -0,0 +1,28 @@ +{ pkgs, lib, config, ... }: +let + enabled = config.mod.greetd.enable; +in +{ + options = { + mod.greetd = { + enable = lib.mkEnableOption "enable greetd module"; + }; + }; + + config = lib.mkIf enabled { + services.greetd = { + enable = true; + + settings = let + session = { + user = "alex"; + command = "${pkgs.hyprland}/bin/Hyprland"; + }; + in + { + initial_session = session; + default_session = session; + }; + }; + }; +}