This commit is contained in:
Martin Benonisen 2025-01-12 14:40:40 +01:00
parent 87bb70fbcd
commit 6167781189
Signed by: mbeno
SSH Key Fingerprint: SHA256:iAzOA1WUAxocdh/WRWXcSg5nw2dJ1aDCvPuT+3ZjkwI
10 changed files with 167 additions and 78 deletions

34
flake.lock generated
View File

@ -7,27 +7,26 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1733317578, "lastModified": 1736508663,
"narHash": "sha256-anN/LcP5IuqEARvhPETg1vnbyG3IQ0wdvSAYEJfIQzA=", "narHash": "sha256-ZOaGwa+WnB7Zn3YXimqjmIugAnHePdXCmNu+AHkq808=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "ad48eb25cd0b00ce730da00fa1f8e6e6c27b397d", "rev": "2532b500c3ed2b8940e831039dcec5a5ea093afc",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "master",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1733212471, "lastModified": 1736523798,
"narHash": "sha256-M1+uCoV5igihRfcUKrr1riygbe73/dzNnzPsmaLCmpo=", "narHash": "sha256-Xb8mke6UCYjge9kPR9o4P1nVrhk7QBbKv3xQ9cj7h2s=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "55d15ad12a74eb7d4646254e13638ad0c4128776", "rev": "130595eba61081acde9001f43de3248d8888ac4a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -52,20 +51,19 @@
}, },
"locked": { "locked": {
"dir": "packaging/nix", "dir": "packaging/nix",
"lastModified": 1733037609, "lastModified": 1735507919,
"narHash": "sha256-HkS24indfMaQbVZ+9GY5BHc+rqPvh8htF0rWYhvgPKI=", "narHash": "sha256-4cR4mk1660p3y8wnX0XbHSQh4KX0mbMn6/2YnALNt8o=",
"ref": "refs/heads/main", "owner": "Open-Wine-Components",
"rev": "e559e2e50999093c3e837d33886f9e14e34ead0a", "repo": "umu-launcher",
"revCount": 863, "rev": "59a82ea8cd284c7535bc06b8f6156abb7da96f6a",
"submodules": true, "type": "github"
"type": "git",
"url": "https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging/nix"
}, },
"original": { "original": {
"dir": "packaging/nix", "dir": "packaging/nix",
"submodules": true, "owner": "Open-Wine-Components",
"type": "git", "repo": "umu-launcher",
"url": "https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging/nix" "rev": "59a82ea8cd284c7535bc06b8f6156abb7da96f6a",
"type": "github"
} }
} }
}, },

View File

@ -5,25 +5,23 @@
# nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; # nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = { home-manager = {
url = "github:nix-community/home-manager/master"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
umu = { umu = {
url = "git+https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging\/nix&submodules=1"; url = "github:Open-Wine-Components/umu-launcher/59a82ea8cd284c7535bc06b8f6156abb7da96f6a?dir=packaging/nix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
# ...
# Optional - updates underlying without waiting for nix-citizen to update # Optional - updates underlying without waiting for nix-citizen to update
}; };
outputs = outputs =
{ { self
self, , nixpkgs
nixpkgs, , home-manager
home-manager, , ...
...
}@inputs: }@inputs:
let let
system = "x86_64-linux"; system = "x86_64-linux";

View File

