Skip to content

Commit

Permalink
fix: various fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
DrymarchonShaun committed Jun 5, 2024
1 parent 9dd0b41 commit 98cf519
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 18 deletions.
3 changes: 3 additions & 0 deletions home/shaun/common/core/zsh/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@

#-------------Git Goodness-------------
# just reference `$ alias` and use the defautls, they're good.

#-----------Anti-Stupid-Shit----------------
clear = "echo \"use ctrl+l stupid\"";
};
};
}
39 changes: 30 additions & 9 deletions home/shaun/common/optional/comms/discord.nix
Original file line number Diff line number Diff line change
@@ -1,18 +1,38 @@
{ pkgs, ... }:
let
discord-wayland = pkgs.unstable.discord.overrideAttrs (
discord-wayland = (pkgs.unstable.discord.overrideAttrs (
old: {
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.makeWrapper ];
postFixup = (old.postFixup or "") + ''
wrapProgram $out/bin/discord \
--add-flags "--enable-features=UseOzonePlatform" \
--add-flags "--ozone-platform=wayland"
'';
# nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.makeWrapper ];
# postFixup = (old.postFixup or "") + ''
# wrapProgram $out/bin/discord \
# --add-flags "--enable-features=UseOzonePlatform" \
# --add-flags "--ozone-platform=wayland"
# '';
}
);
)).override { withVencord = true; };

krisp-patcher = pkgs.writers.writePython3Bin "krisp-patcher"
{
libraries = with pkgs.python3Packages; [ capstone pyelftools ];
flakeIgnore = [
"E501" # line too long (82 > 79 characters)
"F403" # ‘from module import *’ used; unable to detect undefined names
"F405" # name may be undefined, or defined from star imports: module
];
}
(builtins.readFile (pkgs.fetchFromGitHub
{
owner = "sersorrel";
repo = "sys";
rev = "main";
sha256 = "sha256-lRkQ1VXOz13Edn53Gn1SwcqVjZkjwGCIIBvvENBLe7Y=";
} + "/hm/discord/krisp-patcher.py"));
in
{
home.packages = [ (discord-wayland.override { withVencord = true; }) ];
home.packages = [
discord-wayland
krisp-patcher
];
# home.packages = [ discord-wayland ];
systemd.user.services.discord = {
Unit = {
Expand All @@ -26,6 +46,7 @@ in

Service = {
RestartSec = 5;
Restart = "on-failure";
ExecStart = "/bin/sh -c \"${pkgs.coreutils}/bin/sleep 5 && ${discord-wayland}/bin/discord\"";
KillMode = "mixed";
};
Expand Down
16 changes: 16 additions & 0 deletions home/shaun/common/optional/desktops/sway/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,22 @@

# NOTE: xdg portal package is currently set in /hosts/common/optional/hyprland.nix

home.sessionVariables =
{
NIXOS_OZONE_WL = "1"; # for ozone-based and electron apps to run on wayland
MOZ_ENABLE_WAYLAND = "1"; # for firefox to run on wayland
MOZ_WEBRENDER = "1"; # for firefox to run on wayland
XDG_SESSION_TYPE = "wayland";
WLR_NO_HARDWARE_CURSORS = "1";
WLR_RENDERER_ALLOW_SOFTWARE = "1";
XCURSOR_SIZE = "24";

QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";

_JAVA_AWT_WM_NONREPARENTING = "1"; # Fixing java apps (especially idea)

};

wayland.windowManager.sway = {
enable = true;
package = pkgs.swayfx;
Expand Down
12 changes: 6 additions & 6 deletions home/shaun/common/optional/dev/vscode.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
let
vscode-wayland = pkgs.vscode.overrideAttrs (
old: {
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.makeWrapper ];
postFixup = (old.postFixup or "") + ''
wrapProgram $out/bin/code \
--add-flags "--enable-features=UseOzonePlatform" \
--add-flags "--ozone-platform=wayland"
'';
# nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.makeWrapper ];
# postFixup = (old.postFixup or "") + ''
# wrapProgram $out/bin/code \
# --add-flags "--enable-features=UseOzonePlatform" \
# --add-flags "--ozone-platform=wayland"
# '';
}
);
in
Expand Down
4 changes: 3 additions & 1 deletion home/shaun/corais.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@
}
];

home.sessionVariables = {
GDK_DPI_SCALE = 1.15;
};
wayland.windowManager.sway = {
extraSessionCommands = [
"export GDK_DPI_SCALE=1.15"
];
config = {
workspaceOutputAssign = [
Expand Down
3 changes: 1 addition & 2 deletions hosts/corais/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
inputs.hardware.nixosModules.common-cpu-amd
inputs.hardware.nixosModules.common-gpu-amd
inputs.hardware.nixosModules.common-pc-ssd

#################### Disk Layout ####################
inputs.disko.nixosModules.disko
(configLib.relativeToRoot "hosts/common/disks/standard-disk-config.nix")
Expand Down Expand Up @@ -54,7 +53,7 @@
services.gnome.gnome-keyring.enable = true;
# TODO enable and move to greetd area? may need authentication dir or something?
# services.pam.services.greetd.enableGnomeKeyring = true;

hardware.amdgpu.opencl = true;
networking = {
hostName = "corais";
networkmanager.enable = true;
Expand Down

0 comments on commit 98cf519

Please sign in to comment.