This commit is contained in:
dusk 2021-12-25 16:19:03 +03:00
parent e145f8bdac
commit 9eafa9f3bf
Signed by: dusk
GPG Key ID: 1D8F8FAF2294D6EA
4 changed files with 48 additions and 74 deletions

View File

@ -1,12 +1,10 @@
_: prev:
let
pkgs = prev;
lib = pkgs.lib;
chromiumWayland =
cliArgs =
let
flags = [
"--flag-switches-begin"
"--enable-features=UseOzonePlatform,WebRTCPipeWireCapturer,IgnoreGPUBlocklist"
"--enable-features=WebUIDarkMode,UseOzonePlatform,WebRTCPipeWireCapturer,IgnoreGPUBlocklist,Vulkan"
"--flag-switches-end"
"--ozone-platform=wayland"
"--enable-webrtc-pipewire-capturer"
@ -15,40 +13,13 @@ let
"--enable-zero-copy"
"--disable-gpu-driver-bug-workarounds"
"--force-dark-mode"
"--process-per-site"
];
in
pkgs.writeScriptBin "chromium-wayland" ''
#!${pkgs.stdenv.shell}
${pkgs.chromium}/bin/chromium ${lib.concatStringsSep " " flags}
'';
prev.lib.concatStringsSep " " flags;
in
{
chromiumWayland =
let
pname = "chromium";
desktop = pkgs.makeDesktopItem {
name = pname;
exec = pname;
icon = "chromium-browser";
desktopName = "Chromium Wayland";
genericName = "Web Browser";
chromium = prev.chromium.override {
commandLineArgs = cliArgs;
};
in
lib.hiPrio (pkgs.stdenv.mkDerivation {
inherit pname;
version = pkgs.chromium.version;
nativeBuildInputs = [ pkgs.makeWrapper ];
phases = [ "installPhase" "fixupPhase" ];
installPhase = ''
mkdir -p $out/bin
install -m755 ${chromiumWayland}/bin/${pname}-wayland $out/bin/${pname}
cp -r ${desktop}/share $out/share
'';
/*fixupPhase = ''
wrapProgram $out/bin/${pname} \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath (with pkgs; [ vulkan-loader libGL ])} \
--prefix VK_ICD_FILENAMES : "${pkgs.amdvlk}/share/vulkan/icd.d/amd_icd64.json:${pkgs.driversi686Linux.amdvlk}/share/vulkan/icd.d/amd_icd32.json"
'';*/
});
}

View File

@ -1,17 +1,16 @@
final: prev: rec {
discord-canary-system = prev.callPackage mkDiscord (rec {
pname = "discord-canary";
version = "0.0.126";
version = "0.0.131";
binaryName = "DiscordCanary";
desktopName = "Discord Canary";
src = prev.fetchurl {
url = "https://dl-canary.discordapp.net/apps/linux/${version}/discord-canary-${version}.tar.gz";
sha256 = "sha256-EraTDRKd6t0c9U68tSRdGkeB1hfqNS4KUewEXwkL8io=";
sha256 = "sha256-ZYPdE02Jq79LmvXu7KIJFugJX++Nnj0Og/mBuaP/+SA=";
};
isWayland = true;
enableVulkan = true;
enableVulkan = false;
extraOptions = [
"--enable-vulkan"
"--ignore-gpu-blocklist"
"--enable-gpu-rasterization"
"--enable-zero-copy"
@ -74,6 +73,7 @@ final: prev: rec {
, vulkan-loader
, vulkan-extension-layer
, libGL
, pipewire
}:
stdenv.mkDerivation rec {
inherit pname version src;
@ -138,6 +138,7 @@ final: prev: rec {
vulkan-loader
vulkan-extension-layer
libGL
pipewire
];
flags = (lib.optionals isWayland [

View File

@ -27,7 +27,6 @@ in
gtkUsePortal = true;
extraPortals = with pkgs; [
xdg-desktop-portal
xdg-desktop-portal-gtk
xdg-desktop-portal-wlr
];
};
@ -42,19 +41,34 @@ in
wireshark.enable = false;
};
security.pam.services.patriot = {
security = {
pam.services.patriot = {
enableGnomeKeyring = true;
enableKwallet = false;
};
sudo.extraRules = [
{
users = [ "patriot" ];
commands = [{
command = "${pkgs.profile-sync-daemon}/bin/psd-overlay-helper";
options = [ "SETENV" "NOPASSWD" ];
}];
}
];
};
services = {
psd.enable = true;
gnome = {
gnome-keyring.enable = true;
core-utilities.enable = false;
tracker-miners.enable = false;
tracker.enable = false;
};
xserver = {
enable = true;
desktopManager = {
plasma5.enable = false;
gnome.enable = false;
gnome.enable = true;
xterm.enable = false;
};
displayManager = {
@ -64,11 +78,11 @@ in
};
lightdm.enable = false;
gdm = {
enable = false;
enable = true;
wayland = true;
};
sddm.enable = false;
startx.enable = true;
startx.enable = false;
};
};
};
@ -222,15 +236,15 @@ in
fonts = [ fontComb ];
extraEnv = ''
# export SDL_VIDEODRIVER=wayland
export SDL_VIDEODRIVER=wayland
# needs qt5.qtwayland in systemPackages
export QT_QPA_PLATFORM=wayland
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
#export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
# Fix for some Java AWT applications (e.g. Android Studio),
# use this if they aren't displayed properly:
export _JAVA_AWT_WM_NONREPARENTING=1
export QT_QPA_PLATFORMTHEME=qt5ct
export QT_PLATFORM_PLUGIN=qt5ct
#export QT_QPA_PLATFORMTHEME=qt5ct
#export QT_PLATFORM_PLUGIN=qt5ct
'';
in
{
@ -273,12 +287,7 @@ in
dejavu_fonts
(nerdfonts.override { fonts = [ "Iosevka" ]; })
# Programs
# discord-canary-system
# element-desktop
# gh
openbox
openbox-menu
sublime4
discord-canary-system
vulkan-tools
audacity
krita
@ -286,12 +295,10 @@ in
kdenlive
gnome3.seahorse
gnome3.gnome-boxes
#wine-staging
cachix
appimage-run
bitwarden
pfetch
neofetch
gnupg
imv
mpv
@ -308,13 +315,8 @@ in
xdg_utils
tagref
libreoffice-fresh
mako
hydrus
musikcube
qt5ct
phantomstyle
papirus-icon-theme
pcmanfm-qt
wl-clipboard
rust-analyzer
(lib.hiPrio (steam.override {
@ -331,7 +333,7 @@ in
wayland.windowManager = {
sway = {
enable = true;
enable = false;
extraSessionCommands = extraEnv;
wrapperFeatures.gtk = true;
extraConfig = ''
@ -443,7 +445,7 @@ in
};
chromium = {
enable = true;
package = pkgs.chromiumWayland;
package = pkgs.chromium;
extensions = [
"gcbommkclmclpchllfjekcdonpmejbdp" # https everywhere
"cjpalhdlnbpafiamejdnhcphjbkeiagm" # ublock
@ -538,12 +540,12 @@ in
dotDir = ".config/zsh";
history.path = ".local/share/zsh/history";
envExtra = extraEnv;
loginExtra =
/*loginExtra =
''
if [ "$(${pkgs.coreutils}/bin/tty)" = "/dev/tty1" ]; then
exec sway
fi
'';
'';*/
initExtra = ''
export TERM=alacritty
@ -575,7 +577,7 @@ in
acc = "#${acColor}";
in
{
enable = true;
enable = false;
cycle = true;
font = fontComb;
terminal = pkgBin "alacritty";