feat(homes/rafiq): configure graphical modules for hyprland
Moves graphical configs into a nixos module and enables autologin.
This commit is contained in:
parent
5048f44559
commit
ea77bf62ad
1 changed files with 37 additions and 6 deletions
|
@ -1,4 +1,12 @@
|
||||||
{ lib, inputs, ... }:
|
{
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.flake;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
allowedUnfreePackages = [
|
allowedUnfreePackages = [
|
||||||
"stremio-shell"
|
"stremio-shell"
|
||||||
|
@ -7,13 +15,36 @@
|
||||||
"steam-unwrapped"
|
"steam-unwrapped"
|
||||||
];
|
];
|
||||||
flake.modules.nixos.graphical =
|
flake.modules.nixos.graphical =
|
||||||
{ config, ... }:
|
{ config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
security.pam.services.hyprlock = { };
|
fonts.packages = [ pkgs.font-awesome ];
|
||||||
programs.steam = {
|
services.getty.autologinUser = cfg.admin.username;
|
||||||
enable = true;
|
# Start Hyprland at boot only if not connecting through SSH
|
||||||
gamescopeSession.enable = true;
|
environment.loginShellInit = # sh
|
||||||
|
''
|
||||||
|
if [[ -z "$SSH_CLIENT" && -z "$SSH_CONNECTION" ]]; then
|
||||||
|
if uwsm check may-start; then
|
||||||
|
exec uwsm start hyprland-uwsm.desktop
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
environment.variables = {
|
||||||
|
# Get Electron apps to use Wayland
|
||||||
|
ELECTRON_OZONE_PLATFORM_HINT = "auto";
|
||||||
|
NIXOS_OZONE_WL = "1";
|
||||||
};
|
};
|
||||||
|
programs = {
|
||||||
|
hyprland = {
|
||||||
|
enable = true;
|
||||||
|
# Use UWSM to have each process controlled by systemd init
|
||||||
|
withUWSM = true;
|
||||||
|
};
|
||||||
|
steam = {
|
||||||
|
enable = true;
|
||||||
|
gamescopeSession.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
security.pam.services.hyprlock = { };
|
||||||
services.sunshine = {
|
services.sunshine = {
|
||||||
enable = true;
|
enable = true;
|
||||||
capSysAdmin = true;
|
capSysAdmin = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue