Skip to content

Commit

Permalink
add polkit pantheon, enable alsa32bit
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnRTitor committed Jul 4, 2024
1 parent 0d544ec commit a7bc117
Show file tree
Hide file tree
Showing 7 changed files with 85 additions and 88 deletions.
104 changes: 52 additions & 52 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions home-manager/xdg.nix
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,6 @@ in {

# PDF
"application/pdf" = "org.gnome.Evince.desktop;google-chrome-beta.desktop;";
"text/html" = "google-chrome-beta.desktop;org.gnome.TextEditor.desktop;";
};
}
2 changes: 1 addition & 1 deletion modules-overlays/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

nixpkgs.overlays = [
(final: prev: {
# bcachefs-tools = inputs.bcachefs-tools.packages.${pkgs.system}.bcachefs-tools;
bcachefs-tools = inputs.bcachefs-tools.packages.${pkgs.system}.bcachefs-tools;
})
];
}
2 changes: 1 addition & 1 deletion pkgs/user-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
# emacs

# IDEs #
android-studio-full
(jetbrains.plugins.addPlugins jetbrains.phpstorm [
"github-copilot"
"nixidea"
Expand All @@ -106,7 +107,6 @@
# list of latest packages from nixpkgs master
# Can be used to install latest version of some packages
# Some packages may not be cached so.. it may take some time to build
android-studio-full
]);

services.flatpak.packages = [
Expand Down
2 changes: 1 addition & 1 deletion system/hardware/audio.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
services.pipewire = {
enable = true;
alsa.enable = true; # alsa support
# alsa.support32Bit = true;
alsa.support32Bit = true;
pulse.enable = true; # pulseaudio compat
jack.enable = true; # enable jack audio
};
Expand Down
39 changes: 22 additions & 17 deletions system/hardware/graphics.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,27 @@
}: let
nur-amdgpu = config.nur.repos.materus;
in {
hardware.amdgpu = {
initrd.enable = true;
legacySupport.enable = true;
# disabled to use a mix of pocl and rocm below
opencl.enable = false;
};

hardware.amdgpu.amdvlk = {
enable = true;
support32Bit.enable = true;
supportExperimental.enable = true;
settings = {
AllowVkPipelineCachingToDisk = 1;
ShaderCacheMode = 1;
IFH = 0;
EnableVmAlwaysValid = 1;
IdleAfterSubmitGpuMask = 0;
};
};

# AMDGPU-PRO firmware
hardware.firmware = with nur-amdgpu; [
amdgpu-pro-libs.firmware.vcn
amdgpu-pro-libs.firmware
Expand All @@ -19,6 +40,7 @@ in {
# Extra drivers
extraPackages =
(with pkgs; [
# LIBVA and VDPAU are hardware acceleration drivers
libva-vdpau-driver
libvdpau-va-gl
libva
Expand Down Expand Up @@ -46,23 +68,6 @@ in {
vulkan-tools # vulkan graphics library tools
];

hardware.amdgpu.initrd.enable = true;
hardware.amdgpu.legacySupport.enable = true;
hardware.amdgpu.opencl.enable = false;

hardware.amdgpu.amdvlk = {
enable = true;
support32Bit.enable = true;
supportExperimental.enable = true;
settings = {
AllowVkPipelineCachingToDisk = 1;
ShaderCacheMode = 1;
IFH = 0;
EnableVmAlwaysValid = 1;
IdleAfterSubmitGpuMask = 0;
};
};

# Use modesetting driver for Xorg, its better and updated
# AMDGPU graphics driver for Xorg is deprecated
services.xserver.videoDrivers = ["modesetting"];
Expand Down
23 changes: 7 additions & 16 deletions system/hyprland.nix
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ in {
pamixer
pavucontrol # audio control
playerctl # media player control
pantheon.pantheon-agent-polkit # needed for apps requesting root access
# pywal # for automatic color schemes from wallpaper
rofi-wayland
slurp # screenshots
Expand Down Expand Up @@ -188,20 +187,12 @@ in {
# Run XDG autostart, this is needed for a DE-less setup like Hyprland
services.xserver.desktopManager.runXdgAutostartIfNone = true;

systemd = {
# Polkit starting systemd service - needed for apps requesting root access
user.services."io.elementary.desktop.agent-polkit" = {
description = "Polkit by Pantheon Desktop";
wantedBy = ["graphical-session.target"];
wants = ["graphical-session.target"];
after = ["graphical-session.target"];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.pantheon.pantheon-agent-polkit}/libexec/policykit-1-pantheon/io.elementary.desktop.agent-polkit";
Restart = "on-failure";
RestartSec = 1;
TimeoutStopSec = 10;
};
};
systemd.user.services."pantheon-polkit-agent" = {
description = "Pantheon Polkit Agent";
wantedBy = [ "graphical-session.target" ];
upheldBy = [ "graphical-session.target" ];
partOf = [ "graphical-session.target" ];
script = "${pkgs.pantheon.pantheon-agent-polkit}/libexec/policykit-1-pantheon/io.elementary.desktop.agent-polkit";
};

}

0 comments on commit a7bc117

Please sign in to comment.