moved greetd into a module and added sway module

This commit is contained in:
Aly Raffauf 2024-04-22 23:14:28 -04:00
parent e3e62eadda
commit c1af68a79e
9 changed files with 83 additions and 19 deletions

View file

@ -39,6 +39,7 @@
};
desktop = {
enable = true;
greetd.enable = true;
hyprland.enable = true;
};
apps = {

View file

@ -37,6 +37,7 @@
};
desktop = {
enable = true;
greetd.enable = true;
hyprland.enable = true;
};
apps = {

View file

@ -39,6 +39,7 @@ in {
};
desktop = {
enable = true;
greetd.enable = true;
hyprland.enable = true;
};
user = {

View file

@ -82,6 +82,7 @@ in {
};
desktop = {
enable = true;
greetd.enable = true;
hyprland.enable = true;
};
apps = {

View file

@ -58,20 +58,16 @@
};
desktop = {
enable = true;
hyprland.enable = true;
greetd = {
enable = true;
session = config.programs.sway.package + "/bin/sway";
};
sway.enable = true;
};
apps = {
steam.enable = true;
};
};
services.greetd = {
settings = rec {
default_session = {
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --remember --cmd sway";
};
};
};
users.users.aly.hashedPassword = "$y$j9T$VdtiEyMOegHpcUwgmCVFD0$K8Ne6.zk//VJNq2zxVQ0xE0Wg3LohvAQd3Xm9aXdM15";

View file

@ -4,7 +4,14 @@
config,
...
}: {
imports = [./gnome ./hyprland ./lightdm ./plasma];
imports = [
./gnome
./greetd
./hyprland
./lightdm
./plasma
./sway
];
options = {
alyraffauf.desktop.enable =

View file

@ -0,0 +1,30 @@
{
inputs,
pkgs,
lib,
config,
...
}: {
options = {
alyraffauf.desktop.greetd.enable =
lib.mkEnableOption "Enable greetd.";
alyraffauf.desktop.greetd.session = lib.mkOption {
description = "Default command to execute on login.";
default = inputs.hyprland.packages.${pkgs.system}.hyprland + "/bin/Hyprland";
type = lib.types.str;
};
};
config = lib.mkIf config.alyraffauf.desktop.greetd.enable {
services = {
greetd = {
enable = true;
settings = rec {
default_session = {
command = lib.mkDefault "${pkgs.greetd.tuigreet}/bin/tuigreet --time --remember --cmd ${config.alyraffauf.desktop.greetd.session}";
};
};
};
};
};
}

View file

@ -7,20 +7,12 @@
}: {
options = {
alyraffauf.desktop.hyprland.enable =
lib.mkEnableOption "Enable hyprland and greetd.";
lib.mkEnableOption "Enable hyprland wayland compositor.";
};
config = lib.mkIf config.alyraffauf.desktop.hyprland.enable {
services = {
dbus.packages = [pkgs.gcr];
greetd = {
enable = lib.mkDefault true;
settings = rec {
default_session = {
command = lib.mkDefault "${pkgs.greetd.tuigreet}/bin/tuigreet --time --remember --cmd Hyprland";
};
};
};
udev.packages = [pkgs.swayosd];
};

View file

@ -0,0 +1,35 @@
{
inputs,
pkgs,
lib,
config,
...
}: {
options = {
alyraffauf.desktop.sway.enable =
lib.mkEnableOption "Enable sway wayland compositor.";
};
config = lib.mkIf config.alyraffauf.desktop.sway.enable {
services = {
dbus.packages = [pkgs.gcr];
udev.packages = [pkgs.swayosd];
};
security.pam.services = {
greetd.enableKwallet = true;
greetd.enableGnomeKeyring = true;
swaylock = {};
};
programs = {
gnupg.agent.pinentryPackage = pkgs.pinentry-gnome3;
sway = {
enable = true;
package = pkgs.swayfx;
};
};
environment.sessionVariables.NIXOS_OZONE_WL = "1";
};
}