@ -1,8 +1,8 @@
{ { config
config, , pkgs
pkgs, , lib
lib, , inputs
... , ...
}: }:
{ {
# Enable OpenGL # Enable OpenGL

View File

@ -1,31 +1,12 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
environment.sessionVariables = {
LIBVA_DRIVER_NAME = "nvidia";
};
nixpkgs.config.packageOverrides = pkgs: {
intel-vaapi-driver = pkgs.intel-vaapi-driver.override { enableHybridCodec = true; };
};
hardware = { hardware = {
enableRedistributableFirmware = true; enableRedistributableFirmware = true;
cpu.intel.updateMicrocode = true; cpu.intel.updateMicrocode = true;
graphics = { graphics = {
enable = true; enable = true;
enable32Bit = true; enable32Bit = true;
extraPackages = with pkgs; [
vaapiVdpau
mangohud
nvidia-vaapi-driver
intel-media-driver
intel-vaapi-driver
libvdpau-va-gl
];
extraPackages32 = with pkgs.pkgsi686Linux; [
mangohud
intel-media-driver
intel-vaapi-driver
];
}; };
nvidia = { nvidia = {

View File

@ -1,9 +1,15 @@
{ { config
config, , pkgs
pkgs, , inputs
inputs, , ...
...
}: }:
let
inherit (pkgs.stdenv.hostPlatform) system;
umu = inputs.umu.packages.${system}.umu.override {
version = inputs.umu.shortRev;
truststore = true;
};
in
{ {
services.flatpak.enable = true; services.flatpak.enable = true;
programs.nix-ld.enable = true; programs.nix-ld.enable = true;
@ -42,11 +48,11 @@
magicOrExtension = ''\x7fELF....AI\x02''; magicOrExtension = ''\x7fELF....AI\x02'';
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
(inputs.umu.packages.${pkgs.system}.umu.override { version = "${inputs.umu.shortRev}"; })
gfxreconstruct gfxreconstruct
glslang glslang
(opera.override { proprietaryCodecs = true; }) (opera.override { proprietaryCodecs = true; })
spirv-cross spirv-cross
lsof
spirv-headers spirv-headers
spirv-tools spirv-tools
vulkan-extension-layer vulkan-extension-layer
@ -58,7 +64,6 @@
vulkan-validation-layers vulkan-validation-layers
vkdisplayinfo vkdisplayinfo
vkd3d vkd3d
bottles
vkd3d-proton vkd3d-proton
vk-bootstrap vk-bootstrap
lutris lutris
@ -72,8 +77,6 @@
xdg-desktop-portal-gtk xdg-desktop-portal-gtk
google-chrome google-chrome
zoom-us zoom-us
# icu
# icu.dev
neovim neovim
git git
gnupg gnupg
@ -81,6 +84,7 @@
pinentry pinentry
rofi-rbw-x11 rofi-rbw-x11
rbw rbw
protontricks
nil nil
nixpkgs-fmt nixpkgs-fmt
curl curl
@ -89,6 +93,8 @@
usbutils usbutils
vim vim
wget wget
spotify
protonup
v4l-utils v4l-utils
nmap nmap
wineWowPackages.stable wineWowPackages.stable

View File

@ -1,12 +1,18 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
environment.systemPackages = with pkgs; [
pulseaudio
alsa-utils
];
security.rtkit.enable = true; security.rtkit.enable = true;
services.pipewire = { services.pipewire = {
enable = true; enable = true;
alsa.enable = true; alsa.enable = true;
alsa.support32Bit = true; alsa.support32Bit = true;
pulse.enable = true; pulse.enable = true;
# If you want to use JACK applications, uncomment this wireplumber = {
#jack.enable = true; enable = true;
package = pkgs.wireplumber;
};
}; };
} }

View File

@ -38,8 +38,6 @@
mumble mumble
pavucontrol pavucontrol
unrar unrar
protonup-qt
protonup-ng
mpv mpv
pamixer pamixer
pinentry pinentry
@ -47,7 +45,6 @@
restic restic
ripgrep ripgrep
sops sops
spotify
sshfs sshfs
expect expect
# k8s tools # k8s tools
@ -99,6 +96,7 @@
rustup rustup
gcc gcc
gnumake gnumake
(pkgs.callPackage ./vintagestory.nix { })
]; ];
} }

View File

@ -0,0 +1,108 @@
{
lib,
stdenv,
fetchurl,
makeWrapper,
makeDesktopItem,
copyDesktopItems,
xorg,
gtk2,
sqlite,
openal,
cairo,
libGLU,
SDL2,
freealut,
libglvnd,
pipewire,
libpulseaudio,
dotnet-runtime_8,
}:
stdenv.mkDerivation rec {
pname = "vintagestory";
version = "1.20.0-rc.6";
src = fetchurl {
url = "https://cdn.vintagestory.at/gamefiles/unstable/vs_client_linux-x64_${version}.tar.gz";
hash = "sha256-JxyQrZrAmMkUy28JUak0BHHpuGEb2fbxNrtOGVKGhOQ=";
};
nativeBuildInputs = [
makeWrapper
copyDesktopItems
];
buildInputs = [ dotnet-runtime_8 ];
runtimeLibs = lib.makeLibraryPath (
[
gtk2
sqlite
openal
cairo
libGLU
SDL2
freealut
libglvnd
pipewire
libpulseaudio
]
++ (with xorg; [
libX11
libXi
libXcursor
])
);
desktopItems = [
(makeDesktopItem {
name = "vintagestory";
desktopName = "Vintage Story";
exec = "vintagestory";
icon = "vintagestory";
comment = "Innovate and explore in a sandbox world";
categories = [ "Game" ];
})
];
installPhase = ''
runHook preInstall
mkdir -p $out/share/vintagestory $out/bin $out/share/pixmaps $out/share/fonts/truetype
cp -r * $out/share/vintagestory
cp $out/share/vintagestory/assets/gameicon.xpm $out/share/pixmaps/vintagestory.xpm
cp $out/share/vintagestory/assets/game/fonts/*.ttf $out/share/fonts/truetype
runHook postInstall
'';
preFixup =
''
sed -i 's/net7.0/net8.0/' $out/share/vintagestory/Vintagestory.runtimeconfig.json
sed -i 's/7.0.0/8.0.11/' $out/share/vintagestory/Vintagestory.runtimeconfig.json
makeWrapper ${dotnet-runtime_8}/bin/dotnet $out/bin/vintagestory \
--prefix LD_LIBRARY_PATH : "${runtimeLibs}" \
--add-flags $out/share/vintagestory/Vintagestory.dll
makeWrapper ${dotnet-runtime_8}/bin/dotnet $out/bin/vintagestory-server \
--prefix LD_LIBRARY_PATH : "${runtimeLibs}" \
--add-flags $out/share/vintagestory/VintagestoryServer.dll
''
+ ''
find "$out/share/vintagestory/assets/" -not -path "*/fonts/*" -regex ".*/.*[A-Z].*" | while read -r file; do
local filename="$(basename -- "$file")"
ln -sf "$filename" "''${file%/*}"/"''${filename,,}"
done
'';
meta = with lib; {
description = "In-development indie sandbox game about innovation and exploration";
homepage = "https://www.vintagestory.at/";
license = licenses.unfree;
maintainers = with maintainers; [
artturin
gigglesquid
];
};
}

View File

@ -54,20 +54,6 @@ vim.api.nvim_create_autocmd("BufWritePre", {
end end
}) })
-- LSP: expect
if executable('expect-language-server')
augroup lsp
autocmd!
autocmd User lsp_setup call lsp#register_server({
\ 'name': 'expect',
\ 'cmd': {server_info->['expect-language-server']},
\ 'whitelist': ['expect'],
\ 'initialization_options': {
\ 'method': 'builtin',
\ },
\ })
augroup END
endif
-- LSP: nix -- LSP: nix
lspconfig.nil_ls.setup({ lspconfig.nil_ls.setup({

View File

@ -24,6 +24,14 @@
"editor.formatOnSave" = true; "editor.formatOnSave" = true;
"nix.enableLanguageServer" = true; "nix.enableLanguageServer" = true;
"nix.serverPath" = "nil"; "nix.serverPath" = "nil";
"nix.formatterPath" = "nixfmt";
"nix.serverSettings" = {
"nil" = {
"formatting" = {
"command"= ["nixpkgs-fmt"];
};
};
};
}; };
}; };
} }