Swtich greetd to its own enable module

This commit is contained in:
Nathan McCarty 2023-06-18 18:59:45 -04:00
parent ad43501d8a
commit 24cf8ddb9f
Signed by: thatonelutenist
SSH Key Fingerprint: SHA256:hwQEcmak9E6sdU9bXc98RHw/Xd1AhpB5HZT7ZSVJkRM
3 changed files with 77 additions and 65 deletions

View File

@ -29,7 +29,6 @@
useOSProber = true; useOSProber = true;
}; };
virtualisation.vmware.guest.enable = true; virtualisation.vmware.guest.enable = true;
services.greetd.enable = false;
# Setup system configuration # Setup system configuration
nathan = { nathan = {
programs = { games = false; }; programs = { games = false; };
@ -42,6 +41,7 @@
setupGrub = false; setupGrub = false;
nix.autoUpdate = false; nix.autoUpdate = false;
harden = false; harden = false;
hyprland.enableGreetd = false;
}; };
}; };
# Configure networking # Configure networking

View File

@ -182,6 +182,12 @@ in {
description = "Whether to setup hyprland"; description = "Whether to setup hyprland";
type = lib.types.bool; type = lib.types.bool;
}; };
enableGreetd = mkOption {
default = config.nathan.config.isDesktop;
example = true;
description = "Whether to setup greetd";
type = lib.types.bool;
};
}; };
# Virtualization configuration # Virtualization configuration
# All on by default if the system is a desktop # All on by default if the system is a desktop

View File

@ -1,23 +1,32 @@
{ config, lib, pkgs, inputs, ... }: { config, lib, pkgs, inputs, ... }:
let nc = config.nathan.config; let nc = config.nathan.config;
in with lib; { in with lib; {
config = mkIf nc.hyprland.enable { config = mkMerge [
# Turn on GDM for login (mkIf nc.hyprland.enableGreetd {
services.xserver = {
enable = true;
autorun = false;
# Enable plasma for the applications
desktopManager.plasma5.enable = true;
};
# Greetd for login # Greetd for login
programs.regreet = { programs.regreet = {
enable = true; enable = true;
settings = { GTK = { font_name = "Roboto 16"; }; }; settings = { GTK = { font_name = "Roboto 16"; }; };
}; };
services.greetd = { services.greetd = {
enable = lib.mkDefault true; enable = true;
settings = { default_session.command = "cage -s -- regreet"; }; settings = { default_session.command = "cage -s -- regreet"; };
}; };
environment.systemPackages = with pkgs; [
# Greeter packages
cage
config.programs.regreet.package
gnome.adwaita-icon-theme
];
})
(mkIf nc.hyprland.enable {
# Turn on GDM for login
services.xserver = {
enable = true;
autorun = false;
# Enable plasma for the applications
desktopManager.plasma5.enable = true;
};
# Setup drivers # Setup drivers
hardware.opengl = { hardware.opengl = {
# Enable vulkan # Enable vulkan
@ -27,10 +36,6 @@ in with lib; {
}; };
# Basic packages that are effectively required for a graphical system # Basic packages that are effectively required for a graphical system
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# Greeter packages
cage
config.programs.regreet.package
gnome.adwaita-icon-theme
# GTK Theming # GTK Theming
gtk-engine-murrine gtk-engine-murrine
gtk_engines gtk_engines
@ -68,5 +73,6 @@ in with lib; {
environment.sessionVariables = { MOZ_ENABLE_WAYLAND = "1"; }; environment.sessionVariables = { MOZ_ENABLE_WAYLAND = "1"; };
}; })
];
} }