This commit is contained in:
2026-08-02 17:54:30 +09:00
parent 7c66c15da5
commit 176cd60d68
16 changed files with 221 additions and 4 deletions
+16 -1
View File
@@ -1,4 +1,19 @@
{ lib, pkgs, ... }:
let
vesktop = pkgs.vesktop.overrideAttrs (oldAttrs: {
# Electron does not enable the PipeWire WebRTC capturer in Vesktop's
# wrapper, so Wayland compositors cannot hand screen sharing to their
# xdg-desktop-portal backend.
postFixup =
builtins.replaceStrings
[ "WaylandWindowDecorations" ]
[ "WaylandWindowDecorations,WebRTCPipeWireCapturer" ]
oldAttrs.postFixup;
});
in
lib.mkIf pkgs.stdenv.hostPlatform.isLinux {
programs.vesktop.enable = true;
programs.vesktop = {
enable = true;
package = vesktop;
};
}
+6
View File
@@ -0,0 +1,6 @@
{ inputs, ... }:
{
description = "Fcitx 5 input method framework with Hazkey Japanese input";
imports.nixos = [ inputs.nix-hazkey.nixosModules.hazkey ];
}
+6
View File
@@ -39,6 +39,8 @@ let
};
in
{
services.hazkey.enable = true;
i18n.inputMethod = {
enable = true;
type = "fcitx5";
@@ -67,6 +69,10 @@ in
Name = "mozc";
Layout = "";
};
"Groups/0/Items/2" = {
Name = "hazkey";
Layout = "";
};
};
};
};
+8
View File
@@ -0,0 +1,8 @@
{
programs.gamemode = {
enable = true;
enableRenice = true;
settings.general.renice = 10;
};
}
+6
View File
@@ -0,0 +1,6 @@
{
programs.gamescope = {
enable = true;
capSysNice = true;
};
}
+6
View File
@@ -151,6 +151,12 @@ in
# Pull in graphical-session.target so Home Manager services such as
# portals, Vicinae, and the idle manager follow the labwc session.
systemd.extraCommands = [
# The wlroots portal is conditionally started with WAYLAND_DISPLAY. It
# can otherwise be skipped before labwc imports its session environment,
# leaving the desktop portal without the ScreenCast interface.
"${lib.getExe' pkgs.systemd "systemctl"} --user restart xdg-desktop-portal-wlr.service"
"${lib.getExe' pkgs.systemd "systemctl"} --user restart xdg-desktop-portal.service"
# Clear the previous session's target first. Otherwise services such as
# kanshi that lose their Wayland connection on logout remain in a
# failed/start-limit-hit state and are not started for the next login.
+4
View File
@@ -0,0 +1,4 @@
{ lib, pkgs, ... }:
lib.mkIf pkgs.stdenv.hostPlatform.isLinux {
programs.mangohud.enable = true;
}
+1
View File
@@ -89,6 +89,7 @@ let
"codex"
"vesktop"
];
show_all_outputs = true;
group_by_workspace = false;
show_window_title = false;
pinned_opacity = 0.60;
@@ -0,0 +1,7 @@
{
homebrew = {
enable = true;
taps = [ "pear-devs/pear" ];
casks = [ "pear-desktop" ];
};
}
@@ -0,0 +1,76 @@
{
config,
inputs,
lib,
pkgs,
...
}:
let
isLinux = pkgs.stdenv.hostPlatform.isLinux;
isDarwin = pkgs.stdenv.hostPlatform.isDarwin;
unstable = inputs.nixpkgs-unstable.legacyPackages.${pkgs.stdenv.hostPlatform.system};
configDirectory =
if isDarwin then
"${config.home.homeDirectory}/Library/Application Support/YouTube Music"
else
"${config.xdg.configHome}/YouTube Music";
configFile = "${configDirectory}/config.json";
managedConfig = {
options.autoUpdates = false;
plugins = {
performance-improvement.enabled = true;
synced-lyrics = {
enabled = true;
preciseTiming = true;
showLyricsEvenIfInexact = true;
showTimeCodes = false;
defaultTextString = "♪";
lineEffect = "fancy";
romanization = true;
};
do-not-track = {
enabled = true;
cache = true;
};
album-color-theme = {
enabled = true;
ratio = 0.5;
enableSeekbar = true;
};
custom-output-device.enabled = true;
};
};
in
{
home.packages = lib.optionals isLinux [ unstable.pear-desktop ];
home.activation.configurePearDesktop = {
after = [ "writeBoundary" ];
before = [ ];
data = ''
config_directory=${lib.escapeShellArg configDirectory}
config_file=${lib.escapeShellArg configFile}
managed_config=${lib.escapeShellArg (builtins.toJSON managedConfig)}
if [ -n "''${DRY_RUN_CMD:-}" ]; then
echo "Would merge managed Pear Desktop settings into $config_file"
else
umask 077
mkdir -p "$config_directory"
if [ ! -f "$config_file" ]; then
printf '{}\n' > "$config_file"
fi
if ${pkgs.jq}/bin/jq -e . "$config_file" > /dev/null; then
temporary_file="$(${pkgs.coreutils}/bin/mktemp "$config_file.tmp.XXXXXX")"
${pkgs.jq}/bin/jq --argjson managed "$managed_config" \
'. * $managed' "$config_file" > "$temporary_file"
${pkgs.coreutils}/bin/mv "$temporary_file" "$config_file"
else
echo "Pear Desktop config is invalid JSON; leaving it unchanged: $config_file" >&2
fi
fi
'';
};
}
+18
View File
@@ -0,0 +1,18 @@
{ pkgs, ... }:
{
programs.steam = {
enable = true;
# Keep Valve's Proton available through Steam and add Proton-GE as an
# explicitly selectable compatibility tool for games that need its extra
# patches and codecs.
extraCompatPackages = [ pkgs.proton-ge-bin ];
# Install the supported helper for changing an individual Proton prefix.
protontricks.enable = true;
# Translate Steam's X11 input events to uinput under Wayland so Steam Input
# and controller remapping continue to work in the desktop sessions.
extest.enable = true;
};
}