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
Generated
+43
View File
@@ -512,6 +512,27 @@
"type": "github" "type": "github"
} }
}, },
"home-manager_3": {
"inputs": {
"nixpkgs": [
"nix-hazkey",
"nixpkgs"
]
},
"locked": {
"lastModified": 1778444552,
"narHash": "sha256-f18pIiR9q/p1vHY93gmAum7aHhQOG49oGvAB9+lptRo=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "dcebe66f958673729896eec2de4abfd86ef22d21",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"lanzaboote": { "lanzaboote": {
"inputs": { "inputs": {
"crane": "crane", "crane": "crane",
@@ -634,6 +655,27 @@
"type": "github" "type": "github"
} }
}, },
"nix-hazkey": {
"inputs": {
"home-manager": "home-manager_3",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1779529080,
"narHash": "sha256-CHa5L3I71NbPUNJp1gmmwbh91tKsZPyuRK50mLHjAVY=",
"owner": "aster-void",
"repo": "nix-hazkey",
"rev": "24cb2926666836988e78ceebeb67ad6c5a387ac3",
"type": "github"
},
"original": {
"owner": "aster-void",
"repo": "nix-hazkey",
"type": "github"
}
},
"nix-index-database": { "nix-index-database": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -1040,6 +1082,7 @@
"llm-agents": "llm-agents", "llm-agents": "llm-agents",
"niri-flake": "niri-flake", "niri-flake": "niri-flake",
"nix-darwin": "nix-darwin", "nix-darwin": "nix-darwin",
"nix-hazkey": "nix-hazkey",
"nix-index-database": "nix-index-database", "nix-index-database": "nix-index-database",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixos-wsl": "nixos-wsl", "nixos-wsl": "nixos-wsl",
+5
View File
@@ -23,6 +23,11 @@
# Desktop # Desktop
niri-flake.url = "github:sodiboo/niri-flake"; niri-flake.url = "github:sodiboo/niri-flake";
nix-hazkey = {
url = "github:aster-void/nix-hazkey";
inputs.nixpkgs.follows = "nixpkgs";
};
stylix = { stylix = {
url = "github:nix-community/stylix"; url = "github:nix-community/stylix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
+16 -1
View File
@@ -1,4 +1,19 @@
{ lib, pkgs, ... }: { 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 { 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 in
{ {
services.hazkey.enable = true;
i18n.inputMethod = { i18n.inputMethod = {
enable = true; enable = true;
type = "fcitx5"; type = "fcitx5";
@@ -67,6 +69,10 @@ in
Name = "mozc"; Name = "mozc";
Layout = ""; 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 # Pull in graphical-session.target so Home Manager services such as
# portals, Vicinae, and the idle manager follow the labwc session. # portals, Vicinae, and the idle manager follow the labwc session.
systemd.extraCommands = [ 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 # Clear the previous session's target first. Otherwise services such as
# kanshi that lose their Wayland connection on logout remain in a # kanshi that lose their Wayland connection on logout remain in a
# failed/start-limit-hit state and are not started for the next login. # 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" "codex"
"vesktop" "vesktop"
]; ];
show_all_outputs = true;
group_by_workspace = false; group_by_workspace = false;
show_window_title = false; show_window_title = false;
pinned_opacity = 0.60; 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;
};
}
+14 -3
View File
@@ -54,9 +54,20 @@ both sessions while sharing `interface.linux-desktop` and `interface.gui`.
The shared Linux desktop profile provides the common desktop applications and The shared Linux desktop profile provides the common desktop applications and
session-independent services; both session profiles select ly. The laptop session-independent services; both session profiles select ly. The laptop
platform selects niri as Ly's default session, while the desktop platform platform selects niri as Ly's default session, while the desktop platform
selects labwc. A daily-use macOS development machine can combine `interface.macos`, selects labwc. A daily-use macOS development machine can combine
`workload.development`, and `workload.personal`. Hardware support does not `interface.macos`, `workload.development`, and `workload.personal`. Hardware
implicitly select an interface or workload. support does not implicitly select an interface or workload.
`workload.personal` provides Pear Desktop on both NixOS and macOS. Home Manager
enables performance improvements, synced lyrics, tracker blocking, the album
color theme, and custom output-device selection while preserving user-owned
settings such as the selected device.
On NixOS, `workload.game` provides Steam with Valve Proton and Proton-GE,
Protontricks, Wayland-compatible Steam Input, GameMode, Gamescope, and MangoHud.
Enabling Steam also activates the 32-bit graphics and PipeWire support required
by older games. On macOS the same profile currently provides the portable game
applications that support that host class.
`security.tpm-storage` deliberately does not own a disk identifier. A host that `security.tpm-storage` deliberately does not own a disk identifier. A host that
selects it must define `boot.initrd.luks.devices.cryptroot.device` in its selects it must define `boot.initrd.luks.devices.cryptroot.device` in its
+4
View File
@@ -2,6 +2,10 @@
description = "Gaming applications"; description = "Gaming applications";
includes = [ includes = [
"applications.gamemode"
"applications.gamescope"
"applications.mangohud"
"applications.minecraft" "applications.minecraft"
"applications.steam"
]; ];
} }
@@ -8,6 +8,7 @@
"applications.gnome-text-editor" "applications.gnome-text-editor"
"applications.kde" "applications.kde"
"applications.moonlight" "applications.moonlight"
"applications.pear-desktop"
"applications.slack" "applications.slack"
"applications.zoom" "applications.zoom"
]; ];