Compare commits

..

5 Commits

Author SHA1 Message Date
81ff294468 redo pipewire module
Signed-off-by: unexplrd <unexplrd@linerds.us>
2025-04-02 16:51:32 +03:00
435b741506 modules/home/desktop/plasma/default.nix: remove stylix line
Signed-off-by: unexplrd <unexplrd@linerds.us>
2025-04-02 16:51:32 +03:00
7b30ddce63 modules/home/desktop/niri/default.nix: redo variables
Signed-off-by: unexplrd <unexplrd@linerds.us>
2025-04-02 16:51:32 +03:00
a0037fdb0f hosts/sarien/boot.nix: add security kernel params
Signed-off-by: unexplrd <unexplrd@linerds.us>
2025-04-02 16:51:32 +03:00
201db59fce hosts/eldrid/hardware.nix: fix permssions
Signed-off-by: unexplrd <unexplrd@linerds.us>
2025-04-02 16:51:32 +03:00
10 changed files with 74 additions and 21 deletions

0
hosts/eldrid/hardware.nix Executable file → Normal file
View File

View File

@ -11,6 +11,21 @@
# kernelPackages = pkgs.linuxPackages_latest; # kernelPackages = pkgs.linuxPackages_latest;
kernelPackages = pkgs.linuxPackages_cachyos; kernelPackages = pkgs.linuxPackages_cachyos;
kernelModules = ["kvm-intel"]; kernelModules = ["kvm-intel"];
kernelParams = [
"debugfs=off"
"efi=disable_early_pci_dma"
# "gather_data_sampling=force"
"intel_iommu=on"
"iommu.passthrough=0"
"iommu.strict=1"
"iommu=force"
# "lockdown=confidentiality"
# "module.sig_enforce=1"
"page_alloc.shuffle=1"
# "reg_file_data_sampling=on"
# "spec_rstack_overflow=safe-ret"
"vsyscall=none"
];
loader.efi.canTouchEfiVariables = true; loader.efi.canTouchEfiVariables = true;
loader.systemd-boot = { loader.systemd-boot = {
enable = true; enable = true;

View File

@ -8,7 +8,8 @@
cfg = config.desktop.niri; cfg = config.desktop.niri;
inherit (osConfig.networking) hostId; inherit (osConfig.networking) hostId;
inherit (config.lib.stylix) colors; inherit (config.lib.stylix) colors;
cursor_size = config.stylix.cursor.size; cursorSize = config.stylix.cursor.size;
cursorName = config.stylix.cursor.name;
keyboard = keyboard =
if hostId == "eldrid" if hostId == "eldrid"
then "chromeos" then "chromeos"
@ -425,8 +426,8 @@ in {
} }
cursor { cursor {
xcursor-theme "${config.stylix.cursor.name}" xcursor-theme "${cursorName}"
xcursor-size ${toString cursor_size} xcursor-size ${toString cursorSize}
} }
layout { layout {

View File

@ -12,7 +12,6 @@ in {
mkEnableOption "enable plasma desktop"; mkEnableOption "enable plasma desktop";
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
stylix.targets.kde.enable = true;
home.packages = with pkgs; [ home.packages = with pkgs; [
wl-clipboard-rs wl-clipboard-rs
]; ];

View File

@ -1,21 +1,59 @@
{ {
config,
lib, lib,
config,
... ...
}: { }: let
security.rtkit.enable = lib.mkDefault config.services.pipewire.enable; inherit (lib) mkEnableOption mkIf;
services = {
pulseaudio.enable = false; cfg = config.sound.pipewire;
pipewire = { in {
options = {
sound.pipewire.enable = mkEnableOption "enable pipewire";
};
config = mkIf cfg.enable {
security.rtkit.enable = true;
services.pulseaudio.enable = false;
services.pipewire = {
enable = true; enable = true;
alsa.enable = true; alsa.enable = true;
pulse.enable = true; pulse.enable = true;
extraConfig.pipewire."92-low-latency" = {
context.properties.default.clock = { extraConfig = {
rate = 48000; pipewire = {
quantum = 32; "92-low-latency" = {
min-quantum = 32; "context.properties" = {
max-quantum = 32; "default.clock.rate" = 48000;
"default.clock.allowed-rates" = [
44100
48000
88200
96000
];
"default.clock.min-quantum" = 512;
"default.clock.quantum" = 4096;
"default.clock.max-quantum" = 8192;
};
};
"93-no-resampling" = {
"context.properties" = {
"default.clock.rate" = 48000;
"default.clock.allowed-rates" = [
44100
48000
96000
192000
];
};
};
"94-no-upmixing" = {
"stream.properties" = {
"channelmix.upmix" = false;
};
};
}; };
}; };
}; };

View File

@ -8,7 +8,6 @@
cfg = config.desktop.cosmic; cfg = config.desktop.cosmic;
in { in {
imports = with inputs; [ imports = with inputs; [
./common/pipewire.nix
nixos-cosmic.nixosModules.default nixos-cosmic.nixosModules.default
]; ];
options = { options = {
@ -16,6 +15,7 @@ in {
lib.mkEnableOption "enable cosmic desktop"; lib.mkEnableOption "enable cosmic desktop";
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
sound.pipewire.enable = true;
nix.settings = { nix.settings = {
substituters = ["https://cosmic.cachix.org/"]; substituters = ["https://cosmic.cachix.org/"];
trusted-public-keys = ["cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE="]; trusted-public-keys = ["cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE="];

View File

@ -1,5 +1,6 @@
{ {
imports = [ imports = [
./common/pipewire.nix
# ./cosmic.nix # ./cosmic.nix
./gnome.nix ./gnome.nix
./hyprland.nix ./hyprland.nix

View File

@ -1,18 +1,17 @@
{ {
config, config,
pkgs,
lib, lib,
... ...
}: }:
with lib; let with lib; let
cfg = config.desktop.gnome; cfg = config.desktop.gnome;
in { in {
imports = [./common/pipewire.nix];
options = { options = {
desktop.gnome.enable = desktop.gnome.enable =
mkEnableOption "enable gnome desktop"; mkEnableOption "enable gnome desktop";
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
sound.pipewire.enable = true;
services.xserver = { services.xserver = {
enable = true; enable = true;
displayManager.gdm.enable = true; displayManager.gdm.enable = true;

View File

@ -8,12 +8,12 @@
with lib; let with lib; let
cfg = config.desktop.hyprland; cfg = config.desktop.hyprland;
in { in {
imports = [./common/pipewire.nix];
options = { options = {
desktop.hyprland.enable = desktop.hyprland.enable =
mkEnableOption "enable hyprland desktop"; mkEnableOption "enable hyprland desktop";
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
sound.pipewire.enable = true;
programs.hyprland = { programs.hyprland = {
enable = true; enable = true;
package = perSystem.hyprland.hyprland; package = perSystem.hyprland.hyprland;

View File

@ -7,12 +7,12 @@
with lib; let with lib; let
cfg = config.desktop.niri; cfg = config.desktop.niri;
in { in {
imports = [./common/pipewire.nix];
options = { options = {
desktop.niri.enable = desktop.niri.enable =
mkEnableOption "enable niri desktop"; mkEnableOption "enable niri desktop";
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
sound.pipewire.enable = true;
programs.niri.enable = true; programs.niri.enable = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
brightnessctl brightnessctl