Extract login manager configurations to common/

This commit is contained in:
Cameron Reed 2024-01-10 22:38:59 -07:00
parent 9ba2d0df94
commit 2414dfc9b9
6 changed files with 47 additions and 16 deletions

View File

@ -0,0 +1,8 @@
{ config, pkgs, ... }:
{
login-manager = "gdm";
services.xserver.displayManager.gdm.enable = true;
}

View File

@ -0,0 +1,13 @@
{ config, pkgs, ... }:
{
login-manager = "sddm";
services.xserver.displayManager.sddm = {
enable = true;
autoNumlock = true;
enableHidpi = true;
wayland.enable = true;
};
}

View File

@ -0,0 +1,19 @@
{ config, pkgs, ... }:
{
login-manager = "tuigreet";
environment.systemPackages = (with pkgs; [
greetd.tuigreet
]);
services.greetd = {
enable = true;
settings = {
default_session = {
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd sway";
user = "greeter";
};
};
};
}

View File

@ -2,6 +2,11 @@
with lib; { with lib; {
options = { options = {
login-manager = mkOption {
default = "";
type = types.str;
};
desktop = mkOption { desktop = mkOption {
default = ""; default = "";
type = types.str; type = types.str;

View File

@ -10,6 +10,7 @@ in {
(common_dir + /bootloader/systemd-boot.nix) (common_dir + /bootloader/systemd-boot.nix)
(common_dir + /users/users.nix) (common_dir + /users/users.nix)
(common_dir + /display-manager/tuigreet.nix)
(common_dir + /desktop/sway.nix) (common_dir + /desktop/sway.nix)
]; ];
@ -98,8 +99,6 @@ in {
lf lf
tmux tmux
firefox firefox
greetd.tuigreet
]); ]);
environment.shells = with pkgs; [ bash zsh ]; environment.shells = with pkgs; [ bash zsh ];
@ -168,20 +167,6 @@ in {
# Login Manager Configuration
services.greetd = {
enable = true;
settings = {
default_session = {
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd sway";
user = "greeter";
};
};
};
# User Configuration # User Configuration
user.cameron.enable = true; user.cameron.enable = true;

View File

@ -14,6 +14,7 @@ in {
(common_dir + /bootloader/grub.nix) (common_dir + /bootloader/grub.nix)
(common_dir + /users/users.nix) (common_dir + /users/users.nix)
(common_dir + /login-manager/tuigreet.nix)
./minecraft.nix ./minecraft.nix
./frp.nix ./frp.nix