Switch to using tuigreet with greetd instead of launching directly to sway

This commit is contained in:
Evie Litherland-Smith 2024-06-07 20:44:06 +01:00
parent ae2e3a0d59
commit 508907c589
2 changed files with 18 additions and 14 deletions

View file

@ -1,4 +1,5 @@
{ {
config,
lib, lib,
pkgs, pkgs,
... ...
@ -83,11 +84,15 @@
dbus.packages = with pkgs; [gcr]; dbus.packages = with pkgs; [gcr];
greetd = { greetd = {
enable = true; enable = true;
settings = let settings = {
command = "sway"; default_session.command = ''
in { ${pkgs.greetd.tuigreet}/bin/tuigreet --time\
initial_session = {inherit command;}; --remember\
default_session = {inherit command;}; --remember-user-session\
--user-menu\
--asterisks\
--window-padding 10
'';
}; };
}; };
pipewire = { pipewire = {

View file

@ -30,7 +30,7 @@
}; };
defaultModules = { defaultModules = {
hostName ? "Atlas", hostName ? "Atlas",
primaryUser ? "pixelifytica", userName ? "pixelifytica",
loginShell ? "zsh", loginShell ? "zsh",
... ...
}: [ }: [
@ -45,7 +45,7 @@
}: { }: {
networking = {inherit hostName;}; networking = {inherit hostName;};
nix = { nix = {
settings.trusted-users = [primaryUser]; settings.trusted-users = [userName];
registry = { registry = {
my-nixos = { my-nixos = {
from = { from = {
@ -69,9 +69,8 @@
}; };
}; };
}; };
services.greetd.settings.initial_session.user = primaryUser;
programs.${loginShell}.enable = true; programs.${loginShell}.enable = true;
users.users.${primaryUser} = { users.users.${userName} = {
shell = pkgs.${loginShell}; shell = pkgs.${loginShell};
group = "users"; group = "users";
isNormalUser = true; isNormalUser = true;
@ -96,7 +95,7 @@
specialArgs = defaultSpecialArgs {inherit system;}; specialArgs = defaultSpecialArgs {inherit system;};
modules = defaultModules { modules = defaultModules {
hostName = "Legion"; hostName = "Legion";
primaryUser = "pixelifytica"; userName = "pixelifytica";
loginShell = "zsh"; loginShell = "zsh";
}; };
}; };
@ -106,7 +105,7 @@
specialArgs = defaultSpecialArgs {inherit system;}; specialArgs = defaultSpecialArgs {inherit system;};
modules = defaultModules { modules = defaultModules {
hostName = "Northstar"; hostName = "Northstar";
primaryUser = "pixelifytica"; userName = "pixelifytica";
loginShell = "zsh"; loginShell = "zsh";
}; };
}; };
@ -115,7 +114,7 @@
specialArgs = defaultSpecialArgs {inherit system;}; specialArgs = defaultSpecialArgs {inherit system;};
modules = defaultModules { modules = defaultModules {
hostName = "Vanguard"; hostName = "Vanguard";
primaryUser = "pixelifytica"; userName = "pixelifytica";
loginShell = "zsh"; loginShell = "zsh";
}; };
}; };
@ -125,7 +124,7 @@
specialArgs = defaultSpecialArgs {inherit system;}; specialArgs = defaultSpecialArgs {inherit system;};
modules = defaultModules { modules = defaultModules {
hostName = "Tone"; hostName = "Tone";
primaryUser = "elitherl"; userName = "elitherl";
loginShell = "zsh"; loginShell = "zsh";
}; };
}; };
@ -134,7 +133,7 @@
specialArgs = defaultSpecialArgs {inherit system;}; specialArgs = defaultSpecialArgs {inherit system;};
modules = defaultModules { modules = defaultModules {
hostName = "Scorch"; hostName = "Scorch";
primaryUser = "elitherl"; userName = "elitherl";
loginShell = "zsh"; loginShell = "zsh";
}; };
}; };