Compare commits

...

23 Commits

Author SHA1 Message Date
c3ea60a132 typo 2025-12-08 18:13:58 -05:00
dc71273e1c Add starship file and fix conditional syncthing 2025-12-08 18:13:16 -05:00
781f265851 patch monado to respect terminate signals
Although it doesn't terminate properly with this it seems to make
`systemctl --user restart monado` work
2025-12-08 15:27:51 -05:00
5f8e03fc5c Make syncthing optional 2025-12-06 15:19:07 -05:00
c959544f21 Unsure how to actually use lix 2025-12-06 15:11:36 -05:00
b52d6ac220 Change user shell to zsh 2025-12-06 15:09:56 -05:00
04a1dd1558 update vr overlay 2025-12-06 15:04:49 -05:00
3c868f2913 Pass system on pewter 2025-12-01 01:03:17 -05:00
5d0794abba New xrizer version 2025-12-01 00:54:19 -05:00
6a690d6fed Secrets and syncthing 2025-12-01 00:54:10 -05:00
a0edf5e24b xrizer and monado version attempts 2025-11-30 16:26:19 -05:00
cca2a27d26 VR packages for bsb2 eye tracking and stardust 2025-11-30 16:25:47 -05:00
b9efe75c17 Symlink vrchat pictures folder
I sure hope this does soemthing not awful when the folder doesn't
exsit wheeeeeee
2025-11-03 22:57:36 -05:00
67a9b2a4c0 Move monado custom branch to vr-overlay.nix 2025-11-03 22:19:15 -05:00
cc28fe9df6 Move xrizer overlay into a separate file 2025-11-03 21:57:13 -05:00
c3fe86d6b4 Include unity in hass 2025-11-03 18:40:57 -05:00
f6babfabba Bigscreen udev rule update 2025-11-03 18:39:44 -05:00
95fdc587c1 Switch to xrizer, leaving the messiness in flake.nix 2025-11-03 18:39:21 -05:00
f4e7dc9772 Moonlight streaming 2025-10-23 17:17:21 -04:00
e39e3aff80 Install vrchat specific unity version 2025-10-23 17:15:11 -04:00
cb4def1f42 Comment out nixgl install 2025-09-29 00:55:03 -04:00
a9ae3440ce fix nixgl input 2025-09-29 00:53:06 -04:00
84e0615081 Add oscgoesbrrr to config 2025-09-29 00:51:48 -04:00
11 changed files with 564 additions and 61 deletions

View File

