ddebcccb5b
Note: not the actual initial commit. I swear I will stop repeatedly force pushing to this single commit eventually ok.
61 lines
1.4 KiB
Nix
61 lines
1.4 KiB
Nix
{ pkgs, inputs, config, lib, ... }:
|
|
|
|
let
|
|
cfg = config.my.desktop.hyprland;
|
|
in {
|
|
imports = [
|
|
inputs.hyprland.nixosModules.default
|
|
];
|
|
|
|
options.my.desktop.hyprland = {
|
|
enable = lib.mkEnableOption null;
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
programs.hyprland = {
|
|
enable = true;
|
|
portalPackage = inputs.xdph.packages.${pkgs.system}.default;
|
|
};
|
|
|
|
xdg.portal = {
|
|
enable = true;
|
|
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
|
};
|
|
|
|
services.greetd = {
|
|
enable = true;
|
|
settings = let
|
|
session = rec {
|
|
user = config.my.user.username;
|
|
command = let
|
|
sessionVars = "/etc/profiles/per-user/${user}/etc/profile.d/hm-session-vars.sh";
|
|
in pkgs.writeShellScript "hyprland-hm-session-vars" ''
|
|
[ -f ${sessionVars} ] && . ${sessionVars}
|
|
exec ${config.programs.hyprland.package}/bin/Hyprland
|
|
'';
|
|
};
|
|
in {
|
|
initial_session = session;
|
|
default_session = session;
|
|
};
|
|
};
|
|
environment.etc."greetd/environments".text = ''
|
|
Hyprland
|
|
'';
|
|
|
|
boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
|
|
|
|
security = {
|
|
polkit.enable = lib.mkDefault true;
|
|
pam = {
|
|
services = {
|
|
greeetd.gnupg.enable = true;
|
|
login.enableGnomeKeyring = true;
|
|
swaylock = {};
|
|
hyprlock = {};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|