From 508907c589a790b11d1e6dafaea92043ff9dda87 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Fri, 7 Jun 2024 20:44:06 +0100 Subject: [PATCH] Switch to using tuigreet with greetd instead of launching directly to sway --- configuration/desktop.nix | 15 ++++++++++----- flake.nix | 17 ++++++++--------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/configuration/desktop.nix b/configuration/desktop.nix index 82ef3096..3bc33061 100644 --- a/configuration/desktop.nix +++ b/configuration/desktop.nix @@ -1,4 +1,5 @@ { + config, lib, pkgs, ... @@ -83,11 +84,15 @@ dbus.packages = with pkgs; [gcr]; greetd = { enable = true; - settings = let - command = "sway"; - in { - initial_session = {inherit command;}; - default_session = {inherit command;}; + settings = { + default_session.command = '' + ${pkgs.greetd.tuigreet}/bin/tuigreet --time\ + --remember\ + --remember-user-session\ + --user-menu\ + --asterisks\ + --window-padding 10 + ''; }; }; pipewire = { diff --git a/flake.nix b/flake.nix index 4e597978..cd227a95 100644 --- a/flake.nix +++ b/flake.nix @@ -30,7 +30,7 @@ }; defaultModules = { hostName ? "Atlas", - primaryUser ? "pixelifytica", + userName ? "pixelifytica", loginShell ? "zsh", ... }: [ @@ -45,7 +45,7 @@ }: { networking = {inherit hostName;}; nix = { - settings.trusted-users = [primaryUser]; + settings.trusted-users = [userName]; registry = { my-nixos = { from = { @@ -69,9 +69,8 @@ }; }; }; - services.greetd.settings.initial_session.user = primaryUser; programs.${loginShell}.enable = true; - users.users.${primaryUser} = { + users.users.${userName} = { shell = pkgs.${loginShell}; group = "users"; isNormalUser = true; @@ -96,7 +95,7 @@ specialArgs = defaultSpecialArgs {inherit system;}; modules = defaultModules { hostName = "Legion"; - primaryUser = "pixelifytica"; + userName = "pixelifytica"; loginShell = "zsh"; }; }; @@ -106,7 +105,7 @@ specialArgs = defaultSpecialArgs {inherit system;}; modules = defaultModules { hostName = "Northstar"; - primaryUser = "pixelifytica"; + userName = "pixelifytica"; loginShell = "zsh"; }; }; @@ -115,7 +114,7 @@ specialArgs = defaultSpecialArgs {inherit system;}; modules = defaultModules { hostName = "Vanguard"; - primaryUser = "pixelifytica"; + userName = "pixelifytica"; loginShell = "zsh"; }; }; @@ -125,7 +124,7 @@ specialArgs = defaultSpecialArgs {inherit system;}; modules = defaultModules { hostName = "Tone"; - primaryUser = "elitherl"; + userName = "elitherl"; loginShell = "zsh"; }; }; @@ -134,7 +133,7 @@ specialArgs = defaultSpecialArgs {inherit system;}; modules = defaultModules { hostName = "Scorch"; - primaryUser = "elitherl"; + userName = "elitherl"; loginShell = "zsh"; }; };