This commit is contained in:
unexplrd
2025-02-06 00:33:06 +02:00
commit 2e6e28ef32
254 changed files with 28562 additions and 0 deletions

View File

@ -0,0 +1,7 @@
{
imports = [
./niri.nix
./plasma.nix
./hyprland.nix
];
}

View File

@ -0,0 +1,56 @@
{
config,
pkgs,
lib,
...
}:
with lib; let
cfg = config.desktop.hyprland;
in {
imports = [./misc/sound.nix ./misc/regreet.nix];
options = {
desktop.hyprland.enable =
mkEnableOption "enable hyprland desktop";
};
config = mkIf cfg.enable {
programs.hyprland.enable = true;
programs.hyprland.package = pkgs.hyprland;
fonts.fontDir.enable = true;
security.pam.services.hyprlock = {};
security.pam.loginLimits = [
{
domain = "@users";
item = "rtprio";
type = "-";
value = 1;
}
];
programs.dconf.enable = true;
programs.seahorse.enable = true;
services.gnome.gnome-keyring.enable = true;
services.udisks2.enable = true;
services.dbus = {
apparmor = "enabled";
implementation = "broker";
};
xdg.portal = {
enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-hyprland
xdg-desktop-portal-gtk
];
config = {
common = {
default = [
"hyprland"
"gtk"
];
};
};
};
services.greetd.settings.initial_session = {
user = "user";
command = "Hyprland";
};
};
}

View File

@ -0,0 +1,12 @@
{pkgs, ...}: {
programs.regreet.enable = true;
services.greetd = {
enable = true;
vt = 6;
settings = {
default_session = {
command = "${pkgs.cage}/bin/cage -s -m last -- ${pkgs.greetd.regreet}/bin/regreet";
};
};
};
}

View File

@ -0,0 +1,18 @@
{
services = {
pulseaudio.enable = false;
pipewire = {
enable = true;
alsa.enable = true;
pulse.enable = true;
extraConfig.pipewire."92-low-latency" = {
context.properties = {
default.clock.rate = 48000;
default.clock.quantum = 32;
default.clock.min-quantum = 32;
default.clock.max-quantum = 32;
};
};
};
};
}

View File

@ -0,0 +1,60 @@
{
config,
pkgs,
lib,
...
}:
with lib; let
cfg = config.desktop.niri;
in {
imports = [./misc/sound.nix ./misc/regreet.nix];
options = {
desktop.niri.enable =
mkEnableOption "enable niri desktop";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
brightnessctl
gcr_4
];
fonts.fontDir.enable = true;
security.pam = {
services.hyprlock = {};
loginLimits = [
{
domain = "@users";
item = "rtprio";
type = "-";
value = 1;
}
];
};
services = {
gnome.gnome-keyring.enable = true;
udisks2.enable = true;
dbus = {
apparmor = "enabled";
implementation = "broker";
};
};
programs = {
dconf.enable = true;
seahorse.enable = true;
};
xdg.portal = {
enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-gnome
xdg-desktop-portal-gtk
];
config.common.default = [
"gnome"
"gtk"
];
};
services.greetd.settings.initial_session = {
user = "user";
command = "${pkgs.niri}/bin/niri-session";
};
};
}

View File

@ -0,0 +1,28 @@
{
config,
pkgs,
lib,
...
}:
with lib; let
cfg = config.desktop.plasma;
in {
imports = [
./misc/sound.nix
];
options = {
desktop.plasma = {
enable = mkEnableOption "enable plasma desktop";
sddmEnable = mkEnableOption "enable simple display manager";
};
};
config = mkIf cfg.enable {
services.displayManager.sddm = {
enable = cfg.sddmEnable;
wayland.enable = true;
};
services.desktopManager.plasma6.enable = true;
fonts.fontDir.enable = true;
};
}