├── dotfiles
├── app
│ ├── mlterm
│ │ ├── key.nix
│ │ ├── color.nix
│ │ ├── default.nix
│ │ ├── main.nix
│ │ └── aafont.nix
│ ├── git
│ │ ├── default.nix
│ │ └── gitignore.nix
│ ├── hyprland
│ │ └── default.nix
│ └── xdg
│ │ └── default.nix
├── config
│ ├── services
│ │ ├── syncthing.nix
│ │ └── polkit.nix
│ ├── app
│ │ ├── generative.nix
│ │ ├── office.nix
│ │ ├── wine.nix
│ │ ├── multimedia.nix
│ │ ├── creative.nix
│ │ ├── browser.nix
│ │ └── vr.nix
│ ├── files
│ │ └── skk.nix
│ ├── tools
│ │ ├── archiver.nix
│ │ └── development.nix
│ ├── desktop
│ │ ├── theme.nix
│ │ └── desktop-session.nix
│ ├── shell
│ │ ├── starship.nix
│ │ └── zsh.nix
│ └── nixos
│ │ └── gsettings.nix
├── files
│ ├── scripts
│ │ ├── launch-steam
│ │ ├── launch-immersed
│ │ ├── launch-wivrn
│ │ ├── mount-btrfs.sh
│ │ ├── waydroid-stop
│ │ ├── waydroid-start
│ │ ├── vm-snapshot-vr
│ │ ├── vm-snapshot-for-daw
│ │ ├── vanish-check
│ │ ├── snapper-clean-all
│ │ └── prepare-windows-vm
│ └── wine
│ │ └── Kindle
└── user
│ └── nyarla.nix
├── .gitignore
├── system
├── config
│ ├── gadgets
│ │ └── android.nix
│ ├── cpu
│ │ ├── intel.nix
│ │ └── amd.nix
│ ├── desktop
│ │ ├── app.nix
│ │ ├── wayland.nix
│ │ ├── xorg.nix
│ │ ├── xdg.nix
│ │ ├── gnome-compatible.nix
│ │ └── files.nix
│ ├── linux
│ │ ├── optical.nix
│ │ ├── lodpi.nix
│ │ ├── process.nix
│ │ ├── hardware.nix
│ │ ├── wine.nix
│ │ ├── containers.nix
│ │ ├── filesystem.nix
│ │ ├── console.nix
│ │ ├── waydroid.nix
│ │ ├── optimize.nix
│ │ └── dbus.nix
│ ├── wireless
│ │ ├── jp.nix
│ │ ├── AX200.nix
│ │ └── bluetooth.nix
│ ├── graphic
│ │ ├── lodpi.nix
│ │ ├── hidpi.nix
│ │ └── fonts.nix
│ ├── tools
│ │ ├── editors.nix
│ │ └── git.nix
│ ├── networking
│ │ ├── tailscale.nix
│ │ ├── agent.nix
│ │ ├── printer.nix
│ │ ├── avahi.nix
│ │ └── network-manager.nix
│ ├── video
│ │ ├── droidcam.nix
│ │ ├── intel-with-nvidia.nix
│ │ └── intel-with-amd.nix
│ ├── hardware
│ │ └── firmware.nix
│ ├── security
│ │ ├── gnupg.nix
│ │ ├── clamav.nix
│ │ ├── ulimit.nix
│ │ ├── yubikey.nix
│ │ └── firewall-home.nix
│ ├── keyboard
│ │ ├── us.nix
│ │ ├── jp.nix
│ │ └── zinc.nix
│ ├── datetime
│ │ └── jp.nix
│ ├── i18n
│ │ ├── locales.nix
│ │ └── fcitx5.nix
│ ├── nixos
│ │ ├── nix-ld.nix
│ │ └── gsettings.nix
│ ├── gaming
│ │ ├── steam.nix
│ │ └── xr.nix
│ ├── user
│ │ └── nyarla.nix
│ ├── audio
│ │ └── pipewire.nix
│ ├── vmm
│ │ └── kvm.nix
│ └── services
│ │ └── nyzen9.nix
├── machine
│ └── NyZen9
│ │ ├── default.nix
│ │ ├── nixos.nix
│ │ ├── boot.nix
│ │ ├── services.nix
│ │ ├── network.nix
│ │ ├── hardware.nix
│ │ └── devices.nix
└── profile
│ └── NyZen9.nix
├── .secretlintrc.json
├── pkgs
├── xembed-sni-proxy
│ └── default.nix
├── amd-run
│ └── default.nix
├── thorium-reader
│ └── default.nix
├── ghalint
│ └── default.nix
├── wcwidh-cjk
│ └── default.nix
├── perl-shell
│ └── default.nix
├── shoreman
│ └── default.nix
├── calibre
│ └── dont_build_unrar_plugin.patch
├── wine-vst-wrapper
│ └── default.nix
├── noto-fonts-jp
│ ├── default.nix
│ ├── update.sh
│ └── fonts.nix
├── cskk
│ └── default.nix
├── skk-dicts-xl
│ ├── update.sh
│ ├── default.nix
│ └── skk.nix
├── rocm-shell
│ └── default.nix
├── fcitx5-fbterm
│ └── default.nix
├── fluent-kde
│ └── default.nix
├── temporary.nix
├── deadbeef-fb
│ └── default.nix
├── galendae
│ └── default.nix
├── aria-misskey
│ ├── rust_lib_aria.patch
│ └── default.nix
├── glibc-locales-eaw
│ └── default.nix
├── igsc
│ └── default.nix
├── immersed
│ └── default.nix
├── fcitx5-cskk
│ └── default.nix
├── gyazo-diy
│ └── default.nix
├── nvim-run
│ └── default.nix
├── xdg-desktop-portal-hypr-remote
│ └── default.nix
├── wine-run
│ └── default.nix
├── cuda-shell
│ └── default.nix
├── restic-run
│ └── default.nix
├── openjtalk
│ └── default.nix
├── dexed
│ └── default.nix
├── ildaeil
│ ├── default.nix
│ └── nixos.patch
├── stability-matrix
│ ├── default.nix
│ └── nixos.patch
├── unityhub-amd
│ └── default.nix
├── sononym-bin
│ └── default.nix
├── carla
│ ├── default.nix
│ └── nixos.patch
├── default.nix
├── wineasio
│ └── default.nix
└── audiogridder
│ └── default.nix
├── patches
├── weylus.patch
├── tmux-3.6-utf8.pl
├── tmux3.5a-utf8.patch
└── tmux-3.6-utf8.patch
├── lib
├── nixosSystem.nix
└── theme.nix
├── flake.nix
└── flake.lock
/dotfiles/app/mlterm/key.nix:
--------------------------------------------------------------------------------
1 | {
2 | }
3 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .node_modules
2 | result
3 | .snapshots
4 |
--------------------------------------------------------------------------------
/system/config/gadgets/android.nix:
--------------------------------------------------------------------------------
1 | _: { programs.adb.enable = true; }
2 |
--------------------------------------------------------------------------------
/dotfiles/config/services/syncthing.nix:
--------------------------------------------------------------------------------
1 | _: { services.syncthing.enable = true; }
2 |
--------------------------------------------------------------------------------
/system/config/cpu/intel.nix:
--------------------------------------------------------------------------------
1 | _: { hardware.cpu.intel.updateMicrocode = true; }
2 |
--------------------------------------------------------------------------------
/dotfiles/files/scripts/launch-steam:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | steam-run amd-run steam -cef-disable-gpu
4 |
--------------------------------------------------------------------------------
/system/config/desktop/app.nix:
--------------------------------------------------------------------------------
1 | _: {
2 | programs.appimage.enable = true;
3 | services.flatpak.enable = true;
4 | }
5 |
--------------------------------------------------------------------------------
/system/config/linux/optical.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | environment.systemPackages = with pkgs; [ whipper ];
4 | }
5 |
--------------------------------------------------------------------------------
/dotfiles/config/app/generative.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | home.packages = with pkgs; [
4 | rocm-shell
5 | ];
6 | }
7 |
--------------------------------------------------------------------------------
/.secretlintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "rules": [
3 | {
4 | "id": "@secretlint/secretlint-rule-preset-recommend"
5 | }
6 | ]
7 | }
8 |
--------------------------------------------------------------------------------
/system/config/wireless/jp.nix:
--------------------------------------------------------------------------------
1 | _: {
2 | boot.extraModprobeConfig = ''
3 | options cfg80211 ieee80211_regdom=JP
4 | '';
5 | }
6 |
--------------------------------------------------------------------------------
/system/config/linux/lodpi.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | console.font = "${pkgs.terminus_font}/share/consolefonts/ter-v16n.psf.gz";
4 | }
5 |
--------------------------------------------------------------------------------
/system/config/graphic/lodpi.nix:
--------------------------------------------------------------------------------
1 | _: {
2 | fonts.fontconfig.hinting.style = "full";
3 | fonts.fontconfig.subpixel.lcdfilter = "default";
4 | }
5 |
--------------------------------------------------------------------------------
/system/config/linux/process.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | environment.systemPackages = with pkgs; [
4 | htop
5 | lsof
6 | ];
7 | }
8 |
--------------------------------------------------------------------------------
/system/config/tools/editors.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | environment.systemPackages = with pkgs; [
4 | neovim
5 | nano
6 | ];
7 | }
8 |
--------------------------------------------------------------------------------
/system/config/tools/git.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | programs.git = {
4 | enable = true;
5 | package = pkgs.gitFull;
6 | };
7 | }
8 |
--------------------------------------------------------------------------------
/system/config/wireless/AX200.nix:
--------------------------------------------------------------------------------
1 | _: {
2 | boot.kernelParams = [
3 | "iwlwifi.power_save=0"
4 | "iwlmvm.power_scheme=1"
5 | ];
6 | }
7 |
--------------------------------------------------------------------------------
/system/config/networking/tailscale.nix:
--------------------------------------------------------------------------------
1 | _: {
2 | services.tailscale = {
3 | enable = true;
4 | extraUpFlags = [ "--ssh" ];
5 | };
6 | }
7 |
--------------------------------------------------------------------------------
/system/config/video/droidcam.nix:
--------------------------------------------------------------------------------
1 | _: {
2 | boot.kernelParams = [ "v4l2loopback.exclusive_caps=1" ];
3 | programs.droidcam.enable = true;
4 | }
5 |
--------------------------------------------------------------------------------
/dotfiles/config/files/skk.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | xdg.configFile."skk/SKK-JISYO.XL".source = "${pkgs.skk-dicts-xl}/share/skk/SkK-JISYO.XL";
4 | }
5 |
--------------------------------------------------------------------------------
/system/config/linux/hardware.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | environment.systemPackages = with pkgs; [
4 | pciutils
5 | usbutils
6 | ];
7 | }
8 |
--------------------------------------------------------------------------------
/system/config/hardware/firmware.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | hardware.enableAllFirmware = true;
4 | hardware.enableRedistributableFirmware = true;
5 | }
6 |
--------------------------------------------------------------------------------
/system/config/security/gnupg.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | programs.gnupg.agent.enable = true;
4 | programs.gnupg.agent.pinentryPackage = pkgs.pinentry-gnome3;
5 | }
6 |
--------------------------------------------------------------------------------
/system/config/linux/wine.nix:
--------------------------------------------------------------------------------
1 | _: {
2 | services.udev.extraRules = ''
3 | KERNEL=="winesync", MODE="0644"
4 | '';
5 |
6 | boot.kernelModules = [ "winesync" ];
7 | }
8 |
--------------------------------------------------------------------------------
/dotfiles/files/scripts/launch-immersed:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -euo pipefail
4 |
5 | hyprctl dispatch workspace +1
6 |
7 | amd-run \
8 | env HOME=/persist/home/nyarla immersed
9 |
--------------------------------------------------------------------------------
/dotfiles/config/app/office.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | home.packages = with pkgs; [
4 | gucharmap
5 | libreoffice
6 | mate.mate-calc
7 | simple-scan
8 | ];
9 | }
10 |
--------------------------------------------------------------------------------
/dotfiles/config/app/wine.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | home.packages = with pkgs; [
4 | carla-with-wine
5 | wine-staging-run
6 | wine-vst-run
7 | winetricks
8 | ];
9 | }
10 |
--------------------------------------------------------------------------------
/system/config/keyboard/us.nix:
--------------------------------------------------------------------------------
1 | _: {
2 | console.useXkbConfig = true;
3 | services.xserver.xkb = {
4 | layout = "us";
5 | model = "pc104";
6 | options = "ctrl:nocaps";
7 | };
8 | }
9 |
--------------------------------------------------------------------------------
/dotfiles/files/scripts/launch-wivrn:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -euo pipefail
4 |
5 | adb kill-server
6 | adb devices
7 |
8 | systemctl --user stop wivrn
9 |
10 | amd-run wivrn-dashboard
11 |
--------------------------------------------------------------------------------
/system/config/keyboard/jp.nix:
--------------------------------------------------------------------------------
1 | _: {
2 | console.useXkbConfig = true;
3 | services.xserver.layout = "jp";
4 | services.xserver.xkbModel = "pc106";
5 | services.xserver.xkbOptions = "ctrl:nocaps";
6 | }
7 |
--------------------------------------------------------------------------------
/system/config/cpu/amd.nix:
--------------------------------------------------------------------------------
1 | _: {
2 | hardware.cpu.amd.updateMicrocode = true;
3 |
4 | # fix for kernel stuck on reboot or shutdown process with Ryzen Processor
5 | boot.kernelParams = [ "processor.max_cstate=1" ];
6 | }
7 |
--------------------------------------------------------------------------------
/system/machine/NyZen9/default.nix:
--------------------------------------------------------------------------------
1 | _: {
2 | imports = [
3 | ./boot.nix
4 | ./devices.nix
5 | ./fs.nix
6 | ./hardware.nix
7 | ./network.nix
8 | ./nixos.nix
9 | ./services.nix
10 | ];
11 | }
12 |
--------------------------------------------------------------------------------
/system/machine/NyZen9/nixos.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | system.stateVersion = "24.11";
4 |
5 | nixpkgs.config.permittedInsecurePackages = [ ];
6 |
7 | environment.systemPackages = with pkgs; [ wpa_supplicant ];
8 | }
9 |
--------------------------------------------------------------------------------
/dotfiles/files/scripts/mount-btrfs.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | test -d /tmp/btrfs || sudo mkdir -p /tmp/btrfs
4 | test -d /tmp/btrfs/nix || sudo mount -t btrfs -o compress=zstd,ssd,space_cache=v2 /dev/mapper/nixos /tmp/btrfs
5 |
--------------------------------------------------------------------------------
/pkgs/xembed-sni-proxy/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | kdePackages,
3 | writeShellScriptBin,
4 | }:
5 | writeShellScriptBin "xembedsniproxy" ''
6 | exec -a xembed-sni-proxy ${kdePackages.plasma-workspace}/bin/xembedsniproxy "''${@:-}"
7 | ''
8 |
--------------------------------------------------------------------------------
/system/config/networking/agent.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | environment.systemPackages = with pkgs; [
4 | aria2
5 | bind
6 | curlFull
7 | rclone
8 | restic
9 | restic-run
10 | wget
11 | ];
12 | }
13 |
--------------------------------------------------------------------------------
/system/config/linux/containers.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | virtualisation.podman = {
4 | enable = true;
5 | dockerCompat = true;
6 | };
7 |
8 | environment.systemPackages = with pkgs; [
9 | podman-compose
10 | ];
11 | }
12 |
--------------------------------------------------------------------------------
/system/config/graphic/hidpi.nix:
--------------------------------------------------------------------------------
1 | _: {
2 | services.xserver.dpi = 192;
3 | fonts.fontconfig.dpi = 192;
4 |
5 | environment.variables = {
6 | GDK_SCALE = "2";
7 | GDK_DPI_SCALE = "0.5";
8 | QT_AUTOSCREEN_SCALE_FACTOR = "1";
9 | };
10 | }
11 |
--------------------------------------------------------------------------------
/system/config/networking/printer.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | services.printing.enable = true;
4 | services.printing.drivers = with pkgs; [ cnijfilter2 ];
5 |
6 | hardware.sane.enable = true;
7 | hardware.sane.extraBackends = with pkgs; [ sane-airscan ];
8 | }
9 |
--------------------------------------------------------------------------------
/dotfiles/config/app/multimedia.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | home.packages = with pkgs; [
4 | calibre
5 | (deadbeef-with-plugins.override { plugins = [ deadbeef-fb ]; })
6 | easytag
7 | glib.out
8 | picard
9 | thorium-reader
10 | vlc
11 | ];
12 | }
13 |
--------------------------------------------------------------------------------
/system/config/linux/filesystem.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | environment.systemPackages = with pkgs; [
4 | btrfs-progs
5 | cryptsetup
6 | e2fsprogs
7 | exfat
8 | gptfdisk
9 | hfsprogs
10 | ntfs3g
11 | ];
12 |
13 | programs.fuse.userAllowOther = true;
14 | }
15 |
--------------------------------------------------------------------------------
/system/config/wireless/bluetooth.nix:
--------------------------------------------------------------------------------
1 | _: {
2 | services.blueman.enable = true;
3 |
4 | hardware.bluetooth.enable = true;
5 | hardware.bluetooth.powerOnBoot = true;
6 | hardware.bluetooth.settings = {
7 | General = {
8 | Enable = "Source,Sink,Media,Socket";
9 | };
10 | };
11 | }
12 |
--------------------------------------------------------------------------------
/system/config/security/clamav.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | environment.systemPackages = with pkgs; [ clamav ];
4 | services.clamav.daemon.enable = true;
5 | services.clamav.updater.enable = true;
6 | services.clamav.updater.settings = {
7 | DatabaseMirror = [ "db.jp.clamav.net" ];
8 | };
9 | }
10 |
--------------------------------------------------------------------------------
/system/config/datetime/jp.nix:
--------------------------------------------------------------------------------
1 | _: {
2 | # timezone
3 | time.timeZone = "Asia/Tokyo";
4 |
5 | # ntp sync
6 | services.timesyncd = {
7 | enable = true;
8 | servers = [
9 | "ntp1.jst.mfeed.ad.jp"
10 | "ntp2.jst.mfeed.ad.jp"
11 | "ntp3.jst.mfeed.ad.jp"
12 | ];
13 | };
14 | }
15 |
--------------------------------------------------------------------------------
/system/config/desktop/wayland.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | imports = [ ./gnome-compatible.nix ];
4 | security.pam.services.swaylock = { };
5 | services.dbus.packages = with pkgs; [
6 | xembed-sni-proxy
7 | ];
8 | environment.systemPackages = with pkgs; [
9 | xembed-sni-proxy
10 | ];
11 | }
12 |
--------------------------------------------------------------------------------
/dotfiles/config/app/creative.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | home.packages = with pkgs; [
4 | # for edit graphics
5 | gimp3
6 | inkscape
7 | krita
8 |
9 | # for pixel arts
10 | aseprite
11 | pixelorama
12 |
13 | # for 3D modeling
14 | alcom
15 | blender-hip
16 | ];
17 | }
18 |
--------------------------------------------------------------------------------
/dotfiles/config/tools/archiver.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | home.packages = with pkgs; [
4 | bzip2
5 | cpio
6 | # dmg2img
7 | gnutar
8 | lzip
9 | nodePackages.asar
10 | p7zip
11 | # pbzx
12 | unrar
13 | unzip
14 | # xar
15 | xz
16 | zip
17 | zstd
18 | ];
19 | }
20 |
--------------------------------------------------------------------------------
/dotfiles/files/wine/Kindle:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -euo pipefail
4 |
5 | cd "$HOME"/Applications/Wine/Kindle
6 |
7 | wine-staging wine 'C:\Program Files (x86)\Amazon\Kindle\Kindle.exe' &
8 | waitPID=$!
9 |
10 | test -n "$waitPID" && wait $waitPID
11 |
12 | wine-staging wineboot --shutdown
13 |
14 | exit 0
15 |
--------------------------------------------------------------------------------
/pkgs/amd-run/default.nix:
--------------------------------------------------------------------------------
1 | { writeShellScriptBin, gpuId }:
2 | writeShellScriptBin "amd-run" ''
3 | env \
4 | DRI_PRIME=${gpuId}! \
5 | MESA_VK_DEVICE_SELECT=${gpuId} \
6 | AMD_VULKAN_ICD=RADV \
7 | VK_ICD_FILENAMES=/run/opengl-driver/share/vulkan/icd.d/radeon_icd.x86_64.json \
8 | "''${@:-}"
9 | ''
10 |
--------------------------------------------------------------------------------
/dotfiles/files/scripts/waydroid-stop:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -euo pipefail
4 |
5 | waydroid session stop
6 |
7 | env SHELL=/bin/sh pkexec sh -c '
8 | sudo umount /persist/home/nyarla/.local/share/waydroid/data/media/0/Music
9 | sudo umount /persist/home/nyarla/.local/share/waydroid/data/media/0/Download
10 | '
11 |
--------------------------------------------------------------------------------
/system/config/security/ulimit.nix:
--------------------------------------------------------------------------------
1 | _: {
2 | security.pam.loginLimits = [
3 | {
4 | domain = "*";
5 | type = "-";
6 | item = "nofile";
7 | value = "655360";
8 | }
9 | {
10 | domain = "*";
11 | item = "memlock";
12 | type = "-";
13 | value = "655360";
14 | }
15 | ];
16 | }
17 |
--------------------------------------------------------------------------------
/system/config/networking/avahi.nix:
--------------------------------------------------------------------------------
1 | _: {
2 | services.avahi = {
3 | enable = true;
4 | ipv4 = true;
5 | ipv6 = true;
6 | reflector = true;
7 | nssmdns4 = true;
8 | publish = {
9 | enable = true;
10 | userServices = true;
11 | addresses = true;
12 | domain = true;
13 | };
14 | };
15 | }
16 |
--------------------------------------------------------------------------------
/system/config/i18n/locales.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | i18n = rec {
4 | defaultLocale = "en_US.UTF-8";
5 | extraLocales = [
6 | "en_US.UTF-8/UTF-8-EAW-CONSOLE"
7 | "ja_JP.UTF-8/UTF-8-EAW-CONSOLE"
8 | ];
9 | glibcLocales = pkgs.glibc-locales-eaw.override {
10 | allLocales = false;
11 | locales = extraLocales;
12 | };
13 | };
14 | }
15 |
--------------------------------------------------------------------------------
/pkgs/thorium-reader/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | appimageTools,
3 | fetchurl,
4 | }:
5 | appimageTools.wrapType2 rec {
6 | pname = "thorium-reader";
7 | version = "3.2.2";
8 | src = fetchurl {
9 | url = "https://github.com/edrlab/thorium-reader/releases/download/v${version}/Thorium-${version}.AppImage";
10 | hash = "sha256-BkczBJ27k0ZDd0ch77Q6tYRGYSLWs/cryH3dENDUBp0=";
11 | };
12 | }
13 |
--------------------------------------------------------------------------------
/system/config/desktop/xorg.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | imports = [ ./gnome-compatible.nix ];
4 | environment.systemPackages = with pkgs; [ xclip ];
5 |
6 | console.useXkbConfig = true;
7 | services.xserver = {
8 | enable = true;
9 | autorun = false;
10 | exportConfiguration = true;
11 |
12 | displayManager = {
13 | lightdm.enable = false;
14 | };
15 | };
16 | }
17 |
--------------------------------------------------------------------------------
/dotfiles/config/app/browser.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | programs = {
4 | firefox = {
5 | enable = true;
6 | package = pkgs.firefox-bin;
7 | };
8 |
9 | chromium = {
10 | enable = true;
11 | package = pkgs.google-chrome;
12 | };
13 | };
14 |
15 | home.packages = with pkgs; [
16 | aria-misskey
17 | telegram-desktop
18 | thunderbird-bin
19 | ];
20 | }
21 |
--------------------------------------------------------------------------------
/system/config/nixos/nix-ld.nix:
--------------------------------------------------------------------------------
1 | { pkgs, lib, ... }:
2 | {
3 | programs.nix-ld.enable = true;
4 | programs.nix-ld.libraries = with pkgs; [
5 | acl
6 | attr
7 | bzip2
8 | curl
9 | libsodium
10 | libssh
11 | libxcrypt
12 | libxml2
13 | openssl
14 | pkg-config
15 | stdenv.cc.cc.lib
16 | stdenv.cc.libc
17 | systemd
18 | util-linux
19 | xz
20 | zlib
21 | zstd
22 | ];
23 | }
24 |
--------------------------------------------------------------------------------
/dotfiles/files/scripts/waydroid-start:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -euo pipefail
4 |
5 | grep -qF 'Established ADB connection to Waydroid device' <(waydroid -w show-full-ui 2>&1) \
6 | && env SHELL=/bin/sh pkexec sh -c '
7 | sudo mount --bind /backup/Music /persist/home/nyarla/.local/share/waydroid/data/media/0/Music
8 | sudo mount --bind /persist/home/nyarla/Downloads /persist/home/nyarla/.local/share/waydroid/data/media/0/Download
9 | '
10 |
--------------------------------------------------------------------------------
/system/config/security/yubikey.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | environment.systemPackages = with pkgs; [
4 | bitwarden-desktop
5 | yubioath-flutter
6 | ];
7 |
8 | services.udev.packages = [
9 | pkgs.yubioath-flutter
10 | ];
11 | services.pcscd.enable = true;
12 |
13 | security.pam.u2f.settings.cue = true;
14 | security.pam.services = {
15 | sudo.u2fAuth = true;
16 | polkit-1.u2fAuth = true;
17 | login.u2fAuth = true;
18 | };
19 | }
20 |
--------------------------------------------------------------------------------
/dotfiles/files/scripts/vm-snapshot-vr:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -euo pipefail
4 |
5 | main() {
6 | local name
7 | name=$(zenity --entry --text="VR VMのSnapshot名を入れてください")
8 |
9 | local prefix
10 | prefix=$(date +%Y.%m)
11 |
12 | if [[ -n "${name}" ]]; then
13 | env SHELL=/bin/sh pkexec sh -c "
14 | cd /vm/main/VR && sudo btrfs subvol snapshot images .snapshots/${prefix}.${name}
15 | " && zenity --info --text="${prefix}.${name}を作成しました"
16 | fi
17 | }
18 |
19 | main;
20 |
--------------------------------------------------------------------------------
/pkgs/ghalint/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | lib,
3 | fetchFromGitHub,
4 | buildGo125Module,
5 | }:
6 | buildGo125Module rec {
7 | pname = "ghalint";
8 | version = "v1.5.3";
9 |
10 | src = fetchFromGitHub {
11 | owner = "suzuki-shunsuke";
12 | repo = pname;
13 | rev = version;
14 | hash = "sha256-zll71vSqSKIij/TUi4LnGtVqmLhK9UViFDkpnuEvmz8=";
15 | };
16 |
17 | vendorHash = "sha256-pCrVBgS7eLCYlfY6FyAGAeEhpV2dYQowtE/BoRUju0o=";
18 |
19 | subPackages = [
20 | "cmd/ghalint"
21 | ];
22 | }
23 |
--------------------------------------------------------------------------------
/system/config/keyboard/zinc.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | boot.kernelModules = [ "uinput" ];
4 |
5 | hardware.keyboard.qmk.enable = true;
6 |
7 | services.udev.extraRules = ''
8 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="ea3b", ACTION=="add", GROUP="users", MODE="660"
9 | KERNEL=="uinput", GROUP="input", MODE="660"
10 | '';
11 |
12 | services.udev.packages = with pkgs; [ vial ];
13 |
14 | environment.systemPackages = with pkgs; [
15 | qmk
16 | vial
17 | ];
18 | }
19 |
--------------------------------------------------------------------------------
/dotfiles/app/mlterm/color.nix:
--------------------------------------------------------------------------------
1 | let
2 | theme = import ../../../lib/theme.nix;
3 | in
4 |
5 | with theme;
6 |
7 | {
8 | black = gray05;
9 | red = red65;
10 | green = green85;
11 | yellow = yellow85;
12 | blue = blue85;
13 | magenta = magenta95;
14 | cyan = cyan85;
15 | white = gray95;
16 |
17 | hl_black = gray65;
18 | hl_red = red75;
19 | hl_green = green90;
20 | hl_yellow = yellow90;
21 | hl_blue = blue90;
22 | hl_magenta = magenta90;
23 | hl_cyan = cyan90;
24 | hl_white = gray100;
25 | }
26 |
--------------------------------------------------------------------------------
/system/config/gaming/steam.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | programs.steam = {
4 | enable = true;
5 | extraCompatPackages = with pkgs; [
6 | proton-ge-bin
7 | proton-ge-rtsp-bin
8 | ];
9 | protontricks.enable = true;
10 | };
11 |
12 | hardware.steam-hardware.enable = true;
13 |
14 | environment.etc."compatibilitytools.d/Proton-GE".source = pkgs.proton-ge-bin.steamcompattool;
15 | environment.etc."compatibilitytools.d/Proton-GE-rtsp".source =
16 | pkgs.proton-ge-rtsp-bin.steamcompattool;
17 | }
18 |
--------------------------------------------------------------------------------
/pkgs/wcwidh-cjk/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | stdenv,
3 | fetchFromGitHub,
4 | autoreconfHook,
5 | }:
6 | stdenv.mkDerivation {
7 | pname = "wcwidth-cjk";
8 | version = "a1b1e2c+locale-eaw-console";
9 | src = fetchFromGitHub {
10 | owner = "fumiyas";
11 | repo = "wcwidth-cjk";
12 | rev = "a1b1e2c346a563f6538e46e1d29c265bdd5b1c9a";
13 | hash = "sha256-EppA8b1WzQK4TW/65+50WGrnKyrShCRcPyKLKeAZX6A=";
14 | };
15 |
16 | patches = [
17 | ./locale-eaw-console.patch
18 | ];
19 |
20 | nativeBuildInputs = [ autoreconfHook ];
21 | }
22 |
--------------------------------------------------------------------------------
/dotfiles/config/app/vr.nix:
--------------------------------------------------------------------------------
1 | { pkgs, config, ... }:
2 | {
3 | home.packages = with pkgs; [
4 | immersed
5 | ];
6 |
7 | xdg.configFile."openvr/openvrpaths.vrpath".text = ''
8 | {
9 | "config": [
10 | "${config.xdg.dataHome}/Steam/config"
11 | ],
12 | "external_drivers": null,
13 | "jsonid": "vrpathreg",
14 | "log": [
15 | "${config.xdg.dataHome}/Steam/logs"
16 | ],
17 | "runtime": [
18 | "${pkgs.xrizer}/lib/xrizer"
19 | ],
20 | "version": 1
21 | }
22 | '';
23 | }
24 |
--------------------------------------------------------------------------------
/system/config/linux/console.nix:
--------------------------------------------------------------------------------
1 | { pkgs, lib, ... }:
2 | let
3 | theme = import ../../../lib/theme.nix;
4 | in
5 | {
6 | console.colors =
7 | with theme;
8 | lib.lists.forEach [
9 | gray00
10 | red65
11 | green85
12 | yellow85
13 | blue85
14 | magenta95
15 | cyan85
16 | gray95
17 | gray65
18 | red75
19 | green90
20 | yellow90
21 | blue90
22 | magenta90
23 | cyan95
24 | gray100
25 | ] (x: lib.strings.replaceString "#" "" x);
26 |
27 | console.earlySetup = true;
28 | }
29 |
--------------------------------------------------------------------------------
/pkgs/perl-shell/default.nix:
--------------------------------------------------------------------------------
1 | { buildFHSEnv, writeShellScript }:
2 | buildFHSEnv rec {
3 | name = "perl-shell";
4 | targetPkgs =
5 | pkgs: with pkgs; [
6 | gnumake
7 | libxcrypt
8 | openssl.dev
9 | perl
10 | perlPackages.Carton
11 | perlPackages.Appcpanminus
12 | perlPackages.Appcpm
13 | perlPackages.PerlTidy
14 | perlPackages.locallib
15 | pkg-config
16 | stdenv.cc.cc
17 | stdenv.cc.libc
18 | ];
19 | runScript = writeShellScript "perl-env.sh" ''
20 | exec env IN_PERL_SHELL=1 zsh "''${@}"
21 | '';
22 | }
23 |
--------------------------------------------------------------------------------
/pkgs/shoreman/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | fetchurl,
3 | bash,
4 | runCommand,
5 | }:
6 | let
7 | shoreman = fetchurl {
8 | url = "https://raw.githubusercontent.com/chrismytton/shoreman/master/shoreman.sh";
9 | sha256 = "05xqmmwx97y1fh67xgaal1zrsfzxpadllkh9cm2mkf1b0ziwq6m2";
10 | };
11 | in
12 | runCommand "shoreman" { } ''
13 | mkdir -p $out/bin
14 | echo '#!${bash}/bin/bash' >>$out/bin/shoreman
15 | echo 'export PATH=${bash}/bin:$PATH' >>$out/bin/shoreman
16 | cat ${shoreman} >>$out/bin/shoreman
17 |
18 | chmod +x $out/bin/shoreman
19 | ''
20 |
--------------------------------------------------------------------------------
/dotfiles/files/scripts/vm-snapshot-for-daw:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -euo pipefail
4 |
5 | main() {
6 | local name
7 | name=$(zenity --entry --text="DAW VMのSnapshot名を入れてください")
8 |
9 | local prefix
10 | prefix=$(date +%Y.%m)
11 |
12 | if [[ -n "${name}" ]]; then
13 | env SHELL=/bin/sh pkexec sh -c "
14 | cd /vm/special && sudo btrfs subvol snapshot images .snapshots/${prefix}.${name}
15 | cd /vm/main/DAW && sudo btrfs subvol snapshot images .snapshots/${prefix}.${name}
16 | " && zenity --info --text="${prefix}.${name}を作成しました"
17 | fi
18 | }
19 |
20 | main;
21 |
--------------------------------------------------------------------------------
/dotfiles/app/mlterm/default.nix:
--------------------------------------------------------------------------------
1 | { lib, pkgs, ... }:
2 | let
3 | toKV = lib.generators.toKeyValue { };
4 |
5 | aafont = (import ./aafont.nix) { inherit (pkgs.stdenv) system; };
6 | main = (import ./main.nix) { inherit color pkgs; };
7 | color = import ./color.nix;
8 | key = import ./key.nix;
9 | in
10 | {
11 | home = {
12 | packages = with pkgs; [ mlterm-wayland ];
13 | file = {
14 | ".mlterm/aafont".text = toKV aafont;
15 | ".mlterm/color".text = toKV color;
16 | ".mlterm/key".text = toKV key;
17 | ".mlterm/main".text = toKV main;
18 | };
19 | };
20 | }
21 |
--------------------------------------------------------------------------------
/system/config/linux/waydroid.nix:
--------------------------------------------------------------------------------
1 | { lib, pkgs, ... }:
2 | {
3 | virtualisation.waydroid = {
4 | enable = true;
5 | package = pkgs.waydroid-nftables;
6 | };
7 |
8 | environment.etc."gbinder.d/waydroid.conf".source = lib.mkForce (
9 | pkgs.writeText "waydroid.conf" ''
10 | [Protocol]
11 | /dev/binder = aidl3
12 | /dev/vndbinder = aidl3
13 | /dev/hwbinder = hidl
14 |
15 | [ServiceManager]
16 | /dev/binder = aidl3
17 | /dev/vndbinder = aidl3
18 | /dev/hwbinder = hidl
19 |
20 | [General]
21 | ApiLevel = 30
22 | ''
23 | );
24 | }
25 |
--------------------------------------------------------------------------------
/system/config/networking/network-manager.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | environment.systemPackages = with pkgs; [ networkmanagerapplet ];
4 | networking.networkmanager = {
5 | enable = true;
6 | dhcp = "internal";
7 | wifi = {
8 | backend = "wpa_supplicant";
9 | powersave = false;
10 | };
11 | unmanaged = [
12 | "interface-name:tailscale*"
13 | "interface-name:vboxnet*"
14 | "interface-name:virbr*"
15 | "interface-name:vmnet*"
16 | "interface-name:waydroid*"
17 | "type:bridge"
18 | ];
19 | };
20 |
21 | networking.enableIPv6 = true;
22 | }
23 |
--------------------------------------------------------------------------------
/dotfiles/config/tools/development.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | home.packages = with pkgs; [
4 | # container toolchain
5 | act
6 |
7 | # compiler
8 | clang-tools
9 | binutils
10 | gdb
11 | pkg-config
12 | stdenv.cc
13 |
14 | # go
15 | go
16 |
17 | # python3
18 | python3
19 |
20 | # perl
21 | perl-shell
22 |
23 | # nix
24 | nurl
25 |
26 | # editor
27 | bun
28 | editorconfig-core-c
29 | nodejs
30 | nvim-run
31 |
32 | # vcs
33 | git-lfs
34 |
35 | # linter
36 | ghalint
37 |
38 | # misc
39 | openssl
40 | ];
41 | }
42 |
--------------------------------------------------------------------------------
/patches/weylus.patch:
--------------------------------------------------------------------------------
1 | diff --git a/ts/lib.ts b/ts/lib.ts
2 | index 53f72d4..d93169f 100644
3 | --- a/ts/lib.ts
4 | +++ b/ts/lib.ts
5 | @@ -944,7 +944,7 @@ function handle_messages(
6 | let msg = JSON.parse(event.data);
7 | if (typeof msg == "string") {
8 | if (msg == "NewVideo") {
9 | - let MS = window.ManagedMediaSource ? window.ManagedMediaSource : window.MediaSource;
10 | + let MS = window.MediaSource;
11 | mediaSource = new MS();
12 | sourceBuffer = null;
13 | video.src = URL.createObjectURL(mediaSource);
14 |
--------------------------------------------------------------------------------
/dotfiles/files/scripts/vanish-check:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | search() {
4 | local dir=$1
5 | find "$dir"/.* -maxdepth 0
6 | find "$dir"/.config/* -maxdepth 0
7 | find "$dir"/.local/share/* -maxdepth 0
8 | }
9 |
10 | main() {
11 | local tmp
12 | tmp=$(mktemp -d)
13 | test -d "${tmp}" || mkdir -p "${tmp}"
14 |
15 | search "${HOME}" | sort -u > "${tmp}/exists"
16 | search "/persist${HOME}" | sort -u | sed 's|/persist||' > "${tmp}/persist"
17 |
18 | IFS=$'\n'
19 | for f in $(comm -23 "${tmp}/exists" "${tmp}/persist"); do
20 | test -L "${f}" || echo "${f}"
21 | done
22 |
23 | test ! -d "${tmp}" || rm "${tmp}" -r
24 | }
25 |
26 | main;
27 |
--------------------------------------------------------------------------------
/pkgs/calibre/dont_build_unrar_plugin.patch:
--------------------------------------------------------------------------------
1 | diff --git a/src/calibre/ebooks/metadata/archive.py b/src/calibre/ebooks/metadata/archive.py
2 | index 50b4750124..858e39eece 100644
3 | --- a/src/calibre/ebooks/metadata/archive.py
4 | +++ b/src/calibre/ebooks/metadata/archive.py
5 | @@ -99,7 +99,7 @@ class ArchiveExtract(FileTypePlugin):
6 | description = _('Extract common e-book formats from archive files '
7 | '(ZIP/RAR/7z). Also try to autodetect if they are actually '
8 | 'CBZ/CBR/CB7 files.')
9 | - file_types = {'zip', 'rar', '7z'}
10 | + file_types = {'zip', '7z'}
11 | supported_platforms = ['windows', 'osx', 'linux']
12 | on_import = True
13 |
--------------------------------------------------------------------------------
/system/config/i18n/fcitx5.nix:
--------------------------------------------------------------------------------
1 | { config, pkgs, ... }:
2 | {
3 | i18n.inputMethod = {
4 | enable = true;
5 | type = "fcitx5";
6 | fcitx5.addons = with pkgs; [
7 | fcitx5-cskk
8 | fcitx5-cskk-qt5
9 | fcitx5-cskk-qt6
10 | fcitx5-gtk
11 | fcitx5-skk
12 | kdePackages.fcitx5-qt
13 | kdePackages.fcitx5-skk-qt
14 | libsForQt5.fcitx5-qt
15 | ];
16 | fcitx5.waylandFrontend = true;
17 | };
18 |
19 | services.dbus.packages = [ config.i18n.inputMethod.package ];
20 | environment.systemPackages = with pkgs; [
21 | skktools
22 | ];
23 | environment.variables = {
24 | QT_IM_MODULE = "fcitx";
25 | };
26 | }
27 |
--------------------------------------------------------------------------------
/pkgs/wine-vst-wrapper/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | stdenv,
3 | fetchFromGitHub,
4 | pkgsCross,
5 | }:
6 | stdenv.mkDerivation rec {
7 | pname = "wine-vst-wrapper";
8 | version = "git";
9 | src = fetchFromGitHub {
10 | owner = "nyarla";
11 | repo = "WineVSTWrapper";
12 | rev = "6f4c3017dfe2a3fb50240b1ce3b3226739106a8b";
13 | sha256 = "1w00wq5641kr6224gdll38rpqkngf0ir42vd7a2cpnk655wiwwq3";
14 | };
15 |
16 | nativeBuildInputs = [ pkgsCross.mingwW64.buildPackages.gcc ];
17 |
18 | buildPhase = ''
19 | make
20 | '';
21 |
22 | installPhase = ''
23 | mkdir -p $out/share/wine-vst-wrapper/
24 | cp vst.dll $out/share/wine-vst-wrapper/vst.dll
25 | '';
26 | }
27 |
--------------------------------------------------------------------------------
/system/config/desktop/xdg.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | let
3 | xdgPortalApps = with pkgs; [
4 | xdg-desktop-portal-gtk
5 | xdg-desktop-portal-hypr-remote
6 | xdg-desktop-portal-hyprland
7 | xdg-desktop-portal-xapp
8 | ];
9 | in
10 | {
11 | environment.systemPackages = xdgPortalApps ++ (with pkgs; [ xdg-utils ]);
12 |
13 | xdg.portal = {
14 | enable = true;
15 | extraPortals = xdgPortalApps;
16 | configPackages = with pkgs; [
17 | hyprland
18 | ];
19 | config = {
20 | hyprland = {
21 | default = [
22 | "hyrpland"
23 | "gtk"
24 | "hypr-remote"
25 | ];
26 | };
27 | };
28 | };
29 | }
30 |
--------------------------------------------------------------------------------
/pkgs/noto-fonts-jp/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | stdenvNoCC,
3 | lib,
4 | fetchurl,
5 | }:
6 | let
7 | fonts = import ./fonts.nix;
8 | in
9 | stdenvNoCC.mkDerivation rec {
10 | version = "V2.0003";
11 | name = "noto-fonts-jp-${version}";
12 |
13 | files = map (
14 | {
15 | name,
16 | url,
17 | sha256,
18 | }:
19 | fetchurl { inherit name url sha256; }
20 | ) fonts;
21 |
22 | unpackPhase = ''
23 | mkdir -p noto
24 |
25 | ${lib.strings.concatMapStrings (font: ''
26 | cp ${font} noto/${font.name}
27 | '') files}
28 | '';
29 |
30 | installPhase = ''
31 | mkdir -p $out/share/fonts/
32 | mv noto $out/share/fonts/
33 | '';
34 | }
35 |
--------------------------------------------------------------------------------
/pkgs/cskk/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | fetchFromGitHub,
3 | rustPlatform,
4 | cargo-c,
5 | rust-bindgen,
6 | libxkbcommon,
7 | }:
8 | rustPlatform.buildRustPackage rec {
9 | pname = "cskk";
10 | version = "v3.2.0";
11 | src = fetchFromGitHub {
12 | owner = "naokiri";
13 | repo = "cskk";
14 | rev = "v3.2.0";
15 | hash = "sha256-lhLNtSmD5XiG0U6TLWgN+YA/f7UJ/RyHoe5vq5OopuI=";
16 | };
17 |
18 | useFetchVendor = true;
19 | cargoHash = "sha256-XWPeqQ3dC73Hp+TTPdLJtvF0hQ+uI82xfY7DxAXO1gA=";
20 |
21 | buildInputs = [ libxkbcommon.dev ];
22 | nativeBuildInputs = [
23 | cargo-c
24 | rust-bindgen
25 | ];
26 |
27 | postInstall = ''
28 | cargo cinstall --prefix=$out
29 | '';
30 | }
31 |
--------------------------------------------------------------------------------
/dotfiles/files/scripts/snapper-clean-all:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -euo pipefail
4 |
5 | cleanup-snapshot() {
6 | local config=$1 path=$2
7 |
8 | cd $path && \ls | xargs -I{} snapper -c $config delete {}
9 | }
10 |
11 | cleanup-snapshot etc-nixos /persist/etc/nixos/.snapshots
12 | cleanup-snapshot home-nyarla /persist/home/nyarla/.snapshots
13 | cleanup-snapshot home-nyarla-applications /persist/home/nyarla/Applications/.snapshots
14 | cleanup-snapshot home-nyarla-programming /persist/home/nyarla/Programming/.snapshots
15 | cleanup-snapshot var-lib /persist/var/lib/.snapshots
16 |
17 | sudo mkdir -p /tmp/btrfs
18 | sudo mount /dev/mapper/nixos /tmp/btrfs
19 |
20 | cd /tmp/btrfs
21 | sudo btrfs scrub start .
22 |
--------------------------------------------------------------------------------
/pkgs/skk-dicts-xl/update.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | out() {
4 | echo "${1}" >>skk.nix
5 | }
6 |
7 | fetch() {
8 | local name=$1 url=$2
9 | out "{ name = \"${1}\"; url = \"${url}\"; sha256 = \"$(nix-prefetch-url "${url}")\"; }"
10 | }
11 |
12 | main() {
13 | test ! -e skk.nix || rm skk.nix
14 |
15 | out '['
16 | for dict in S M ML L jinmei fullname geo law okinawa propernoun station; do
17 | name="SKK-JISYO.${dict}"
18 | fetch $name "https://raw.githubusercontent.com/skk-dev/dict/master/${name}"
19 | done
20 |
21 | fetch "SKK-JISYO.neologd" "https://raw.githubusercontent.com/tokuhirom/skk-jisyo-neologd/master/SKK-JISYO.neologd"
22 |
23 | out ']'
24 |
25 | nixfmt skk.nix
26 | }
27 |
28 | main;
29 |
--------------------------------------------------------------------------------
/system/config/desktop/gnome-compatible.nix:
--------------------------------------------------------------------------------
1 | { config, pkgs, ... }:
2 | let
3 | gnomeApps = with pkgs; [
4 | zenity
5 | dconf-editor
6 | gsound
7 | gcr
8 | ];
9 | in
10 | {
11 | environment.systemPackages = gnomeApps;
12 |
13 | services = {
14 | accounts-daemon.enable = true;
15 | dbus.enable = true;
16 | dbus.packages = gnomeApps;
17 | system-config-printer.enable = true;
18 |
19 | gnome = {
20 | glib-networking.enable = true;
21 | gnome-keyring.enable = true;
22 | };
23 |
24 | libinput.enable = true;
25 | };
26 |
27 | programs.dconf.enable = true;
28 | programs.seahorse.enable = true;
29 |
30 | services.upower.enable = config.powerManagement.enable;
31 | }
32 |
--------------------------------------------------------------------------------
/dotfiles/config/services/polkit.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | systemd.user.services.polkit-mate-authentication-agent-1 = {
4 | Unit = {
5 | Description = "launch authentication-agent-1";
6 | After = [ "graphical-session.target" ];
7 | PartOf = [ "graphical-session.target" ];
8 | };
9 |
10 | Service = {
11 | Type = "simple";
12 | Restart = "on-failure";
13 | ExecStart = ''
14 | ${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1
15 | '';
16 | Environment = [
17 | "WAYLAND_DISPLAY=wayland-0"
18 | "LANG=ja_JP.UTF-8"
19 | ];
20 | };
21 |
22 | Install = {
23 | WantedBy = [ "graphical-session.target" ];
24 | };
25 | };
26 | }
27 |
--------------------------------------------------------------------------------
/dotfiles/files/scripts/prepare-windows-vm:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -euo pipefail
4 |
5 | main() {
6 | if ! which modprobe 2>/dev/null ; then
7 | echo "modprobe is not found" >&2;
8 | exit 1
9 | fi
10 |
11 | sudo systemctl stop ollama
12 |
13 | if sudo bash -x /var/lib/libvirt/hooks/qemu.d/DAW/prepare/begin/01_alloc_hugepage.sh; then
14 | sudo bash -x /var/lib/libvirt/hooks/qemu.d/DAW/release/end/01_dealloc_hugepage.sh
15 | fi
16 |
17 | echo "0000:0d:00.0" | sudo tee /sys/bus/pci/drivers/amdgpu/unbind
18 | sleep 2
19 | echo 3 | sudo tee /sys/bus/pci/devices/0000:0d:00.0/resource2_resize
20 | sleep 2
21 |
22 | sudo modprobe -r amdgpu
23 | sudo systemctl stop amdgpu-kernel-modules.service
24 | }
25 |
26 | main
27 |
--------------------------------------------------------------------------------
/pkgs/rocm-shell/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | buildFHSEnv,
3 | }:
4 | buildFHSEnv {
5 | name = "rocm-shell";
6 | targetPkgs =
7 | p:
8 | with p;
9 | [
10 | autoconf
11 | binutils
12 | cmake
13 | curl
14 | freeglut
15 | git
16 | gitRepo
17 | glib
18 | gnumake
19 | gnupg
20 | gperf
21 | gperftools
22 | libGL
23 | libGLU
24 | m4
25 | ncurses5
26 | procps
27 | unzip
28 | util-linux
29 | zlib
30 | zstd
31 |
32 | # for comfyUI
33 | sentencepiece
34 | ]
35 | ++ (with rocmPackages; [
36 | llvm.libcxx
37 | ]);
38 |
39 | runScript = "bash";
40 | profile = ''
41 | export ROCM_PATH=/opt/rocm
42 | '';
43 | }
44 |
--------------------------------------------------------------------------------
/pkgs/fcitx5-fbterm/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | stdenv,
3 | glib,
4 | fcitx5,
5 | fcitx5-gtk,
6 | cmake,
7 | gnumake,
8 | pkg-config,
9 | fetchFromGitHub,
10 | }:
11 | stdenv.mkDerivation rec {
12 | pname = "fcitx5-fbterm";
13 | version = "git";
14 | src = fetchFromGitHub {
15 | owner = "fcitx";
16 | repo = "fcitx5-fbterm";
17 | rev = "620980bc6dc491448fe22e853b3e1b188996bba1";
18 | sha256 = "08h538xzfgw05az63px5m41qy9vsbiy3wndpifc12basnr13fwkj";
19 | };
20 |
21 | nativeBuildInputs = [
22 | cmake
23 | gnumake
24 | pkg-config
25 | ];
26 | buildInputs = [
27 | fcitx5
28 | fcitx5-gtk
29 | glib.dev
30 | ];
31 |
32 | installPhase = ''
33 | mkdir -p $out/bin
34 | cp src/fcitx5-fbterm $out/bin/
35 | chmod +x $out/bin/*
36 | '';
37 | }
38 |
--------------------------------------------------------------------------------
/pkgs/fluent-kde/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | fetchFromGitHub,
3 | stdenvNoCC,
4 | }:
5 | stdenvNoCC.mkDerivation rec {
6 | pname = "Fluent-kde";
7 | version = "git";
8 | src = fetchFromGitHub {
9 | owner = "vinceliuice";
10 | repo = "Fluent-kde";
11 | rev = "44794f29c89de994b0179aebabd2f5776c90d236";
12 | hash = "sha256-Ejr2wDs3tr36YN2mWSd9ZKp5e6gH/whcuhauN/2Y15I=";
13 | };
14 |
15 | installPhase = ''
16 | mkdir -p $out/share/Kvantum
17 | mkdir -p $out/share/aurorae/themes
18 | mkdir -p $out/share/color-schemes
19 | mkdir -p $out/share/plasma
20 |
21 | cp -r Kvantum/Fluent* $out/share/Kvantum/
22 | cp -r aurorae/Fluent* $out/share/aurorae/themes/
23 | cp -r color-schemes/* $out/share/color-schemes/
24 | cp -r plasma/* $out/share/plasma/
25 | '';
26 | }
27 |
--------------------------------------------------------------------------------
/pkgs/temporary.nix:
--------------------------------------------------------------------------------
1 | { nixpkgs, stable, ... }:
2 | final: prev: {
3 | inherit (stable.legacyPackages.x86_64-linux.pkgs) deadbeef;
4 |
5 | bristol = prev.bristol.overrideAttrs (_: {
6 | CFLAGS = "-Wno-implicit-int -Wno-implicit-int8 -Wno-implicit-function-declaration";
7 | });
8 |
9 | whipper = prev.whipper.overrideAttrs (_: {
10 | postPatch = ''
11 | sed -i 's|cd-paranoia|${prev.cdparanoia}/bin/cdparanoia|g' whipper/program/cdparanoia.py
12 | '';
13 | });
14 |
15 | wivrn-stable = nixpkgs.legacyPackages.x86_64-linux.pkgs.wivrn;
16 |
17 | voicevox-engine = prev.voicevox-engine.override { python3Packages = prev.python312Packages; };
18 | waydroid = prev.waydroid.override { python3Packages = prev.python312Packages; };
19 | zrythm = prev.zrythm.override { carla = final.carla-with-wine; };
20 | }
21 |
--------------------------------------------------------------------------------
/pkgs/deadbeef-fb/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | stdenv,
3 | fetchFromGitLab,
4 | pkg-config,
5 | deadbeef,
6 | gtk3,
7 | autoconf,
8 | automake,
9 | libtool,
10 | glib,
11 | }:
12 | stdenv.mkDerivation {
13 | pname = "deadbeef-fb";
14 | version = "git";
15 | src = fetchFromGitLab {
16 | owner = "zykure";
17 | repo = "deadbeef-fb";
18 | rev = "17accd5345adeb3b81315d284dd81ac881517cc6";
19 | hash = "sha256-xmC0m47OnEQS4nXRG+bq5vMiAui0+ehhCrcWF8n1t/s=";
20 | };
21 | nativeBuildInputs = [
22 | autoconf
23 | automake
24 | libtool
25 | pkg-config
26 | ];
27 | buildInputs = [
28 | deadbeef
29 | glib
30 | gtk3
31 | ];
32 |
33 | preConfigure = ''
34 | ./autogen.sh
35 | '';
36 |
37 | configureFlags = [
38 | "--prefix=$(out)"
39 | "--disable-gtk2"
40 | ];
41 | }
42 |
--------------------------------------------------------------------------------
/pkgs/galendae/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | stdenv,
3 | fetchFromGitHub,
4 | gtk3,
5 | pkg-config,
6 | wrapGAppsHook,
7 | }:
8 | stdenv.mkDerivation rec {
9 | pname = "galendae";
10 | version = "git";
11 | src = fetchFromGitHub {
12 | owner = "chris-marsh";
13 | repo = "galendae";
14 | rev = "7cf032bba678c0782412d3407fabdc750f966f3f";
15 | sha256 = "07mnmj1fh1s763vs97hpmzsiyx52fss52m8d6jf8frgxasap6sb1";
16 | };
17 |
18 | buildInputs = [
19 | gtk3.dev
20 | pkg-config
21 | ];
22 | nativeBuildInupts = [ wrapGAppsHook ];
23 |
24 | patchPhase = ''
25 | sed 's|CFLAGS += -DVERSION|#CFLAGS += -DVERSION|' makefile
26 | '';
27 |
28 | buildPhase = ''
29 | make -f makefile release
30 | '';
31 |
32 | installPhase = ''
33 | mkdir -p $out/bin
34 | cp galendae $out/bin/
35 | chmod +x $out/bin/*
36 | '';
37 | }
38 |
--------------------------------------------------------------------------------
/pkgs/skk-dicts-xl/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | stdenv,
3 | lib,
4 | fetchurl,
5 | skktools,
6 | libiconv,
7 | }:
8 | let
9 | dicts = lib.strings.concatStringsSep " + " (
10 | lib.lists.forEach (import ./skk.nix) (x: fetchurl { inherit (x) name url sha256; })
11 | );
12 | in
13 | stdenv.mkDerivation rec {
14 | pname = "skk-dicts-xl";
15 | version = "2022-07-07";
16 | dontUnpack = true;
17 |
18 | nativeBuildInputs = [ skktools ];
19 |
20 | installPhase = ''
21 | mkdir -p $out/share/skk/
22 |
23 | echo ';; -*- mode: fundamental; coding: euc-jp -*-' >$out/share/skk/SkK-JISYO.XL
24 | skkdic-expr2 ${dicts} >>$out/share/skk/SkK-JISYO.XL
25 |
26 | iconv -c -f EUC-JISX0213 -t utf8 < $out/share/skk/SkK-JISYO.XL >$out/share/skk/SKK-JISYO.XL.utf8
27 | sed -i 's|coding: euc-jp|coding: utf8|' $out/share/skk/SKK-JISYO.XL.utf8
28 | '';
29 | }
30 |
--------------------------------------------------------------------------------
/pkgs/aria-misskey/rust_lib_aria.patch:
--------------------------------------------------------------------------------
1 | diff --git a/rust_builder/linux/CMakeLists.txt b/rust_builder/linux/CMakeLists.txt
2 | index 8661930..b8cf0c5 100644
3 | --- a/rust_builder/linux/CMakeLists.txt
4 | +++ b/rust_builder/linux/CMakeLists.txt
5 | @@ -7,13 +7,10 @@ cmake_minimum_required(VERSION 3.10)
6 | set(PROJECT_NAME "rust_lib_aria")
7 | project(${PROJECT_NAME} LANGUAGES CXX)
8 |
9 | -include("../cargokit/cmake/cargokit.cmake")
10 | -apply_cargokit(${PROJECT_NAME} ../../rust rust_lib_aria "")
11 | -
12 | # List of absolute paths to libraries that should be bundled with the plugin.
13 | # This list could contain prebuilt libraries, or libraries created by an
14 | # external build triggered from this build file.
15 | set(rust_lib_aria_bundled_libraries
16 | - "${${PROJECT_NAME}_cargokit_lib}"
17 | + "../rust/target/release/librust_lib_aria.so"
18 | PARENT_SCOPE
19 | )
20 |
--------------------------------------------------------------------------------
/pkgs/glibc-locales-eaw/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | glibcLocales,
3 | fetchurl,
4 | allLocales ? true,
5 | locales ? [ "en_US.UTF-8/UTF-8" ],
6 | }:
7 |
8 | let
9 | UTF-8-EAW-CONSOLE = fetchurl {
10 | url = "https://raw.githubusercontent.com/hamano/locale-eaw/6f8d5ddb29da3bde73e3d617ece5ba9fd16c335c/dist/UTF-8-EAW-CONSOLE";
11 | sha256 = "1d2zmkvaydwf0ra22gg9fms90ja597mxvbd1b05k26mkd91ck675";
12 | };
13 | in
14 |
15 | (glibcLocales.override {
16 | inherit allLocales;
17 | inherit locales;
18 | }).overrideAttrs
19 | (old: {
20 | preBuild =
21 | ''
22 | cp ${UTF-8-EAW-CONSOLE} $(find .. -type d -name 'glibc-2*' | head -n1)/localedata/charmaps/UTF-8-EAW-CONSOLE
23 | echo 'ja_JP.UTF-8/UTF-8-EAW-CONSOLE \' >> ../glibc-2*/localedata/SUPPORTED
24 | echo 'en_US.UTF-8/UTF-8-EAW-CONSOLE \' >> ../glibc-2*/localedata/SUPPORTED
25 | ''
26 | + old.preBuild;
27 | })
28 |
--------------------------------------------------------------------------------
/pkgs/igsc/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | stdenv,
3 | fetchFromGitHub,
4 | cmake,
5 | pkg-config,
6 | systemd,
7 | }:
8 | let
9 | metee = stdenv.mkDerivation rec {
10 | pname = "metee";
11 | version = "6.1.0";
12 | src = fetchFromGitHub {
13 | owner = "intel";
14 | repo = "metee";
15 | rev = version;
16 | hash = "sha256-ybTi4pFZAkoO6FAyUOLK+ZbTQb7uwu/sqhYxo06SE9A=";
17 | };
18 |
19 | nativeBuildInputs = [
20 | cmake
21 | pkg-config
22 | ];
23 | };
24 | in
25 | stdenv.mkDerivation {
26 | pname = "igsc";
27 | version = "1.0.0";
28 | src = fetchFromGitHub {
29 | owner = "intel";
30 | repo = "igsc";
31 | rev = "5a69634ac5e38d28c8354967ab0f1c7034586ccd";
32 | hash = "sha256-OpEsJrObkjoDmVy9mxEf/+CzcNZXWIDhDRfQbPyiyPM=";
33 | };
34 |
35 | buildInputs = [
36 | metee
37 | systemd.dev
38 | ];
39 |
40 | nativeBuildInputs = [
41 | cmake
42 | pkg-config
43 | ];
44 | }
45 |
--------------------------------------------------------------------------------
/system/config/user/nyarla.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | users.mutableUsers = false;
4 | users.users.nyarla = {
5 | home = "/home/nyarla";
6 | group = "users";
7 | extraGroups = [
8 | # sudo
9 | "wheel"
10 |
11 | # terminal
12 | "tty"
13 |
14 | # desktop
15 | "audio"
16 | "lp"
17 | "scanner"
18 | "video"
19 |
20 | # hardware
21 | "disk"
22 | "i2c"
23 | "input"
24 | "networkmanager"
25 | "storage"
26 |
27 | # graphic
28 | "render"
29 |
30 | # development
31 | "plugdev"
32 |
33 | # vmm
34 | "kvm"
35 | "libvirtd"
36 | ];
37 |
38 | description = "OKAMURA Naoki";
39 | createHome = true;
40 | isNormalUser = true;
41 | shell = pkgs.zsh;
42 | initialHashedPassword = "$6$lABardu7BNX7a5cv$8TIACJK2U.GBjdsSnFpPHEiwkMtPSCZrxQsphf9uadpu3tBqKfgdZCSW.b2PyJXw16dzgvBysUzknPZ99kxec0";
43 | };
44 |
45 | programs.zsh.enable = true;
46 | }
47 |
--------------------------------------------------------------------------------
/pkgs/immersed/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | appimageTools,
3 | fetchurl,
4 | lib,
5 | libgpg-error,
6 | }:
7 |
8 | let
9 | pname = "immersed";
10 | version = "latest";
11 |
12 | src = fetchurl {
13 | url = "https://static.immersed.com/dl/Immersed-x86_64.AppImage";
14 | sha256 = "1md4bvqja15h7plgp5ym4nb8fzd19555aknayz5xwqghcwr58gl5";
15 | };
16 |
17 | src' = appimageTools.extract {
18 | inherit pname version;
19 | inherit src;
20 |
21 | postExtract = ''
22 | cp ${libgpg-error}/lib/* $out/usr/lib/
23 | '';
24 | };
25 | in
26 | appimageTools.wrapAppImage {
27 | inherit pname version;
28 | src = src';
29 | extraPkgs =
30 | pkgs: with pkgs; [
31 | e2fsprogs
32 | fontconfig
33 | freetype
34 | fribidi
35 | harfbuzz
36 | libGL
37 | libdrm
38 | libgbm
39 | libgpg-error
40 | libp11
41 | libthai
42 | libva
43 | pipewire
44 | wayland
45 | xorg.libSM
46 | xorg.libX11
47 | zlib
48 | ];
49 | }
50 |
--------------------------------------------------------------------------------
/system/config/gaming/xr.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | nixpkgs.xr.enable = true;
4 |
5 | # for ntsync
6 | boot.kernelModules = [
7 | "ntsync"
8 | ];
9 |
10 | # wivrn
11 | services.wivrn = {
12 | package = pkgs.wivrn-stable;
13 | enable = true;
14 | autoStart = true;
15 | defaultRuntime = true;
16 | monadoEnvironment = {
17 | DRI_PRIME = "1002:7550!";
18 | MESA_VK_DEVICE_SELECT = "1002:7550";
19 | AMD_VULKAN_ICD = "RADV";
20 | VK_ICD_FILENAMES = "/run/opengl-driver/share/vulkan/icd.d/radeon_icd.x86_64.json";
21 |
22 | WMR_HANDTRACKING = "1";
23 | };
24 | config = {
25 | enable = true;
26 | json = {
27 | bitrate = 50000000;
28 | scale = 1;
29 | tcp-only = true;
30 | encoders = [
31 | {
32 | encoder = "vaapi";
33 | codec = "h265";
34 | }
35 | ];
36 | };
37 | };
38 | };
39 |
40 | environment.systemPackages = with pkgs; [
41 | wlx-overlay-s
42 | ];
43 | }
44 |
--------------------------------------------------------------------------------
/pkgs/noto-fonts-jp/update.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -euo pipefail
4 |
5 | out() {
6 | echo "${1}" >>fonts.nix
7 | }
8 |
9 | fetch() {
10 | local name=$1 url=$2
11 | out "{ name = \"${1}\"; url = \"${url}\"; sha256 = \"$(nix-prefetch-url "${url}")\"; }"
12 | }
13 |
14 | test ! -e fonts.nix || rm fonts.nix
15 | out '['
16 |
17 | for weight in Black Bold DemiLight Medium Regular Thin; do
18 | name="NotoSansCJKjp-${weight}.otf"
19 | url="https://github.com/notofonts/noto-cjk/raw/main/Sans/OTF/Japanese/${name}"
20 |
21 | fetch $name $url
22 | done
23 |
24 | for weight in Bold Regular; do
25 | name="NotoSansMonoCJKjp-${weight}.otf"
26 | url="https://github.com/notofonts/noto-cjk/raw/main/Sans/Mono/${name}"
27 |
28 | fetch $name $url
29 | done
30 |
31 | for weight in Black Bold ExtraLight Light Medium Regular SemiBold; do
32 | name="NotoSerifCJKjp-${weight}.otf"
33 | url="https://github.com/notofonts/noto-cjk/raw/main/Serif/OTF/Japanese/${name}"
34 |
35 | fetch $name $url
36 | done
37 |
38 | out ']'
39 |
40 | nixfmt fonts.nix
41 |
--------------------------------------------------------------------------------
/system/config/graphic/fonts.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | fonts = {
4 | packages = with pkgs; [
5 | # basical fonts
6 | noto-fonts
7 | noto-fonts-jp
8 | noto-fonts-color-emoji
9 |
10 | # monospace
11 | hackgen-font
12 | nerd-fonts.hack
13 |
14 | # fallback
15 | dejavu_fonts
16 | ];
17 |
18 | fontconfig = {
19 | enable = true;
20 |
21 | defaultFonts = {
22 | sansSerif = [
23 | "Noto Sans CJK JP"
24 | "DejaVu Sans"
25 | "Noto Sans Symbols"
26 | "Noto Sans Symbols2"
27 | ];
28 | serif = [
29 | "Noto Serif JP"
30 | "DejaVu Serif"
31 | "Noto Sans Symbols"
32 | "Noto Sans Symbols2"
33 | ];
34 | monospace = [
35 | "HackGen Console"
36 | "Hack Nerd Font"
37 | "DejaVu Sans Mono"
38 | "Noto Sans Symbols"
39 | "Noto Sans Symbols2"
40 | ];
41 | emoji = [ "Noto Color Emoji" ];
42 | };
43 | };
44 | };
45 | }
46 |
--------------------------------------------------------------------------------
/dotfiles/app/git/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs, config, ... }:
2 | {
3 | programs.git = {
4 | enable = true;
5 | lfs.enable = true;
6 | package = pkgs.gitFull;
7 | settings = {
8 | alias = {
9 | ci = "commit";
10 | cleanup = "!git branch --merged | grep -v main | grep -v master | xargs -I{} git branch -d {}";
11 | co = "checkout";
12 | force-push = "push -f --force-with-lease --force-if-includes";
13 | rr = "restore";
14 | rs = "restore --staged";
15 | st = "status";
16 | };
17 | color = {
18 | ui = true;
19 | };
20 | init = {
21 | defaultBranch = "main";
22 | };
23 | core = {
24 | autoCRLF = false;
25 | fileMode = false;
26 | fscache = true;
27 | preloadindex = true;
28 | quotepath = false;
29 | hooksPath = "${config.home.homeDirectory}/Applications/Development/githooks/hooks";
30 | };
31 | credential.helper = "${pkgs.gitFull}/bin/git-credential-libsecret";
32 | };
33 | ignores = import ./gitignore.nix;
34 | };
35 | }
36 |
--------------------------------------------------------------------------------
/pkgs/fcitx5-cskk/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | stdenv,
3 | lib,
4 | fetchFromGitHub,
5 | cmake,
6 | extra-cmake-modules,
7 | pkg-config,
8 | gettext,
9 | fcitx5,
10 | fcitx5-qt,
11 | qtbase,
12 | wrapQtAppsHook,
13 | cskk,
14 | skkDictionaries,
15 | enableQt ? false,
16 | useQt6 ? false,
17 | }:
18 | stdenv.mkDerivation rec {
19 | pname = "fcitx5-cskk";
20 | version = "6d4407c";
21 | src = fetchFromGitHub {
22 | owner = "fcitx";
23 | repo = "fcitx5-cskk";
24 | rev = "6d4407c64df46423c378afeefa71bda3282a7cec";
25 | hash = "sha256-UfEmRenWiX2xbIirkDRbix1YQrDz1/sVg6yut8ZRJ0k=";
26 | };
27 |
28 | nativeBuildInputs = [
29 | cmake
30 | extra-cmake-modules
31 | pkg-config
32 | gettext
33 | ]
34 | ++ lib.optional enableQt wrapQtAppsHook;
35 |
36 | buildInputs = [
37 | fcitx5
38 | cskk
39 | ]
40 | ++ lib.optionals enableQt [
41 | fcitx5-qt
42 | qtbase
43 | ];
44 |
45 | cmakeFlags = [
46 | "-DENABLE_QT=${toString enableQt}"
47 | "-DUSE_QT6=${toString useQt6}"
48 | "-DSKK_DICT_DEFAULT_PATH=${skkDictionaries.l}/share/SKK-JISYO.L"
49 | ];
50 | }
51 |
--------------------------------------------------------------------------------
/pkgs/gyazo-diy/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | lib,
3 | writeShellScriptBin,
4 |
5 | coreutils,
6 | curl,
7 | jq,
8 | libnotify,
9 | xdg-utils,
10 | }:
11 | writeShellScriptBin "gyazo" ''
12 | export PATH=${
13 | lib.makeBinPath [
14 | coreutils
15 | curl
16 | jq
17 | libnotify
18 | xdg-utils
19 | ]
20 | }:$PATH
21 |
22 | source $HOME/.config/gyazo/env
23 |
24 | main() {
25 | local fn
26 | fn="''${1:-1}"
27 |
28 | if [[ -z "''${fn}" ]]; then
29 | notify-send -u critical -t 5000 "ファイル名が空です"
30 | exit 1
31 | fi
32 |
33 | local href
34 | href=$(curl -s \
35 | -F access_token=''${ACCESS_TOKEN} \
36 | -F imagedata=@''${fn} \
37 | -F created_at=$(date +%s) \
38 | -F collection_id=''${COLLECTION_ID} \
39 | https://upload.gyazo.com/api/upload | jq -r .permalink_url)
40 |
41 | if [[ -z "''${href}" ]]; then
42 | notify-send -u critical -t 5000 "アップロードに失敗しました"
43 | exit 1
44 | else
45 | notify-send -u low -t 3000 "アップロード成功!"
46 | xdg-open $href &
47 | fi
48 |
49 | exit 0
50 | }
51 |
52 | main "''${@:-}"
53 | ''
54 |
--------------------------------------------------------------------------------
/pkgs/nvim-run/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | lib,
3 | pkgs,
4 | writeShellScriptBin,
5 | neovim,
6 | }:
7 | let
8 | PATH = lib.makeBinPath (
9 | with pkgs;
10 | [
11 | # linter
12 | deadnix
13 | hadolint
14 | shellcheck
15 | statix
16 | actionlint
17 |
18 | # formatter
19 | go
20 | gotools
21 | nixfmt-rfc-style
22 | nodePackages.prettier
23 | perlPackages.PerlTidy
24 | stylua
25 |
26 | # language server
27 | gopls
28 | lua-language-server
29 | nixd
30 | nodePackages.bash-language-server
31 | nodePackages.typescript-language-server
32 | nodePackages.vscode-langservers-extracted
33 | perlnavigator
34 | sqls
35 | tailwindcss-language-server
36 | taplo
37 |
38 | # all-in-one toolchains
39 | biome
40 | deno
41 | sqlfluff
42 |
43 | # for test
44 | hello
45 | ]
46 | );
47 | in
48 | writeShellScriptBin "nvim" ''
49 | export PATH=$PATH:${PATH}
50 |
51 | if [[ -e $HOME/.config/llm/env ]]; then
52 | eval "$(cat $HOME/.config/llm/env)"
53 | fi
54 |
55 | exec -a nvim ${neovim}/bin/nvim "''${@}"
56 | ''
57 |
--------------------------------------------------------------------------------
/system/config/desktop/files.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | let
3 | mateApps = with pkgs.mate; [
4 | atril
5 | engrampa
6 | eom
7 | mate-polkit
8 | pluma
9 | ];
10 | in
11 | {
12 | environment.systemPackages = mateApps;
13 | services.dbus.packages = mateApps;
14 |
15 | services = {
16 | udisks2.enable = true;
17 | gvfs.enable = true;
18 | tumbler.enable = true;
19 | };
20 |
21 | programs.thunar = {
22 | enable = true;
23 | plugins = with pkgs.xfce; [ thunar-archive-plugin ];
24 | };
25 |
26 | programs.xfconf.enable = true;
27 |
28 | users.groups.storage = { };
29 |
30 | security.polkit = {
31 | enable = true;
32 | extraConfig = ''
33 | polkit.addRule(function(action, subject) {
34 | if ( action.id === "org.freedesktop.udisks2.encrypted-unlock-system" && subject.isInGroup("storage") ) {
35 | return polkit.Result.YES;
36 | }
37 | if ( (action.id === "org.freedesktop.udisks2.filesystem-mount-system"
38 | || action.id === "org.freedesktop.udisks2.filesystem-mount") && subject.isInGroup("storage") ) {
39 | return polkit.Result.YES;
40 | }
41 | });
42 | '';
43 | };
44 | }
45 |
--------------------------------------------------------------------------------
/system/config/nixos/gsettings.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | pkgs,
4 | lib,
5 | ...
6 | }:
7 | let
8 | nixos-gsettings-overrides = pkgs.runCommand "nixos-gsettings-overrides" { } ''
9 | mkdir -p $out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas/
10 | cp -rf ${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/gsettings-desktop-schemas*/glib-2.0/schemas/*.xml \
11 | $out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas/
12 |
13 | ${lib.concatMapStrings (p: ''
14 | if test -d ${p}/share/gsettings-schemas; then
15 | find ${p}/share/gsettings-schemas -name '*.xml' \
16 | -exec cp -rfH {} $out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas/ \;
17 | fi
18 | '') (lib.lists.remove null config.environment.systemPackages)}
19 |
20 | ${pkgs.glib.dev}/bin/glib-compile-schemas $out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas/
21 | '';
22 | in
23 | {
24 | environment.etc."profile.d/gsettings.sh" = {
25 | text = ''
26 | export NIX_GSETTINGS_OVERRIDES_DIR=${nixos-gsettings-overrides}/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas
27 | '';
28 | };
29 | }
30 |
--------------------------------------------------------------------------------
/dotfiles/config/desktop/theme.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | gtk = {
4 | enable = true;
5 |
6 | iconTheme = {
7 | name = "Fluent-light";
8 | package = pkgs.fluent-icon-theme;
9 | };
10 |
11 | theme = {
12 | name = "Fluent-Light-compact";
13 | package = pkgs.fluent-gtk-theme;
14 | };
15 |
16 | font = {
17 | name = "Sans";
18 | size = 9;
19 | };
20 | };
21 |
22 | qt = {
23 | enable = true;
24 | platformTheme.name = "gtk3";
25 | style.name = "kvantum";
26 | style.package = with pkgs; [
27 | libsForQt5.qtstyleplugin-kvantum
28 | qt6Packages.qtstyleplugin-kvantum
29 | ];
30 | };
31 |
32 | xdg.configFile."Kvantum/Fluent".source = with pkgs; "${fluent-kde}/share/Kvantum/Fluent";
33 |
34 | home.pointerCursor = {
35 | name = "capitaine-cursors-white";
36 | package = pkgs.capitaine-cursors;
37 | size = 24;
38 |
39 | gtk.enable = true;
40 | x11.enable = true;
41 | x11.defaultCursor = "left_ptr";
42 | };
43 |
44 | home.packages = with pkgs; [
45 | adwaita-icon-theme
46 | fluent-kde
47 | gnome-themes-extra
48 | gtk-engine-murrine
49 | gtk_engines
50 | hicolor-icon-theme
51 | ];
52 | }
53 |
--------------------------------------------------------------------------------
/dotfiles/config/desktop/desktop-session.nix:
--------------------------------------------------------------------------------
1 | _: {
2 | systemd.user.targets.desktop-session = {
3 | Unit = {
4 | Description = "Desktop Session target for Xorg and Wayland";
5 | BindsTo = [ "graphical-session.target" ];
6 | Wants = [ "graphical-session-pre.target" ];
7 | After = [ "graphical-session-pre.target" ];
8 | };
9 | };
10 |
11 | systemd.user.targets.desktop-xdg-autostart = {
12 | Unit = {
13 | Description = "XDG Autostart for Xorg and Wayland desktop";
14 | BindsTo = [ "xdg-desktop-autostart.target" ];
15 | PartOf = [ "desktop-session.target" ];
16 | After = [ "desktop-session.target" ];
17 | };
18 | };
19 |
20 | systemd.user.targets.desktop-session-shutdown = {
21 | Unit = {
22 | Description = "Shutdown running Xorg and Wayland Desktop";
23 | DefaultDependencies = "no";
24 | StopWhenUnneeded = true;
25 |
26 | Conflict = [
27 | "graphical-session.target"
28 | "graphical-session-pre.target"
29 | "desktop-session.target"
30 | ];
31 | After = [
32 | "graphical-session.target"
33 | "graphical-session-pre.target"
34 | "desktop-session.target"
35 | ];
36 | };
37 | };
38 | }
39 |
--------------------------------------------------------------------------------
/pkgs/xdg-desktop-portal-hypr-remote/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | stdenv,
3 | fetchFromGitHub,
4 | libei,
5 | libffi,
6 | sdbus-cpp,
7 | systemd,
8 | wayland,
9 | wayland-protocols,
10 | wayland-scanner,
11 | cmake,
12 | pkg-config,
13 | }:
14 |
15 | stdenv.mkDerivation rec {
16 | pname = "xdg-desktop-portal-hypr-remote";
17 | version = "git";
18 | src = fetchFromGitHub {
19 | owner = "gac3k";
20 | repo = pname;
21 | rev = "f463018129c5effd3b82b477d7f84fe0d0820a6b";
22 | hash = "sha256-hbRlPcrPWOKWZvLlnsw37/s4P+bLRq59n+R9qtVbIXc=";
23 | };
24 |
25 | buildInputs = [
26 | libei
27 | libffi
28 | sdbus-cpp
29 | systemd.dev
30 | wayland
31 | wayland-protocols
32 | wayland-scanner
33 | wayland.dev
34 | ];
35 |
36 | nativeBuildInputs = [
37 | cmake
38 | pkg-config
39 | ];
40 |
41 | postInstall = ''
42 | cp -r $out/bin $out/libexec
43 |
44 | install -Dm644 org.freedesktop.impl.portal.desktop.hypr-remote.service \
45 | $out/share/dbus-1/services/org.freedesktop.impl.portal.desktop.hypr-remote.service
46 |
47 | install -Dm644 contrib/systemd/xdg-desktop-portal-hypr-remote.service \
48 | $out/share/systemd/user/xdg-desktop-portal-hypr-remote.service
49 | '';
50 | }
51 |
--------------------------------------------------------------------------------
/pkgs/wine-run/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | lib,
3 | runCommand,
4 | writeShellScript,
5 | pname ? "wine",
6 | paths ? "",
7 | }:
8 | let
9 | env = lib.optionalString (paths != "") ''
10 | export PATH=${paths}:$PATH
11 | '';
12 |
13 | wine-runtime = writeShellScript "${pname}" ''
14 | ${env}
15 | unset LD_PRELOAD
16 |
17 | if [[ ! -d $(pwd)/drive_c ]]; then
18 | echo 'This directory is not wine prefix' >&2
19 | exit 1
20 | fi
21 |
22 | export WINEPREFIX=$(pwd)
23 | export WINE_BIN=$(which .wine)
24 | exec "''${@:-}"
25 | '';
26 |
27 | wine-setup = writeShellScript "${pname}-setup" ''
28 | ${wine-run} wineboot -u
29 | ${wine-run} winetricks corefonts fakejapanese
30 | ${wine-run} wineboot -s
31 | '';
32 |
33 | wine-run = writeShellScript "${pname}-wine" ''
34 | ${env}
35 |
36 | case "''${0:-}" in
37 | *64)
38 | exec wine64 "''${@:-}"
39 | ;;
40 | *)
41 | exec wine "''${@:-}"
42 | ;;
43 | esac
44 | '';
45 | in
46 | runCommand "wine-run" { } ''
47 | mkdir -p $out/bin
48 | cp ${wine-runtime} $out/bin/${pname}
49 | cp ${wine-setup} $out/bin/${pname}-setup
50 | cp ${wine-run} $out/bin/${pname}-wine
51 | cp ${wine-run} $out/bin/${pname}-wine64
52 |
53 | chmod +x $out/bin/*
54 | ''
55 |
--------------------------------------------------------------------------------
/system/config/linux/optimize.nix:
--------------------------------------------------------------------------------
1 | _: {
2 | # kernel
3 | boot.kernelParams = [ "clocksource=hpet" ];
4 | boot.kernelModules = [
5 | # enable to tcp bbr
6 | "tcp_bbr"
7 | ];
8 |
9 | # sysctl
10 | boot.kernel.sysctl = {
11 | # for swap
12 | "vm.swapiness" = 10;
13 |
14 | # for file watching
15 | "fs.inotify.max_user_watches" = 1048576; # 1GB
16 |
17 | # for networking
18 | "net.core.default_qdisc" = "cake";
19 | "net.ipv4.tcp_congestion_control" = "bbr";
20 | "net.ipv4.tcp_window_scaling" = 1;
21 |
22 | "net.core.netdev_max_backlog" = 16384;
23 | "net.core.somaxconn" = 8192;
24 |
25 | "net.ipv4.tcp_fastopen" = 3;
26 | };
27 |
28 | # cpu
29 | powerManagement.enable = true;
30 | powerManagement.cpuFreqGovernor = "performance";
31 |
32 | # udev
33 | services.udev.extraRules = ''
34 | # for audio
35 | KERNEL=="rtc0", GROUP="audio"
36 | KERNEL=="hpet", GROUP="audio"
37 | DEVPATH=="/devices/virtual/misc/cpu_dma_latency", OWNER="root", GROUP="audio", MODE="0660"
38 |
39 | # for storage
40 | ACTION=="add|change", KERNEL=="nvme[0-9]n[0-9]", ATTR{queue/scheduler}="none"
41 | ACTION=="add|change", KERNEL=="sd[a-z]*|mmcblk[0-9]*", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="brq"
42 | ACTION=="add|change", KERNEL=="sd[a-z]*", ATTR{queue/rotational}=="1", ATTR{queue/scheduler}="bfq"
43 | '';
44 | }
45 |
--------------------------------------------------------------------------------
/dotfiles/user/nyarla.nix:
--------------------------------------------------------------------------------
1 | _: {
2 | imports = [
3 | ../config/app/browser.nix
4 | ../config/app/creative.nix
5 | ../config/app/generative.nix
6 | ../config/app/multimedia.nix
7 | ../config/app/office.nix
8 | ../config/app/vr.nix
9 | ../config/app/wine.nix
10 | ../config/desktop/theme.nix
11 | ../config/files/skk.nix
12 | ../config/nixos/gsettings.nix
13 | ../config/services/polkit.nix
14 | ../config/services/syncthing.nix
15 | ../config/shell/starship.nix
16 | ../config/shell/zsh.nix
17 | ../config/tools/archiver.nix
18 | ../config/tools/development.nix
19 |
20 | ../app/git
21 | ../app/hyprland
22 | ../app/mlterm
23 | ../app/xdg
24 | ];
25 |
26 | # More customizations
27 | # ===================
28 |
29 | # Development
30 | # -----------
31 |
32 | # git
33 | programs.git.settings.user = {
34 | name = "nyarla";
35 | email = "nyarla@kalaclista.com";
36 | };
37 |
38 | # keychain (ssh)
39 | programs.keychain.keys = [ "id_ed25519" ];
40 |
41 | # System configuration
42 | # ====================
43 |
44 | # home-manager
45 | # -------------
46 | programs.home-manager.enable = true;
47 | systemd.user.startServices = "sd-switch";
48 |
49 | # stateVersion (same as NixOS)
50 | home.stateVersion = "24.11";
51 | home.enableNixpkgsReleaseCheck = false;
52 | nix.nixPath = [ "nixpkgs=/etc/nixpkgs" ];
53 | }
54 |
--------------------------------------------------------------------------------
/pkgs/cuda-shell/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | gcc9Stdenv,
3 | lib,
4 | buildFHSEnv,
5 | cudaPackages,
6 | nvidia_x11,
7 | }:
8 | let
9 | libPath = lib.makeLibraryPath (
10 | [
11 | nvidia_x11
12 | gcc9Stdenv.cc.cc
13 | gcc9Stdenv.cc.libc
14 | ]
15 | ++ (with cudaPackages; [
16 | cudatoolkit
17 | cudnn
18 | ])
19 | );
20 | in
21 | buildFHSEnv {
22 | name = "cuda-shell";
23 | targetPkgs =
24 | p:
25 | (with p; [
26 | autoconf
27 | binutils
28 | curl
29 | freeglut
30 | git
31 | gitRepo
32 | glib
33 | gnumake
34 | gnupg
35 | gperf
36 | gperftools
37 | libGL
38 | libGLU
39 | m4
40 | ncurses5
41 | procps
42 | unzip
43 | util-linux
44 | xorg.libX11
45 | xorg.libXext
46 | xorg.libXi
47 | xorg.libXmu
48 | xorg.libXrandr
49 | xorg.libXv
50 | zlib
51 | ])
52 | ++ (with cudaPackages; [
53 | cudatoolkit
54 | cudnn
55 | ])
56 | ++ [ gcc9Stdenv.cc ];
57 |
58 | multiPkgs = pkgs: with pkgs; [ zlib ];
59 | runScript = "bash";
60 | profile = ''
61 | export CUDA_PATH=${cudaPackages.cudatoolkit}
62 | export CUDA_LD_LIBRARY_PATH=${libPath}
63 | export LDFLAGS="-L${nvidia_x11}/lib -L${cudaPackages.cudatoolkit}/lib -L${cudaPackages.cudnn}/lib"
64 | export CFLAGS="-I${cudaPackages.cudatoolkit}/include -I${cudaPackages.cudnn}/include"
65 | '';
66 | }
67 |
--------------------------------------------------------------------------------
/dotfiles/app/mlterm/main.nix:
--------------------------------------------------------------------------------
1 | { color, pkgs }:
2 | let
3 | config = {
4 | # terminal
5 | use_login_shell = true;
6 | termtype = "mlterm-256color";
7 | encoding = "UTF-8";
8 | col_size_of_width_a = 1;
9 | bidi_mode = "left";
10 |
11 | # font
12 | fontsize = 16;
13 | line_space = 0;
14 | use_anti_alias = true;
15 | box_drawing_font = "unicode";
16 | type_engine = "cairo";
17 | unicode_full_width_areas = "U+2030-2031,U+203B-203B,U+2121-2121,U+213B-213B,U+214F-214F,U+2160-2182,U+2190-21FF,U+2318-2318,U+2325-2325,U+2460-24FF,U+25A0-25D7,U+25D9-25E5,U+25E7-2653,U+2668-2668,U+2670-2712,U+2744-2744,U+2747-2747,U+2763-2763,U+2776-2793,U+27DD-27DE,U+27F5-27FF,U+2B33-2B33,U+3248-324F,U+E000-EDFF,U+EE0C-F8FF,U+1F000-1F02B,U+1F030-1F093,U+1F0A0-1F0F5,U+1F100-1FAF8,U+F0000-10FFFD";
18 | emoji_path = "${pkgs.noto-fonts-color-emoji}/share/fonts/noto/NotoColorEmoji.ttf";
19 |
20 | # appearance
21 | scrollbar_mode = false;
22 | vt_color_mode = true;
23 | blink_cursor = true;
24 |
25 | bg_color = color.black;
26 | fg_color = color.hl_white;
27 |
28 | cursor_bg_color = color.hl_green;
29 | cursor_fg_color = color.black;
30 |
31 | tab_size = 2;
32 | log_size = 100000;
33 |
34 | # others
35 | mod_meta_key = "alt";
36 | mod_meta_mode = "esc";
37 | use_clipboard = true;
38 | };
39 |
40 | extraConfig = {
41 | x86_64-linux = {
42 | use_xim = false;
43 | input_method = "fcitx";
44 | };
45 | };
46 | in
47 | config // extraConfig."${pkgs.stdenv.system}"
48 |
--------------------------------------------------------------------------------
/patches/tmux-3.6-utf8.pl:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env perl
2 |
3 | use v5.40;
4 |
5 | my @half = (
6 | 0x1F1E6, 0x1F1E7, 0x1F1E8, 0x1F1E9, 0x1F1EA, 0x1F1EB, 0x1F1EC, 0x1F1ED,
7 | 0x1F1EE, 0x1F1EF, 0x1F1F0, 0x1F1F1, 0x1F1F2, 0x1F1F3, 0x1F1F4, 0x1F1F5,
8 | 0x1F1F6, 0x1F1F7, 0x1F1F8, 0x1F1F9, 0x1F1FA, 0x1F1FB, 0x1F1FC, 0x1F1FD,
9 | 0x1F1FE, 0x1F1FF,
10 | );
11 |
12 | my @full = map {
13 | my $range = $_;
14 | $range =~ s{U\+}{};
15 | my ( $start, $end ) = split qr{-}, $range;
16 | hex($start) .. hex($end)
17 | } split q{,},
18 | "U+2030-2031,U+203B-203B,U+2121-2121,U+213B-213B,U+214F-214F,U+2160-2182,U+2190-21FF,U+2318-2318,U+2325-2325,U+2460-24FF,U+25A0-25D7,U+25D9-25E5,U+25E7-2653,U+2668-2668,U+2670-2712,U+2744-2744,U+2747-2747,U+2763-2763,U+2776-2793,U+27F5-27FF,U+2B33-2B33,U+3248-324F,U+E000-EDFF,U+EE0C-F8FF,U+1F000-1F02B,U+1F030-1F093,U+1F0A0-1F0F5,U+1F100-1FAF8,U+F0000-10FFFD";
19 |
20 | my @codepoints = sort { $a <=> $b } ( @half, @full );
21 |
22 | say <<'...';
23 | #ifndef UTF8_WIDTH
24 | #define UTF8_WIDTH
25 |
26 | static struct utf8_width_item utf8_default_width_cache[] = {
27 | ...
28 |
29 | for my ( $idx, $code ) ( indexed @codepoints ) {
30 | if ( grep { $code eq $_ } @half ) {
31 | print sprintf( "\t{ .wc = 0x%X, .width = 1 }", $code );
32 | }
33 | else {
34 | print sprintf( "\t{ .wc = 0x%X, .width = 2 }", $code );
35 | }
36 |
37 | if ( $idx == $#codepoints ) {
38 | print "\n";
39 | }
40 | else {
41 | print ",\n";
42 | }
43 | }
44 |
45 | say <<'...';
46 | };
47 | #endif
48 | ...
49 |
--------------------------------------------------------------------------------
/dotfiles/config/shell/starship.nix:
--------------------------------------------------------------------------------
1 | _: {
2 | programs.bash.enable = true;
3 |
4 | programs.starship = {
5 | enable = true;
6 | enableBashIntegration = true;
7 | enableZshIntegration = true;
8 | settings = {
9 | format = ''
10 | $directory$git_branch$git_status$env_var $cmd_duration
11 | $character'';
12 |
13 | add_newline = false;
14 |
15 | directory = {
16 | format = "[$path]($style)[$read_only]($read_only_style)";
17 | style = "blue";
18 | read_only = "";
19 | read_only_style = "yellow";
20 | truncation_symbol = ".../";
21 | truncate_to_repo = false;
22 | };
23 |
24 | character = {
25 | format = "$symbol ";
26 | success_symbol = "[\\$](purple)";
27 | error_symbol = "[\\$](red)";
28 | vicmd_symbol = "[!](green)";
29 | };
30 |
31 | cmd_duration = {
32 | format = "[$duration]($style)";
33 | style = "yellow";
34 | };
35 |
36 | git_branch = {
37 | format = " [$symbol$branch]($style)";
38 | symbol = "";
39 | style = "white";
40 | };
41 |
42 | git_status = {
43 | format = " [$ahead_behind](cyan)";
44 | };
45 |
46 | env_var = {
47 | IN_NIX_SHELL = {
48 | format = "[ ](bold gray)[](cyan)";
49 | variable = "IN_NIX_SHELL";
50 | };
51 |
52 | IN_PERL_SHELL = {
53 | format = "[ ](bold gray)[](purple)";
54 | variable = "IN_PERL_SHELL";
55 | };
56 | };
57 | };
58 | };
59 | }
60 |
--------------------------------------------------------------------------------
/system/config/linux/dbus.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | pkgs,
4 | lib,
5 | ...
6 | }:
7 | let
8 | target = lib.lists.remove null config.environment.systemPackages;
9 |
10 | addDBus = pkg: ns: ''
11 | if test -d ${pkg}/${ns} ; then
12 | cd ${pkg}/${ns}
13 |
14 | for file in $(ls); do
15 | if test -f $file ; then
16 | cp -RLf ${pkg}/${ns}/$file $out/${ns}/$file
17 | fi
18 | done
19 | fi
20 | '';
21 |
22 | dbusBundlePackage = pkgs.runCommand "dbus-bundle" { } ''
23 | mkdir -p $out/etc/dbus-1/interfaces
24 | mkdir -p $out/etc/dbus-1/session.d
25 | mkdir -p $out/etc/dbus-1/system.d
26 | mkdir -p $out/share/dbus-1/interfaces
27 | mkdir -p $out/share/dbus-1/services
28 | mkdir -p $out/share/dbus-1/session.d
29 | mkdir -p $out/share/dbus-1/system-services
30 | mkdir -p $out/share/dbus-1/system.d
31 |
32 | ${lib.concatMapStrings (p: addDBus p "etc/dbus-1/interfaces") target}
33 | ${lib.concatMapStrings (p: addDBus p "etc/dbus-1/session.d") target}
34 | ${lib.concatMapStrings (p: addDBus p "etc/dbus-1/system.d") target}
35 | ${lib.concatMapStrings (p: addDBus p "share/dbus-1/interfaces") target}
36 | ${lib.concatMapStrings (p: addDBus p "share/dbus-1/services") target}
37 | ${lib.concatMapStrings (p: addDBus p "share/dbus-1/session.d") target}
38 | ${lib.concatMapStrings (p: addDBus p "share/dbus-1/system-services") target}
39 | ${lib.concatMapStrings (p: addDBus p "share/dbus-1/system.d") target}
40 | '';
41 | in
42 | {
43 | services.dbus.packages = lib.mkForce (lib.singleton dbusBundlePackage);
44 | }
45 |
--------------------------------------------------------------------------------
/pkgs/restic-run/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | runCommand,
3 | writeShellScriptBin,
4 | restic,
5 | rclone,
6 | lib,
7 | }:
8 | let
9 | restic-run = writeShellScriptBin "restic-run" ''
10 | set -euo pipefail
11 |
12 | export PATH=${
13 | lib.makeBinPath [
14 | restic
15 | rclone
16 | ]
17 | }:$PATH
18 |
19 | export HOME=/home/nyarla
20 |
21 | export RESTIC_PASSWORD_FILE=$HOME/.config/rclone/restic
22 | export RESTIC_REPOSITORY=rclone:Teracloud:Backup/NixOS
23 |
24 | exec "''${@}"
25 | '';
26 |
27 | restic-backup = writeShellScriptBin "restic-backup" ''
28 | set -euo pipefail
29 |
30 | export RESTIC_FORGET_ARGS="--prune --keep-daily 7 --keep-weekly 3 --keep-monthly 3"
31 | export RESTIC_BACKUP_ARGS="--exclude-file $HOME/.config/rclone/ignore"
32 |
33 | DIR="$1"
34 |
35 | if test "z$DIR" = "z"; then
36 | echo "Usage: restic-backup [DIR]" >&2
37 | exit 1
38 | fi
39 |
40 | shift 1
41 |
42 | ${restic-run}/bin/restic-run ${restic}/bin/restic cache --cleanup
43 | ${restic-run}/bin/restic-run ${restic}/bin/restic unlock --remove-all
44 | ${restic-run}/bin/restic-run ${restic}/bin/restic repair index
45 | ${restic-run}/bin/restic-run ${restic}/bin/restic prune
46 | ${restic-run}/bin/restic-run ${restic}/bin/restic backup $RESTIC_BACKUP_ARGS "$DIR"
47 | ${restic-run}/bin/restic-run ${restic}/bin/restic forget $RESTIC_FORGET_ARGS
48 | '';
49 | in
50 | runCommand "restic-run" { } ''
51 | mkdir -p $out/bin
52 | cp -r ${restic-run}/bin/* $out/bin/
53 | cp -r ${restic-backup}/bin/* $out/bin/
54 | chmod +x $out/bin/*
55 | ''
56 |
--------------------------------------------------------------------------------
/dotfiles/config/nixos/gsettings.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | pkgs,
4 | lib,
5 | ...
6 | }:
7 | let
8 | nixos-gsettings-overrides = pkgs.runCommand "nixos-gsettings-overrides" { } ''
9 | mkdir -p $out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas/
10 |
11 | ${lib.concatMapStrings (p: ''
12 | if test -d ${p}/share/gsettings-schemas; then
13 | find ${p}/share/gsettings-schemas -name '*.xml' \
14 | -exec cp -rf {} $out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas/ \;
15 | fi
16 | '') config.home.packages}
17 |
18 | ${pkgs.glib.dev}/bin/glib-compile-schemas $out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas/
19 | '';
20 | in
21 | {
22 | xdg.configFile."profile.d/gsettings.sh" = {
23 | text = ''
24 | rm -rf $HOME/.local/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas
25 | mkdir -p $HOME/.local/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas
26 |
27 | cp -RLf $NIX_GSETTINGS_OVERRIDES_DIR/*.xml \
28 | $HOME/.local/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas/
29 |
30 | cp -RLf ${nixos-gsettings-overrides}/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas/*.xml \
31 | $HOME/.local/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas/
32 |
33 | ${pkgs.glib.dev}/bin/glib-compile-schemas \
34 | $HOME/.local/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas/
35 |
36 | export NIX_GSETTINGS_OVERRIDES_DIR=$HOME/.local/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas
37 | '';
38 | };
39 | }
40 |
--------------------------------------------------------------------------------
/system/profile/NyZen9.nix:
--------------------------------------------------------------------------------
1 | _: {
2 | imports = [
3 | ../machine/NyZen9/default.nix
4 |
5 | ../config/audio/pipewire.nix
6 | ../config/cpu/amd.nix
7 | ../config/desktop/app.nix
8 | ../config/datetime/jp.nix
9 | ../config/desktop/files.nix
10 | ../config/desktop/wayland.nix
11 | ../config/desktop/xdg.nix
12 | ../config/desktop/xorg.nix
13 | ../config/gadgets/android.nix
14 | ../config/gaming/steam.nix
15 | ../config/gaming/xr.nix
16 | ../config/graphic/fonts.nix
17 | ../config/graphic/lodpi.nix
18 | ../config/hardware/firmware.nix
19 | ../config/i18n/fcitx5.nix
20 | ../config/i18n/locales.nix
21 | ../config/keyboard/us.nix
22 | ../config/keyboard/zinc.nix
23 | ../config/linux/console.nix
24 | ../config/linux/containers.nix
25 | ../config/linux/filesystem.nix
26 | ../config/linux/hardware.nix
27 | ../config/linux/lodpi.nix
28 | ../config/linux/optical.nix
29 | ../config/linux/optimize.nix
30 | ../config/linux/process.nix
31 | ../config/linux/waydroid.nix
32 | ../config/networking/agent.nix
33 | ../config/networking/avahi.nix
34 | ../config/networking/network-manager.nix
35 | ../config/networking/printer.nix
36 | ../config/networking/tailscale.nix
37 | ../config/nixos/gsettings.nix
38 | ../config/nixos/nix-ld.nix
39 | ../config/security/clamav.nix
40 | ../config/security/firewall-home.nix
41 | ../config/security/gnupg.nix
42 | ../config/security/ulimit.nix
43 | ../config/security/yubikey.nix
44 | ../config/tools/editors.nix
45 | ../config/tools/git.nix
46 | ../config/user/nyarla.nix
47 | ../config/video/droidcam.nix
48 | ../config/video/intel-with-amd.nix
49 | ../config/vmm/kvm.nix
50 | ../config/wireless/AX200.nix
51 | ../config/wireless/bluetooth.nix
52 | ../config/wireless/jp.nix
53 |
54 | ../config/services/nyzen9.nix
55 | ];
56 | }
57 |
--------------------------------------------------------------------------------
/pkgs/openjtalk/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | stdenv,
3 | stdenvNoCC,
4 | fetchurl,
5 | }:
6 | let
7 | htsengine = stdenv.mkDerivation rec {
8 | pname = "hts_engine";
9 | version = "1.10";
10 | src = fetchurl {
11 | url = "mirror://sourceforge/hts-engine/hts_engine_API-${version}.tar.gz";
12 | hash = "sha256-4hMr5YYNj7SkYL52ZFTP18PiHPZ7UJxI4YBP6rFJaPc=";
13 | };
14 | };
15 |
16 | open-jtalk-mecab-naist-jdic-utf8 = stdenvNoCC.mkDerivation rec {
17 | pname = "open-jtalk-mecab-naist-jdic-utf-8";
18 | version = "1.11";
19 | src = fetchurl {
20 | url = "mirror://sourceforge/open-jtalk/open_jtalk_dic_utf_8-${version}.tar.gz";
21 | hash = "sha256-M+nNJRvEGqK9fKNvV6u/YerjVDyiXKiSrjReOUyxBUk=";
22 | };
23 |
24 | installPhase = ''
25 | mkdir -p $out/share/openjtalk/dict
26 | cp -r . $out/share/openjtalk/dict
27 | '';
28 | };
29 |
30 | hts-voice-nitech-jp-atr503-m001 = stdenvNoCC.mkDerivation rec {
31 | pname = "hts_voice_nitech_jp_atr503_m001";
32 | version = "1.05";
33 | src = fetchurl {
34 | url = "mirror://sourceforge/open-jtalk/hts_voice_nitech_jp_atr503_m001-${version}.tar.gz";
35 | hash = "sha256-LlVciEgiZ7KTHH28fswOPfFA1vaPyROqSCLzNsngrfw=";
36 | };
37 |
38 | installPhase = ''
39 | mkdir -p $out/share/openjtalk/voice
40 | cp -r . $out/share/openjtalk/voice
41 | '';
42 | };
43 |
44 | openjtalk = stdenv.mkDerivation rec {
45 | pname = "openjtalk";
46 | version = "1.11";
47 | src = fetchurl {
48 | url = "mirror://sourceforge/open-jtalk/open_jtalk-${version}.tar.gz";
49 | hash = "sha256-IP3GrrbHV4ZgNKvBdYIFc9tD5ChHB8hm/NAsjsGN5x8=";
50 | };
51 |
52 | buildInputs = [ htsengine ];
53 | configureFlags = [
54 | "--with-hts-engine-header-path=${htsengine}/include"
55 | "--with-hts-engine-library-path=${htsengine}/lib"
56 | ];
57 |
58 | passthru = {
59 | inherit htsengine open-jtalk-mecab-naist-jdic-utf8 hts-voice-nitech-jp-atr503-m001;
60 | };
61 | };
62 | in
63 | openjtalk
64 |
--------------------------------------------------------------------------------
/system/config/video/intel-with-nvidia.nix:
--------------------------------------------------------------------------------
1 | { pkgs, config, ... }:
2 | let
3 | nvidia = config.boot.kernelPackages.nvidiaPackages.latest;
4 | in
5 | {
6 | boot = {
7 | blacklistedKernelModules = [
8 | "i2c_nvidia_gpu"
9 | "nouveau"
10 | "nvidia"
11 | "nvidia_uvm"
12 | "nvidia_drm"
13 | "nvidia_modeset"
14 | ];
15 | initrd.kernelModules = [ "i915" ];
16 | kernelParams = [
17 | "i915.enable_guc=3"
18 | ];
19 | };
20 |
21 | hardware = {
22 | i2c.enable = true;
23 | intel-gpu-tools.enable = true;
24 | nvidia = {
25 | modesetting.enable = false;
26 | package = nvidia;
27 | open = true;
28 | nvidiaSettings = true;
29 | nvidiaPersistenced = false;
30 | powerManagement.enable = false;
31 | powerManagement.finegrained = false;
32 | };
33 |
34 | graphics = {
35 | enable = true;
36 | enable32Bit = true;
37 | extraPackages = with pkgs; [
38 | intel-media-driver
39 | libvdpau-va-gl
40 | ];
41 | extraPackages32 = with pkgs.driversi686Linux; [
42 | intel-media-driver
43 | libvdpau-va-gl
44 | ];
45 | };
46 | };
47 |
48 | environment.variables = {
49 | VDPAU_DRIVER = "va_gl";
50 | };
51 |
52 | services.xserver = {
53 | videoDrivers = [
54 | "i915"
55 | "nvidia"
56 | ];
57 |
58 | screenSection = ''
59 | Option "AllowEmptyInitialConfiguration" "True"
60 | Option "ConnectedMonitor" "None"
61 | '';
62 |
63 | deviceSection = ''
64 | BusID "PCI:11:0:0"
65 | Option "Coolbits" "28"
66 | '';
67 | };
68 |
69 | environment.systemPackages = with pkgs; [
70 | igsc
71 | (nvtopPackages.full.override {
72 | intel = true;
73 | nvidia = true;
74 | })
75 | (cuda-shell.override {
76 | nvidia_x11 = nvidia;
77 | cudaPackages = pkgs.cudaPackages_12_8;
78 | })
79 | nvidia-maximize
80 | ddcui
81 | ddcutil
82 | ];
83 |
84 | hardware.nvidia-container-toolkit.enable = true;
85 | }
86 |
--------------------------------------------------------------------------------
/system/config/video/intel-with-amd.nix:
--------------------------------------------------------------------------------
1 | { pkgs, config, ... }:
2 | {
3 | boot = {
4 | initrd.kernelModules = [ "i915" ];
5 | kernelParams = [
6 | "i915.enable_guc=3"
7 | ];
8 | blacklistedKernelModules = [ "amdgpu" ];
9 | };
10 |
11 | hardware = {
12 | i2c.enable = true;
13 | intel-gpu-tools.enable = true;
14 | graphics = {
15 | enable = true;
16 | enable32Bit = true;
17 | extraPackages = with pkgs; [
18 | intel-media-driver
19 | libvdpau-va-gl
20 | rocmPackages.clr.icd
21 | ];
22 | extraPackages32 = with pkgs.driversi686Linux; [
23 | intel-media-driver
24 | libvdpau-va-gl
25 | ];
26 | };
27 | };
28 |
29 | systemd.tmpfiles.rules =
30 | let
31 | rocmEnv = pkgs.symlinkJoin {
32 | name = "rocm-combined";
33 | paths = with pkgs.rocmPackages.gfx12; [
34 | clr
35 | hipblas
36 | rocblas
37 | ];
38 | };
39 | in
40 | [
41 | "L+ /opt/rocm - - - - ${rocmEnv}"
42 | ];
43 |
44 | environment.variables = {
45 | VDPAU_DRIVER = "va_gl";
46 | };
47 |
48 | services.xserver = {
49 | videoDrivers = [
50 | "i915"
51 | "amdgpu"
52 | ];
53 | };
54 |
55 | environment.systemPackages =
56 | let
57 | amd-run = pkgs.amd-run.override { gpuId = "1002:7550"; };
58 | unityhub-amd = pkgs.unityhub-amd.override { inherit amd-run; };
59 | in
60 | [
61 | amd-run
62 | unityhub-amd
63 | unityhub-amd.unity-run
64 | ]
65 | ++ (with pkgs; [
66 | clinfo
67 | ddcui
68 | ddcutil
69 | igsc
70 | (nvtopPackages.full.override {
71 | amd = true;
72 | intel = true;
73 | })
74 | ])
75 | ++ (with pkgs.rocmPackages; [
76 | amdsmi
77 | rocm-smi
78 | ]);
79 |
80 | services.ollama = {
81 | package = pkgs.ollama-rocm;
82 | environmentVariables = {
83 | "ROCM_PATH" = "/opt/rocm";
84 | "HIP_VISIBLE_DEVICES" = "0";
85 | "HSA_OVERRIDE_GFX_VERSION" = "12.0.1";
86 | };
87 | };
88 | }
89 |
--------------------------------------------------------------------------------
/dotfiles/app/hyprland/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | imports = [
4 | ../../config/desktop/desktop-session.nix
5 | ../../config/desktop/theme.nix
6 | ];
7 |
8 | home.packages = with pkgs; [
9 | # wayland compositor
10 | hypridle
11 | hyprland
12 | hyprlock
13 | hyprnotify
14 | hyprshot
15 |
16 | hyprlandPlugins.hyprbars
17 | hyprlandPlugins.hyprexpo
18 |
19 | swaylock-effects # TODO: switch to hyprlock
20 |
21 | xwayland
22 |
23 | # desktop
24 | waybar
25 | wofi
26 |
27 | gyazo-diy
28 | libnotify
29 | libsecret
30 | mission-center
31 |
32 | # background services
33 | blueman
34 | networkmanagerapplet
35 | xembed-sni-proxy
36 |
37 | # utilities
38 | grim
39 | slurp
40 | wayout
41 | wev
42 | wlr-randr
43 | ydotool
44 |
45 | wl-clipboard
46 | xclip
47 | ];
48 |
49 | home.file.".local/bin/hy".source = toString (
50 | pkgs.writeShellScript "starthyprland" ''
51 | exec >$HOME/Reports/hyprland.log 2>&1
52 |
53 | for rc in $(ls /etc/profile.d); do
54 | . /etc/profile.d/$rc
55 | done
56 |
57 | for rc in $(ls $HOME/.config/profile.d); do
58 | . $HOME/.config/profile.d/$rc
59 | done
60 |
61 | export DESKTOP_SESSION=hyprland
62 | export LIBSEAT_BACKEND=logind
63 |
64 | export XDG_SESSION_CLASS=user
65 | export XDG_SESSION_TYPE=wayland
66 |
67 | if systemctl --user -q is-active desktop-session.target ; then
68 | echo "Desktop session already exists." >&2
69 | exit 1
70 | fi
71 |
72 | if hash dbus-update-activation-environment 2>/dev/null; then
73 | dbus-update-activation-environment --systemd --all
74 | fi
75 |
76 | systemctl --user reset-failed
77 |
78 | cleanup() {
79 | if systemctl --user -q is-active desktop-session.target ; then
80 | systemctl --user stop desktop-session.target
81 | fi
82 | }
83 | trap cleanup INT TERM
84 |
85 | dbus-run-session ${pkgs.hyprland}/bin/Hyprland
86 | cleanup
87 | ''
88 | );
89 | }
90 |
--------------------------------------------------------------------------------
/pkgs/dexed/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | stdenv,
3 | fetchFromGitHub,
4 | pkg-config,
5 | cmake,
6 | alsa-lib,
7 | curlFull,
8 | doxygen,
9 | freetype,
10 | glib,
11 | graphviz,
12 | gtk3,
13 | ladspa-sdk,
14 | libjack2,
15 | libjpeg_turbo,
16 | libpng,
17 | pcre,
18 | python3,
19 | webkitgtk,
20 | zlib,
21 | xorg,
22 | libGLU,
23 | lib,
24 | }:
25 | stdenv.mkDerivation rec {
26 | pname = "dexed";
27 | version = "git";
28 |
29 | src = fetchFromGitHub {
30 | owner = "asb2m10";
31 | repo = "dexed";
32 | rev = "e4b536dc1194a008a0dfb4087242b6f8641946c8";
33 | hash = "sha256-1tWdCVtp3uMkbVa1aoEx63MbVuaIL4svBN0G4ELUJLo=";
34 | fetchSubmodules = true;
35 | };
36 |
37 | dontFixup = true;
38 |
39 | cmakeFlags = [
40 | "-DCMAKE_AR=${stdenv.cc.cc}/bin/gcc-ar"
41 | "-DCMAKE_RANLIB=${stdenv.cc.cc}/bin/gcc-ranlib"
42 | ];
43 |
44 | nativeBuildInputs = [
45 | cmake
46 | pkg-config
47 | doxygen
48 | python3
49 | ];
50 | buildInputs =
51 | [
52 | alsa-lib
53 | curlFull.dev
54 | freetype
55 | glib.dev
56 | graphviz
57 | gtk3
58 | ladspa-sdk
59 | libGLU
60 | libjack2
61 | libjpeg_turbo
62 | libpng
63 | pcre
64 | webkitgtk
65 | zlib
66 | ]
67 | ++ (with xorg; [
68 | libX11
69 | libXcomposite
70 | libXcursor
71 | libXext
72 | libXinerama
73 | libXrandr
74 | libXrender
75 | ]);
76 |
77 | libPath = lib.makeLibraryPath (
78 | buildInputs
79 | ++ [
80 | curlFull.out
81 | stdenv.cc.cc
82 | stdenv.cc.libc
83 | ]
84 | );
85 |
86 | installPhase = ''
87 | mkdir -p $out/bin
88 | mkdir -p $out/lib/vst3
89 |
90 | cp Source/Dexed_artefacts/Release/Standalone/Dexed \
91 | $out/bin
92 |
93 | chmod +x $out/bin/Dexed
94 |
95 | cp -R Source/Dexed_artefacts/Release/VST3/Dexed.vst3 \
96 | $out/lib/vst3/Dexed.vst3
97 |
98 | patchelf --set-rpath "${libPath}" $out/bin/Dexed
99 | patchelf --set-rpath "${libPath}" $out/lib/vst3/Dexed.vst3/Contents/x86_64-linux/Dexed.so
100 | '';
101 | }
102 |
--------------------------------------------------------------------------------
/system/config/security/firewall-home.nix:
--------------------------------------------------------------------------------
1 | _: {
2 | networking.firewall = {
3 | enable = true;
4 | allowPing = true;
5 | checkReversePath = "loose"; # for tailscale
6 | trustedInterfaces = [
7 | "virbr0"
8 | ];
9 | interfaces = {
10 | "lo" = {
11 | allowedTCPPorts = [
12 | 9757
13 | ];
14 | allowedUDPPorts = [
15 | 5353
16 | 9757
17 | ];
18 | };
19 |
20 | "tailscale0" = {
21 | allowedTCPPorts = [
22 | # calibre
23 | 8085
24 |
25 | # http
26 | 80
27 | 443
28 | 1313 # for development
29 | 8191 # for flaresolverr
30 |
31 | # ssh
32 | 22
33 |
34 | # NetBIOS
35 | 137
36 | 138
37 | 139
38 | 445
39 | ];
40 |
41 | allowedUDPPorts = [
42 | # http
43 | 80
44 | 443
45 |
46 | # NetBIOS
47 | 137
48 | 138
49 | 139
50 | 445
51 | ];
52 | };
53 |
54 | "wlan0" = {
55 | allowedTCPPorts = [
56 | # syncthing
57 | 22000
58 |
59 | # wivrn
60 | 9757
61 |
62 | # steam link
63 | 27036
64 | 27037
65 | ];
66 |
67 | allowedUDPPorts = [
68 | # scanner
69 | 8610
70 | 8612
71 |
72 | # syncthing
73 | 22000
74 | 21027
75 |
76 | # wivrn
77 | 5353
78 | 9757
79 |
80 | # steam link
81 | 10400
82 | 10401
83 | 27031
84 | 27036
85 | ];
86 | };
87 |
88 | "virbr0" = {
89 | allowedTCPPorts = [
90 | # NetBIOS
91 | 137
92 | 138
93 | 139
94 | 445
95 | ];
96 |
97 | allowedUDPPorts = [
98 | # NetBIOS
99 | 137
100 | 138
101 | 139
102 | 445
103 |
104 | # netjack
105 | 19000
106 | ];
107 | };
108 | };
109 | };
110 | }
111 |
--------------------------------------------------------------------------------
/pkgs/ildaeil/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | stdenv,
3 | fetchFromGitHub,
4 | autoPatchelfHook,
5 | pkg-config,
6 | patchelf,
7 | qt5,
8 | findutils,
9 | bzip2,
10 | carla,
11 | dbus,
12 | file,
13 | flac,
14 | libGL,
15 | libcap,
16 | libglvnd,
17 | libjack2,
18 | libogg,
19 | libopus,
20 | libsndfile,
21 | libvorbis,
22 | wine,
23 | xorg,
24 | zstd,
25 | }:
26 | stdenv.mkDerivation rec {
27 | pname = "ildaeil";
28 | version = "2025-08-02";
29 | src = fetchFromGitHub {
30 | owner = "DISTRHO";
31 | repo = "Ildaeil";
32 | rev = "ae243919d592055d1e7806c8e47d847771da39d0";
33 | hash = "sha256-YPtA07+xipjOOgpPQ055nukvqT+UhhRz9W+U/SnmE08=";
34 | fetchSubmodules = true;
35 | };
36 |
37 | nativeBuildInputs = [
38 | findutils
39 | pkg-config
40 | patchelf
41 | autoPatchelfHook
42 | qt5.wrapQtAppsHook
43 | ];
44 |
45 | buildInputs = [
46 | bzip2.dev
47 | carla
48 | dbus.dev
49 | file.dev
50 | flac.dev
51 | libGL.dev
52 | libcap.dev
53 | libglvnd.dev
54 | libjack2
55 | libogg.dev
56 | libopus.dev
57 | libsndfile.dev
58 | libvorbis.dev
59 | xorg.libX11.dev
60 | xorg.libXcursor.dev
61 | xorg.libXext.dev
62 | xorg.libXrandr.dev
63 | zstd.dev
64 | ];
65 |
66 | postUnpack = ''
67 | rm carla -rf
68 | cp -R ${carla.src} carla
69 | chmod -R +w carla
70 | '';
71 |
72 | patches = [ ./nixos.patch ];
73 |
74 | postPatch = ''
75 | cd carla
76 | export carla=${carla}
77 | export wine=${wine}
78 |
79 | substituteAllInPlace source/jackbridge/Makefile
80 | substituteAllInPlace source/modules/dgl/Makefile
81 | substituteAllInPlace source/backend/CarlaStandalone.cpp
82 | substituteAllInPlace source/backend/engine/CarlaEngineJack.cpp
83 | cd ..
84 |
85 | substituteAllInPlace plugins/Common/IldaeilPlugin.cpp
86 | patchShebangs --build dpf/utils
87 | '';
88 |
89 | installFlags = [ "PREFIX=$(out)" ];
90 | makeFlags = [ "USE_SYSTEM_CARLA_BINS=true" ];
91 |
92 | preFixup = ''
93 | patchelf --add-needed libjack.so.0 $out/bin/Ildaeil
94 | find $out/lib -type f -name '*.so' -exec patchelf --add-needed libjack.so.0 {} \;
95 | find $out/lib -type f -name '*.clap' -exec patchelf --add-needed libjack.so.0 {} \;
96 | '';
97 | }
98 |
--------------------------------------------------------------------------------
/pkgs/stability-matrix/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | buildDotnetModule,
3 | dotnetCorePackages,
4 | fetchFromGitHub,
5 | buildFHSEnv,
6 | writeShellScript,
7 | }:
8 |
9 | let
10 | app = buildDotnetModule rec {
11 | pname = "StabilityMatrix";
12 | version = "2.14.2";
13 |
14 | src = fetchFromGitHub {
15 | owner = "LykosAI";
16 | repo = pname;
17 | rev = "v${version}";
18 | hash = "sha256-vusbubTTEHQlskp+T30bhFNDmsEzTYwTEp4W3b8xXLw=";
19 | };
20 |
21 | patches = [
22 | ./nixos.patch
23 | ];
24 |
25 | postPatch = ''
26 | # workaround for my environment
27 | sed -i 's!RegisterUriSchemeLinux();!/* RegisterUriSchemeLinux(); */!' \
28 | StabilityMatrix.Avalonia/Helpers/UriHandler.cs
29 | '';
30 |
31 | projectFile = "StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj";
32 | nugetDeps = ./deps.nix;
33 |
34 | dotnet-runtime = dotnetCorePackages.runtime_9_0;
35 | dotnet-sdk = dotnetCorePackages.sdk_9_0;
36 |
37 | preConfigure = ''
38 | dotnet tool uninstall husky
39 | dotnet tool uninstall xamlstyler.console
40 | dotnet tool uninstall csharpier
41 | dotnet tool uninstall dotnet-script
42 | dotnet tool uninstall refitter
43 |
44 | export HUSKY=0
45 | '';
46 |
47 | executables = [ "StabilityMatrix.Avalonia" ];
48 | };
49 | in
50 | buildFHSEnv {
51 | name = "StabilityMatrix";
52 | targetPkgs =
53 | p:
54 | (
55 | with p;
56 | [
57 | python310Full
58 |
59 | # dependences for pytyon 3.10.x runtime
60 | expat
61 | glib
62 | libGL
63 | libxcrypt-legacy
64 | tcl
65 | tclx
66 | tix
67 | tk
68 | xorg.libX11
69 | xorg.xorgproto
70 | zlib
71 | zstd
72 | ]
73 | ++ python310Full.buildInputs
74 | )
75 | ++ [ app ];
76 |
77 | # # workaround for my environment
78 | runScript = toString (
79 | writeShellScript "StabilityMatrix" ''
80 | export HOME=/persist/home/nyarla
81 | export XDG_CONFIG_HOME=$HOME/.config
82 | export XDG_DATA_HOME=$HOME/.local/share
83 | export XDG_STATE_HOME=$HOME/.local/state
84 |
85 | exec -a StabilityMatrix.Avalonia ${app}/bin/StabilityMatrix.Avalonia ''${@:-};
86 | ''
87 | );
88 | }
89 |
--------------------------------------------------------------------------------
/dotfiles/app/xdg/default.nix:
--------------------------------------------------------------------------------
1 | { lib, pkgs, ... }:
2 | {
3 | xdg.desktopEntries = {
4 | thorium-reader = {
5 | name = "Thorium Reader";
6 | genericName = "ePub/PDF Reader";
7 | exec = "thorium-reader %U";
8 | terminal = false;
9 | mimeType = [
10 | "application/pdf"
11 | "application/epub+zip"
12 | ];
13 | };
14 | };
15 | xdg.mimeApps = {
16 | enable = true;
17 | defaultApplications =
18 | let
19 | toMimeMap =
20 | apps:
21 | lib.attrsets.concatMapAttrs (
22 | app: mimeTypes: lib.attrsets.mergeAttrsList (lib.lists.map (mime: { "${mime}" = app; }) mimeTypes)
23 | ) apps;
24 | in
25 | toMimeMap {
26 | # web
27 | "firefox.desktop" = [
28 | # files
29 | "application/x-extension-htm"
30 | "application/x-extension-xhtml"
31 | "text/html"
32 |
33 | # schema
34 | "x-scheme-handler/http"
35 | "x-scheme-handler/https"
36 | ];
37 |
38 | # ebooks
39 | "thorium-reader.desktop" = [
40 | "application/epub+zip"
41 | ];
42 |
43 | # files
44 | "pluma.desktop" = [
45 | "text/plain"
46 | ];
47 |
48 | "eom.desktop" = [
49 | "image/apng"
50 | "image/bmp"
51 | "image/gif"
52 | "image/jp2"
53 | "image/jpeg"
54 | "image/jpm"
55 | "image/jpx"
56 | "image/jxl"
57 | "image/jxr"
58 | "image/png"
59 | "image/svg+xml"
60 | "image/svg+xml-compressed"
61 | "image/tiff"
62 | "image/vnd.microsoft.icon"
63 | "image/webp"
64 | ];
65 |
66 | "deadbeef.desktop" = [
67 | "audio/flac"
68 | "audio/mpeg"
69 | "audio/ogg"
70 | "audio/webm"
71 | "audio/x-ape"
72 | "audio/x-flac+ogg"
73 | "audio/x-ms-wma"
74 | "audio/x-opus+ogg"
75 | "audio/x-vorbis+ogg"
76 | ];
77 |
78 | "atril.desktop" = [
79 | "application/epub+zip"
80 | "application/pdf"
81 | "application/rtf"
82 | ];
83 |
84 | "thunar.desktop" = [
85 | "inode/directory"
86 | "inode/mount-point"
87 | ];
88 | };
89 | };
90 | }
91 |
--------------------------------------------------------------------------------
/system/machine/NyZen9/boot.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | # bootloader
4 | boot.loader.systemd-boot.enable = true;
5 | boot.loader.systemd-boot.consoleMode = "max";
6 | boot.loader.efi.canTouchEfiVariables = true;
7 |
8 | # encrypted boot devices
9 | boot.initrd.luks.devices = {
10 | nixos = {
11 | device = "/dev/disk/by-uuid/2b254558-0847-48f0-93c6-31a26d588d01";
12 | preLVM = true;
13 | allowDiscards = true;
14 | bypassWorkqueues = true;
15 | };
16 |
17 | windows = {
18 | device = "/dev/disk/by-uuid/c8810d52-8e8b-4dd9-a09a-4f1c21e56e54";
19 | preLVM = true;
20 | allowDiscards = true;
21 | bypassWorkqueues = true;
22 | };
23 | };
24 |
25 | swapDevices = [
26 | {
27 | device = "/dev/disk/by-partuuid/c5fdfe0f-7cbb-4354-9bb1-6c3132c4fa6d";
28 | randomEncryption = {
29 | enable = true;
30 | allowDiscards = true;
31 | };
32 | }
33 | ];
34 |
35 | # kernel configuration
36 | boot.kernelPackages = pkgs.linuxKernel.packages.linux_xanmod_latest;
37 | boot.initrd.availableKernelModules = [
38 | "xhci_pci"
39 | "ahci"
40 | "nvme"
41 | "usb_storage"
42 | "usbhid"
43 | "sd_mod"
44 | "sr_mod"
45 | ];
46 | boot.initrd.kernelModules = [ "dm-snapshot" ];
47 |
48 | boot.kernelModules = [
49 | "k10temp"
50 | "nct6775"
51 | ];
52 |
53 | boot.kernelParams = [ "amd_pstate=active" ];
54 | boot.blacklistedKernelModules = [ "acpi-cpufreq" ];
55 |
56 | # memory ans smap
57 | boot.tmp.useTmpfs = true;
58 | boot.tmp.cleanOnBoot = true;
59 |
60 | zramSwap.enable = true;
61 | zramSwap.memoryPercent = 50;
62 |
63 | # dynamic loading to kernel modules for amd
64 | systemd.services.amdgpu-kernel-modules = {
65 | enable = true;
66 | wantedBy = [ "multi-user.target" ];
67 | path = [
68 | pkgs.kmod
69 | ];
70 | serviceConfig = {
71 | Type = "oneshot";
72 | RemainAfterExit = "yes";
73 | ExecStart = toString (
74 | pkgs.writeShellScript "load-nvidia-kmod.sh" ''
75 | set -euo pipefail
76 | modprobe amdgpu || exit 1
77 | ''
78 | );
79 | ExecStop = toString (
80 | pkgs.writeShellScript "unload-nvidia-kmod.sh" ''
81 | set -euo pipefail
82 | modprobe -r amdgpu || exit 1
83 | ''
84 | );
85 | };
86 | };
87 | }
88 |
--------------------------------------------------------------------------------
/lib/nixosSystem.nix:
--------------------------------------------------------------------------------
1 | let
2 | nixosSystem =
3 | {
4 | nixpkgs,
5 | system,
6 | patches,
7 | }:
8 | let
9 | applyPatch =
10 | patches:
11 | nixpkgs.legacyPackages.${system}.applyPatches {
12 | name = "nixpkgs-patched-${nixpkgs.shortRev}";
13 | src = nixpkgs;
14 | inherit patches;
15 | };
16 |
17 | flake = applyPatch patches;
18 | in
19 | {
20 | hostname,
21 | profile,
22 | overlays,
23 | modules,
24 | }:
25 | import "${flake}/nixos/lib/eval-config.nix" {
26 | inherit system;
27 | specialArgs = {
28 | modulesPath = toString (flake + "/nixos/modules");
29 | };
30 | baseModules = import (flake + "/nixos/modules/module-list.nix");
31 |
32 | modules = modules ++ [
33 | (
34 | { pkgs, ... }:
35 | {
36 |
37 | # hostname
38 | networking.hostName = hostname;
39 |
40 | # nix
41 | nix = {
42 | package = pkgs.nixVersions.nix_2_28;
43 | registry = {
44 | nixpkgs = {
45 | inherit flake;
46 | };
47 | };
48 | settings = {
49 | trusted-public-keys = [
50 | "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
51 | "nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
52 | ];
53 |
54 | trusted-users = [
55 | "root"
56 | "@wheel"
57 | ];
58 |
59 | substituters = [
60 | "https://cache.nixos.org"
61 | "https://nixpkgs-wayland.cachix.org"
62 | ];
63 |
64 | experimental-features = [
65 | "nix-command"
66 | "flakes"
67 | ];
68 | };
69 |
70 | nixPath = [ "nixpkgs=${flake}" ];
71 | };
72 |
73 | nixpkgs = {
74 | inherit overlays;
75 | config = {
76 | allowUnfree = true;
77 | };
78 | };
79 |
80 | systemd.tmpfiles.rules = [ "L+ /etc/nixpkgs - - - - ${flake}" ];
81 | }
82 | )
83 |
84 | profile
85 | ];
86 | };
87 | in
88 | nixosSystem
89 |
--------------------------------------------------------------------------------
/system/machine/NyZen9/services.nix:
--------------------------------------------------------------------------------
1 | { pkgs, lib, ... }:
2 | {
3 | systemd.services.waydroid-container.environment = {
4 | XDG_DATA_HOME = "/persist/home/nyarla/.local/share";
5 | };
6 |
7 | # clamav
8 | services.clamav.daemon.settings = {
9 | ExcludePath = [
10 | "^/backup"
11 | "^/dev"
12 | "^/home/nyarla/Reports"
13 | "^/nix"
14 | "^/persist/home/nyarla/Reports"
15 | "^/proc"
16 | "^/sys"
17 | "^/vm"
18 | ".snapshots/[0-9]+"
19 | ];
20 | MaxThreads = 30;
21 | };
22 |
23 | systemd.user.services.clamav-scan = {
24 | enable = true;
25 | description = "Full Virus Scan by ClamAV";
26 | serviceConfig = {
27 | Type = "oneshot";
28 | ExecStart = toString (
29 | pkgs.writeShellScript "clamav-scan.sh" ''
30 | set -euo pipefail
31 |
32 | export PATH=${lib.makeBinPath (with pkgs; [ clamav ])}:$PATH
33 |
34 | clamdscan -l /home/nyarla/Reports/clamav.log -i -m --fdpass / || true
35 |
36 | exit 0
37 | ''
38 | );
39 | };
40 | };
41 |
42 | systemd.user.timers.clamav-scan = {
43 | enable = true;
44 | description = "Full Virus Scan by ClamAV";
45 | wantedBy = [ "timers.target" ];
46 | timerConfig = {
47 | OnCalendar = "*-*-* 03:00:00";
48 | RandomizedDelaySec = "5m";
49 | Persistent = true;
50 | };
51 | };
52 |
53 | # backup by restic
54 | systemd.services.backup = {
55 | enable = true;
56 | path = with pkgs; [
57 | restic-run
58 | rclone
59 | ];
60 | description = "Automatic backup by restic and rclone";
61 | requires = [ "network-online.target" ];
62 | after = [ "network-online.target" ];
63 | serviceConfig = {
64 | Type = "oneshot";
65 | ExecStart = toString (
66 | pkgs.writeShellScript "backup.sh" ''
67 | set -euo pipefail
68 | export HOME=/home/nyarla
69 |
70 | if test -d /backup ; then
71 | cd /backup
72 | restic-backup .
73 | fi
74 |
75 | exit 0
76 | ''
77 | );
78 | };
79 | };
80 |
81 | systemd.timers.backup = {
82 | enable = true;
83 | description = "Automatic backup by restic and rclone";
84 | wantedBy = [ "timers.target" ];
85 | timerConfig = {
86 | OnCalendar = "*-*-* 01:00:00";
87 | RandomizedDelaySec = "10m";
88 | Persistent = true;
89 | };
90 | };
91 | }
92 |
--------------------------------------------------------------------------------
/pkgs/stability-matrix/nixos.patch:
--------------------------------------------------------------------------------
1 | diff --git a/StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj b/StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj
2 | index f4207345..bae612a6 100644
3 | --- a/StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj
4 | +++ b/StabilityMatrix.Avalonia/StabilityMatrix.Avalonia.csproj
5 | @@ -268,6 +268,5 @@
6 |
7 |
8 |
9 | -
10 |
11 |
12 | diff --git a/StabilityMatrix.Core/Helper/Compat.cs b/StabilityMatrix.Core/Helper/Compat.cs
13 | index 1a619bab..fb3da197 100644
14 | --- a/StabilityMatrix.Core/Helper/Compat.cs
15 | +++ b/StabilityMatrix.Core/Helper/Compat.cs
16 | @@ -130,10 +130,7 @@ public static class Compat
17 | {
18 | Platform = PlatformKind.Linux | PlatformKind.Unix;
19 |
20 | - // For AppImage builds, the path is in `$APPIMAGE`
21 | - var appPath = Environment.GetEnvironmentVariable("APPIMAGE") ?? AppContext.BaseDirectory;
22 | - AppCurrentDir =
23 | - Path.GetDirectoryName(appPath) ?? throw new Exception("Could not find application directory");
24 | + AppCurrentDir = new DirectoryPath(AppContext.BaseDirectory);
25 | ExeExtension = "";
26 | DllExtension = ".so";
27 | }
28 | @@ -185,17 +182,7 @@ public static class Compat
29 | {
30 | if (IsLinux)
31 | {
32 | - // Use name component of APPIMAGE
33 | - var appImage = Environment.GetEnvironmentVariable("APPIMAGE");
34 | - if (string.IsNullOrEmpty(appImage))
35 | - {
36 | -#if DEBUG
37 | - return "DEBUG_NOT_RUNNING_IN_APPIMAGE";
38 | -#else
39 | - throw new Exception("Could not find APPIMAGE environment variable");
40 | -#endif
41 | - }
42 | - return Path.GetFileName(appImage);
43 | + return AppName + ".Avalonia";
44 | }
45 | using var process = Process.GetCurrentProcess();
46 | var fullPath = process.MainModule?.ModuleName;
47 |
--------------------------------------------------------------------------------
/pkgs/skk-dicts-xl/skk.nix:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | name = "SKK-JISYO.S";
4 | url = "https://raw.githubusercontent.com/skk-dev/dict/master/SKK-JISYO.S";
5 | sha256 = "11cjrc8m99hj4xpl2nvzxanlswpapi92vmgk9d6yimdz0jidb6cq";
6 | }
7 | {
8 | name = "SKK-JISYO.M";
9 | url = "https://raw.githubusercontent.com/skk-dev/dict/master/SKK-JISYO.M";
10 | sha256 = "0pwjp9qjmn9sq6zc0k6632l7dc2dbjn45585ibckvvl9iwfqqxdp";
11 | }
12 | {
13 | name = "SKK-JISYO.ML";
14 | url = "https://raw.githubusercontent.com/skk-dev/dict/master/SKK-JISYO.ML";
15 | sha256 = "165dxadrwhl34ijs61l4dp0q0r8wgdv5s92fpsilh74wsjfj4wf1";
16 | }
17 | {
18 | name = "SKK-JISYO.L";
19 | url = "https://raw.githubusercontent.com/skk-dev/dict/master/SKK-JISYO.L";
20 | sha256 = "090gl7vmhvvcr4mw8ghx2wl03g2w86zf9x3c4730nnhqwi2zr5p8";
21 | }
22 | {
23 | name = "SKK-JISYO.jinmei";
24 | url = "https://raw.githubusercontent.com/skk-dev/dict/master/SKK-JISYO.jinmei";
25 | sha256 = "09425krr0h2fdh7dppa8ns2pbaa2ji91pyiw94x9l3qpfxiaxaad";
26 | }
27 | {
28 | name = "SKK-JISYO.fullname";
29 | url = "https://raw.githubusercontent.com/skk-dev/dict/master/SKK-JISYO.fullname";
30 | sha256 = "1cx8cd1ji9jks692x3sddbn5cs0kb0jxi4wdwvlax4cvwqpm0d5h";
31 | }
32 | {
33 | name = "SKK-JISYO.geo";
34 | url = "https://raw.githubusercontent.com/skk-dev/dict/master/SKK-JISYO.geo";
35 | sha256 = "0y6h4yri5dbs5yc1zp29254gig5nh0wq01xxw1w3cw11la894j82";
36 | }
37 | {
38 | name = "SKK-JISYO.law";
39 | url = "https://raw.githubusercontent.com/skk-dev/dict/master/SKK-JISYO.law";
40 | sha256 = "1gh3myk892g4r2faf7x82pgqjz9ffsw7zq0nl8mx21mir3gp9ihi";
41 | }
42 | {
43 | name = "SKK-JISYO.okinawa";
44 | url = "https://raw.githubusercontent.com/skk-dev/dict/master/SKK-JISYO.okinawa";
45 | sha256 = "1zcx4gyabb1k1fwim1gqg2pjfgvqgy1bas3azxmdaamvc0xs5yl8";
46 | }
47 | {
48 | name = "SKK-JISYO.propernoun";
49 | url = "https://raw.githubusercontent.com/skk-dev/dict/master/SKK-JISYO.propernoun";
50 | sha256 = "0a5lkp69cpjhgya3m983d5hwf1zdsp8w81pdk8arw03s5hy6j8hm";
51 | }
52 | {
53 | name = "SKK-JISYO.station";
54 | url = "https://raw.githubusercontent.com/skk-dev/dict/master/SKK-JISYO.station";
55 | sha256 = "1gil9kz0f8hdi04akk6dsz02jbg7pwah9ypbcm9lp3373fzhh1q0";
56 | }
57 | {
58 | name = "SKK-JISYO.neologd";
59 | url = "https://raw.githubusercontent.com/tokuhirom/skk-jisyo-neologd/master/SKK-JISYO.neologd";
60 | sha256 = "08pdzbzrzcfw2f62fnw1njrnpqkgn04kbhx0wkrrm5cg8b948n6k";
61 | }
62 | ]
63 |
--------------------------------------------------------------------------------
/pkgs/unityhub-amd/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | unityhub,
3 | buildFHSEnv,
4 | amd-run,
5 | }:
6 | unityhub.overrideAttrs (old: rec {
7 | fhsEnv = buildFHSEnv {
8 | pname = "${old.pname}-fhs-env";
9 | inherit (old) version;
10 | runScript = "";
11 |
12 | targetPkgs =
13 | p: with p; [
14 | # Unity Hub binary dependencies
15 | xorg.libXrandr
16 | xdg-utils
17 |
18 | # GTK filepicker
19 | gsettings-desktop-schemas
20 | hicolor-icon-theme
21 |
22 | # Bug Reporter dependencies
23 | fontconfig
24 | freetype
25 | lsb-release
26 | ];
27 |
28 | multiPkgs =
29 | p: with p; [
30 | # Unity Hub ldd dependencies
31 | cups
32 | gtk3
33 | expat
34 | libxkbcommon
35 | lttng-ust_2_12
36 | krb5
37 | alsa-lib
38 | nss
39 | libdrm
40 | libgbm
41 | nspr
42 | atk
43 | dbus
44 | at-spi2-core
45 | pango
46 | xorg.libXcomposite
47 | xorg.libXext
48 | xorg.libXdamage
49 | xorg.libXfixes
50 | xorg.libxcb
51 | xorg.libxshmfence
52 | xorg.libXScrnSaver
53 | xorg.libXtst
54 |
55 | # Unity Hub additional dependencies
56 | libva
57 | openssl
58 | cairo
59 | libnotify
60 | libuuid
61 | libsecret
62 | udev
63 | libappindicator
64 | wayland
65 | cpio
66 | icu
67 | libpulseaudio
68 |
69 | # Unity Editor dependencies
70 | libglvnd # provides ligbl
71 | xorg.libX11
72 | xorg.libXcursor
73 | glib
74 | gdk-pixbuf
75 | libxml2_13
76 | zlib
77 | clang
78 | git # for git-based packages in unity package manager
79 |
80 | # Unity Editor 6000 specific dependencies
81 | harfbuzz
82 | vulkan-loader
83 |
84 | # Unity Bug Reporter specific dependencies
85 | xorg.libICE
86 | xorg.libSM
87 |
88 | # fonts
89 | noto-fonts
90 | noto-fonts-jp
91 | noto-fonts-color-emoji
92 | hackgen-font
93 | nerd-fonts.hack
94 | dejavu_fonts
95 | ];
96 | };
97 |
98 | installPhase =
99 | builtins.replaceStrings
100 | [ (toString old.fhsEnv) "--add-flags" ]
101 | [
102 | (toString fhsEnv)
103 | "--add-flag ${amd-run}/bin/amd-run --add-flags"
104 | ]
105 | old.installPhase;
106 |
107 | passthru.unity-run = fhsEnv;
108 | })
109 |
--------------------------------------------------------------------------------
/system/machine/NyZen9/network.nix:
--------------------------------------------------------------------------------
1 | _: {
2 | # mtu
3 | networking.interfaces."wlan0".mtu = 1472;
4 |
5 | # avahi
6 | services.avahi.allowInterfaces = [ "wlan0" ];
7 |
8 | # samba
9 | services.samba = {
10 | enable = true;
11 | nmbd.enable = true;
12 | winbindd.enable = true;
13 | settings = {
14 | global = {
15 | "security" = "user";
16 | "workgroup" = "WORKGROUP";
17 | "server string" = "nixos";
18 | "netbios name" = "nixos";
19 | "use sendfile" = "yes";
20 | "hosts allow" = "192.168.122.0/24 100.126.27.87/32 localhost";
21 | "hosts deny" = "0.0.0.0/0";
22 | "guest account" = "nobody";
23 | "map to guest" = "bad user";
24 | "acl allow execute always" = "yes";
25 | };
26 |
27 | Downloads = {
28 | path = "/persist/home/nyarla/Downloads/KVM";
29 | browsable = "yes";
30 | "create mask" = "0774";
31 | "force create mask" = "0774";
32 | "directory mask" = "0755";
33 | "force group" = "users";
34 | "force user" = "nyarla";
35 | "guest ok" = "false";
36 | "read only" = "no";
37 | };
38 |
39 | Data = {
40 | path = "/persist/home/nyarla/Documents/DAW";
41 | "create mask" = "0774";
42 | "force create mask" = "0774";
43 | "directory mask" = "0755";
44 | "force group" = "users";
45 | "force user" = "nyarla";
46 | "guest ok" = "false";
47 | "read only" = "no";
48 | };
49 |
50 | Sources = {
51 | path = "/persist/home/nyarla/Sources/DAW";
52 | browsable = "yes";
53 | "create mask" = "0774";
54 | "force create mask" = "0774";
55 | "directory mask" = "0755";
56 | "force group" = "users";
57 | "force user" = "nyarla";
58 | "guest ok" = "false";
59 | "read only" = "no";
60 | };
61 |
62 | Sync = {
63 | path = "/persist/home/nyarla/Sync";
64 | browsable = "yes";
65 | "create mask" = "0774";
66 | "force create mask" = "0774";
67 | "directory mask" = "0755";
68 | "force group" = "users";
69 | "force user" = "nyarla";
70 | "guest ok" = "false";
71 | "read only" = "no";
72 | };
73 |
74 | eBook = {
75 | path = "/backup/eBooks";
76 | browsable = "yes";
77 | "create mask" = "0774";
78 | "force create mask" = "0774";
79 | "directory mask" = "0755";
80 | "force group" = "users";
81 | "force user" = "nyarla";
82 | "guest ok" = "false";
83 | "read only" = "yes";
84 | };
85 | };
86 | };
87 | }
88 |
--------------------------------------------------------------------------------
/system/machine/NyZen9/hardware.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | # clock setting for dual boot to windows
4 | time.hardwareClockInLocalTime = true;
5 |
6 | # pc fan control
7 | systemd.services.fan2go =
8 | let
9 | config = pkgs.writeText "fan2go.yaml" (
10 | let
11 | fan = id: curve: index: {
12 | inherit id;
13 | inherit curve;
14 | hwmon = {
15 | platform = "nct6798";
16 | rpmChannel = index;
17 | pwmChannel = index;
18 | };
19 | };
20 |
21 | sensor = id: platform: index: {
22 | inherit id;
23 | hwmon = {
24 | inherit platform;
25 | inherit index;
26 | };
27 | };
28 |
29 | curve = id: sensor: steps: {
30 | inherit id;
31 | linear = {
32 | inherit sensor;
33 | inherit steps;
34 | };
35 | };
36 | in
37 | builtins.toJSON {
38 | dbPath = "/var/lib/fan2go/fan.db";
39 |
40 | fans = [
41 | (fan "cpu" "cpu" 2)
42 | (fan "case" "case" 1)
43 | (fan "back" "cpu" 7)
44 | ];
45 | sensors = [
46 | (sensor "cpu" "k10temp" 1)
47 | (sensor "nvme-pci-0100" "nvme-pci-0100" 1)
48 | (sensor "nvme-pci-0800" "nvme-pci-0800" 1)
49 | ];
50 | curves = [
51 | (curve "cpu" "cpu" {
52 | "30" = 15;
53 | "70" = 255;
54 | })
55 | (curve "nvme-pci-0100" "nvme-pci-0100" {
56 | "30" = 100;
57 | "65" = 255;
58 | })
59 | (curve "nvme-pci-0800" "nvme-pci-0800" {
60 | "30" = 100;
61 | "65" = 255;
62 | })
63 | {
64 | id = "case";
65 | function = {
66 | type = "average";
67 | curves = [
68 | "cpu"
69 | "nvme-pci-0100"
70 | "nvme-pci-0800"
71 | ];
72 | };
73 | }
74 | ];
75 | }
76 | );
77 | in
78 | {
79 | enable = true;
80 | wantedBy = [ "multi-user.target" ];
81 | after = [ "lm_sensors.service" ];
82 | serviceConfig = {
83 | Type = "simple";
84 | ExecStart = "${pkgs.fan2go}/bin/fan2go -c ${config}";
85 | ExecStartPre = "${pkgs.fan2go}/bin/fan2go -c ${config} config validate";
86 | Restart = "always";
87 | };
88 | };
89 |
90 | powerManagement.resumeCommands = ''
91 | systemctl restart fan2go.service
92 | '';
93 | }
94 |
--------------------------------------------------------------------------------
/pkgs/sononym-bin/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | stdenv,
3 | lib,
4 | fetchurl,
5 | autoPatchelfHook,
6 | makeWrapper,
7 | alsa-lib,
8 | at-spi2-atk,
9 | at-spi2-core,
10 | atk,
11 | cairo,
12 | cups,
13 | dbus,
14 | expat,
15 | fontconfig,
16 | freetype,
17 | gdk-pixbuf,
18 | glib,
19 | gtk3,
20 | libappindicator-gtk3,
21 | libcap,
22 | libdbusmenu,
23 | libdrm,
24 | libglvnd,
25 | libgpg-error,
26 | libjack2,
27 | libnotify,
28 | libsecret,
29 | libuuid,
30 | libxkbcommon,
31 | mesa,
32 | nspr,
33 | nss,
34 | pango,
35 | systemd,
36 | unzip,
37 | xorg,
38 | zlib,
39 | }:
40 | stdenv.mkDerivation rec {
41 | pname = "sononym";
42 | version = "1.5.6";
43 |
44 | src = fetchurl {
45 | url = "https://www.sononym.net/download/sononym-${version}.tar.bz2";
46 | hash = "sha256-b4g7FY6JyQBco3bf1xe+Rga0oBUO9sgW/Dy02jKY7kw=";
47 | };
48 |
49 | nativeBuildInputs = [
50 | autoPatchelfHook
51 | makeWrapper
52 | ];
53 |
54 | buildInputs =
55 | [
56 | alsa-lib
57 | at-spi2-atk
58 | at-spi2-core
59 | atk
60 | cairo
61 | cups
62 | dbus
63 | expat
64 | fontconfig.out
65 | freetype
66 | gdk-pixbuf
67 | glib.out
68 | gtk3
69 | libappindicator-gtk3
70 | libcap
71 | libdbusmenu
72 | libdrm
73 | libglvnd
74 | libgpg-error
75 | libjack2
76 | libnotify
77 | libsecret
78 | libuuid.out
79 | libxkbcommon
80 | mesa
81 | nspr
82 | nss
83 | pango.out
84 | stdenv.cc.cc
85 | stdenv.cc.libc
86 | stdenv.cc.cc.lib
87 | systemd
88 | unzip
89 | zlib
90 | ]
91 | ++ (with xorg; [
92 | libX11
93 | libXScrnSaver
94 | libXcomposite
95 | libXcursor
96 | libXdamage
97 | libXext
98 | libXfixes
99 | libXi
100 | libXrandr
101 | libXrender
102 | libXtst
103 | libxcb
104 | libxkbfile
105 | libxshmfence
106 | ]);
107 |
108 | libPath =
109 | lib.makeLibraryPath buildInputs + (":" + lib.makeSearchPathOutput "lib" "lib64" buildInputs);
110 |
111 | buildPhase = ''
112 | runHook preBuild
113 |
114 | mkdir -p $out/opt/sononym
115 | cp -r . $out/opt/sononym
116 |
117 | runHook postBuild
118 | '';
119 |
120 | dontStirp = true;
121 |
122 | installPhase = ''
123 | runHook preInstall
124 |
125 | mkdir -p $out/bin
126 | ln -sf $out/opt/sononym/sononym $out/bin/sononym
127 |
128 | runHook postInstall
129 | '';
130 |
131 | postInstall = ''
132 | wrapProgram $out/bin/sononym \
133 | --prefix LD_LIBRARY_PATH : "${libPath}:$out/opt/sononym"
134 | '';
135 | }
136 |
--------------------------------------------------------------------------------
/pkgs/carla/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | carla,
3 | python312,
4 | glibc,
5 | pkgsCross,
6 | wine,
7 | multiStdenv,
8 | fetchFromGitHub,
9 | fetchpatch,
10 | }:
11 | let
12 | pkgsMinGW = bit: if bit == 32 then pkgsCross.mingw32 else pkgsCross.mingwW64;
13 |
14 | mingw32 = pkgsMinGW 32;
15 | mingwW64 = pkgsMinGW 64;
16 |
17 | mcfgthreadsw32 = mingw32.windows.mcfgthreads.overrideAttrs (_: {
18 | dontDisableStatic = true;
19 | });
20 | mcfgthreadsW64 = mingwW64.windows.mcfgthreads.overrideAttrs (_: {
21 | dontDisableStatic = true;
22 | });
23 | in
24 | (carla.override {
25 | stdenv = multiStdenv;
26 | }).overrideAttrs
27 | (old: rec {
28 | version = "2025-10-09"; # keep same version of ildaeil
29 | src = fetchFromGitHub {
30 | inherit (old.src) owner repo;
31 | rev = "1d8dcb5aab5e0c30352e9f928ce3e40cbc86a439";
32 | hash = "sha256-jLEwzp2mpHKXwu8zvz7eNPTNoH5UdhGt1lB10/YLCcg=";
33 | fetchSubmodules = true;
34 | };
35 |
36 | nativeBuildInputs = old.nativeBuildInputs ++ [
37 | wine
38 | mingw32.buildPackages.gcc
39 | mingwW64.buildPackages.gcc
40 | ];
41 |
42 | buildInputs = old.buildInputs ++ [
43 | mcfgthreadsw32.dev
44 | mcfgthreadsW64.dev
45 | ];
46 |
47 | dontStrip = true;
48 |
49 | patches = [ ./nixos.patch ];
50 |
51 | postPatch = old.postPatch + ''
52 | export carla=$out
53 | export wine=${wine}
54 |
55 | substituteAllInPlace source/jackbridge/Makefile
56 | substituteAllInPlace source/modules/dgl/Makefile
57 | substituteAllInPlace source/backend/CarlaStandalone.cpp
58 | substituteAllInPlace source/backend/engine/CarlaEngineJack.cpp
59 | '';
60 |
61 | postBuild = ''
62 | make win32 \
63 | CC=i686-w64-mingw32-gcc \
64 | CXX=i686-w64-mingw32-g++ \
65 | CFLAGS="-I${mingw32.windows.pthreads}/include -I${mcfgthreadsw32.dev}/include" \
66 | CXXFLAGS="-I${mingw32.windows.pthreads}/include -I${mcfgthreadsw32.dev}/include" \
67 | LDFLAGS="-L${mingw32.windows.pthreads}/lib -L${mcfgthreadsw32}/lib"
68 |
69 | make wine32 \
70 | CC="winegcc -m32" \
71 | CXX="winegcc -m32" \
72 | CFLAGS="-I${glibc.dev}/include" \
73 | CXXFLAGS="-I${glibc.dev}/include" \
74 |
75 | make win64 \
76 | CC=x86_64-w64-mingw32-gcc \
77 | CXX=x86_64-w64-mingw32-g++ \
78 | CFLAGS="-I${mingwW64.windows.pthreads}/include -I${mcfgthreadsW64.dev}/include" \
79 | CXXFLAGS="-I${mingwW64.windows.pthreads}/include -I${mcfgthreadsW64.dev}/include" \
80 | LDFLAGS="-L${mingwW64.windows.pthreads}/lib -L${mcfgthreadsW64}/lib"
81 |
82 | make wine64 \
83 | CC="winegcc" \
84 | CXX="winegcc" \
85 | CFLAGS="-I${glibc.dev}/include" \
86 | CXXFLAGS="-I${glibc.dev}/include"
87 | '';
88 |
89 | preFixup = ''
90 | rm $out/share/carla/resources/ui_carla_about.py
91 | '';
92 | })
93 |
--------------------------------------------------------------------------------
/patches/tmux3.5a-utf8.patch:
--------------------------------------------------------------------------------
1 | diff --git a/utf8.c b/utf8.c
2 | index bc7c8fd2..2856f0ac 100644
3 | --- a/utf8.c
4 | +++ b/utf8.c
5 | @@ -26,171 +26,7 @@
6 |
7 | #include "compat.h"
8 | #include "tmux.h"
9 | -
10 | -static const wchar_t utf8_force_wide[] = {
11 | - 0x0261D,
12 | - 0x026F9,
13 | - 0x0270A,
14 | - 0x0270B,
15 | - 0x0270C,
16 | - 0x0270D,
17 | - 0x1F1E6,
18 | - 0x1F1E7,
19 | - 0x1F1E8,
20 | - 0x1F1E9,
21 | - 0x1F1EA,
22 | - 0x1F1EB,
23 | - 0x1F1EC,
24 | - 0x1F1ED,
25 | - 0x1F1EE,
26 | - 0x1F1EF,
27 | - 0x1F1F0,
28 | - 0x1F1F1,
29 | - 0x1F1F2,
30 | - 0x1F1F3,
31 | - 0x1F1F4,
32 | - 0x1F1F5,
33 | - 0x1F1F6,
34 | - 0x1F1F7,
35 | - 0x1F1F8,
36 | - 0x1F1F9,
37 | - 0x1F1FA,
38 | - 0x1F1FB,
39 | - 0x1F1FC,
40 | - 0x1F1FD,
41 | - 0x1F1FE,
42 | - 0x1F1FF,
43 | - 0x1F385,
44 | - 0x1F3C2,
45 | - 0x1F3C3,
46 | - 0x1F3C4,
47 | - 0x1F3C7,
48 | - 0x1F3CA,
49 | - 0x1F3CB,
50 | - 0x1F3CC,
51 | - 0x1F3FB,
52 | - 0x1F3FC,
53 | - 0x1F3FD,
54 | - 0x1F3FE,
55 | - 0x1F3FF,
56 | - 0x1F442,
57 | - 0x1F443,
58 | - 0x1F446,
59 | - 0x1F447,
60 | - 0x1F448,
61 | - 0x1F449,
62 | - 0x1F44A,
63 | - 0x1F44B,
64 | - 0x1F44C,
65 | - 0x1F44D,
66 | - 0x1F44E,
67 | - 0x1F44F,
68 | - 0x1F450,
69 | - 0x1F466,
70 | - 0x1F467,
71 | - 0x1F468,
72 | - 0x1F469,
73 | - 0x1F46B,
74 | - 0x1F46C,
75 | - 0x1F46D,
76 | - 0x1F46E,
77 | - 0x1F470,
78 | - 0x1F471,
79 | - 0x1F472,
80 | - 0x1F473,
81 | - 0x1F474,
82 | - 0x1F475,
83 | - 0x1F476,
84 | - 0x1F477,
85 | - 0x1F478,
86 | - 0x1F47C,
87 | - 0x1F481,
88 | - 0x1F482,
89 | - 0x1F483,
90 | - 0x1F485,
91 | - 0x1F486,
92 | - 0x1F487,
93 | - 0x1F48F,
94 | - 0x1F491,
95 | - 0x1F4AA,
96 | - 0x1F574,
97 | - 0x1F575,
98 | - 0x1F57A,
99 | - 0x1F590,
100 | - 0x1F595,
101 | - 0x1F596,
102 | - 0x1F645,
103 | - 0x1F646,
104 | - 0x1F647,
105 | - 0x1F64B,
106 | - 0x1F64C,
107 | - 0x1F64D,
108 | - 0x1F64E,
109 | - 0x1F64F,
110 | - 0x1F6A3,
111 | - 0x1F6B4,
112 | - 0x1F6B5,
113 | - 0x1F6B6,
114 | - 0x1F6C0,
115 | - 0x1F6CC,
116 | - 0x1F90C,
117 | - 0x1F90F,
118 | - 0x1F918,
119 | - 0x1F919,
120 | - 0x1F91A,
121 | - 0x1F91B,
122 | - 0x1F91C,
123 | - 0x1F91D,
124 | - 0x1F91E,
125 | - 0x1F91F,
126 | - 0x1F926,
127 | - 0x1F930,
128 | - 0x1F931,
129 | - 0x1F932,
130 | - 0x1F933,
131 | - 0x1F934,
132 | - 0x1F935,
133 | - 0x1F936,
134 | - 0x1F937,
135 | - 0x1F938,
136 | - 0x1F939,
137 | - 0x1F93D,
138 | - 0x1F93E,
139 | - 0x1F977,
140 | - 0x1F9B5,
141 | - 0x1F9B6,
142 | - 0x1F9B8,
143 | - 0x1F9B9,
144 | - 0x1F9BB,
145 | - 0x1F9CD,
146 | - 0x1F9CE,
147 | - 0x1F9CF,
148 | - 0x1F9D1,
149 | - 0x1F9D2,
150 | - 0x1F9D3,
151 | - 0x1F9D4,
152 | - 0x1F9D5,
153 | - 0x1F9D6,
154 | - 0x1F9D7,
155 | - 0x1F9D8,
156 | - 0x1F9D9,
157 | - 0x1F9DA,
158 | - 0x1F9DB,
159 | - 0x1F9DC,
160 | - 0x1F9DD,
161 | - 0x1FAC3,
162 | - 0x1FAC4,
163 | - 0x1FAC5,
164 | - 0x1FAF0,
165 | - 0x1FAF1,
166 | - 0x1FAF2,
167 | - 0x1FAF3,
168 | - 0x1FAF4,
169 | - 0x1FAF5,
170 | - 0x1FAF6,
171 | - 0x1FAF7,
172 | - 0x1FAF8
173 | -};
174 | +#include "utf8_force_wide.h"
175 |
176 | struct utf8_item {
177 | RB_ENTRY(utf8_item) index_entry;
178 |
--------------------------------------------------------------------------------
/pkgs/default.nix:
--------------------------------------------------------------------------------
1 | { nixpkgs, ... }:
2 | final: prev:
3 | let
4 | require = path: prev.callPackage (import path);
5 | in
6 | {
7 | # custom packages
8 | amd-run = require ./amd-run { gpuId = null; };
9 | aria-misskey = require ./aria-misskey { };
10 | calibre = require ./calibre { inherit (prev) calibre; };
11 | cskk = require ./cskk { };
12 | deadbeef-fb = require ./deadbeef-fb { };
13 | fluent-kde = require ./fluent-kde { };
14 | galendae = require ./galendae { };
15 | ghalint = require ./ghalint { };
16 | glibc-locales-eaw = require ./glibc-locales-eaw { };
17 | gyazo-diy = require ./gyazo-diy { };
18 | igsc = require ./igsc { };
19 | immersed = require ./immersed { };
20 | noto-fonts-jp = require ./noto-fonts-jp { };
21 | nvim-run = require ./nvim-run { };
22 | perl-shell = require ./perl-shell { };
23 | restic-run = require ./restic-run { };
24 | rocm-shell = require ./rocm-shell { };
25 | skk-dicts-xl = require ./skk-dicts-xl { };
26 | thorium-reader = require ./thorium-reader { };
27 | unityhub-amd = require ./unityhub-amd { };
28 | wcwidth-cjk = require ./wcwidh-cjk { };
29 | xdg-desktop-portal-hypr-remote = require ./xdg-desktop-portal-hypr-remote { };
30 | xembed-sni-proxy = require ./xembed-sni-proxy { };
31 |
32 | # fcitx5 packages
33 | fcitx5-fbterm = require ./fcitx5-fbterm { };
34 | fcitx5-cskk = prev.libsForQt5.callPackage (import ./fcitx5-cskk) { };
35 | fcitx5-cskk-qt5 = prev.libsForQt5.callPackage (import ./fcitx5-cskk) { enableQt = true; };
36 | fcitx5-cskk-qt6 = prev.qt6Packages.callPackage (import ./fcitx5-cskk) {
37 | enableQt = true;
38 | useQt6 = true;
39 | };
40 |
41 | # customized packages
42 | firefox-bin-unwrapped = prev.firefox-bin-unwrapped.override { systemLocale = "ja_JP"; };
43 |
44 | steam = prev.steam.override (
45 | {
46 | extraLibraries ? _: [ ],
47 | ...
48 | }:
49 | {
50 | extraLibraries =
51 | pkgs':
52 | (extraLibraries pkgs')
53 | ++ [
54 | pkgs'.gperftools
55 | ];
56 | }
57 | );
58 |
59 | thunderbird-bin-unwrapped = prev.thunderbird-bin-unwrapped.override { systemLocale = "ja_JP"; };
60 |
61 | tmux = prev.tmux.overrideAttrs (_: {
62 | preConfigure = ''
63 | cp ${../patches/tmux-3.6-utf8.h} utf8_default_width_cache.h
64 | '';
65 | patches = [ ../patches/tmux-3.6-utf8.patch ];
66 | });
67 |
68 | # custom wine-related packages
69 | carla-with-wine = require ./carla {
70 | wine = prev.wineWowPackages.yabridge;
71 | };
72 |
73 | wine-vst-run = require ./wine-run {
74 | pname = "wine-vst";
75 | paths = prev.lib.makeBinPath [ prev.wineWowPackages.yabridge ];
76 | };
77 |
78 | wine-staging-run = require ./wine-run {
79 | pname = "wine-staging";
80 | paths = prev.lib.makeBinPath [ prev.wineWowPackages.stagingFull ];
81 | };
82 |
83 | winetricks = prev.winetricks.overrideAttrs (old: {
84 | pname = "winetricks";
85 | version = "git";
86 | src = prev.fetchFromGitHub {
87 | inherit (old.src) owner repo;
88 | rev = "533f41704766765cfb3706fb2aa197acbb05df32";
89 | hash = "sha256-Bt5wo7zEAN9Mh9dwbGPsSW8pt1ruBrn0Br9BdprtIRY=";
90 | };
91 | });
92 |
93 | wineasio = require ./wineasio { };
94 | }
95 |
--------------------------------------------------------------------------------
/system/config/audio/pipewire.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | boot.kernelModules = [ "snd_aloop" ];
4 | boot.kernelParams = [ "snd_aloop.index=10" ];
5 |
6 | # add packages to system
7 | environment.systemPackages =
8 | with pkgs;
9 | [
10 | pwvucontrol
11 | pulseaudio
12 | ]
13 | ++ (with pipewire; [
14 | out
15 | jack
16 | ]);
17 |
18 | # enable to pipewire services
19 | security.rtkit.enable = true;
20 | services.pipewire = {
21 | enable = true;
22 |
23 | # enable to audio backends
24 | alsa.enable = true;
25 | alsa.support32Bit = true;
26 | pulse.enable = true;
27 | jack.enable = true;
28 |
29 | # wireplumber settings
30 | wireplumber = {
31 | enable = true;
32 | };
33 |
34 | # pipewire configurations
35 | extraConfig = {
36 | # pipewire daemon
37 | pipewire = {
38 | "10-clock-rate" = {
39 | "context.properties" = {
40 | "default.clock.allowed-rates" = [
41 | 44100
42 | 48000
43 | 88200
44 | 96000
45 | 176400
46 | 192000
47 | ];
48 | };
49 | };
50 |
51 | "98-focusrite-scalette-2gen" = {
52 | "device.rules" = [
53 | {
54 | matches = [
55 | { "device.name" = "alsa_card.usb-Focusrite_Scarlett_Solo_USB-00"; }
56 | ];
57 | actions = {
58 | update-props = {
59 | "alsa.format" = "S32_LE";
60 | "audio.format" = "S32LE";
61 | };
62 | };
63 | }
64 | ];
65 | };
66 | "99-droidcam" = {
67 | "context.objects" = [
68 | {
69 | # for droidcam
70 | factory = "adapter";
71 | args = {
72 | "factory.name" = "api.alsa.pcm.source";
73 | "node.name" = "DroidCam";
74 | "object.linger" = true;
75 | "audio.channels" = 1;
76 | "api.alsa.path" = "hw:10,1,0";
77 | "media.class" = "Audio/Source";
78 | };
79 | }
80 | ];
81 | };
82 | };
83 |
84 | # client
85 | client = {
86 | "10-clock-rate" = {
87 | "context.properties" = {
88 | "default.clock.allowed-rates" = [
89 | 44100
90 | 48000
91 | 88200
92 | 96000
93 | 176400
94 | 192000
95 | ];
96 | };
97 | };
98 | };
99 |
100 | # jackaudio
101 | jack = {
102 | "10-clock-rate" = {
103 | "context.properties" = {
104 | "default.clock.allowed-rates" = [
105 | 44100
106 | 48000
107 | 88200
108 | 96000
109 | 176400
110 | 192000
111 | ];
112 | };
113 | };
114 | };
115 |
116 | # pulseaudio
117 | pipewire-pulse = {
118 | "10-clock-rate" = {
119 | "context.properties" = {
120 | "default.clock.allowed-rates" = [
121 | 44100
122 | 48000
123 | 88200
124 | 96000
125 | 176400
126 | 192000
127 | ];
128 | };
129 | };
130 | };
131 | };
132 | };
133 | }
134 |
--------------------------------------------------------------------------------
/pkgs/noto-fonts-jp/fonts.nix:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | name = "NotoSansCJKjp-Black.otf";
4 | url = "https://github.com/notofonts/noto-cjk/raw/main/Sans/OTF/Japanese/NotoSansCJKjp-Black.otf";
5 | sha256 = "0k8bl7vli28gycwnc7d9nd8zpnnfdx00m6ajwwps8qd8jijnhrnd";
6 | }
7 | {
8 | name = "NotoSansCJKjp-Bold.otf";
9 | url = "https://github.com/notofonts/noto-cjk/raw/main/Sans/OTF/Japanese/NotoSansCJKjp-Bold.otf";
10 | sha256 = "0xhzmxw0c5xxhfwbc64v4ba83fw2yg9fpqda05fy88i9rc6wngg5";
11 | }
12 | {
13 | name = "NotoSansCJKjp-DemiLight.otf";
14 | url = "https://github.com/notofonts/noto-cjk/raw/main/Sans/OTF/Japanese/NotoSansCJKjp-DemiLight.otf";
15 | sha256 = "0rq2r9mwbdsh8z02qxvs0dqx68fkqssc5skzmzpi9r250hlsdy2k";
16 | }
17 | {
18 | name = "NotoSansCJKjp-Medium.otf";
19 | url = "https://github.com/notofonts/noto-cjk/raw/main/Sans/OTF/Japanese/NotoSansCJKjp-Medium.otf";
20 | sha256 = "0ln0lv9dip1b9jjbdkz33620zhilwmjby0fpna0c84rl1rc3wlnx";
21 | }
22 | {
23 | name = "NotoSansCJKjp-Regular.otf";
24 | url = "https://github.com/notofonts/noto-cjk/raw/main/Sans/OTF/Japanese/NotoSansCJKjp-Regular.otf";
25 | sha256 = "1dbmyf3xavwllvx4z79hi6yk6dmg3ncpkyzjf6rjfahbh2cgr8v8";
26 | }
27 | {
28 | name = "NotoSansCJKjp-Thin.otf";
29 | url = "https://github.com/notofonts/noto-cjk/raw/main/Sans/OTF/Japanese/NotoSansCJKjp-Thin.otf";
30 | sha256 = "0b3pk30yp41jxwwqd37ljzal15xhissx0apmzs8rpsfdv297afr9";
31 | }
32 | {
33 | name = "NotoSansMonoCJKjp-Bold.otf";
34 | url = "https://github.com/notofonts/noto-cjk/raw/main/Sans/Mono/NotoSansMonoCJKjp-Bold.otf";
35 | sha256 = "1f6zvar8s9f0alxi9gjggbl0m95wmn6qpgfsc0lgbjy6kcagxpyz";
36 | }
37 | {
38 | name = "NotoSansMonoCJKjp-Regular.otf";
39 | url = "https://github.com/notofonts/noto-cjk/raw/main/Sans/Mono/NotoSansMonoCJKjp-Regular.otf";
40 | sha256 = "1fd5xq5r46k0rhjgrf0hlvbhr4pvws0ykbankb7l9l92x1dp40ad";
41 | }
42 | {
43 | name = "NotoSerifCJKjp-Black.otf";
44 | url = "https://github.com/notofonts/noto-cjk/raw/main/Serif/OTF/Japanese/NotoSerifCJKjp-Black.otf";
45 | sha256 = "0xlfbrwr359znas5x730hi69gaddnhg4sa11n1ixrv99sxnqp33s";
46 | }
47 | {
48 | name = "NotoSerifCJKjp-Bold.otf";
49 | url = "https://github.com/notofonts/noto-cjk/raw/main/Serif/OTF/Japanese/NotoSerifCJKjp-Bold.otf";
50 | sha256 = "1y1sa1faa6p51q9gp4h4ixi14gznvqzqrgk2q92kgci41qn2n6l6";
51 | }
52 | {
53 | name = "NotoSerifCJKjp-ExtraLight.otf";
54 | url = "https://github.com/notofonts/noto-cjk/raw/main/Serif/OTF/Japanese/NotoSerifCJKjp-ExtraLight.otf";
55 | sha256 = "0iklfn8735sz6wwb5lzbx3ylpcydsr7b6zznj6n0v0rzj2sch10d";
56 | }
57 | {
58 | name = "NotoSerifCJKjp-Light.otf";
59 | url = "https://github.com/notofonts/noto-cjk/raw/main/Serif/OTF/Japanese/NotoSerifCJKjp-Light.otf";
60 | sha256 = "0q42rk9g29yd1ln991c3ayhw7532jhn8vj5jyyk7pwwhz96p50m2";
61 | }
62 | {
63 | name = "NotoSerifCJKjp-Medium.otf";
64 | url = "https://github.com/notofonts/noto-cjk/raw/main/Serif/OTF/Japanese/NotoSerifCJKjp-Medium.otf";
65 | sha256 = "0y4lfynvq0vmffcmhn3r4y79j0cg1gi9ijjbicl0f1hc44q6lb1n";
66 | }
67 | {
68 | name = "NotoSerifCJKjp-Regular.otf";
69 | url = "https://github.com/notofonts/noto-cjk/raw/main/Serif/OTF/Japanese/NotoSerifCJKjp-Regular.otf";
70 | sha256 = "1lq352ni9xgrsvz27n3w005xxf2fsrpqan15jfkvaw7iirx4r1fr";
71 | }
72 | {
73 | name = "NotoSerifCJKjp-SemiBold.otf";
74 | url = "https://github.com/notofonts/noto-cjk/raw/main/Serif/OTF/Japanese/NotoSerifCJKjp-SemiBold.otf";
75 | sha256 = "0302is6nr3may2qd1fh0psyra88h6mvvp9y1h9mnkhdly988aq8l";
76 | }
77 | ]
78 |
--------------------------------------------------------------------------------
/pkgs/wineasio/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | multiStdenv,
3 | fetchFromGitHub,
4 | libjack2,
5 | pkg-config,
6 | wine,
7 | pkgsi686Linux,
8 | qt5,
9 | python3,
10 | }:
11 |
12 | multiStdenv.mkDerivation rec {
13 | pname = "wineasio";
14 | version = "1.3.0";
15 | src = fetchFromGitHub {
16 | owner = pname;
17 | repo = pname;
18 | rev = "b5e668103ad13e6f51f4118ed7090592213e5ca2";
19 | hash = "sha256-Yw07XBzllbZ7l1XZcCvEaxZieaHLVxM5cmBM+HAjtQ4=";
20 | };
21 |
22 | nativeBuildInputs = [
23 | pkg-config
24 | wine
25 | qt5.wrapQtAppsHook
26 | python3.pkgs.wrapPython
27 | ];
28 |
29 | buildInputs = [
30 | pkgsi686Linux.libjack2
31 | libjack2
32 | python3.pkgs.pyqt5
33 | qt5.qtbase
34 | ];
35 |
36 | pythonPath = with python3.pkgs; [ pyqt5 ];
37 |
38 | dontConfigure = true;
39 | makeFlags = [ "PREFIX=${wine}" ];
40 |
41 | buildPhase = ''
42 | runHook preBuild
43 |
44 | make ''${makeFlags[@]} 32
45 | make ''${makeFlags[@]} 64
46 |
47 | cd gui
48 | make regen
49 | cd ..
50 |
51 | cat <wineasio-settings
52 | #!${multiStdenv.shell}
53 | exec $out/share/wineasio/settings.py "$@"
54 | EOF
55 |
56 | runHook postBuild
57 | '';
58 |
59 | installPhase = ''
60 | runHook preInstall
61 | install -D build32/wineasio32.dll $out/lib/wine/i386-windows/wineasio32.dll
62 | install -D build32/wineasio32.dll.so $out/lib/wine/i386-unix/wineasio32.dll.so
63 | install -D build64/wineasio64.dll $out/lib/wine/x86_64-windows/wineasio64.dll
64 | install -D build64/wineasio64.dll.so $out/lib/wine/x86_64-unix/wineasio64.dll.so
65 |
66 | cd gui
67 | mkdir -p $out/share/wineasio
68 | install -m 644 -D *.py $out/share/wineasio/
69 | cd ..
70 |
71 | install -D wineasio-settings -m 755 $out/bin/wineasio-settings
72 |
73 | cat <$out/bin/wineasio-register
74 | if [[ ! -e drive_c ]]; then
75 | echo 'This directory is not wine prefix!' >&2; exit 1
76 | fi
77 |
78 | case "''${1:-}" in
79 | 32)
80 | [[ ! -e drive_c/windows/system32/wineasio32.dll ]] || chmod +w drive_c/windows/system32/wineasio32.dll
81 | cp $out/lib/wine/i386-unix/wineasio32.dll.so \
82 | drive_c/windows/system32/wineasio32.dll
83 | wine regsvr32 wineasio32.dll
84 | ;;
85 |
86 | 64)
87 | [[ ! -e drive_c/windows/system32/wineasio64.dll ]] || chmod +w drive_c/windows/system32/wineasio64.dll
88 |
89 | cp $out/lib/wine/x86_64-unix/wineasio64.dll.so \
90 | drive_c/windows/system32/wineasio64.dll
91 |
92 | wine64 regsvr32 wineasio64.dll
93 | ;;
94 |
95 | wow)
96 | [[ ! -e drive_c/windows/system32/wineasio32.dll ]] || chmod +w drive_c/winsows/syswow64/wineasio32.dll
97 | cp $out/lib/wine/i386-unix/wineasio32.dll.so \
98 | drive_c/windows/syswow64/wineasio32.dll
99 | wine regsvr32 wineasio32.dll
100 | ;;
101 |
102 | *)
103 | echo "Usage: wineasio-register [32|64|wow]";
104 | exit 0;
105 | ;;
106 | esac
107 | EOF
108 |
109 | chmod +x $out/bin/wineasio-register
110 |
111 | runHook postInstall
112 | '';
113 |
114 | fixupPhase = ''
115 | sed -i "s#/usr/bin/python3#${python3}/bin/python3#" $out/bin/wineasio-settings
116 | sed -i "s#X-PREFIX-X#$out#" $out/bin/wineasio-settings
117 |
118 | chmod +x $out/share/wineasio/settings.py
119 | wrapProgram $out/share/wineasio/settings.py \
120 | ''${qtWrapperArgs[@]} \
121 | --prefix PYTHONPATH : $PYTHONPATH
122 | '';
123 |
124 | dontStrip = true;
125 | }
126 |
--------------------------------------------------------------------------------
/flake.nix:
--------------------------------------------------------------------------------
1 | {
2 | description = "NixOS configurations for my PCs";
3 | inputs = {
4 | systems.url = "github:nix-systems/default";
5 |
6 | flake-utils.url = "github:numtide/flake-utils";
7 | flake-utils.inputs.systems.follows = "systems";
8 |
9 | flake-compat.url = "github:nix-community/flake-compat";
10 |
11 | nixpkgs-lib.url = "github:nix-community/nixpkgs.lib";
12 |
13 | lib-aggregate.url = "github:nix-community/lib-aggregate";
14 | lib-aggregate.inputs.flake-utils.follows = "flake-utils";
15 | lib-aggregate.inputs.nixpkgs-lib.follows = "nixpkgs-lib";
16 |
17 | nixpkgs.url = "github:NixOS/nixpkgs/master";
18 | stable.url = "github:NixOS/nixpkgs/nixos-25.05";
19 |
20 | home-manager.url = "github:nix-community/home-manager";
21 | home-manager.inputs.nixpkgs.follows = "nixpkgs";
22 |
23 | wayland.url = "github:nix-community/nixpkgs-wayland";
24 | wayland.inputs.nixpkgs.follows = "nixpkgs";
25 | wayland.inputs.flake-compat.follows = "flake-compat";
26 | wayland.inputs.lib-aggregate.follows = "lib-aggregate";
27 |
28 | impermanence.url = "github:nix-community/impermanence";
29 |
30 | nixpkgs-xr.url = "github:nix-community/nixpkgs-xr";
31 | nixpkgs-xr.inputs.nixpkgs.follows = "nixpkgs";
32 | nixpkgs-xr.inputs.flake-compat.follows = "flake-compat";
33 | nixpkgs-xr.inputs.flake-utils.follows = "flake-utils";
34 | nixpkgs-xr.inputs.systems.follows = "systems";
35 |
36 | waybar.url = "github:Alexays/Waybar";
37 | waybar.inputs.nixpkgs.follows = "nixpkgs";
38 | waybar.inputs.flake-compat.follows = "flake-compat";
39 | };
40 | outputs =
41 | {
42 | nixpkgs,
43 | stable,
44 | home-manager,
45 | wayland,
46 | impermanence,
47 | nixpkgs-xr,
48 | waybar,
49 | ...
50 | }:
51 | rec {
52 | legacyPackages.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.extend (
53 | final: prev:
54 | prev
55 | // (import ./pkgs/default.nix { inherit nixpkgs; } final prev)
56 | // (import ./pkgs/temporary.nix { inherit nixpkgs stable; } final prev)
57 | );
58 |
59 | ## test
60 | nixosConfigurations =
61 | let
62 | nixosSystem =
63 | opts:
64 | (import ./lib/nixosSystem.nix {
65 | inherit nixpkgs;
66 | inherit (opts) system patches;
67 | })
68 | {
69 | inherit (opts)
70 | hostname
71 | profile
72 | overlays
73 | modules
74 | ;
75 | };
76 | in
77 | {
78 | nixos = nixosSystem {
79 | hostname = "nixos";
80 | profile = import ./system/profile/NyZen9.nix;
81 | system = "x86_64-linux";
82 | patches = [ ];
83 | overlays = [
84 | wayland.overlay
85 | waybar.overlays.default
86 | (import ./pkgs/temporary.nix { inherit nixpkgs stable; })
87 | (import ./pkgs/default.nix { inherit nixpkgs; })
88 | ];
89 |
90 | modules = [
91 | nixpkgs-xr.nixosModules.nixpkgs-xr
92 | impermanence.nixosModules.impermanence
93 | home-manager.nixosModules.home-manager
94 | (_: {
95 | home-manager = {
96 | useGlobalPkgs = true;
97 | useUserPackages = false;
98 | users.nyarla = import ./dotfiles/user/nyarla.nix;
99 | };
100 | })
101 | ];
102 | };
103 | };
104 | };
105 | }
106 |
--------------------------------------------------------------------------------
/dotfiles/config/shell/zsh.nix:
--------------------------------------------------------------------------------
1 | { pkgs, lib, ... }:
2 | {
3 | programs.zsh = {
4 | enable = true;
5 |
6 | # completion
7 | enableCompletion = true;
8 | autocd = true;
9 |
10 | # highlight
11 | syntaxHighlighting.enable = true;
12 |
13 | # zshrc
14 | initContent =
15 | let
16 | PATH = lib.strings.concatStringsSep ":" [
17 | "$HOME/.nix-profile/bin"
18 | "$HOME/.local/bin"
19 | "$GOPATH/bin"
20 | "$PATH"
21 | ];
22 |
23 | options = lib.mkOrder 500 ''
24 | export PATH=${PATH}
25 |
26 | setopt auto_pushd
27 | setopt pushd_ignore_dups
28 | setopt pushd_to_home
29 |
30 | setopt hist_ignore_all_dups
31 | setopt hist_reduce_blanks
32 | setopt hist_find_no_dups
33 | '';
34 |
35 | functions = lib.mkOrder 551 ''
36 | function has() {
37 | type "''${1:-}" >/dev/null 2>&1
38 | }
39 |
40 | function nixos-clean() {
41 | sudo nix-collect-garbage --delete-older-than 7d
42 | sudo /run/current-system/bin/switch-to-configuration boot
43 | }
44 |
45 | if has fzy ; then
46 | function __bind-history() {
47 | BUFFER="$(fc -l -n 1 | sort -u | fzy --query "''${LBUFFER}")"
48 | CURSOR=$#BUFFER
49 | zle -R -c
50 | }
51 |
52 | zle -N __bind-history
53 | bindkey '^R' __bind-history
54 | fi
55 |
56 | if has wl-paste ; then
57 | function __bind-clipboard() {
58 | BUFFER="''${LBUFFER:-}$(wl-paste)"
59 | CURSOR=$#BUFFER
60 | zle -R -c
61 | }
62 |
63 | zle -N __bind-clipboard
64 | bindkey '^P' __bind-clipboard
65 | fi
66 | '';
67 | in
68 | lib.mkMerge [
69 | options
70 | functions
71 | ];
72 |
73 | # aliases
74 | shellAliases =
75 | let
76 | podman = "env DBUS_SESSION_BUS_ADDRESS= podman";
77 | ls = "ls --color -F";
78 | nixos-rebuild = action: "sudo nixos-rebuild ${action} --flake /etc/nixos#$(hostname)";
79 | in
80 | {
81 | inherit ls;
82 | l = "${ls} -l";
83 |
84 | docker = podman;
85 | inherit podman;
86 |
87 | nixos-apply = "${nixos-rebuild "switch"} && sudo systemctl restart home-manager-$(id -n -u).service";
88 | nixos-build = nixos-rebuild "build";
89 | nixos-upgrade = nixos-rebuild "boot";
90 |
91 | waydroid = "env env XDG_DATA_HOME=/persist/home/nyarla/.local/share waydroid";
92 | };
93 | sessionVariables = {
94 | # editor
95 | EDITOR = "nvim";
96 |
97 | # development
98 | GOPATH = "/home/nyarla/Applications/Development/go";
99 | FAKE_RELEASE = 1;
100 |
101 | # nixpkgs
102 | NIXPKGS_ALLOW_UNFREE = 1;
103 | };
104 |
105 | history = {
106 | size = 10000;
107 | path = "$HOME/.zsh_history";
108 | ignorePatterns = [ ];
109 | ignoreDups = true;
110 | share = true;
111 | };
112 |
113 | plugins = [
114 | {
115 | name = "enhancd";
116 | file = "init.sh";
117 | src = pkgs.fetchFromGitHub {
118 | owner = "babarot";
119 | repo = "enhancd";
120 | rev = "5afb4eb6ba36c15821de6e39c0a7bb9d6b0ba415";
121 | hash = "sha256-pKQbwiqE0KdmRDbHQcW18WfxyJSsKfymWt/TboY2iic=";
122 | };
123 | }
124 | ];
125 | };
126 |
127 | home.packages = with pkgs; [
128 | fzy
129 | mmv-go
130 | ripgrep
131 | tmux
132 | wcwidth-cjk
133 |
134 | file
135 | gawk
136 | gnumake
137 | gnused
138 |
139 | inotify-tools
140 |
141 | keychain
142 |
143 | bc
144 | tree
145 | ];
146 | }
147 |
--------------------------------------------------------------------------------
/dotfiles/app/git/gitignore.nix:
--------------------------------------------------------------------------------
1 | [
2 | # Created by https://www.toptal.com/developers/gitignore/api/node,perl
3 | # Edit at https://www.toptal.com/developers/gitignore?templates=node,perl
4 |
5 | ### Node ###
6 | # Logs
7 | "logs"
8 | "*.log"
9 | "npm-debug.log*"
10 | "yarn-debug.log*"
11 | "yarn-error.log*"
12 | "lerna-debug.log*"
13 | ".pnpm-debug.log*"
14 |
15 | # Diagnostic reports (https://nodejs.org/api/report.html)
16 | "report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json"
17 |
18 | # Runtime data
19 | "pids"
20 | "*.pid"
21 | "*.seed"
22 | "*.pid.lock"
23 |
24 | # Directory for instrumented libs generated by jscoverage/JSCover
25 | "lib-cov"
26 |
27 | # Coverage directory used by tools like istanbul
28 | "coverage"
29 | "*.lcov"
30 |
31 | # nyc test coverage
32 | ".nyc_output"
33 |
34 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
35 | ".grunt"
36 |
37 | # Bower dependency directory (https://bower.io/)
38 | "bower_components"
39 |
40 | # node-waf configuration
41 | ".lock-wscript"
42 |
43 | # Compiled binary addons (https://nodejs.org/api/addons.html)
44 | "build/Release"
45 |
46 | # Dependency directories
47 | "node_modules/"
48 | "jspm_packages/"
49 |
50 | # Snowpack dependency directory (https://snowpack.dev/)
51 | "web_modules/"
52 |
53 | # TypeScript cache
54 | "*.tsbuildinfo"
55 |
56 | # Optional npm cache directory
57 | ".npm"
58 |
59 | # Optional eslint cache
60 | ".eslintcache"
61 |
62 | # Microbundle cache
63 | ".rpt2_cache/"
64 | ".rts2_cache_cjs/"
65 | ".rts2_cache_es/"
66 | ".rts2_cache_umd/"
67 |
68 | # Optional REPL history
69 | ".node_repl_history"
70 |
71 | # Output of 'npm pack'
72 | "*.tgz"
73 |
74 | # Yarn Integrity file
75 | ".yarn-integrity"
76 |
77 | # dotenv environment variables file
78 | ".env"
79 | ".env.test"
80 | ".env.production"
81 |
82 | # parcel-bundler cache (https://parceljs.org/)
83 | ".cache"
84 | ".parcel-cache"
85 |
86 | # Next.js build output
87 | ".next"
88 | "out"
89 |
90 | # Nuxt.js build / generate output
91 | ".nuxt"
92 | "dist"
93 |
94 | # Gatsby files
95 | ".cache/"
96 | # Comment in the public line in if your project uses Gatsby and not Next.js
97 | # https://nextjs.org/blog/next-9-1#public-directory-support
98 | # public
99 |
100 | # vuepress build output
101 | ".vuepress/dist"
102 |
103 | # Serverless directories
104 | ".serverless/"
105 |
106 | # FuseBox cache
107 | ".fusebox/"
108 |
109 | # DynamoDB Local files
110 | ".dynamodb/"
111 |
112 | # TernJS port file
113 | ".tern-port"
114 |
115 | # Stores VSCode versions used for testing VSCode extensions
116 | ".vscode-test"
117 |
118 | # yarn v2
119 | ".yarn/cache"
120 | ".yarn/unplugged"
121 | ".yarn/build-state.yml"
122 | ".yarn/install-state.gz"
123 | ".pnp.*"
124 |
125 | ### Node Patch ###
126 | # Serverless Webpack directories
127 | ".webpack/"
128 |
129 | # Optional stylelint cache
130 | ".stylelintcache"
131 |
132 | # SvelteKit build / generate output
133 | ".svelte-kit"
134 |
135 | ### Perl ###
136 | "!Build/"
137 | ".last_cover_stats"
138 | "/META.yml"
139 | "/META.json"
140 | "/MYMETA.*"
141 | "*.o"
142 | "*.pm.tdy"
143 | "*.bs"
144 |
145 | # Devel::Cover
146 | "cover_db/"
147 |
148 | # Devel::NYTProf
149 | "nytprof.out"
150 |
151 | # Dizt::Zilla
152 | "/.build/"
153 |
154 | # Module::Build
155 | "_build/"
156 | "Build"
157 | "Build.bat"
158 |
159 | # Module::Install
160 | "inc/"
161 |
162 | # ExtUtils::MakeMaker
163 | "/blib/"
164 | "/_eumm/"
165 | "/*.gz"
166 | "/Makefile.old"
167 | "/MANIFEST.bak"
168 | "/pm_to_blib"
169 | "/*.zip"
170 |
171 | # End of https://www.toptal.com/developers/gitignore/api/node,perl
172 |
173 | "lefthook.yml"
174 | ".lefthook"
175 | ]
176 |
--------------------------------------------------------------------------------
/pkgs/aria-misskey/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | stdenv,
3 | lib,
4 | runCommand,
5 | fetchFromGitHub,
6 |
7 | flutter338,
8 | rustPlatform,
9 | cargo,
10 | yq,
11 |
12 | libepoxy,
13 | mdk-sdk,
14 | }:
15 | let
16 | pname = "aria";
17 | version = "v1.4.0-beta.2";
18 |
19 | source = fetchFromGitHub {
20 | owner = "poppingmoon";
21 | repo = pname;
22 | rev = version;
23 | hash = "sha256-tdLrxWf+0EKfLLB7ll0p0oXUI3PvtV9Eo3+Atl+tlJw=";
24 | fetchSubmodules = true;
25 | };
26 |
27 | src = runCommand "aria-src" { } ''
28 | mkdir -p $out
29 | cp -r '${source}'/* "$out"
30 |
31 | chmod -R +w $out
32 | cd $out
33 | patch -p1 -i ${./rust_lib_aria.patch}
34 | '';
35 |
36 | customSourceBuilders = {
37 | fvp =
38 | { version, src, ... }:
39 | stdenv.mkDerivation rec {
40 | pname = "fvp";
41 | inherit version src;
42 | inherit (src) passthru;
43 |
44 | postPatch = ''
45 | sed -i 's|.*libc++.so.1.*|${mdk-sdk}/lib/libc++.so.1|' ./linux/CMakeLists.txt
46 | substituteInPlace ./linux/CMakeLists.txt \
47 | --replace-fail "fvp_setup_deps()" "include(${mdk-sdk}/lib/cmake/FindMDK.cmake)"
48 | '';
49 |
50 | installPhase = ''
51 | runHook preInstall
52 |
53 | cp -r . $out
54 |
55 | runHook postInstall
56 | '';
57 | };
58 | };
59 | in
60 | flutter338.buildFlutterApplication rec {
61 | inherit pname version src;
62 |
63 | pubspecLock =
64 | let
65 | lockfile = runCommand "build-aria-pubspec.json" { nativeBuildInputs = [ yq ]; } ''
66 | yq '.' ${src}/pubspec.lock > $out
67 | '';
68 | in
69 | lib.importJSON "${lockfile}";
70 |
71 | inherit customSourceBuilders;
72 |
73 | gitHashes = {
74 | flutter_apns_only = "sha256-5KlICoKqekSE4LCzd1MP+o8Ezq0xLZmzeAQZExXBalM=";
75 | flutter_cache_manager = "sha256-4sMjeSMOsEicIVLdY+evnl0HbvMcm4PLG8JL4e4yxBE=";
76 | flutter_highlighting = "sha256-5t4hXvqkhwohTuFoeVycwb9HKZDDug+HjkGPeItVrTk=";
77 | fvp = "sha256-PgxJVEr0oOtuP3xf0ybw3wyIpzz8zKGt3ASl1psp+1Y=";
78 | highlighting = "sha256-r2rMvgHt312F64dy4aIRr+eD9Q0sJ7eGe6DGP57t50M=";
79 | image_compression = "sha256-9RBjKId8TYdx3O0wT2We8FbCiJYkqJlyBY7TYDUxsMg=";
80 | material_off_icons = "sha256-jMO1abOm1YgFAAbFaTFgTjrmQGW6d7Z1J4o2wTynto4=";
81 | mfm_parser = "sha256-fwhKTPbuuEtimWhtUxsDNqHb0TDBqjdsNQN0RIq7Rq0=";
82 | misskey_dart = "sha256-npX0jI4x7E9u1X5R4qRxRyAMReIhmRG2vqtnB4b/fP8=";
83 | receive_sharing_intent = "sha256-8D5ZENARPZ7FGrdIErxOoV3Ao35/XoQ2tleegI42ZUY=";
84 | tinycolor2 = "sha256-RGjhuX6487TJ2ofNdJS1FCMl6ciKU0qkGKg4yfkPE+w=";
85 | twemoji_v2 = "sha256-liX5FrM5lgJUXo6HfgIgiY4MnnvCNRYIY7nOTkrSt6k=";
86 | unifiedpush_android = "sha256-NDnQYBAjQC+fI3a9sdqmr/4Er+nGtG3caCZM6C1cXAk=";
87 | webcrypto = "sha256-AELwdBRSBcjHNlprlFXoP5rKOG6J5PG3cwTa+gZps6U=";
88 | };
89 |
90 | targetFlutterPlatform = "linux";
91 |
92 | cargoRoot = "rust";
93 | cargoDeps = rustPlatform.importCargoLock {
94 | lockFile = src + /rust/Cargo.lock;
95 | outputHashes = {
96 | "aiscript-0.1.0" = "sha256-GJccX0YHBpvLL0YElQIaJ6ooIIvKRIA426OlJeHrrN4=";
97 | };
98 | };
99 |
100 | dontCargoBuild = true;
101 | cargoBuildFlags = "--lib";
102 | cargoBuildType = "release";
103 |
104 | preBuild = ''
105 | preBuild=()
106 | cd rust
107 | cargoBuildHook
108 | mv ./target/*/release/librust_lib_aria.* ./target/release/
109 | cd ..
110 | '';
111 |
112 | CXXFLAGS = [ "-Wno-deprecated-literal-operator" ];
113 |
114 | buildInputs = [
115 | libepoxy.dev
116 | ];
117 |
118 | nativeBuildInputs = [
119 | cargo
120 | rustPlatform.cargoSetupHook
121 | rustPlatform.cargoBuildHook
122 | rustPlatform.bindgenHook
123 | ];
124 |
125 | postInstall = ''
126 | rm $out/bin/aria
127 | cat <$out/bin/aria
128 | #!${stdenv.shell}
129 | export LD_LIBRARY_PATH=$out/app/aria/lib
130 | exec $out/app/aria/aria
131 | EOF
132 |
133 | chmod +x $out/bin/aria
134 | '';
135 | }
136 |
--------------------------------------------------------------------------------
/system/machine/NyZen9/devices.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | # auto-mount for encrypted usb devices with btrfs
4 | systemd.services.automount-encrypted-usb-device = {
5 | enable = true;
6 | wantedBy = [ "multi-user.target" ];
7 | description = "Automount service for encrypted usb storage";
8 | path = with pkgs; [
9 | coreutils
10 | cryptsetup
11 | "/run/wrappers/bin"
12 | ];
13 | serviceConfig = {
14 | Type = "oneshot";
15 | RemainAfterExit = "yes";
16 | ExecStart = toString (
17 | pkgs.writeShellScript "mount.sh" ''
18 | set -xeuo pipefail
19 |
20 | export PATH=/run/wrappers/bin:$PATH
21 |
22 | mount-if-exists() {
23 | local deviceId
24 | deviceId=$1
25 |
26 | if [[ ! -e /dev/disk/by-uuid/$deviceId ]]; then
27 | echo "/dev/disk/by-uuid/$deviceId is not found."
28 | exit 0
29 | fi
30 |
31 | if [[ ! -e /boot/keys/$deviceId ]]; then
32 | echo "/boot/keys/$deviceId is not found."
33 | exit 0
34 | fi
35 |
36 | if [[ ! -e /persist/data/$deviceId ]]; then
37 | mkdir -p /persist/data/$deviceId
38 | fi
39 |
40 | if [[ ! -e /dev/mapper/dev-disk-by-uuid-$deviceId ]]; then
41 | cryptsetup luksOpen \
42 | --key-file /boot/keys/$deviceId \
43 | /dev/disk/by-uuid/$deviceId dev-disk-by-uuid-$deviceId
44 | fi
45 |
46 | if [[ ! -e /persist/data/$deviceId/.keep ]]; then
47 | mount -t btrfs -o compress=zstd,ssd,space_cache=v2,x-gvfs-hide,noexec,nosuid,nodev \
48 | /dev/mapper/dev-disk-by-uuid-$deviceId \
49 | /persist/data/$deviceId
50 | fi
51 |
52 | return 0
53 | }
54 |
55 | backup-if-exists() {
56 | local deviceId
57 | deviceId=$1
58 |
59 | local dirName
60 | dirName=$2
61 |
62 | if [[ ! -e /persist/data/$deviceId/$dirName ]]; then
63 | echo "/persist/data/$deviceId/$dirName is not found."
64 | exit 0
65 | fi
66 |
67 | if [[ ! -e /backup/$dirName ]]; then
68 | mkdir -p /backup/$dirName
69 | fi
70 |
71 | mount -o bind /persist/data/$deviceId/$dirName /backup/$dirName
72 | return $?
73 | }
74 |
75 | mount-if-exists 14887bd8-3e3c-4675-9e81-9027a050cdf7
76 |
77 | backup-if-exists 14887bd8-3e3c-4675-9e81-9027a050cdf7 Archives
78 | backup-if-exists 14887bd8-3e3c-4675-9e81-9027a050cdf7 Calibre
79 | backup-if-exists 14887bd8-3e3c-4675-9e81-9027a050cdf7 Music
80 | backup-if-exists 14887bd8-3e3c-4675-9e81-9027a050cdf7 Pictures
81 | backup-if-exists 14887bd8-3e3c-4675-9e81-9027a050cdf7 eBooks
82 |
83 | backup-if-exists 14887bd8-3e3c-4675-9e81-9027a050cdf7 Sources/AI
84 | backup-if-exists 14887bd8-3e3c-4675-9e81-9027a050cdf7 Sources/Games
85 | backup-if-exists 14887bd8-3e3c-4675-9e81-9027a050cdf7 Sources/ISO
86 | backup-if-exists 14887bd8-3e3c-4675-9e81-9027a050cdf7 Sources/Learn
87 | ''
88 | );
89 |
90 | ExecStop = toString (
91 | pkgs.writeShellScript "unmount.sh" ''
92 | set -xeuo pipefail
93 |
94 | export PATH=/run/wrappers/bin:$PATH
95 |
96 | unbind-if-exists() {
97 | local dirName
98 | dirName=$1
99 |
100 | if [[ -e /backup/$dirName ]]; then
101 | umount /backup/$dirName
102 | fi
103 |
104 | return 0
105 | }
106 |
107 | unmount-if-exists() {
108 | local deviceId
109 | deviceId=$1
110 |
111 | if [[ -e /persist/data/$deviceId ]]; then
112 | umount /persist/data/$deviceId || true
113 | fi
114 |
115 | if [[ -e /dev/mapper/dev-disk-by-uuid-$deviceId ]]; then
116 | cryptsetup luksClose /dev/mapper/dev-disk-by-uuid-$deviceId
117 | fi
118 |
119 | return 0
120 | }
121 |
122 | unbind-if-exists Archives
123 | unbind-if-exists Calibre
124 | unbind-if-exists Music
125 | unbind-if-exists Pictures
126 | unbind-if-exists eBooks
127 |
128 | unbind-if-exists Sources/AI
129 | unbind-if-exists Sources/Games
130 | unbind-if-exists Sources/ISO
131 | unbind-if-exists Sources/Learn
132 |
133 | unmount-if-exists 14887bd8-3e3c-4675-9e81-9027a050cdf7
134 |
135 | exit 0
136 | ''
137 | );
138 | };
139 | };
140 | }
141 |
--------------------------------------------------------------------------------
/dotfiles/app/mlterm/aafont.nix:
--------------------------------------------------------------------------------
1 | { system, ... }:
2 | let
3 | mapEmoji = font: {
4 | "U+A9" = font;
5 | "U+AE" = font;
6 | "U+200D" = font;
7 | "U+203C" = font;
8 | "U+2049" = font;
9 | "U+20E3" = font;
10 | "U+2122" = font;
11 | "U+2139" = font;
12 | "U+2194-2199" = font;
13 | "U+21A9-21AA" = font;
14 | "U+231A-231B" = font;
15 | "U+2328" = font;
16 | "U+23CF" = font;
17 | "U+23E9-23F3" = font;
18 | "U+23F8-23FA" = font;
19 | "U+24C2" = font;
20 | "U+25AA-25AB" = font;
21 | "U+25B6" = font;
22 | "U+25C0" = font;
23 | "U+25FB-25FE" = font;
24 | "U+2600-2604" = font;
25 | "U+260E" = font;
26 | "U+2611" = font;
27 | "U+2614-2615" = font;
28 | "U+2618" = font;
29 | "U+261D" = font;
30 | "U+2620" = font;
31 | "U+2622-2623" = font;
32 | "U+2626" = font;
33 | "U+262A" = font;
34 | "U+262E-262F" = font;
35 | "U+2638-263A" = font;
36 | "U+2640" = font;
37 | "U+2642" = font;
38 | "U+2648-2653" = font;
39 | "U+265F-2660" = font;
40 | "U+2663" = font;
41 | "U+2665-2666" = font;
42 | "U+2668" = font;
43 | "U+267B" = font;
44 | "U+267E-267F" = font;
45 | "U+2692-2697" = font;
46 | "U+2699" = font;
47 | "U+269B-269C" = font;
48 | "U+26A0-26A1" = font;
49 | "U+26AA-26AB" = font;
50 | "U+26B0-26B1" = font;
51 | "U+26BD-26BE" = font;
52 | "U+26C4-26C5" = font;
53 | "U+26C8" = font;
54 | "U+26CE-26CF" = font;
55 | "U+26D1" = font;
56 | "U+26D3-26D4" = font;
57 | "U+26E9-26EA" = font;
58 | "U+26F0-26F5" = font;
59 | "U+26F7-26FA" = font;
60 | "U+26FD" = font;
61 | "U+2702" = font;
62 | "U+2705" = font;
63 | "U+2708-270D" = font;
64 | "U+270F" = font;
65 | "U+2712" = font;
66 | "U+2714" = font;
67 | "U+2716" = font;
68 | "U+271D" = font;
69 | "U+2721" = font;
70 | "U+2728" = font;
71 | "U+2733-2734" = font;
72 | "U+2744" = font;
73 | "U+2747" = font;
74 | "U+274C" = font;
75 | "U+274E" = font;
76 | "U+2753-2755" = font;
77 | "U+2757" = font;
78 | "U+2763-2764" = font;
79 | "U+2795-2797" = font;
80 | "U+27A1" = font;
81 | "U+27B0" = font;
82 | "U+27BF" = font;
83 | "U+2934-2935" = font;
84 | "U+2B05-2B07" = font;
85 | "U+2B1B-2B1C" = font;
86 | "U+2B50" = font;
87 | "U+2B55" = font;
88 | "U+3030" = font;
89 | "U+303D" = font;
90 | "U+3297" = font;
91 | "U+3299" = font;
92 | "U+FE0F" = font;
93 | "U+1F004" = font;
94 | "U+1F0CF" = font;
95 | "U+1F170-1F171" = font;
96 | "U+1F17E-1F17F" = font;
97 | "U+1F18E" = font;
98 | "U+1F191-1F19A" = font;
99 | "U+1F1E6-1F1FF" = font;
100 | "U+1F201-1F202" = font;
101 | "U+1F21A" = font;
102 | "U+1F22F" = font;
103 | "U+1F232-1F23A" = font;
104 | "U+1F250-1F251" = font;
105 | "U+1F300-1F321" = font;
106 | "U+1F324-1F393" = font;
107 | "U+1F396-1F397" = font;
108 | "U+1F399-1F39B" = font;
109 | "U+1F39E-1F3F0" = font;
110 | "U+1F3F3-1F3F5" = font;
111 | "U+1F3F7-1F4FD" = font;
112 | "U+1F4FF-1F53D" = font;
113 | "U+1F549-1F54E" = font;
114 | "U+1F550-1F567" = font;
115 | "U+1F56F-1F570" = font;
116 | "U+1F573-1F57A" = font;
117 | "U+1F587" = font;
118 | "U+1F58A-1F58D" = font;
119 | "U+1F590" = font;
120 | "U+1F595-1F596" = font;
121 | "U+1F5A4-1F5A5" = font;
122 | "U+1F5A8" = font;
123 | "U+1F5B1-1F5B2" = font;
124 | "U+1F5BC" = font;
125 | "U+1F5C2-1F5C4" = font;
126 | "U+1F5D1-1F5D3" = font;
127 | "U+1F5DC-1F5DE" = font;
128 | "U+1F5E1" = font;
129 | "U+1F5E3" = font;
130 | "U+1F5E8" = font;
131 | "U+1F5EF" = font;
132 | "U+1F5F3" = font;
133 | "U+1F5FA-1F64F" = font;
134 | "U+1F680-1F6C5" = font;
135 | "U+1F6CB-1F6D2" = font;
136 | "U+1F6D5" = font;
137 | "U+1F6E0-1F6E5" = font;
138 | "U+1F6E9" = font;
139 | "U+1F6EB-1F6EC" = font;
140 | "U+1F6F0" = font;
141 | "U+1F6F3-1F6FA" = font;
142 | "U+1F7E0-1F7EB" = font;
143 | "U+1F90D-1F93A" = font;
144 | "U+1F93C-1F945" = font;
145 | "U+1F947-1F971" = font;
146 | "U+1F973-1F976" = font;
147 | "U+1F97A-1F9A2" = font;
148 | "U+1F9A5-1F9AA" = font;
149 | "U+1F9AE-1F9CA" = font;
150 | "U+1F9CD-1F9FF" = font;
151 | "U+1FA70-1FA73" = font;
152 | "U+1FA78-1FA7A" = font;
153 | "U+1FA80-1FA82" = font;
154 | "U+1FA90-1FA95" = font;
155 | "U+E0062-E0063" = font;
156 | "U+E0065" = font;
157 | "U+E0067" = font;
158 | "U+E006C" = font;
159 | "U+E006E" = font;
160 | "U+E0073-E0074" = font;
161 | "U+E0077" = font;
162 | "U+E007F" = font;
163 | };
164 | in
165 | {
166 | x86_64-linux = {
167 | DEFAULT = "Monospace";
168 | "U+E000-F8FF" = "Hack Nerd Font";
169 | "U+F0000-FFFFD" = "Hack Nerd Font";
170 | } // mapEmoji "Noto Color Emoji";
171 | }
172 | ."${system}"
173 |
--------------------------------------------------------------------------------
/pkgs/audiogridder/default.nix:
--------------------------------------------------------------------------------
1 | {
2 | stdenv,
3 | fetchFromGitHub,
4 | lib,
5 | runCommand,
6 | binutils,
7 | cmake,
8 | findutils,
9 | pkg-config,
10 | python3,
11 | alsa-lib,
12 | atk,
13 | boost178,
14 | cairo,
15 | curlFull,
16 | freetype,
17 | gdk-pixbuf,
18 | glib,
19 | graphviz,
20 | gtk3,
21 | gtkmm3,
22 | harfbuzz,
23 | ladspa-sdk,
24 | libGLU,
25 | libappindicator-gtk3,
26 | libdatrie,
27 | libdbusmenu,
28 | libepoxy,
29 | libjack2,
30 | libjpeg_turbo,
31 | libpng,
32 | libselinux,
33 | libsepol,
34 | libsysprof-capture,
35 | libthai,
36 | libxkbcommon,
37 | pango,
38 | pcre,
39 | pcre2,
40 | sqlite,
41 | util-linux,
42 | webkitgtk_4_1,
43 | xorg,
44 | zlib,
45 | vst2-sdk,
46 | }:
47 | let
48 | deps = fetchFromGitHub {
49 | owner = "apohl79";
50 | repo = "audiogridder-deps";
51 | rev = "6a7a41c06b9ca9d4a260febe79ee1f6e96618e0a";
52 | sha256 = "sha256-ESgeLkX/CQPY4/x3yl+H0OdpM9uc2z6dh4vMzcvXTR8=";
53 | };
54 |
55 | sdks = runCommand "ag-sdks" { } ''
56 | mkdir -p $out/vstsdk2.4
57 | cp -r ${vst2-sdk}/* $out/vstsdk2.4/
58 | '';
59 |
60 | boost178Static = boost178.override {
61 | enableShared = false;
62 | enableStatic = true;
63 | };
64 | in
65 | stdenv.mkDerivation rec {
66 | pname = "audiogridder-modded";
67 | version = "1.2.0-mod";
68 |
69 | src = fetchFromGitHub {
70 | owner = "nyarla";
71 | repo = "audiogridder-modded";
72 | rev = "dc01e87a00b2de7f30a8d65628ceac7e4292661f";
73 | hash = "sha256-DdCpULUVTclcRBbTinE6cOx1jDg1Hst21DRkb3CCru8=";
74 | fetchSubmodules = true;
75 | };
76 |
77 | nativeBuildInputs = [
78 | cmake
79 | pkg-config
80 | python3
81 | findutils
82 | binutils
83 | ];
84 | buildInputs =
85 | [
86 | alsa-lib
87 | atk
88 | boost178Static
89 | cairo
90 | curlFull
91 | curlFull.dev
92 | freetype
93 | gdk-pixbuf
94 | glib
95 | glib.dev
96 | graphviz
97 | gtk3
98 | gtk3.dev
99 | gtkmm3
100 | gtkmm3.dev
101 | harfbuzz
102 | ladspa-sdk
103 | libGLU
104 | libappindicator-gtk3
105 | libappindicator-gtk3.dev
106 | libdatrie.dev
107 | libdatrie.out
108 | libdbusmenu
109 | libepoxy.dev
110 | libepoxy.out
111 | libjack2
112 | libjpeg_turbo
113 | libpng
114 | libselinux.dev
115 | libselinux.out
116 | libsepol.dev
117 | libsepol.out
118 | libsysprof-capture
119 | libthai.dev
120 | libthai.out
121 | libxkbcommon.dev
122 | libxkbcommon.out
123 | pango
124 | pcre.dev
125 | pcre.out
126 | pcre2.dev
127 | pcre2.out
128 | sqlite.dev
129 | sqlite.out
130 | util-linux.dev
131 | util-linux.out
132 | webkitgtk_4_1
133 | zlib
134 | ]
135 | ++ (with xorg; [
136 | libX11
137 | libXcomposite
138 | libXcursor
139 | libXdmcp.dev
140 | libXdmcp.out
141 | libXext
142 | libXinerama
143 | libXrandr
144 | libXrender
145 | libXtst
146 | libxcb
147 | ]);
148 |
149 | libPath = lib.makeLibraryPath (
150 | buildInputs
151 | ++ [
152 | stdenv.cc.cc
153 | stdenv.cc.libc
154 | ]
155 | );
156 |
157 | postPatch = ''
158 | export binutils=${binutils}
159 |
160 | substituteAllInPlace CMakeLists.txt
161 | substituteAllInPlace Plugin/Source/PluginProcessor.cpp
162 | substituteAllInPlace Server/Source/App.cpp
163 | substituteAllInPlace Server/Source/ProcessorClient.cpp
164 | substituteAllInPlace Server/Source/Server.cpp
165 | '';
166 |
167 | cmakeFlags = [
168 | "-DAG_DEPS_ROOT=${deps}/linux-x86_64"
169 | "-DAG_SDKS_ROOT=${sdks}"
170 | "-DAG_VST2_PLUGIN_ENABLED=ON"
171 | "-DAG_WITH_PLUGIN=ON"
172 | "-DAG_WITH_SERVER=ON"
173 | "-DCMAKE_AR=${stdenv.cc.cc}/bin/gcc-ar"
174 | "-DCMAKE_BUILD_TYPE=Release"
175 | "-DCMAKE_RANLIB=${stdenv.cc.cc}/bin/gcc-ranlib"
176 | "-DFFMPEG_ROOT=${deps}/linux-x86_64"
177 | "-DWEBP_ROOT=${deps}/linux-x86_64"
178 | ];
179 |
180 | installPhase = ''
181 | mkdir -p $out/bin
182 | mkdir -p $out/lib/vst
183 | mkdir -p $out/lib/vst3
184 | mkdir -p $out/share/audiogridder/images
185 |
186 | cp -R ../Server/Resources/* $out/share/audiogridder/images
187 |
188 | for fn in Fx Inst Midi ; do
189 | mv Plugin/AudioGridder''${fn}_artefacts/Release/VST3/* $out/lib/vst3/
190 | mv Plugin/AudioGridder''${fn}_artefacts/Release/VST/* $out/lib/vst/
191 | done
192 |
193 | cp PluginTray/AudioGridderPluginTray_artefacts/Release/AudioGridderPluginTray $out/bin/
194 | cp Server/AudioGridderServer_artefacts/Release/AudioGridderServer $out/bin/
195 |
196 | chmod +x $out/bin/*
197 | '';
198 |
199 | fixupPhase = ''
200 | for exe in $(ls $out/bin); do
201 | patchelf --set-rpath "${libPath}" $out/bin/$exe
202 | done
203 |
204 | find $out/lib -type f -name '*.so' -exec patchelf --set-rpath "${libPath}" {} \;
205 | '';
206 | }
207 |
--------------------------------------------------------------------------------
/pkgs/carla/nixos.patch:
--------------------------------------------------------------------------------
1 | diff --git a/source/backend/CarlaStandalone.cpp b/source/backend/CarlaStandalone.cpp
2 | index 44a8cdc72..bcf10e301 100644
3 | --- a/source/backend/CarlaStandalone.cpp
4 | +++ b/source/backend/CarlaStandalone.cpp
5 | @@ -216,7 +216,7 @@ static void carla_engine_init_common(const CarlaHostStandalone& standalone, Carl
6 | engine->setFileCallback(standalone.fileCallback, standalone.fileCallbackPtr);
7 |
8 | using water::File;
9 | - const File waterBinaryDir(File::getSpecialLocation(File::currentExecutableFile).getParentDirectory());
10 | + const File waterBinaryDir("@carla@");
11 |
12 | #ifdef BUILD_BRIDGE
13 | /*
14 | @@ -278,12 +278,12 @@ static void carla_engine_init_common(const CarlaHostStandalone& standalone, Carl
15 | if (const char* const binaryDir = std::getenv("ENGINE_OPTION_PATH_BINARIES"))
16 | engine->setOption(CB::ENGINE_OPTION_PATH_BINARIES, 0, binaryDir);
17 | else
18 | - engine->setOption(CB::ENGINE_OPTION_PATH_BINARIES, 0, waterBinaryDir.getFullPathName().toRawUTF8());
19 | + engine->setOption(CB::ENGINE_OPTION_PATH_BINARIES, 0, "@carla@/lib/carla");
20 |
21 | if (const char* const resourceDir = std::getenv("ENGINE_OPTION_PATH_RESOURCES"))
22 | engine->setOption(CB::ENGINE_OPTION_PATH_RESOURCES, 0, resourceDir);
23 | else
24 | - engine->setOption(CB::ENGINE_OPTION_PATH_RESOURCES, 0, waterBinaryDir.getChildFile("resources").getFullPathName().toRawUTF8());
25 | + engine->setOption(CB::ENGINE_OPTION_PATH_RESOURCES, 0, "@carla@/share/carla/resources");
26 |
27 | if (const char* const preventBadBehaviour = std::getenv("ENGINE_OPTION_PREVENT_BAD_BEHAVIOUR"))
28 | engine->setOption(CB::ENGINE_OPTION_PREVENT_BAD_BEHAVIOUR, (std::strcmp(preventBadBehaviour, "true") == 0) ? 1 : 0, nullptr);
29 | diff --git a/source/backend/engine/CarlaEngineJack.cpp b/source/backend/engine/CarlaEngineJack.cpp
30 | index df4fffbc1..976e81de4 100644
31 | --- a/source/backend/engine/CarlaEngineJack.cpp
32 | +++ b/source/backend/engine/CarlaEngineJack.cpp
33 | @@ -4557,8 +4557,8 @@ int jack_initialize(jack_client_t* const client, const char* const load_init)
34 | #endif
35 |
36 | // FIXME
37 | - engine->setOption(ENGINE_OPTION_PATH_BINARIES, 0, "/usr/lib/carla");
38 | - engine->setOption(ENGINE_OPTION_PATH_RESOURCES, 0, "/usr/share/resources");
39 | + engine->setOption(ENGINE_OPTION_PATH_BINARIES, 0, "@carla@/lib/carla");
40 | + engine->setOption(ENGINE_OPTION_PATH_RESOURCES, 0, "@carla@/share/resources");
41 |
42 | if (engine->initInternal(client))
43 | return 0;
44 | diff --git a/source/jackbridge/Makefile b/source/jackbridge/Makefile
45 | index 69a30ac0e..1499b97b3 100644
46 | --- a/source/jackbridge/Makefile
47 | +++ b/source/jackbridge/Makefile
48 | @@ -36,7 +36,7 @@ WINE_LINK_FLAGS += -lstdc++
49 | ifneq ($(MACOS),true)
50 | WINE_32BIT_FLAGS += -I/usr/include/wine/wine/windows
51 | WINE_32BIT_FLAGS += -I/usr/include/wine-development/windows
52 | -WINE_32BIT_FLAGS += -I/opt/wine-devel/include/wine/windows
53 | +WINE_32BIT_FLAGS += -I@wine@/include/wine/windows
54 | WINE_32BIT_FLAGS += -L/usr/lib32/wine
55 | WINE_32BIT_FLAGS += -L/usr/lib/wine
56 | WINE_32BIT_FLAGS += -L/usr/lib/i386-linux-gnu/wine
57 | @@ -45,13 +45,13 @@ WINE_32BIT_FLAGS += -L/usr/lib/i386-linux-gnu/wine-development/i386-unix
58 | WINE_32BIT_FLAGS += -L/opt/wine-stable/lib
59 | WINE_32BIT_FLAGS += -L/opt/wine-stable/lib/wine
60 | WINE_32BIT_FLAGS += -L/opt/wine-stable/lib/wine/i386-unix
61 | -WINE_32BIT_FLAGS += -L/opt/wine-staging/lib
62 | -WINE_32BIT_FLAGS += -L/opt/wine-staging/lib/wine
63 | -WINE_32BIT_FLAGS += -L/opt/wine-staging/lib/wine/i386-unix
64 | +WINE_32BIT_FLAGS += -L@wine@/lib
65 | +WINE_32BIT_FLAGS += -L@wine@/lib/wine
66 | +WINE_32BIT_FLAGS += -L@wine@/lib/wine/i386-unix
67 |
68 | WINE_64BIT_FLAGS += -I/usr/include/wine/wine/windows
69 | WINE_64BIT_FLAGS += -I/usr/include/wine-development/windows
70 | -WINE_64BIT_FLAGS += -I/opt/wine-devel/include/wine/windows
71 | +WINE_64BIT_FLAGS += -I@wine@/include/wine/windows
72 | WINE_64BIT_FLAGS += -L/usr/lib64/wine
73 | WINE_64BIT_FLAGS += -L/usr/lib/x86_64-linux-gnu/wine
74 | WINE_64BIT_FLAGS += -L/usr/lib/x86_64-linux-gnu/wine-development
75 | @@ -59,9 +59,9 @@ WINE_64BIT_FLAGS += -L/usr/lib/x86_64-linux-gnu/wine-development/x86_64-unix
76 | WINE_64BIT_FLAGS += -L/opt/wine-stable/lib64
77 | WINE_64BIT_FLAGS += -L/opt/wine-stable/lib64/wine
78 | WINE_64BIT_FLAGS += -L/opt/wine-stable/lib64/wine/x86_64-unix
79 | -WINE_64BIT_FLAGS += -L/opt/wine-staging/lib64
80 | -WINE_64BIT_FLAGS += -L/opt/wine-staging/lib64/wine
81 | -WINE_64BIT_FLAGS += -L/opt/wine-staging/lib64/wine/x86_64-unix
82 | +WINE_64BIT_FLAGS += -L@wine@/lib
83 | +WINE_64BIT_FLAGS += -L@wine@/lib/wine
84 | +WINE_64BIT_FLAGS += -L@wine@/lib/wine/x86_64-unix
85 |
86 | WINE_LINK_FLAGS += -lrt
87 | endif
88 | diff --git a/source/modules/dgl/Makefile b/source/modules/dgl/Makefile
89 | index 50eab4b88..207ac5916 100644
90 | --- a/source/modules/dgl/Makefile
91 | +++ b/source/modules/dgl/Makefile
92 | @@ -16,7 +16,7 @@ BUILD_CXX_FLAGS += -Isrc/pugl-upstream/include
93 | ifneq ($(MACOS),true)
94 | WINE_FLAGS = -I/usr/include/wine/wine/windows
95 | WINE_FLAGS += -I/usr/include/wine-development/windows
96 | -WINE_FLAGS += -I/opt/wine-devel/include/wine/windows
97 | +WINE_FLAGS += -I@wine@/include/wine/windows
98 | endif
99 |
100 | # ---------------------------------------------------------------------------------------------------------------------
101 |
--------------------------------------------------------------------------------
/system/config/vmm/kvm.nix:
--------------------------------------------------------------------------------
1 | { pkgs, lib, ... }:
2 | let
3 | gpuIds = lib.concatStringsSep "," [
4 | # RX 9070
5 | "1002:7550"
6 | "1002:ab40"
7 | ];
8 | usbId = "1022:149c";
9 | ids = lib.concatStringsSep "," [
10 | gpuIds
11 | usbId
12 | ];
13 | in
14 | {
15 | # libvirt-related packages
16 | programs.virt-manager.enable = true;
17 | environment.systemPackages = with pkgs; [
18 | looking-glass-client
19 | remmina
20 | spice
21 | spice-gtk
22 | virt-manager
23 | virt-viewer
24 | virtiofsd
25 | ];
26 |
27 | # vfio kernel settings
28 | boot.kernelParams = [
29 | "iommu=pt"
30 | "kvm.ignore_msrs=1"
31 | ];
32 |
33 | boot.extraModprobeConfig = ''
34 | options vfio_pci ids=${ids}
35 | '';
36 |
37 | # libvirtd configurations
38 | virtualisation.libvirtd = {
39 | enable = true;
40 | hooks.qemu =
41 | let
42 | PATH = lib.makeBinPath (
43 | with pkgs;
44 | [
45 | libvirt
46 | kmod
47 | systemd
48 | ]
49 | );
50 |
51 | loadVFIO = pkgs.writeShellScript "start.sh" ''
52 | set -xeuo pipefail
53 | export PATH=${PATH}:$PATH
54 |
55 |
56 | if [[ "$(lsmod | grep amdgpu)" != "" ]]; then
57 | echo "amdgpu is loaded yet" >&2
58 | exit 1
59 | fi
60 |
61 | modprobe vfio_pci
62 | modprobe vfio
63 | modprobe vfio_iommu_type1
64 |
65 | virsh nodedev-detach pci_0000_0d_00_0
66 | virsh nodedev-detach pci_0000_0d_00_1
67 | virsh nodedev-detach pci_0000_0f_00_3
68 |
69 | set +x
70 | '';
71 |
72 | unloadVFIO = pkgs.writeShellScript "stop.sh" ''
73 | set -x
74 |
75 | export PATH=${PATH}:$PATH
76 |
77 | virsh nodedev-reattach pci_0000_0d_00_0
78 | virsh nodedev-reattach pci_0000_0d_00_1
79 | virsh nodedev-reattach pci_0000_0f_00_3
80 |
81 | modprobe -r vfio_pci
82 | modprobe -r vfio_iommu_type1
83 | modprobe -r vfio
84 |
85 | modprobe amdgpu
86 | systemctl start amdgpu-kernel-modules.service
87 |
88 | set +x
89 | '';
90 |
91 | allocHugePage = pkgs.writeShellScript "alloc.sh" ''
92 | set -xeuo pipefail
93 |
94 | export PATH=${pkgs.gawk}/bin:$PATH
95 |
96 | MEMORY=65536
97 | HUGEPAGES="$(($MEMORY / $(( $(grep Hugepagesize /proc/meminfo | awk '{print $2}') / 1024))))"
98 |
99 | echo $HUGEPAGES > /proc/sys/vm/nr_hugepages
100 | ALLOC_PAGES=$(cat /proc/sys/vm/nr_hugepages)
101 |
102 | TRIES=0
103 | while (( $ALLOC_PAGES != $HUGEPAGES && $TRIES < 100 )) ; do
104 | echo 1 > /proc/sys/vm/compact_memory
105 |
106 | echo $HUGEPAGES > /proc/sys/vm/nr_hugepages
107 | ALLOC_PAGES=$(cat /proc/sys/vm/nr_hugepages)
108 |
109 | let TRIES+=1
110 | done
111 |
112 | if test "$ALLOC_PAGES" -ne "$HUGEPAGES"; then
113 | echo 0 >/proc/sys/vm/nr_hugepages
114 | exit 1
115 | fi
116 |
117 | set +x
118 | exit 0
119 | '';
120 |
121 | deallocHugePage = pkgs.writeShellScript "dealloc.sh" ''
122 | echo 0 >/proc/sys/vm/nr_hugepages
123 | '';
124 |
125 | qemuHooks = pkgs.runCommand "qemu-hooks" { } ''
126 | mkdir -p $out/prepare/begin
127 | mkdir -p $out/release/end
128 |
129 | cp ${loadVFIO} $out/prepare/begin/00_load_vfio.sh
130 | cp ${unloadVFIO} $out/release/end/00_unload_vfio.sh
131 |
132 | cp ${allocHugePage} $out/prepare/begin/01_alloc_hugepage.sh
133 | cp ${deallocHugePage} $out/release/end/01_dealloc_hugepage.sh
134 | '';
135 | in
136 | {
137 | DAW = toString qemuHooks;
138 | VR = toString qemuHooks;
139 | };
140 |
141 | qemu = {
142 | package = pkgs.qemu_kvm;
143 | runAsRoot = true;
144 | swtpm.enable = true;
145 |
146 | verbatimConfig = ''
147 | user = "root"
148 | group = "libvirtd"
149 |
150 | cgroup_device_acl = [
151 | "/dev/null",
152 | "/dev/full",
153 | "/dev/zero",
154 | "/dev/random",
155 | "/dev/urandom",
156 | "/dev/ptmx",
157 | "/dev/kvm",
158 | "/dev/dri/card1",
159 | "/dev/dri/renderD128"
160 | ]
161 | '';
162 | };
163 | extraConfig = ''
164 | unix_sock_group = "libvirtd"
165 | unix_sock_ro_perms = "0770"
166 | unix_sock_rw_perms = "0770"
167 | auth_unix_ro = "none"
168 | auth_unix_rw = "none"
169 | clear_emulator_capabilities = 0
170 | '';
171 |
172 | onBoot = "ignore";
173 | onShutdown = "shutdown";
174 | };
175 |
176 | systemd.tmpfiles.rules =
177 | let
178 | qemuScript =
179 | let
180 | script = pkgs.fetchurl {
181 | url = "https://raw.githubusercontent.com/PassthroughPOST/VFIO-Tools/0410193a205c5f150b8dfb411e83f8c42c511a2e/libvirt_hooks/qemu";
182 | sha256 = "0fphif8r5llflaq5fc7bxswb4xjmjppycnqkjnw8l76ak8yrv2hc";
183 | };
184 | in
185 | pkgs.writeShellScript "qemu-hook.sh" ''
186 | ${builtins.readFile (toString script)}
187 | '';
188 | in
189 | [
190 | "L+ /var/lib/libvirt/hooks/qemu - - - - ${qemuScript}"
191 | "f /dev/shm/looking-glass 0660 nyarla kvm -"
192 | ];
193 | }
194 |
--------------------------------------------------------------------------------
/system/config/services/nyzen9.nix:
--------------------------------------------------------------------------------
1 | {
2 | pkgs,
3 | config,
4 | lib,
5 | ...
6 | }:
7 | {
8 | # Librechat by podman compose
9 | systemd.user.services.librechat = {
10 | enable = true;
11 | serviceConfig = {
12 | Type = "forking";
13 | RemainAfterExit = "yes";
14 | WorkingDirectory = "/home/nyarla/Applications/AI/Librechat";
15 | ExecStart = toString (
16 | pkgs.writeShellScript "librechat-start" ''
17 | export PATH=${
18 | lib.makeBinPath [
19 | config.virtualisation.podman.package
20 | pkgs.podman-compose
21 | ]
22 | }:/run/wrappers/bin:$PATH
23 | export XDG_RUNTIME_DIR=/run/user/$(id -u)
24 |
25 | env DBUS_SESSION_BUS_ADDRESS= podman compose up -d
26 | ''
27 | );
28 |
29 | ExecStop = toString (
30 | pkgs.writeShellScript "librechat-stop" ''
31 | export PATH=${
32 | lib.makeBinPath [
33 | config.virtualisation.podman.package
34 | pkgs.podman-compose
35 | ]
36 | }:/run/wrappers/bin:$PATH
37 | export XDG_RUNTIME_DIR=/run/user/$(id -u)
38 |
39 | env DBUS_SESSION_BUS_ADDRESS= podman compose down
40 | ''
41 | );
42 | };
43 | };
44 |
45 | services.ollama = {
46 | enable = true;
47 | user = "ollama";
48 | group = "ollama";
49 | host = "0.0.0.0";
50 | openFirewall = true;
51 | };
52 |
53 | # for FreshRSS
54 | services.flaresolverr.enable = true;
55 |
56 | # calibre
57 | systemd.services.calibre-web.after = [ "automount-encrypted-usb-device.service" ];
58 | systemd.services.calibre-web.environment.CACHE_DIR = lib.mkForce "/home/nyarla/.cache/calibre-web";
59 | services.calibre-web = {
60 | enable = true;
61 | user = "nyarla";
62 | group = "users";
63 | listen = {
64 | ip = "127.0.0.1";
65 | port = 40001;
66 | };
67 | options = {
68 | calibreLibrary = "/persist/data/14887bd8-3e3c-4675-9e81-9027a050cdf7/Calibre";
69 | };
70 | };
71 |
72 | # FreshRSS on local machine
73 | services.freshrss = {
74 | enable = true;
75 | baseUrl = "https://freshrss.p.localhost.thotep.net";
76 | virtualHost = "freshrss.p.localhost.thotep.net";
77 |
78 | defaultUser = "nyarla";
79 | passwordFile = "/var/lib/freshrss/password";
80 |
81 | language = "ja";
82 | webserver = "caddy";
83 | };
84 |
85 | # httpd
86 | security.acme = {
87 | acceptTerms = true;
88 | defaults = {
89 | enableDebugLogs = false;
90 | email = "nyarla@kalaclista.com";
91 | dnsProvider = "cloudflare";
92 | dnsResolver = "1.1.1.1:53";
93 | environmentFile = "/persist/var/lib/acme/cloudflare";
94 | };
95 |
96 | certs."localhost.thotep.net" = {
97 | extraDomainNames = [
98 | "*.localhost.thotep.net"
99 | "*.p.localhost.thotep.net"
100 | "*.f.localhost.thotep.net"
101 | ];
102 | };
103 | };
104 |
105 | systemd.services.caddy.serviceConfig.ExecStartPre = toString (
106 | pkgs.writeShellScript "wait.sh" ''
107 | while [[ -z "$(${pkgs.tailscale}/bin/tailscale ip | head -n1)" ]]; do
108 | sleep 1
109 | done
110 | ''
111 | );
112 | services.caddy = {
113 | enable = true;
114 | virtualHosts =
115 | let
116 | devhost = domain: {
117 | "${domain}" = {
118 | listenAddresses = [ "100.103.65.77" ];
119 | useACMEHost = "localhost.thotep.net";
120 | logFormat = ''
121 | output stdout
122 | '';
123 | extraConfig = ''
124 | reverse_proxy 127.0.0.1:21515
125 | '';
126 | };
127 | };
128 |
129 | devhosts = domains: lib.attrsets.mergeAttrsList (lib.lists.forEach domains devhost);
130 | in
131 | {
132 | # for private web services
133 | "calibre.p.localhost.thotep.net" = {
134 | listenAddresses = [ "100.103.65.77" ];
135 | useACMEHost = "localhost.thotep.net";
136 | logFormat = ''
137 | output stdout
138 | '';
139 | extraConfig = ''
140 | reverse_proxy 127.0.0.1:8085
141 | '';
142 | };
143 | "ebooks.p.localhost.thotep.net" = {
144 | listenAddresses = [ "100.103.65.77" ];
145 | useACMEHost = "localhost.thotep.net";
146 | logFormat = ''
147 | output stdout
148 | '';
149 | extraConfig = ''
150 | reverse_proxy 127.0.0.1:40001
151 | '';
152 | };
153 | "librechat.p.localhost.thotep.net" = {
154 | listenAddresses = [ "100.103.65.77" ];
155 | useACMEHost = "localhost.thotep.net";
156 | logFormat = ''
157 | output stdout
158 | '';
159 | extraConfig = ''
160 | reverse_proxy 127.0.0.1:40010
161 | '';
162 | };
163 | "contents.p.localhost.thotep.net" = {
164 | listenAddresses = [ "100.103.65.77" ];
165 | useACMEHost = "localhost.thotep.net";
166 | logFormat = ''
167 | output stdout
168 | '';
169 | extraConfig = ''
170 | reverse_proxy 127.0.0.1:40020
171 | '';
172 | };
173 |
174 | "freshrss.p.localhost.thotep.net" = {
175 | listenAddresses = [ "100.103.65.77" ];
176 | useACMEHost = "localhost.thotep.net";
177 | logFormat = ''
178 | output stdout
179 | '';
180 | };
181 | }
182 | // devhosts [
183 | "gts.f.localhost.thotep.net"
184 | "misskey.f.localhost.thotep.net"
185 | "mstdn.f.localhost.thotep.net"
186 | ];
187 | };
188 | }
189 |
--------------------------------------------------------------------------------
/lib/theme.nix:
--------------------------------------------------------------------------------
1 | # THIS FILE IS AUTO GENERATED. DO NOT EDIT!
2 | {
3 | "gray00" = "#000000";
4 | "gray05" = "#111111";
5 | "gray10" = "#1b1b1b";
6 | "gray15" = "#262626";
7 | "gray20" = "#303030";
8 | "gray25" = "#3b3b3b";
9 | "gray30" = "#474747";
10 | "gray35" = "#525252";
11 | "gray40" = "#5e5e5e";
12 | "gray45" = "#6a6a6a";
13 | "gray50" = "#777777";
14 | "gray55" = "#848484";
15 | "gray60" = "#919191";
16 | "gray65" = "#9e9e9e";
17 | "gray70" = "#ababab";
18 | "gray75" = "#b9b9b9";
19 | "gray80" = "#c6c6c6";
20 | "gray85" = "#d4d4d4";
21 | "gray90" = "#e2e2e2";
22 | "gray95" = "#f1f1f1";
23 | "gray100" = "#ffffff";
24 | "red05" = "#480000";
25 | "red10" = "#550000";
26 | "red15" = "#620000";
27 | "red20" = "#700000";
28 | "red25" = "#7e000e";
29 | "red30" = "#8d0b19";
30 | "red35" = "#9c1f23";
31 | "red40" = "#ab2f2e";
32 | "red45" = "#ba3d39";
33 | "red50" = "#c94b44";
34 | "red55" = "#d85950";
35 | "red60" = "#e8665b";
36 | "red65" = "#f77468";
37 | "red70" = "#ff8274";
38 | "red75" = "#ff8f81";
39 | "red80" = "#ff9d8e";
40 | "red85" = "#ffab9b";
41 | "red90" = "#ffb9a8";
42 | "red95" = "#ffc8b6";
43 | "orange05" = "#410000";
44 | "orange10" = "#4c0000";
45 | "orange15" = "#580000";
46 | "orange20" = "#650800";
47 | "orange25" = "#721900";
48 | "orange30" = "#802600";
49 | "orange35" = "#8f3302";
50 | "orange40" = "#9e400f";
51 | "orange45" = "#ac4c1c";
52 | "orange50" = "#bb5928";
53 | "orange55" = "#ca6634";
54 | "orange60" = "#da7340";
55 | "orange65" = "#e9804c";
56 | "orange70" = "#f88d58";
57 | "orange75" = "#ff9b65";
58 | "orange80" = "#ffa972";
59 | "orange85" = "#ffb67f";
60 | "orange90" = "#ffc48c";
61 | "orange95" = "#ffd399";
62 | "yellow05" = "#300600";
63 | "yellow10" = "#371300";
64 | "yellow15" = "#401e00";
65 | "yellow20" = "#4b2900";
66 | "yellow25" = "#563400";
67 | "yellow30" = "#623f00";
68 | "yellow35" = "#6f4b00";
69 | "yellow40" = "#7d5600";
70 | "yellow45" = "#8b6200";
71 | "yellow50" = "#996f00";
72 | "yellow55" = "#a77b08";
73 | "yellow60" = "#b6881c";
74 | "yellow65" = "#c4952b";
75 | "yellow70" = "#d3a239";
76 | "yellow75" = "#e2b047";
77 | "yellow80" = "#f1bd54";
78 | "yellow85" = "#ffcb61";
79 | "yellow90" = "#ffd96e";
80 | "yellow95" = "#ffe77c";
81 | "rime05" = "#181600";
82 | "rime10" = "#201f00";
83 | "rime15" = "#242a00";
84 | "rime20" = "#2b3500";
85 | "rime25" = "#344100";
86 | "rime30" = "#3f4c00";
87 | "rime35" = "#4b5800";
88 | "rime40" = "#576400";
89 | "rime45" = "#647100";
90 | "rime50" = "#727d00";
91 | "rime55" = "#7f8a00";
92 | "rime60" = "#8d9717";
93 | "rime65" = "#9aa428";
94 | "rime70" = "#a8b237";
95 | "rime75" = "#b6bf45";
96 | "rime80" = "#c4cd52";
97 | "rime85" = "#d3db60";
98 | "rime90" = "#e1e96d";
99 | "rime95" = "#f0f87b";
100 | "green05" = "#001d00";
101 | "green10" = "#002500";
102 | "green15" = "#032f00";
103 | "green20" = "#033a00";
104 | "green25" = "#0c4600";
105 | "green30" = "#195200";
106 | "green35" = "#275e00";
107 | "green40" = "#346b00";
108 | "green45" = "#427800";
109 | "green50" = "#4f840b";
110 | "green55" = "#5c921d";
111 | "green60" = "#699f2c";
112 | "green65" = "#77ac3a";
113 | "green70" = "#84ba47";
114 | "green75" = "#92c854";
115 | "green80" = "#a0d661";
116 | "green85" = "#aee46f";
117 | "green90" = "#bcf27c";
118 | "green95" = "#caff8a";
119 | "cyan05" = "#002715";
120 | "cyan10" = "#002d1f";
121 | "cyan15" = "#00352a";
122 | "cyan20" = "#004035";
123 | "cyan25" = "#004d40";
124 | "cyan30" = "#005a4b";
125 | "cyan35" = "#006757";
126 | "cyan40" = "#007463";
127 | "cyan45" = "#00816f";
128 | "cyan50" = "#008f7b";
129 | "cyan55" = "#009c88";
130 | "cyan60" = "#00aa95";
131 | "cyan65" = "#00b8a2";
132 | "cyan70" = "#00c6b0";
133 | "cyan75" = "#00d5bd";
134 | "cyan80" = "#00e3cb";
135 | "cyan85" = "#00f2d9";
136 | "cyan90" = "#00ffe7";
137 | "cyan95" = "#00fff5";
138 | "sky05" = "#002540";
139 | "sky10" = "#002b4c";
140 | "sky15" = "#003558";
141 | "sky20" = "#004064";
142 | "sky25" = "#004c70";
143 | "sky30" = "#00597d";
144 | "sky35" = "#00658a";
145 | "sky40" = "#007297";
146 | "sky45" = "#007fa4";
147 | "sky50" = "#008db2";
148 | "sky55" = "#008db2";
149 | "sky60" = "#00a8ce";
150 | "sky65" = "#00b6dc";
151 | "sky70" = "#00c4ea";
152 | "sky75" = "#00d2f8";
153 | "sky80" = "#00e0ff";
154 | "sky85" = "#00efff";
155 | "sky90" = "#00fdff";
156 | "sky95" = "#00ffff";
157 | "blue05" = "#001564";
158 | "blue10" = "#001f71";
159 | "blue15" = "#00297e";
160 | "blue20" = "#00338b";
161 | "blue25" = "#003e98";
162 | "blue30" = "#0049a6";
163 | "blue35" = "#0054b4";
164 | "blue40" = "#0060c2";
165 | "blue45" = "#006cd0";
166 | "blue50" = "#2279de";
167 | "blue55" = "#3985ec";
168 | "blue60" = "#4c92fb";
169 | "blue65" = "#5d9fff";
170 | "blue70" = "#6dadff";
171 | "blue75" = "#7dbaff";
172 | "blue80" = "#8cc8ff";
173 | "blue85" = "#9cd6ff";
174 | "blue90" = "#abe4ff";
175 | "blue95" = "#baf2ff";
176 | "purple05" = "#080057";
177 | "purple10" = "#1a0663";
178 | "purple15" = "#291270";
179 | "purple20" = "#371d7d";
180 | "purple25" = "#44298a";
181 | "purple30" = "#523497";
182 | "purple35" = "#5f40a5";
183 | "purple40" = "#6c4cb3";
184 | "purple45" = "#7a58c0";
185 | "purple50" = "#8864ce";
186 | "purple55" = "#9571dd";
187 | "purple60" = "#a37eeb";
188 | "purple65" = "#b18bfa";
189 | "purple70" = "#bf98ff";
190 | "purple75" = "#cea6ff";
191 | "purple80" = "#dcb3ff";
192 | "purple85" = "#ebc1ff";
193 | "purple90" = "#f9cfff";
194 | "purple95" = "#ffddff";
195 | "magenta05" = "#430030";
196 | "magenta10" = "#50003b";
197 | "magenta15" = "#5e0046";
198 | "magenta20" = "#6b0052";
199 | "magenta25" = "#79005e";
200 | "magenta30" = "#87006b";
201 | "magenta35" = "#951877";
202 | "magenta40" = "#a32a84";
203 | "magenta45" = "#b23991";
204 | "magenta50" = "#c0489e";
205 | "magenta55" = "#cf56ac";
206 | "magenta60" = "#dd63b9";
207 | "magenta65" = "#ec71c7";
208 | "magenta70" = "#fb7fd5";
209 | "magenta75" = "#ff8de3";
210 | "magenta80" = "#ff9bf2";
211 | "magenta85" = "#ffa9ff";
212 | "magenta90" = "#ffb7ff";
213 | "magenta95" = "#ffc5ff";
214 | }
215 |
--------------------------------------------------------------------------------
/patches/tmux-3.6-utf8.patch:
--------------------------------------------------------------------------------
1 | diff --git a/utf8.c b/utf8.c
2 | index 95b7ceb3..aeff1d97 100644
3 | --- a/utf8.c
4 | +++ b/utf8.c
5 | @@ -50,170 +50,7 @@ RB_GENERATE_STATIC(utf8_width_cache, utf8_width_item, entry,
6 | static struct utf8_width_cache utf8_width_cache =
7 | RB_INITIALIZER(utf8_width_cache);
8 |
9 | -static struct utf8_width_item utf8_default_width_cache[] = {
10 | - { .wc = 0x0261D, .width = 2 },
11 | - { .wc = 0x026F9, .width = 2 },
12 | - { .wc = 0x0270A, .width = 2 },
13 | - { .wc = 0x0270B, .width = 2 },
14 | - { .wc = 0x0270C, .width = 2 },
15 | - { .wc = 0x0270D, .width = 2 },
16 | - { .wc = 0x1F1E6, .width = 1 },
17 | - { .wc = 0x1F1E7, .width = 1 },
18 | - { .wc = 0x1F1E8, .width = 1 },
19 | - { .wc = 0x1F1E9, .width = 1 },
20 | - { .wc = 0x1F1EA, .width = 1 },
21 | - { .wc = 0x1F1EB, .width = 1 },
22 | - { .wc = 0x1F1EC, .width = 1 },
23 | - { .wc = 0x1F1ED, .width = 1 },
24 | - { .wc = 0x1F1EE, .width = 1 },
25 | - { .wc = 0x1F1EF, .width = 1 },
26 | - { .wc = 0x1F1F0, .width = 1 },
27 | - { .wc = 0x1F1F1, .width = 1 },
28 | - { .wc = 0x1F1F2, .width = 1 },
29 | - { .wc = 0x1F1F3, .width = 1 },
30 | - { .wc = 0x1F1F4, .width = 1 },
31 | - { .wc = 0x1F1F5, .width = 1 },
32 | - { .wc = 0x1F1F6, .width = 1 },
33 | - { .wc = 0x1F1F7, .width = 1 },
34 | - { .wc = 0x1F1F8, .width = 1 },
35 | - { .wc = 0x1F1F9, .width = 1 },
36 | - { .wc = 0x1F1FA, .width = 1 },
37 | - { .wc = 0x1F1FB, .width = 1 },
38 | - { .wc = 0x1F1FC, .width = 1 },
39 | - { .wc = 0x1F1FD, .width = 1 },
40 | - { .wc = 0x1F1FE, .width = 1 },
41 | - { .wc = 0x1F1FF, .width = 1 },
42 | - { .wc = 0x1F385, .width = 2 },
43 | - { .wc = 0x1F3C2, .width = 2 },
44 | - { .wc = 0x1F3C3, .width = 2 },
45 | - { .wc = 0x1F3C4, .width = 2 },
46 | - { .wc = 0x1F3C7, .width = 2 },
47 | - { .wc = 0x1F3CA, .width = 2 },
48 | - { .wc = 0x1F3CB, .width = 2 },
49 | - { .wc = 0x1F3CC, .width = 2 },
50 | - { .wc = 0x1F3FB, .width = 2 },
51 | - { .wc = 0x1F3FC, .width = 2 },
52 | - { .wc = 0x1F3FD, .width = 2 },
53 | - { .wc = 0x1F3FE, .width = 2 },
54 | - { .wc = 0x1F3FF, .width = 2 },
55 | - { .wc = 0x1F442, .width = 2 },
56 | - { .wc = 0x1F443, .width = 2 },
57 | - { .wc = 0x1F446, .width = 2 },
58 | - { .wc = 0x1F447, .width = 2 },
59 | - { .wc = 0x1F448, .width = 2 },
60 | - { .wc = 0x1F449, .width = 2 },
61 | - { .wc = 0x1F44A, .width = 2 },
62 | - { .wc = 0x1F44B, .width = 2 },
63 | - { .wc = 0x1F44C, .width = 2 },
64 | - { .wc = 0x1F44D, .width = 2 },
65 | - { .wc = 0x1F44E, .width = 2 },
66 | - { .wc = 0x1F44F, .width = 2 },
67 | - { .wc = 0x1F450, .width = 2 },
68 | - { .wc = 0x1F466, .width = 2 },
69 | - { .wc = 0x1F467, .width = 2 },
70 | - { .wc = 0x1F468, .width = 2 },
71 | - { .wc = 0x1F469, .width = 2 },
72 | - { .wc = 0x1F46B, .width = 2 },
73 | - { .wc = 0x1F46C, .width = 2 },
74 | - { .wc = 0x1F46D, .width = 2 },
75 | - { .wc = 0x1F46E, .width = 2 },
76 | - { .wc = 0x1F470, .width = 2 },
77 | - { .wc = 0x1F471, .width = 2 },
78 | - { .wc = 0x1F472, .width = 2 },
79 | - { .wc = 0x1F473, .width = 2 },
80 | - { .wc = 0x1F474, .width = 2 },
81 | - { .wc = 0x1F475, .width = 2 },
82 | - { .wc = 0x1F476, .width = 2 },
83 | - { .wc = 0x1F477, .width = 2 },
84 | - { .wc = 0x1F478, .width = 2 },
85 | - { .wc = 0x1F47C, .width = 2 },
86 | - { .wc = 0x1F481, .width = 2 },
87 | - { .wc = 0x1F482, .width = 2 },
88 | - { .wc = 0x1F483, .width = 2 },
89 | - { .wc = 0x1F485, .width = 2 },
90 | - { .wc = 0x1F486, .width = 2 },
91 | - { .wc = 0x1F487, .width = 2 },
92 | - { .wc = 0x1F48F, .width = 2 },
93 | - { .wc = 0x1F491, .width = 2 },
94 | - { .wc = 0x1F4AA, .width = 2 },
95 | - { .wc = 0x1F574, .width = 2 },
96 | - { .wc = 0x1F575, .width = 2 },
97 | - { .wc = 0x1F57A, .width = 2 },
98 | - { .wc = 0x1F590, .width = 2 },
99 | - { .wc = 0x1F595, .width = 2 },
100 | - { .wc = 0x1F596, .width = 2 },
101 | - { .wc = 0x1F645, .width = 2 },
102 | - { .wc = 0x1F646, .width = 2 },
103 | - { .wc = 0x1F647, .width = 2 },
104 | - { .wc = 0x1F64B, .width = 2 },
105 | - { .wc = 0x1F64C, .width = 2 },
106 | - { .wc = 0x1F64D, .width = 2 },
107 | - { .wc = 0x1F64E, .width = 2 },
108 | - { .wc = 0x1F64F, .width = 2 },
109 | - { .wc = 0x1F6A3, .width = 2 },
110 | - { .wc = 0x1F6B4, .width = 2 },
111 | - { .wc = 0x1F6B5, .width = 2 },
112 | - { .wc = 0x1F6B6, .width = 2 },
113 | - { .wc = 0x1F6C0, .width = 2 },
114 | - { .wc = 0x1F6CC, .width = 2 },
115 | - { .wc = 0x1F90C, .width = 2 },
116 | - { .wc = 0x1F90F, .width = 2 },
117 | - { .wc = 0x1F918, .width = 2 },
118 | - { .wc = 0x1F919, .width = 2 },
119 | - { .wc = 0x1F91A, .width = 2 },
120 | - { .wc = 0x1F91B, .width = 2 },
121 | - { .wc = 0x1F91C, .width = 2 },
122 | - { .wc = 0x1F91D, .width = 2 },
123 | - { .wc = 0x1F91E, .width = 2 },
124 | - { .wc = 0x1F91F, .width = 2 },
125 | - { .wc = 0x1F926, .width = 2 },
126 | - { .wc = 0x1F930, .width = 2 },
127 | - { .wc = 0x1F931, .width = 2 },
128 | - { .wc = 0x1F932, .width = 2 },
129 | - { .wc = 0x1F933, .width = 2 },
130 | - { .wc = 0x1F934, .width = 2 },
131 | - { .wc = 0x1F935, .width = 2 },
132 | - { .wc = 0x1F936, .width = 2 },
133 | - { .wc = 0x1F937, .width = 2 },
134 | - { .wc = 0x1F938, .width = 2 },
135 | - { .wc = 0x1F939, .width = 2 },
136 | - { .wc = 0x1F93D, .width = 2 },
137 | - { .wc = 0x1F93E, .width = 2 },
138 | - { .wc = 0x1F977, .width = 2 },
139 | - { .wc = 0x1F9B5, .width = 2 },
140 | - { .wc = 0x1F9B6, .width = 2 },
141 | - { .wc = 0x1F9B8, .width = 2 },
142 | - { .wc = 0x1F9B9, .width = 2 },
143 | - { .wc = 0x1F9BB, .width = 2 },
144 | - { .wc = 0x1F9CD, .width = 2 },
145 | - { .wc = 0x1F9CE, .width = 2 },
146 | - { .wc = 0x1F9CF, .width = 2 },
147 | - { .wc = 0x1F9D1, .width = 2 },
148 | - { .wc = 0x1F9D2, .width = 2 },
149 | - { .wc = 0x1F9D3, .width = 2 },
150 | - { .wc = 0x1F9D4, .width = 2 },
151 | - { .wc = 0x1F9D5, .width = 2 },
152 | - { .wc = 0x1F9D6, .width = 2 },
153 | - { .wc = 0x1F9D7, .width = 2 },
154 | - { .wc = 0x1F9D8, .width = 2 },
155 | - { .wc = 0x1F9D9, .width = 2 },
156 | - { .wc = 0x1F9DA, .width = 2 },
157 | - { .wc = 0x1F9DB, .width = 2 },
158 | - { .wc = 0x1F9DC, .width = 2 },
159 | - { .wc = 0x1F9DD, .width = 2 },
160 | - { .wc = 0x1FAC3, .width = 2 },
161 | - { .wc = 0x1FAC4, .width = 2 },
162 | - { .wc = 0x1FAC5, .width = 2 },
163 | - { .wc = 0x1FAF0, .width = 2 },
164 | - { .wc = 0x1FAF1, .width = 2 },
165 | - { .wc = 0x1FAF2, .width = 2 },
166 | - { .wc = 0x1FAF3, .width = 2 },
167 | - { .wc = 0x1FAF4, .width = 2 },
168 | - { .wc = 0x1FAF5, .width = 2 },
169 | - { .wc = 0x1FAF6, .width = 2 },
170 | - { .wc = 0x1FAF7, .width = 2 },
171 | - { .wc = 0x1FAF8, .width = 2 }
172 | -};
173 | +#include "utf8_default_width_cache.h"
174 |
175 | struct utf8_item {
176 | RB_ENTRY(utf8_item) index_entry;
177 |
--------------------------------------------------------------------------------
/pkgs/ildaeil/nixos.patch:
--------------------------------------------------------------------------------
1 | diff --git a/plugins/Common/IldaeilPlugin.cpp b/plugins/Common/IldaeilPlugin.cpp
2 | index e10861c..3aa6a13 100644
3 | --- a/plugins/Common/IldaeilPlugin.cpp
4 | +++ b/plugins/Common/IldaeilPlugin.cpp
5 | @@ -424,9 +424,9 @@ public:
6 | carla_set_engine_option(fCarlaHostHandle, ENGINE_OPTION_PATH_BINARIES, 0, "/Applications/Carla.app/Contents/MacOS");
7 | carla_set_engine_option(fCarlaHostHandle, ENGINE_OPTION_PATH_RESOURCES, 0, "/Applications/Carla.app/Contents/MacOS/resources");
8 | #else
9 | - fBinaryPath = "/usr/lib/carla";
10 | - carla_set_engine_option(fCarlaHostHandle, ENGINE_OPTION_PATH_BINARIES, 0, "/usr/lib/carla");
11 | - carla_set_engine_option(fCarlaHostHandle, ENGINE_OPTION_PATH_RESOURCES, 0, "/usr/share/carla/resources");
12 | + fBinaryPath = "@carla@/lib/carla";
13 | + carla_set_engine_option(fCarlaHostHandle, ENGINE_OPTION_PATH_BINARIES, 0, "@carla@/lib/carla");
14 | + carla_set_engine_option(fCarlaHostHandle, ENGINE_OPTION_PATH_RESOURCES, 0, "@carla@/share/carla/resources");
15 | #endif
16 | }
17 |
18 | diff --git a/carla/source/backend/CarlaStandalone.cpp b/carla/source/backend/CarlaStandalone.cpp
19 | index 44a8cdc72..bcf10e301 100644
20 | --- a/carla/source/backend/CarlaStandalone.cpp
21 | +++ b/carla/source/backend/CarlaStandalone.cpp
22 | @@ -216,7 +216,7 @@ static void carla_engine_init_common(const CarlaHostStandalone& standalone, Carl
23 | engine->setFileCallback(standalone.fileCallback, standalone.fileCallbackPtr);
24 |
25 | using water::File;
26 | - const File waterBinaryDir(File::getSpecialLocation(File::currentExecutableFile).getParentDirectory());
27 | + const File waterBinaryDir("@carla@");
28 |
29 | #ifdef BUILD_BRIDGE
30 | /*
31 | @@ -278,12 +278,12 @@ static void carla_engine_init_common(const CarlaHostStandalone& standalone, Carl
32 | if (const char* const binaryDir = std::getenv("ENGINE_OPTION_PATH_BINARIES"))
33 | engine->setOption(CB::ENGINE_OPTION_PATH_BINARIES, 0, binaryDir);
34 | else
35 | - engine->setOption(CB::ENGINE_OPTION_PATH_BINARIES, 0, waterBinaryDir.getFullPathName().toRawUTF8());
36 | + engine->setOption(CB::ENGINE_OPTION_PATH_BINARIES, 0, "@carla@/lib/carla");
37 |
38 | if (const char* const resourceDir = std::getenv("ENGINE_OPTION_PATH_RESOURCES"))
39 | engine->setOption(CB::ENGINE_OPTION_PATH_RESOURCES, 0, resourceDir);
40 | else
41 | - engine->setOption(CB::ENGINE_OPTION_PATH_RESOURCES, 0, waterBinaryDir.getChildFile("resources").getFullPathName().toRawUTF8());
42 | + engine->setOption(CB::ENGINE_OPTION_PATH_RESOURCES, 0, "@carla@/share/carla/resources");
43 |
44 | if (const char* const preventBadBehaviour = std::getenv("ENGINE_OPTION_PREVENT_BAD_BEHAVIOUR"))
45 | engine->setOption(CB::ENGINE_OPTION_PREVENT_BAD_BEHAVIOUR, (std::strcmp(preventBadBehaviour, "true") == 0) ? 1 : 0, nullptr);
46 | diff --git a/carla/source/backend/engine/CarlaEngineJack.cpp b/carla/source/backend/engine/CarlaEngineJack.cpp
47 | index df4fffbc1..976e81de4 100644
48 | --- a/carla/source/backend/engine/CarlaEngineJack.cpp
49 | +++ b/carla/source/backend/engine/CarlaEngineJack.cpp
50 | @@ -4557,8 +4557,8 @@ int jack_initialize(jack_client_t* const client, const char* const load_init)
51 | #endif
52 |
53 | // FIXME
54 | - engine->setOption(ENGINE_OPTION_PATH_BINARIES, 0, "/usr/lib/carla");
55 | - engine->setOption(ENGINE_OPTION_PATH_RESOURCES, 0, "/usr/share/resources");
56 | + engine->setOption(ENGINE_OPTION_PATH_BINARIES, 0, "@carla@/lib/carla");
57 | + engine->setOption(ENGINE_OPTION_PATH_RESOURCES, 0, "@carla@/share/resources");
58 |
59 | if (engine->initInternal(client))
60 | return 0;
61 | diff --git a/carla/source/jackbridge/Makefile b/carla/source/jackbridge/Makefile
62 | index 69a30ac0e..1499b97b3 100644
63 | --- a/carla/source/jackbridge/Makefile
64 | +++ b/carla/source/jackbridge/Makefile
65 | @@ -36,7 +36,7 @@ WINE_LINK_FLAGS += -lstdc++
66 | ifneq ($(MACOS),true)
67 | WINE_32BIT_FLAGS += -I/usr/include/wine/wine/windows
68 | WINE_32BIT_FLAGS += -I/usr/include/wine-development/windows
69 | -WINE_32BIT_FLAGS += -I/opt/wine-devel/include/wine/windows
70 | +WINE_32BIT_FLAGS += -I@wine@/include/wine/windows
71 | WINE_32BIT_FLAGS += -L/usr/lib32/wine
72 | WINE_32BIT_FLAGS += -L/usr/lib/wine
73 | WINE_32BIT_FLAGS += -L/usr/lib/i386-linux-gnu/wine
74 | @@ -45,13 +45,13 @@ WINE_32BIT_FLAGS += -L/usr/lib/i386-linux-gnu/wine-development/i386-unix
75 | WINE_32BIT_FLAGS += -L/opt/wine-stable/lib
76 | WINE_32BIT_FLAGS += -L/opt/wine-stable/lib/wine
77 | WINE_32BIT_FLAGS += -L/opt/wine-stable/lib/wine/i386-unix
78 | -WINE_32BIT_FLAGS += -L/opt/wine-staging/lib
79 | -WINE_32BIT_FLAGS += -L/opt/wine-staging/lib/wine
80 | -WINE_32BIT_FLAGS += -L/opt/wine-staging/lib/wine/i386-unix
81 | +WINE_32BIT_FLAGS += -L@wine@/lib
82 | +WINE_32BIT_FLAGS += -L@wine@/lib/wine
83 | +WINE_32BIT_FLAGS += -L@wine@/lib/wine/i386-unix
84 |
85 | WINE_64BIT_FLAGS += -I/usr/include/wine/wine/windows
86 | WINE_64BIT_FLAGS += -I/usr/include/wine-development/windows
87 | -WINE_64BIT_FLAGS += -I/opt/wine-devel/include/wine/windows
88 | +WINE_64BIT_FLAGS += -I@wine@/include/wine/windows
89 | WINE_64BIT_FLAGS += -L/usr/lib64/wine
90 | WINE_64BIT_FLAGS += -L/usr/lib/x86_64-linux-gnu/wine
91 | WINE_64BIT_FLAGS += -L/usr/lib/x86_64-linux-gnu/wine-development
92 | @@ -59,9 +59,9 @@ WINE_64BIT_FLAGS += -L/usr/lib/x86_64-linux-gnu/wine-development/x86_64-unix
93 | WINE_64BIT_FLAGS += -L/opt/wine-stable/lib64
94 | WINE_64BIT_FLAGS += -L/opt/wine-stable/lib64/wine
95 | WINE_64BIT_FLAGS += -L/opt/wine-stable/lib64/wine/x86_64-unix
96 | -WINE_64BIT_FLAGS += -L/opt/wine-staging/lib64
97 | -WINE_64BIT_FLAGS += -L/opt/wine-staging/lib64/wine
98 | -WINE_64BIT_FLAGS += -L/opt/wine-staging/lib64/wine/x86_64-unix
99 | +WINE_64BIT_FLAGS += -L@wine@/lib
100 | +WINE_64BIT_FLAGS += -L@wine@/lib/wine
101 | +WINE_64BIT_FLAGS += -L@wine@/lib/wine/x86_64-unix
102 |
103 | WINE_LINK_FLAGS += -lrt
104 | endif
105 | diff --git a/carla/source/modules/dgl/Makefile b/carla/source/modules/dgl/Makefile
106 | index 50eab4b88..207ac5916 100644
107 | --- a/carla/source/modules/dgl/Makefile
108 | +++ b/carla/source/modules/dgl/Makefile
109 | @@ -16,7 +16,7 @@ BUILD_CXX_FLAGS += -Isrc/pugl-upstream/include
110 | ifneq ($(MACOS),true)
111 | WINE_FLAGS = -I/usr/include/wine/wine/windows
112 | WINE_FLAGS += -I/usr/include/wine-development/windows
113 | -WINE_FLAGS += -I/opt/wine-devel/include/wine/windows
114 | +WINE_FLAGS += -I@wine@/include/wine/windows
115 | endif
116 |
117 | # ---------------------------------------------------------------------------------------------------------------------
118 |
119 |
--------------------------------------------------------------------------------
/flake.lock:
--------------------------------------------------------------------------------
1 | {
2 | "nodes": {
3 | "flake-compat": {
4 | "locked": {
5 | "lastModified": 1761640442,
6 | "narHash": "sha256-AtrEP6Jmdvrqiv4x2xa5mrtaIp3OEe8uBYCDZDS+hu8=",
7 | "owner": "nix-community",
8 | "repo": "flake-compat",
9 | "rev": "4a56054d8ffc173222d09dad23adf4ba946c8884",
10 | "type": "github"
11 | },
12 | "original": {
13 | "owner": "nix-community",
14 | "repo": "flake-compat",
15 | "type": "github"
16 | }
17 | },
18 | "flake-utils": {
19 | "inputs": {
20 | "systems": [
21 | "systems"
22 | ]
23 | },
24 | "locked": {
25 | "lastModified": 1731533236,
26 | "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
27 | "owner": "numtide",
28 | "repo": "flake-utils",
29 | "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
30 | "type": "github"
31 | },
32 | "original": {
33 | "owner": "numtide",
34 | "repo": "flake-utils",
35 | "type": "github"
36 | }
37 | },
38 | "home-manager": {
39 | "inputs": {
40 | "nixpkgs": [
41 | "nixpkgs"
42 | ]
43 | },
44 | "locked": {
45 | "lastModified": 1765480374,
46 | "narHash": "sha256-HlbvQAqLx7WqZFFQZ8nu5UUJAVlXiV/kqKbyueA8srw=",
47 | "owner": "nix-community",
48 | "repo": "home-manager",
49 | "rev": "39cb677ed9e908e90478aa9fe5f3383dfc1a63f3",
50 | "type": "github"
51 | },
52 | "original": {
53 | "owner": "nix-community",
54 | "repo": "home-manager",
55 | "type": "github"
56 | }
57 | },
58 | "impermanence": {
59 | "locked": {
60 | "lastModified": 1737831083,
61 | "narHash": "sha256-LJggUHbpyeDvNagTUrdhe/pRVp4pnS6wVKALS782gRI=",
62 | "owner": "nix-community",
63 | "repo": "impermanence",
64 | "rev": "4b3e914cdf97a5b536a889e939fb2fd2b043a170",
65 | "type": "github"
66 | },
67 | "original": {
68 | "owner": "nix-community",
69 | "repo": "impermanence",
70 | "type": "github"
71 | }
72 | },
73 | "lib-aggregate": {
74 | "inputs": {
75 | "flake-utils": [
76 | "flake-utils"
77 | ],
78 | "nixpkgs-lib": [
79 | "nixpkgs-lib"
80 | ]
81 | },
82 | "locked": {
83 | "lastModified": 1765111385,
84 | "narHash": "sha256-Gn8IIq9FGLvQSDK2bXKzsqqkgKExTExLkYfH7n8Nnpk=",
85 | "owner": "nix-community",
86 | "repo": "lib-aggregate",
87 | "rev": "e562ca084a8b3490337d446f1e0d6afadb509d1e",
88 | "type": "github"
89 | },
90 | "original": {
91 | "owner": "nix-community",
92 | "repo": "lib-aggregate",
93 | "type": "github"
94 | }
95 | },
96 | "nixpkgs": {
97 | "locked": {
98 | "lastModified": 1765601217,
99 | "narHash": "sha256-Ozou5B6Pn6GcSn5m+7BxWFXBnDXK5vd31Wh27FOqSA8=",
100 | "owner": "NixOS",
101 | "repo": "nixpkgs",
102 | "rev": "e3a74fdac2f4d0c1b0ee4f3276981212a0018320",
103 | "type": "github"
104 | },
105 | "original": {
106 | "owner": "NixOS",
107 | "ref": "master",
108 | "repo": "nixpkgs",
109 | "type": "github"
110 | }
111 | },
112 | "nixpkgs-lib": {
113 | "locked": {
114 | "lastModified": 1765070080,
115 | "narHash": "sha256-5D1Mcm2dQ1aPzQ0sbXluHVUHququ8A7PKJd7M3eI9+E=",
116 | "owner": "nix-community",
117 | "repo": "nixpkgs.lib",
118 | "rev": "e0cad9791b0c168931ae562977703b72d9360836",
119 | "type": "github"
120 | },
121 | "original": {
122 | "owner": "nix-community",
123 | "repo": "nixpkgs.lib",
124 | "type": "github"
125 | }
126 | },
127 | "nixpkgs-xr": {
128 | "inputs": {
129 | "flake-compat": [
130 | "flake-compat"
131 | ],
132 | "flake-utils": [
133 | "flake-utils"
134 | ],
135 | "nixpkgs": [
136 | "nixpkgs"
137 | ],
138 | "systems": [
139 | "systems"
140 | ],
141 | "treefmt-nix": "treefmt-nix"
142 | },
143 | "locked": {
144 | "lastModified": 1765503806,
145 | "narHash": "sha256-0jPnVJlc8E29+wSYUXdbj/hnwBxaDpde9K7Sx+076Ws=",
146 | "owner": "nix-community",
147 | "repo": "nixpkgs-xr",
148 | "rev": "5ff6e3bbc8f6421c23dabb0bfaf72d46f3fb586b",
149 | "type": "github"
150 | },
151 | "original": {
152 | "owner": "nix-community",
153 | "repo": "nixpkgs-xr",
154 | "type": "github"
155 | }
156 | },
157 | "root": {
158 | "inputs": {
159 | "flake-compat": "flake-compat",
160 | "flake-utils": "flake-utils",
161 | "home-manager": "home-manager",
162 | "impermanence": "impermanence",
163 | "lib-aggregate": "lib-aggregate",
164 | "nixpkgs": "nixpkgs",
165 | "nixpkgs-lib": "nixpkgs-lib",
166 | "nixpkgs-xr": "nixpkgs-xr",
167 | "stable": "stable",
168 | "systems": "systems",
169 | "waybar": "waybar",
170 | "wayland": "wayland"
171 | }
172 | },
173 | "stable": {
174 | "locked": {
175 | "lastModified": 1765363881,
176 | "narHash": "sha256-3C3xWn8/2Zzr7sxVBmpc1H1QfxjNfta5IMFe3O9ZEPw=",
177 | "owner": "NixOS",
178 | "repo": "nixpkgs",
179 | "rev": "d2b1213bf5ec5e62d96b003ab4b5cbc42abfc0d0",
180 | "type": "github"
181 | },
182 | "original": {
183 | "owner": "NixOS",
184 | "ref": "nixos-25.05",
185 | "repo": "nixpkgs",
186 | "type": "github"
187 | }
188 | },
189 | "systems": {
190 | "locked": {
191 | "lastModified": 1681028828,
192 | "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
193 | "owner": "nix-systems",
194 | "repo": "default",
195 | "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
196 | "type": "github"
197 | },
198 | "original": {
199 | "owner": "nix-systems",
200 | "repo": "default",
201 | "type": "github"
202 | }
203 | },
204 | "treefmt-nix": {
205 | "inputs": {
206 | "nixpkgs": [
207 | "nixpkgs-xr",
208 | "nixpkgs"
209 | ]
210 | },
211 | "locked": {
212 | "lastModified": 1762938485,
213 | "narHash": "sha256-AlEObg0syDl+Spi4LsZIBrjw+snSVU4T8MOeuZJUJjM=",
214 | "owner": "numtide",
215 | "repo": "treefmt-nix",
216 | "rev": "5b4ee75aeefd1e2d5a1cc43cf6ba65eba75e83e4",
217 | "type": "github"
218 | },
219 | "original": {
220 | "owner": "numtide",
221 | "repo": "treefmt-nix",
222 | "type": "github"
223 | }
224 | },
225 | "waybar": {
226 | "inputs": {
227 | "flake-compat": [
228 | "flake-compat"
229 | ],
230 | "nixpkgs": [
231 | "nixpkgs"
232 | ]
233 | },
234 | "locked": {
235 | "lastModified": 1761204979,
236 | "narHash": "sha256-QWS3FCd6sTbr1runpZPdpVrhqFu8E5fNOpfp0r9ifLk=",
237 | "owner": "Alexays",
238 | "repo": "Waybar",
239 | "rev": "161367d9617673a4ef9caf8299411dc5153464d1",
240 | "type": "github"
241 | },
242 | "original": {
243 | "owner": "Alexays",
244 | "repo": "Waybar",
245 | "type": "github"
246 | }
247 | },
248 | "wayland": {
249 | "inputs": {
250 | "flake-compat": [
251 | "flake-compat"
252 | ],
253 | "lib-aggregate": [
254 | "lib-aggregate"
255 | ],
256 | "nixpkgs": [
257 | "nixpkgs"
258 | ]
259 | },
260 | "locked": {
261 | "lastModified": 1765545632,
262 | "narHash": "sha256-m4IdtiDpcAtMyQtRKaV2Zq+k98RzI/I3AP+MekjL750=",
263 | "owner": "nix-community",
264 | "repo": "nixpkgs-wayland",
265 | "rev": "f75bb29f5464375a5ee852b682ec3417512ce32b",
266 | "type": "github"
267 | },
268 | "original": {
269 | "owner": "nix-community",
270 | "repo": "nixpkgs-wayland",
271 | "type": "github"
272 | }
273 | }
274 | },
275 | "root": "root",
276 | "version": 7
277 | }
278 |
--------------------------------------------------------------------------------