I don't even know man.

This commit is contained in:
vorboyvo 2025-07-06 15:16:08 -04:00
parent b036345fa7
commit 4d7a64d72e
8 changed files with 154 additions and 81 deletions

View file

@ -20,6 +20,12 @@
inputs.nixpkgs.follows = "nixpkgs";
};
tepid-client-services = {
url = "path:/home/alice/projects/tepid-client-services/";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
@ -28,7 +34,8 @@
lix-module,
home-manager,
nixos-hardware,
edit
edit,
tepid-client-services
}:
let
system = "x86_64-linux";
@ -48,7 +55,7 @@
name = hostname;
value = nixpkgs.lib.nixosSystem {
inherit system;
# _module.args = { inherit edit; };
specialArgs = { inherit edit tepid-client-services; };
modules = defaultModules ++ modules;
};
};

View file

@ -2,7 +2,7 @@
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ config, lib, pkgs, ... }:
{ config, lib, pkgs, edit, tepid-client-services, flakelib, ... }: # fix this this is awful
{
imports = [ # Include the results of the hardware scan.
@ -158,6 +158,9 @@
shell = pkgs.zsh;
};
home-manager.users.alice = import ./home.nix;
home-manager.extraSpecialArgs = {
inherit edit tepid-client-services flakelib;
};
# Make sure swaylock works (defined in home.nix)
security.pam.services.swaylock = { };

View file

@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, tepid-client-services, ... }@inputs:
rec {
imports = [
@ -23,13 +23,15 @@ rec {
overlay = (final: prev: {
olympus = prev.callPackage ../../pkgs/olympus/package.nix { };
olympus-unwrapped = prev.callPackage ../../pkgs/olympus-unwrapped/package.nix { };
# edit_pkg = prev.callPackage inputs.edit.defaultPackage.x86_64-linux { };
# tepid-client-services_pkg = prev.callPackage inputs.tepid-client-services.defaultPackage.x86_64-linux { };
});
in
(with (pkgs.extend overlay); [ olympus ]) ++
(with pkgs;
let
archivo = callPackage ../../pkgs/archivo/archivo.nix { };
# highway-gothic = callPackage ../../pkgs/highway-gothic/highway-gothic.nix { };
highway-gothic = callPackage ../../pkgs/highway-gothic/highway-gothic.nix { };
in
[
blueman
@ -73,7 +75,7 @@ rec {
ibm-plex
rubik
archivo
# highway-gothic
highway-gothic
merriweather-sans
paratype-pt-sans
paratype-pt-serif

Binary file not shown.

122
pkgs/celeste/default.nix Normal file
View file

@ -0,0 +1,122 @@
{
stdenvNoCC,
lib,
requireFile,
unzip,
copyDesktopItems,
xxd,
makeWrapper,
SDL2,
mono,
makeDesktopItem,
libfmodstudio_fix,
libfmodstudio,
libfna3d,
libfmodsdl,
}:
stdenvNoCC.mkDerivation rec {
name = "celeste-game";
version = "1.4.0.0";
src = requireFile {
name = "celeste-linux.zip";
url = "https://maddymakesgamesinc.itch.io/celeste";
hash = "sha256-q4gniSgg00U3j5TZpvIZnSmqAyCHd/pOVAuQ3rDYEAs=";
};
sourceRoot = "."; # needed for multiple directories
nativeBuildInputs = [
unzip # for unzipping
copyDesktopItems # will help!
makeWrapper
xxd
];
buildInputs = [
libfmodstudio_fix
libfmodstudio
libfna3d
SDL2
libfmodsdl
mono
];
strictDeps = true;
dontConfigure = true;
patchPhase = ''
# patch celeste
runHook prePatch
# TODO: i don't know what this magic string does and it bothers me
# TODO: convert these to patch files?
xxd -p < Celeste.exe | tr -d '\n' | LC_ALL=C sed 's/03000616fe012a0013300200210000000a000011160a02145112012014100100/03000616fe012a0013300200210000000a000011160a02145112012006020200/g' | xxd -r -p > Celeste.exe.patched
mv Celeste.exe.patched Celeste.exe
# this cannot possibly be the best way of doing this
cat >Celeste.exe.config <<EOF
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<dllmap dll="fmod" os="linux" target="libfmod.so.13"/>
<dllmap dll="fmodstudio" os="linux" target="libfmodstudio.so.13">
<dllentry dll="fmodstudio_fix.so" name="FMOD_Studio_EventInstance_SetParameterValue" target="_FMOD_Studio_EventInstance_SetParameterValue"/>
<dllentry dll="fmodstudio_fix.so" name="FMOD_Studio_System_Create" target="_FMOD_Studio_System_Create"/>
<dllentry dll="fmodstudio.so.13" name="FMOD_Studio_System_GetLowLevelSystem" target="FMOD_Studio_System_GetCoreSystem"/>
<dllentry dll="fmodstudio.so.13" name="FMOD_Studio_EventInstance_TriggerCue" target="FMOD_Studio_EventInstance_KeyOff"/>
</dllmap>
</configuration>
EOF
runHook postPatch
'';
dontBuild = true;
installPhase = ''
runHook preInstall # these get clobbered
mkdir -p $out/{bin,lib}
cp Celeste.exe Celeste.exe.config Celeste.pdb $out/lib
cp Celeste.Content.dll Celeste.Content.pdb $out/lib
cp FNA.dll FNA.dll.config FNA3D.dll $out/lib
cp -r Content/ $out/lib
cp -r Backups/ $out/lib
cp gamecontrollerdb.txt $out/lib
mkdir -p $out/share/icons/hicolor/512x512/apps
cp Celeste.png $out/share/icons/hicolor/512x512/apps
runHook postInstall
'';
postFixup = ''
makeWrapper "${mono}/bin/mono" "$out/bin/celeste-game" \
--add-flags "--debug $out/lib/Celeste.exe" \
--prefix LD_LIBRARY_PATH : ${
lib.makeLibraryPath [
"$out"
libfmodstudio_fix
libfmodstudio
libfna3d
SDL2
libfmodsdl
]
}
'';
desktopItems = [
(makeDesktopItem {
name = name;
exec = "celeste-game %U";
icon = "Celeste";
comment = "Just breathe. You can do this..."; # should be an actual description of Celeste
desktopName = "Celeste";
categories = [
"Game"
"Application"
];
})
];
meta = { };
}

View file

@ -1,62 +0,0 @@
{
description = "core-lending";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
"aarch64-darwin"
];
perSystem = { self', pkgs, system, ... }:
let
rustVersion = "1.86.0";
rust = pkgs.rust-bin.stable.${rustVersion};
rustPlatform = pkgs.makeRustPlatform {
rustc = rust.minimal;
cargo = rust.minimal;
};
cargoToml = builtins.fromTOML (builtins.readFile ./Cargo.toml);
in
{
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
overlays = [ inputs.rust-overlay.overlays.default ];
};
packages.default = rustPlatform.buildRustPackage {
pname = cargoToml.package.name;
version = cargoToml.package.version;
src = ./.;
cargoLock = {
lockFile = ./Cargo.lock;
};
};
devShells.default = pkgs.mkShell {
buildInputs = [
pkgs.diesel-cli
pkgs.elmPackages.elm
pkgs.elmPackages.elm-language-server
pkgs.postgresql_17
(rust.default.override {
extensions = [ "rust-analyzer" "rust-src" ];
})
];
shellHook = ''
export LANG="en_US.UTF-8"
'';
};
};
};
}

1
pkgs/edit/result Symbolic link
View file

@ -0,0 +1 @@
/nix/store/v87dnjfc7275z6lwc52qa42vw773nvr3-edit-1.0.0

View file

@ -1,20 +1,20 @@
{lib, pkgs, ...}:
let
overlay = (final: prev: {
clifm = prev.clifm.overrideAttrs (old: {
version = "1.23";
src = prev.fetchFromGitHub {
owner = "leo-arch";
repo = prev.clifm.pname;
rev = "v1.23";
hash = "sha256-FtlLz77yy/QfRyAhJSh5juCSPCZ921sTGhuYJzCusus=";
};
});
});
# overlay = (final: prev: {
# clifm = prev.clifm.overrideAttrs (old: {
# version = "1.23";
# src = prev.fetchFromGitHub {
# owner = "leo-arch";
# repo = prev.clifm.pname;
# rev = "v1.23";
# hash = "sha256-FtlLz77yy/QfRyAhJSh5juCSPCZ921sTGhuYJzCusus=";
# };
# });
# });
file_picker = pkgs.writeScriptBin "file_picker" (builtins.readFile "${pkgs.clifm}/share/clifm/plugins/file_picker.sh");
in
{
home.packages = with pkgs.extend overlay; [ atool fzf xdragon unzip zip sshfs clifm ]
home.packages = with pkgs; [ atool fzf xdragon unzip zip sshfs clifm ]
++ [ file_picker ];
xdg.configFile."clifm/profiles/default/clifmrc".source = ./clifm/clifmrc;
xdg.configFile."clifm/profiles/default/mimelist.clifm".source = ./clifm/mimelist.clifm;