@ -0,0 +1,68 @@
From 8d75be68315bec605a95b50edf7d2a6c56772b7f Mon Sep 17 00:00:00 2001
From: Sapphire <imsapphire0@gmail.com>
Date: Tue, 25 Nov 2025 23:20:46 -0600
Subject: [PATCH] ipc: shutdown ipc server on SIGTERM
---
src/xrt/ipc/server/ipc_server_process.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/src/xrt/ipc/server/ipc_server_process.c b/src/xrt/ipc/server/ipc_server_process.c
index 92c232904..47a4a70bc 100644
--- a/src/xrt/ipc/server/ipc_server_process.c
+++ b/src/xrt/ipc/server/ipc_server_process.c
@@ -50,6 +50,10 @@
#include <timeapi.h>
#endif
+#if defined(XRT_OS_UNIX)
+#include <signal.h>
+#endif
+
/*
*
@@ -1062,6 +1066,16 @@ ipc_server_get_system_properties(struct ipc_server *vs, struct xrt_system_proper
return XRT_SUCCESS;
}
+#ifdef XRT_OS_UNIX
+struct ipc_server *g_server;
+static void handle_signal(int signal)
+{
+ if (g_server && signal == SIGTERM) {
+ ipc_server_handle_shutdown_signal(g_server);
+ }
+}
+#endif
+
int
ipc_server_main_common(const struct ipc_server_main_info *ismi,
const struct ipc_server_callbacks *callbacks,
@@ -1086,6 +1100,11 @@ ipc_server_main_common(const struct ipc_server_main_info *ismi,
timeBeginPeriod(1);
#endif
+#ifdef XRT_OS_UNIX
+ g_server = s;
+ signal(SIGTERM, handle_signal);
+#endif
+
/*
* Need to create early before any vars are added. Not created in
* init_all since that function is shared with Android and the debug
@@ -1127,6 +1146,11 @@ ipc_server_main_common(const struct ipc_server_main_info *ismi,
// Stop the UI before tearing everything down.
u_debug_gui_stop(&s->debug_gui);
+#ifdef XRT_OS_UNIX
+ signal(SIGTERM, NULL);
+ g_server = NULL;
+#endif
+
// Done after UI stopped.
teardown_all(s);
free(s);
--
2.52.0

View File

@ -36,7 +36,12 @@
hash = "sha256-Y3a0+x2xvHsfLax/uwycdJf3xLxvVfkfDVqjkxNaYEo=";
};
}
];
];
fileSystems."/media" = {
device = "10.0.37.142:/zfs/b";
fsType = "nfs";
};
networking.hostName = "pewter"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
@ -102,8 +107,7 @@
#media-session.enable = true;
};
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
programs.zsh.enable = true;
# Define a user account. Don't forget to set a password with passwd.
users.users.abby = {
@ -118,8 +122,12 @@
protonup-ng
vivaldi
chromium
# thunderbird
appimage-run
# thunderbird
];
shell = pkgs.zsh;
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOYmdrmGnKrC3baYXihar6PoR1r64r8SCctEy8BVv2BQ triazo@nicrosil"
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC3Dv3wVYJ77FNZU8JuGCwBAr9cAdsYMibGyImUSs+R73vEI6XpK/R5NQEDqC/y8TUL+nwLmBIrCj9k+At9FxLlGphUQhQcUKxUvx0qXCP52M3XLxGhbQinTACEsSa15SLli5WsD9xqj3TjiqD35jz/a3s1r2gwzj4vqGxcU1pwYlGNyU+RfyddgOdQTtBr5FzVjHKMMA4UW3HTtC1AyjdKrwhbQApDKrif3tAabcn0jG6dLpLxS7v/fugUQSPTzPne0Bw+SthPKb/R95EWfs7EoSjNAmIc+RSgKO+om9hqHVPTFK95TosmYr5VZVlJ0/uHw0GrpRfQNXpoFEbJ6g4l"
@ -146,10 +154,6 @@
nixpkgs.config.allowUnfree = true;
# url = "https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2425.diff";
# hash = sha256-572a968fda55d9fabd22ab94f8bc1bbdadb4ac21fbe2bf927d05fbf00d9a0e42
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
@ -166,26 +170,8 @@
zenity
htop
usbutils
# lemonake.packages.${pkgs.system}.wayvr-dashboard-git
(monado.overrideAttrs (oldAttrs: rec {
src = fetchFromGitLab {
domain = "gitlab.freedesktop.org";
owner = "monado";
repo = "monado";
rev = "5c137fe28b232fe460f9b03defa7749adc32ee48";
hash = "sha256-4P/ejRAitrYn8hXZPaDOcx27utfm+aVLjtqL6JxZYAg=";
};
patches = [];
# (pkgs.fetchpatch {
# url = "https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2425.diff";
# sha256 = "0hhfk86z1yq5gn9bzqpv46nb9bdx3fygi55b4ayzmnamva7rcajp";
# })
# ];
}))
# lemonake.packages.${pkgs.system}.wayvr-dashboard-git
monado
];
@ -244,10 +230,25 @@
U_PACING_COMP_MIN_TIME_MS = "5";
};
# bigscreen udev rule
services.udev.extraRules = ''
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="35bd", ATTRS{idProduct}=="0101", MODE="0666"
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="35bd", ATTRS{idProduct}=="0202", MODE="0666"
'';
# Bigscreen Beyond
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="35bd", ATTRS{idProduct}=="0101", MODE="0660", TAG+="uaccess"
# Bigscreen Bigeye
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="35bd", ATTRS{idProduct}=="0202", MODE="0660", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="35bd", ATTRS{idProduct}=="0202", MODE="0660", TAG+="uaccess"
# Bigscreen Beyond Audio Strap
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="35bd", ATTRS{idProduct}=="0105", MODE="0660", TAG+="uaccess"
# Bigscreen Beyond Firmware Mode?
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="35bd", ATTRS{idProduct}=="4004", MODE="0660", TAG+="uaccess"
'';
# For streaming
services.sunshine = {
enable = true;
autoStart = true;
capSysAdmin = true;
openFirewall = true;
};
}

View File

@ -2,15 +2,35 @@
description = "Root System NixOS flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
home-manager = {
url = "github:nix-community/home-manager/release-25.05";
url = "github:nix-community/home-manager/release-25.11";
inputs.nixpkgs.follows = "nixpkgs";
};
lix-module = {
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.93.3-1.tar.gz";
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.93.3-2.tar.gz";
inputs.nixpkgs.follows = "nixpkgs";
};
oscgoesbrrr = {
url = "github:TheButlah/OscGoesBrrr";
inputs.nixpkgs.follows = "nixpkgs";
};
go-bsb-cam = {
url = "git+https://repo.abby.cafe/pager/go-bsb-cams.git";
inputs.nixpkgs.follows = "nixpkgs";
};
nixgl = {
url = "github:nix-community/nixGL";
inputs.nixpkgs.follows = "nixpkgs";
};
ragenix = {
url = "github:yaxitech/ragenix";
inputs.nixpkgs.follows = "nixpkgs";
};
@ -25,48 +45,71 @@
# wayvr-dashbourd.url = "github:PassiveLemon/lemonake/master/pkgs/wayvr-dashboard"
};
outputs = { self, nixpkgs, lix-module, home-manager, ...}@inputs:
outputs = { self, nixpkgs, lix-module, ragenix, home-manager, ...}@inputs:
{
nixosConfigurations.pewter = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = inputs;
modules = [
lix-module.nixosModules.default
./configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.abby = ./home.nix;
home-manager.extraSpecialArgs = {
username = "abby";
inherit inputs;
system = "x86_64-linux";
};
}
];
};
nixosConfigurations.pewter =
let
system = "x86_64-linux";
pkgs = import nixpkgs {
system = system;
};
in
nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = inputs;
modules = [
lix-module.nixosModules.default
./vr-overlay.nix
./configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.abby = ./home.nix;
home-manager.sharedModules = [
ragenix.homeManagerModules.default
];
home-manager.extraSpecialArgs = {
username = "abby";
inherit inputs;
system = system;
use_syncthing = true;
};
}
];
};
homeConfigurations."abby@copper" =
let
system = "aarch64-linux";
pkgs = nixpkgs.legacyPackages.${system};
pkgs = import nixpkgs {
system = system;
overlays = [ inputs.nixgl.overlay ];
};
in
home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
lix-module.nixosModules.default
ragenix.homeManagerModules.default
./home.nix
];
extraSpecialArgs = {
inherit system;
username = "abby";
inherit inputs;
use_syncthing = false;
};
};
homeConfigurations."pager@nicrosil" =
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
pkgs = import nixpkgs {
system = system;
overlays = [ inputs.nixgl.overlay ];
};
in
home-manager.lib.homeManagerConfiguration {
@ -74,11 +117,14 @@
# specialArgs = inputs;
modules = [
lix-module.nixosModules.default
ragenix.homeManagerModules.default
./home.nix
];
extraSpecialArgs = {
inherit system;
username = "pager";
inherit inputs;
use_syncthing = false;
};
};
};

View File

@ -1,4 +1,4 @@
{ config, pkgs, inputs, system ? "x86_64-linux", username ? "abby", ... }:
{ config, pkgs, inputs, system ? "x86_64-linux", username ? "abby", use_syncthing ? false , ... }:
{
# Home Manager needs a bit of information about you and the
@ -21,10 +21,41 @@
home.packages = with pkgs; [
tmux
htop
inputs.oscgoesbrrr.packages.${system}.default
oscavmgr
vrcadvert
alcom
vesktop
mpv
vlc
moonlight-qt
starship
#inputs.ragenix.packges.${system}.default
# htop
#inputs.baballonia.${system}.default
] ++ lib.optionals (system == "x86-linux")
(import ./unity_vrchat.nix {pkgs = pkgs; }).packages
++ lib.optionals (system == "x86-linux") [ vrcx ]
++ lib.optionals (false) [
inputs.nixgl.nixGLIntel
] ++ [
stardust-xr-server
stardust-xr-sphereland
stardust-xr-protostar
stardust-xr-magnetar
stardust-xr-kiara
stardust-xr-gravity
stardust-xr-flatland
stardust-xr-atmosphere
];
# importing secrets
age.secrets = {
syncthing_tin.file = ./secrets/syncthing_tin.age;
syncthing_nicrosil.file = ./secrets/syncthing_nicrosil.age;
};
# Wayvr customization
xdg.configFile."wlxoverlay/openxr_actions.json5" = {
source = ./xdg/wlxoverlay_openxr_actions.json5;
@ -38,6 +69,9 @@ dashboard:
env: []
'';
# Make vrchat pictures folder more accessable
home.file."Pictures/VRChat".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.local/share/Steam/steamapps/compatdata/438100/pfx/drive_c/users/steamuser/Pictures/VRChat";
# For Monado:
xdg.configFile."openxr/1/active_runtime.json".source = "${pkgs.monado}/share/openxr/1/openxr_monado.json";
@ -55,12 +89,29 @@ dashboard:
],
"runtime" :
[
"${pkgs.opencomposite}/lib/opencomposite"
"${pkgs.xrizer}/lib/xrizer"
],
"version" : 1
}
'';
# For bsb2e cameras
systemd.user.services.go-bsb-cams = {
Unit = {
Description = "Go bsb cams";
};
Install = {
WantedBy = [ "default.target" ];
};
unitConfig = {
Type = "simple";
};
Service = {
ExecStart = "${inputs.go-bsb-cam.packages.${system}.default}/bin/go-bsb-cams";
};
};
# Emacs stuff - ported from dotfiles repo
services.emacs = {
enable = false;
@ -78,6 +129,9 @@ dashboard:
# Other misc conf files
xdg.configFile."kitty/kitty.conf".source = ./xdg/kitty/kitty.conf;
home.file.".zshrc".source = .xdg/zshrc;
xdg.configFile."starship.toml".source = ./xdg/starship.toml;
home.file.".zshrc".source = xdg/zshrc;
services.syncthing = pkgs.lib.mkIf use_syncthing (import ./syncthing.nix { config = config; });
# services.syncthing = pkgs.lib.mkIf use_syncthing import ./syncthing.nix { config = config; };
}

15
secrets/secrets.nix Normal file
View File

@ -0,0 +1,15 @@
let
pewter = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHo7gy/7ZTGPrpJO7aHNlyda5W9mDQhBm90p8Zrxe/Al";
nicrosil = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOYmdrmGnKrC3baYXihar6PoR1r64r8SCctEy8BVv2BQ";
copper = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK/4a7VOiTVo8g1L1cckHz+Od87lsAOaw0WaNoip2Wdv";
users = [pewter nicrosil copper];
nicrosil_system = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP7A9oW3c5GGJGU1kac7BZHLrrTsxni0+vCbZsgoRF44";
systems = [nicrosil_system];
everybody = users ++ systems;
in
{
"syncthing_tin.age".publicKeys = everybody;
"syncthing_nicrosil.age".publicKeys = everybody;
}

View File

@ -0,0 +1,16 @@
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IG9DVi9VQSBHV1hC
MU9qQ3JRVW1MRSsvY0tubkphZWtVa2l1ZnRUN2U4TGFTODh1UUQwCmtVVW1QSWNR
SG1WM1Q2aWMyejhqSjM2Y2ljYUI4bUF6aSt1M28rUzNoM2MKLT4gc3NoLWVkMjU1
MTkgRU0wcEhnIG5xc0YzNmpSRjh4eFo3dUhKQW1mRGI0YkRSeHM5S3NnK0VTUnJF
cHpmQUUKZEhVZlJzY2lsa0ZFZTFidHBPdng4aDE5aHdqdHFSdW5yVDRoWG1NRVY0
dwotPiBzc2gtZWQyNTUxOSBSLzFOMkEgckhKVzdwVFJiSTBVTXhTVHVUaXQzVW5k
bkU3VklvelFWYnFFTHJDS0JTcwoyYTM4eFdidnJQMmpGT29ieXk1U0JPeDRqT2pE
OWROS2xTOHZWdjJHQnFBCi0+IHNzaC1lZDI1NTE5IENvbk4wUSB5dE8zUlBvV1Qv
QzIzTko0MHFmei8vWlU1bU9ra2x0elBTRkVRT2ZlRlN3CkpDeVFoeWg5U2hmYUha
bkZwYzNxSllLSzZlUkd2T1M5WTlzZzVwTGlDRjQKLT4gUnMtZ3JlYXNlCkszeklp
WUUKLS0tIHBQazN3NjNCT21aa1FvaitWK29yeHUvbWt2a1crSUx2SzgrRzNQRzcx
Q2MKOYjq/4daJpvmYYh+Ctn4c4EZ77Am0xQg5BV9JqUJOYLtzmz1cSV02zBiIPzQ
EpYZXdzp+becn+4mT7+6yVQBFXQGZlXmyuuHSk8MgBD7duSL9aUFTeNVSVDIuwJM
+JE=
-----END AGE ENCRYPTED FILE-----

18
secrets/syncthing_tin.age Normal file
View File

@ -0,0 +1,18 @@
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IG9DVi9VQSBIUXky
c2RKZ2ZBS2VYNmZXdkdmZmVHa2hvalNMcnRpUDh1QUNCS0JuTGpFClNsQ0ZIYjRl
VzFQT2JSRjRJQjdLN1JTVDRVeWRXRGo0aFJ6ZmoydHZQakEKLT4gc3NoLWVkMjU1
MTkgRU0wcEhnIHN3SEM0anRnQXR1Wkoxd2lIMmo0VzJoNDd4V21nMUx6SWNKRFVB
QlRsVlUKQWgxeU9VUE1aV3BQdDRCTkN1QnVaNEtvU2l4eGtpcWgzVUNLQm55R0FM
UQotPiBzc2gtZWQyNTUxOSBSLzFOMkEgVEpIZVlmYktRbDhaZDRyQ1N4UlI2WDdi
QmowN0x4azdxRE00QjgxeERDQQpQendFQWtMVytnV3JjS3RxcW5odVFNemJzLzFQ
SVc5SDN4Slc5WEJYZ1BzCi0+IHNzaC1lZDI1NTE5IENvbk4wUSBiV0lHVjFGWE4v
MDZaamZ5QUlVQTh4MnMzVHZCMGJraHZwK3R1U0pnT0drCmdQdmFaN1pRRTFlblpS
N0RYQjlJWVF4K2NGamFUekhIQVZNOElaRk02dVEKLT4gRyZ4RDNbXGgtZ3JlYXNl
IFx2cCUjIGRreSBDTTgnciwgaVdhUWxSKAphb0hBZDY3VEEwb0ZOS3psbEM4WXRZ
RUVtZWhIa0NpLzM3VjAxbTR0S040OVRoQmQvUlBFTitTQ2M0TWpsVXZGCkhyUHRK
SnFxanFWVG0zYjhGbjNnZXkyckxXd1ZoNXpuWHVIdjBRCi0tLSBUekRnZlhpRkt3
QkZOYThKbzVTc0Y5aHFCa3RpdWRJV2ZLZUYwWEViU2lFCk0O7G9anHpP6Np2V3F1
Y9KOK4mu5SxrFkWbulV/PRQ+/78QFoxGkUxvEeB3TtQlFnMkamMEzG73PeEjDruy
J8V61yKSsuuT7r0hw6ZksrVnrmYI4aq0wqwDIpQrZuGG
-----END AGE ENCRYPTED FILE-----

43
syncthing.nix Normal file
View File

@ -0,0 +1,43 @@
{ config, ... }:
let
secretFile = builtins.WriteFile "secrets.nix" config.age.secrets.secret.path;
secrets = import ./secrets.nix;
in
{
enable = true;
# openDefaultPorts = true;
# syncthing
settings.gui = {
user = "pager";
password = "roundabout";
};
settings.devices = {
"tin" = { id = config.age.secrets.syncthing_tin.path; };
"nicrosil" = { id = config.age.secrets.syncthing_tin.path; };
};
settings.folders = {
"VRC Pictures" = {
path = "/home/abby/Pictures/VRChat";
id = "7q62w-jsps5";
type = "sendreceive";
devices = [ "tin" "nicrosil" ];
};
"VRC Avatars" = {
path = "/home/abby/projects/VRC Avatars";
id = "jdfra-eqoig";
type = "sendreceive";
devices = [ "tin" "nicrosil" ];
};
"Basis Avatars" = {
path = "/home/abby/projects/Basis Avatars";
id = "qzla2-jxhox";
type = "sendreceive";
devices = [ "tin" "nicrosil" ];
};
};
}

64
unity_vrchat.nix Normal file
View File

@ -0,0 +1,64 @@
{ pkgs, ... }:
let
# Define a unityhub that includes fonts.
unityhub = pkgs.unityhub.override { extraPkgs = pkgs: [pkgs.corefonts pkgs.ipafont]; };
in {
packages = [
unityhub
(pkgs.stdenvNoCC.mkDerivation rec {
pname = "unity";
version = "2022.3.22f1";
dontFixup = true;
unitySrc = pkgs.fetchurl {
url = "https://download.unity3d.com/download_unity/887be4894c44/LinuxEditorInstaller/Unity-2022.3.22f1.tar.xz";
hash = "sha256-eE//d2kFHA9p7bA52NCUMeeuQASmSh20QDcJ3biKpQY=";
};
androidSupportSrc = pkgs.fetchurl {
url = "https://download.unity3d.com/download_unity/887be4894c44/MacEditorTargetInstaller/UnitySetup-Android-Support-for-Editor-2022.3.22f1.pkg";
hash = "sha256-Vqk8HgnFsUzjLvjIhIdJTLFHpyE6UDhwR7hN7/Jjpak=";
};
windowsSupportSrc = pkgs.fetchurl {
url = "https://download.unity3d.com/download_unity/887be4894c44/MacEditorTargetInstaller/UnitySetup-Windows-Mono-Support-for-Editor-2022.3.22f1.pkg";
hash = "sha256-iBGBpsg3IwooTqQSC/y14qq5QLuQEOvftQ07iGXCBZ0=";
};
nativeBuildInputs = [ pkgs.cpio pkgs.xarMinimal ];
buildInputs = [ unityhub.fhsEnv ];
unpackPhase = ''
mkdir android
xar -C android -xf "${androidSupportSrc}"
mkdir windows
xar -C windows -xf "${windowsSupportSrc}"
'';
installPhase = ''
# This Editor/version/Editor path helps Unity Hub recognize the version of the editor.
mkdir -p "$out/bin" "$out/Editor/${version}/Editor/Data/PlaybackEngines/AndroidPlayer" "$out/Editor/${version}/Editor/Data/PlaybackEngines/WindowsStandaloneSupport"
tar -C "$out/Editor/${version}" -xf "${unitySrc}"
gzip -d < android/TargetSupport.pkg.tmp/Payload | cpio -iD "$out/Editor/${version}/Editor/Data/PlaybackEngines/AndroidPlayer"
gzip -d < windows/TargetSupport.pkg.tmp/Payload | cpio -iD "$out/Editor/${version}/Editor/Data/PlaybackEngines/WindowsStandaloneSupport"
# Create unity wrapper script
cat > "$out/bin/unity" <<-EOF
#!/bin/sh
exec -a "$out/Editor/${version}/Editor/Unity" "${unityhub.fhsEnv}/bin/unityhub-fhs-env" "$out/Editor/${version}/Editor/Unity" "\$@"
EOF
chmod a+x "$out/bin/unity"
# Fix font fallback
cat > "$out/Editor/${version}/Editor/Data/Resources/fontsettings.txt" <<-EOF
English|default=Inter, IPAPGothic, Verdana, Tahoma
English|Inter-Regular=Inter, IPAPGothic, Verdana, Tahoma
English|Inter-SemiBold=Inter, IPAPGothic, Verdana, Tahoma
English|Inter-Small=Inter, IPAPGothic, Verdana, Tahoma
English|Inter-Italic=Inter, IPAPGothic, Verdana, Tahoma
English|Inter-SemiBoldItalic=Inter, IPAPGothic, Verdana, Tahoma
EOF
'';
})
];
}

34
vr-overlay.nix Normal file
View File

@ -0,0 +1,34 @@
# Overlay to get vr working on my bsb2
{config, pkgs, lib, ... }:
{
nixpkgs.overlays = [
(final: prev: {
xrizer = prev.xrizer.overrideAttrs (oldAttrs: rec {
src = final.fetchFromGitHub {
owner = "ImSapphire";
repo = "xrizer";
rev = "0660170c3fcff27035a44052ab593c5e96208341";
hash = "sha256-D9jLaxWNce8XHfYePyOF2HEmJuDMKhuty+VO0CP8I38=";
};
cargoDeps = prev.rustPackages.rustPlatform.fetchCargoVendor {
inherit src;
hash = "sha256-tLPwiwKkEBdsRxXgdcTM9TLJeNRZV32W11qUbyCVdHw=";
};
patches = [];
});
monado = prev.monado.overrideAttrs (oldAttrs: rec {
src = final.fetchFromGitLab {
domain = "gitlab.freedesktop.org";
owner = "monado";
repo = "monado";
rev = "2ebbca83e896e0802185277ce0a0a463db7a7892";
hash = "sha256-JjlKHXd1SD9M8OpgFERZCvAhM0eMxjME96YU38DlKNw=";
};
patches = [
./0001-ipc-shutdown-ipc-server-on-SIGTERM.patch
];
});
})
];
}

144
xdg/starship.toml Normal file
View File

@ -0,0 +1,144 @@
format = """
[](#9A348E)\
$os\
$username\
[](bg:#DA627D fg:#9A348E)\
$directory\
[](fg:#DA627D bg:#FCA17D)\
$git_branch\
$git_status\
[](fg:#FCA17D bg:#86BBD8)\
$c\
$elixir\
$elm\
$golang\
$gradle\
$haskell\
$java\
$julia\
$nodejs\
$nim\
$rust\
$scala\
[](fg:#86BBD8 bg:#06969A)\
$docker_context\
[](fg:#06969A bg:#33658A)\
$time\
[ ](fg:#33658A)\
"""
# Disable the blank line at the start of the prompt
# add_newline = false
# You can also replace your username with a neat symbol like  or disable this
# and use the os module below
[username]
show_always = true
style_user = "bg:#9A348E"
style_root = "bg:#9A348E"
format = '[$user ]($style)'
disabled = false
# An alternative to the username module which displays a symbol that
# represents the current operating system
[os]
style = "bg:#9A348E"
disabled = true # Disabled by default
[directory]
style = "bg:#DA627D"
format = "[ $path ]($style)"
truncation_length = 3
truncation_symbol = "…/"
# Here is how you can shorten some long paths by text replacement
# similar to mapped_locations in Oh My Posh:
[directory.substitutions]
"Documents" = "󰈙 "
"Downloads" = " "
"Music" = " "
"Pictures" = " "
# Keep in mind that the order matters. For example:
# "Important Documents" = " 󰈙 "
# will not be replaced, because "Documents" was already substituted before.
# So either put "Important Documents" before "Documents" or use the substituted version:
# "Important 󰈙 " = " 󰈙 "
[c]
symbol = " "
style = "bg:#86BBD8"
format = '[ $symbol ($version) ]($style)'
[docker_context]
symbol = " "
style = "bg:#06969A"
format = '[ $symbol $context ]($style) $path'
[elixir]
symbol = " "
style = "bg:#86BBD8"
format = '[ $symbol ($version) ]($style)'
[elm]
symbol = " "
style = "bg:#86BBD8"
format = '[ $symbol ($version) ]($style)'
[git_branch]
symbol = ""
style = "bg:#FCA17D"
format = '[ $symbol $branch ]($style)'
[git_status]
style = "bg:#FCA17D"
format = '[$all_status$ahead_behind ]($style)'
[golang]
symbol = " "
style = "bg:#86BBD8"
format = '[ $symbol ($version) ]($style)'
[gradle]
style = "bg:#86BBD8"
format = '[ $symbol ($version) ]($style)'
[haskell]
symbol = " "
style = "bg:#86BBD8"
format = '[ $symbol ($version) ]($style)'
[java]
symbol = " "
style = "bg:#86BBD8"
format = '[ $symbol ($version) ]($style)'
[julia]
symbol = " "
style = "bg:#86BBD8"
format = '[ $symbol ($version) ]($style)'
[nodejs]
symbol = ""
style = "bg:#86BBD8"
format = '[ $symbol ($version) ]($style)'
[nim]
symbol = "󰆥 "
style = "bg:#86BBD8"
format = '[ $symbol ($version) ]($style)'
[rust]
symbol = ""
style = "bg:#86BBD8"
format = '[ $symbol ($version) ]($style)'
[scala]
symbol = " "
style = "bg:#86BBD8"
format = '[ $symbol ($version) ]($style)'
[time]
disabled = false
time_format = "%R" # Hour:Minute Format
style = "bg:#33658A"
format = '[ ♥ $time ]($style)'