Compare commits
10 commits
2ac7a5de52
...
57112d33a2
| Author | SHA1 | Date | |
|---|---|---|---|
| 57112d33a2 | |||
| 1a2966e054 | |||
| 80c904edfd | |||
| 35ab173c24 | |||
| 9771242083 | |||
| 57c0d7237a | |||
| 6c59fb3e17 | |||
| 6944ac33e3 | |||
| 8d1f5e59c3 | |||
| 9ec7c2631d |
28 changed files with 267 additions and 401 deletions
13
.gitignore
vendored
Normal file
13
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# Nix build artifacts
|
||||
result
|
||||
result-*
|
||||
|
||||
# Direnv
|
||||
.direnv
|
||||
|
||||
# IDE / edytory
|
||||
.aider*
|
||||
|
||||
# Systemowe pliki tymczasowe
|
||||
*.swp
|
||||
*.swo
|
||||
20
base.nix
20
base.nix
|
|
@ -1,16 +1,18 @@
|
|||
{ pkgs, ... }: {
|
||||
|
||||
# Włączamy Flakes
|
||||
# === Włączamy Flakes ===
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
# paczki systemowe
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovim
|
||||
git
|
||||
openssh
|
||||
wget
|
||||
tree
|
||||
];
|
||||
# === Automatyczne sprzątanie store ===
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 30d";
|
||||
};
|
||||
|
||||
# === Optymalizacja store (deduplikacja) ===
|
||||
nix.settings.auto-optimise-store = true;
|
||||
|
||||
# === Pozwalamy na niewolne pakiety ===
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,61 +0,0 @@
|
|||
{
|
||||
description = "Modular NixOS config for gaming PC + office laptop";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
home-manager.url = "github:nix-community/home-manager";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, ... }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
lib = nixpkgs.lib;
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
gaming-amd = lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = [
|
||||
./hosts/gaming-amd/configuration.nix
|
||||
./modules/common/base.nix
|
||||
./modules/common/networking.nix
|
||||
./modules/common/users.nix
|
||||
./modules/common/locale.nix
|
||||
./modules/desktop/gaming.nix
|
||||
./modules/services.steam.nix
|
||||
];
|
||||
};
|
||||
|
||||
laptop-office = lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = [
|
||||
./hosts/laptop-office/configuration.nix
|
||||
./modules/common/base.nix
|
||||
./modules/common/networking.nix
|
||||
./modules/common/users.nix
|
||||
./modules/common/locale.nix
|
||||
./modules/desktop/office.nix
|
||||
./modules/services/printing.nix
|
||||
./modules/services/bluetooth.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
homeConfigurations = {
|
||||
gamer = home-manager.lib.homeManagerConfiguration {
|
||||
inherit system;
|
||||
modules = [
|
||||
./home/gamer/home.nix
|
||||
];
|
||||
};
|
||||
|
||||
office = home-manager.lib.homeManagerConfiguration {
|
||||
inherit system;
|
||||
modules = [
|
||||
./home/office/home.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
{ config, pkgs, ... }: {
|
||||
home.username = "gamer";
|
||||
home.homeDirectory = "/home/gamer";
|
||||
|
||||
programs.git.enable = true;
|
||||
programs.zsh.enable = true;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
discord obs-studio protonup-qt
|
||||
];
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
{ config, pkgs, ... }: {
|
||||
home.username = "office";
|
||||
home.homeDirectory = "/home/office";
|
||||
|
||||
programs.git.enable = true;
|
||||
programs.zsh.enable = true;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
libreoffice nextcloud-client zoom
|
||||
];
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
{ config, pkgs, ... }: {
|
||||
imports = [ ./hardware-configuration.nix ];
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
{ config, pkgs, ... }: {
|
||||
imports = [ ./hardware-configuration.nix ];
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
environment.systemPackages = with pkgs; [ vim git ];
|
||||
services.openssh.enable = true;
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
{ ... }: {
|
||||
i18n.defaultLocale = "pl_PL.UTF-8";
|
||||
time.timeZone = "Europe/Warsaw";
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
{ ... }: {
|
||||
networking.networkmanager.enable = true;
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
{ ... }: {
|
||||
users.users.gamer = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "networkmanager" ];
|
||||
};
|
||||
users.users.office = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "networkmanager" ];
|
||||
};
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
{ config, pkgs, ... }: {
|
||||
services.xserver.enable = true;
|
||||
services.xserver.desktopManager.gnome.enable = true;
|
||||
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
};
|
||||
|
||||
hardware.cpu.amd.updateMicrocode = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
mangohud goverlay lutris vkBasalt
|
||||
];
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
services.xserver.enable = true;
|
||||
services.xserver.desktopManager.plasma6.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
libreoffice thunderbird okular
|
||||
];
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
{ ... }: {
|
||||
hardware.bluetooth.enable = true;
|
||||
services.blueman.enable = true;
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
{ ... }: {
|
||||
services.printing.enable = true;
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
dedicatedServer.openFirewall = true;
|
||||
};
|
||||
environment.systemPackages = with pkgs; [ steam-run ];
|
||||
}
|
||||
31
flake.nix
31
flake.nix
|
|
@ -2,48 +2,33 @@
|
|||
description = "Konfiguracja wielu maszyn na raz";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; # Bleeding edge!
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
url = "github:nix-community/home-manager/nixos-unstable";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, ... }:
|
||||
let # pomocnicza funkcja
|
||||
outputs = { self, nixpkgs, home-manager, ... }:
|
||||
let
|
||||
mk_system = system: hostname: modules: nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = [
|
||||
{ networking.hostName = hostname; }
|
||||
# base configuration
|
||||
./base.nix
|
||||
# home manager
|
||||
home-manager.nixosModules.home-manager {
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.sharedModules = [ ./modules/home/tibia.nix ];
|
||||
home-manager.users.sasza = import ./home.nix;
|
||||
}
|
||||
] ++ modules;
|
||||
};
|
||||
};
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
nix-latitude = mk_system "x86_64-linux" "nix-latitude" [
|
||||
./hosts/nix-latitude/configuration.nix
|
||||
./modules/plasma.nix
|
||||
./modules/3dmodel.nix
|
||||
#./modules/network.nix
|
||||
#./modules/office.nix
|
||||
./modules/tibia.nix
|
||||
];
|
||||
|
||||
nix-gaming = mk_system "x86_64-linux" "nix-gaming" [
|
||||
./hosts/nix-gaming/configuration.nix
|
||||
./modules/plasma.nix
|
||||
./modules/gaming.nix
|
||||
./modules/network.nix
|
||||
# ./modules/office.nix
|
||||
./modules/3dmodel.nix
|
||||
./modules/3dprint.nix
|
||||
./hosts/nix-latitude/configuration.nix
|
||||
./modules/plasma.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
|||
41
home.nix
41
home.nix
|
|
@ -3,18 +3,55 @@
|
|||
home.homeDirectory = "/home/sasza";
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# Przeglądarki
|
||||
brave
|
||||
|
||||
# Narzędzia CLI
|
||||
neovim
|
||||
git
|
||||
htop
|
||||
glances
|
||||
tree
|
||||
wget
|
||||
openssh
|
||||
|
||||
# Modelowanie 3D
|
||||
openscad-unstable
|
||||
|
||||
# Druk 3D
|
||||
orca-slicer
|
||||
|
||||
# Gry
|
||||
lutris
|
||||
|
||||
# Sieć / VPN
|
||||
eddie
|
||||
wireguard-tools
|
||||
qbittorrent
|
||||
|
||||
# Biuro
|
||||
libreoffice-fresh
|
||||
|
||||
# KDE
|
||||
kdePackages.kate
|
||||
|
||||
# Dodane z remote
|
||||
file
|
||||
keepassxc
|
||||
nextcloud-client
|
||||
tmux
|
||||
unzip
|
||||
vlc
|
||||
];
|
||||
|
||||
# Przykład prostej konfiguracji Git
|
||||
programs.git = {
|
||||
enable = true;
|
||||
settings.user.name = "Sasza Stanczew";
|
||||
settings.user.email = "sasza@stanczew.com";
|
||||
};
|
||||
|
||||
programs.tibia.enable = true;
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
home.stateVersion = "24.11";
|
||||
home.stateVersion = "25.11";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,38 +1,25 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
# Bootloader
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# Use latest kernel.
|
||||
# Use latest kernel
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
networking.hostName = "nix-latitude"; # Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
# Timezone
|
||||
time.timeZone = "Europe/Warsaw";
|
||||
|
||||
# Select internationalisation properties.
|
||||
# Locale
|
||||
i18n.defaultLocale = "pl_PL.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "pl_PL.UTF-8";
|
||||
LC_IDENTIFICATION = "pl_PL.UTF-8";
|
||||
|
|
@ -45,45 +32,16 @@
|
|||
LC_TIME = "pl_PL.UTF-8";
|
||||
};
|
||||
|
||||
# Configure console keymap
|
||||
# Console keymap
|
||||
console.keyMap = "pl2";
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
# User account (pakiety w home-manager)
|
||||
users.users.sasza = {
|
||||
isNormalUser = true;
|
||||
description = "Sasza Stanczew";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
packages = with pkgs; [
|
||||
kdePackages.kate
|
||||
# thunderbird
|
||||
];
|
||||
};
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
# programs.gnupg.agent = {
|
||||
# enable = true;
|
||||
# enableSSHSupport = true;
|
||||
# };
|
||||
|
||||
# List services that you want to enable:
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
# services.openssh.enable = true;
|
||||
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "25.11"; # Did you read the comment?
|
||||
|
||||
# State version
|
||||
system.stateVersion = "25.11";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
|
||||
# paczki
|
||||
environment.systemPackages = with pkgs; [
|
||||
openscad-unstable
|
||||
];
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
|
||||
# paczki
|
||||
environment.systemPackages = with pkgs; [
|
||||
orca-slicer
|
||||
];
|
||||
}
|
||||
|
|
@ -1,13 +1,9 @@
|
|||
{ pkgs, ... }: {
|
||||
|
||||
# Grafika AMD i Steam
|
||||
# Akceleracja grafiki (AMD/Intel)
|
||||
hardware.graphics.enable = true;
|
||||
hardware.graphics.enable32Bit = true;
|
||||
|
||||
# Steam
|
||||
programs.steam.enable = true;
|
||||
|
||||
# paczki
|
||||
environment.systemPackages = with pkgs; [
|
||||
lutris
|
||||
|
||||
];
|
||||
}
|
||||
|
|
|
|||
147
modules/home/tibia.nix
Normal file
147
modules/home/tibia.nix
Normal file
|
|
@ -0,0 +1,147 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.programs.tibia;
|
||||
|
||||
# Legacy libxml2 (2.9.x) — wymagany przez Tibię, usunięty z nixpkgs-unstable
|
||||
libxml2_2_9 = pkgs.callPackage ../../packages/libxml2-2.9 { };
|
||||
|
||||
# Wspólne ścieżki bibliotek
|
||||
tibiaLibPath = lib.makeLibraryPath [
|
||||
pkgs.nss
|
||||
pkgs.nspr
|
||||
pkgs.libxkbfile
|
||||
libxml2_2_9
|
||||
];
|
||||
|
||||
# Helper: eksport LD_LIBRARY_PATH
|
||||
exportLibs = ''
|
||||
export LD_LIBRARY_PATH="${tibiaLibPath}:$LD_LIBRARY_PATH"
|
||||
'';
|
||||
|
||||
# Wrapper dla właściwego clienta (uruchamiany przez Tibia package.json)
|
||||
tibiaClientWrapper = pkgs.writeShellScriptBin "tibia-client" ''
|
||||
#!/usr/bin/env bash
|
||||
${exportLibs}
|
||||
exec steam-run "$HOME/.local/share/CipSoft GmbH/Tibia/packages/Tibia/bin/client" "$@"
|
||||
'';
|
||||
|
||||
# Patchuje package.json Tibii żeby używała wrappera zamiast surowego binary
|
||||
tibiaPatcher = pkgs.writeShellScriptBin "tibia-patch" ''
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
PKGDIR="$HOME/.local/share/CipSoft GmbH/Tibia/packages/Tibia"
|
||||
PKGJSON="$PKGDIR/package.json"
|
||||
LOCALWRAPPER="$PKGDIR/tibia-client-wrapper"
|
||||
|
||||
if [ ! -f "$PKGJSON" ]; then
|
||||
echo "package.json not found — run the launcher once first."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if grep -q "tibia-client-wrapper" "$PKGJSON" 2>/dev/null; then
|
||||
echo "Already patched."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
cat > "$LOCALWRAPPER" <<'TIBIA_WRAPPER'
|
||||
#!/usr/bin/env bash
|
||||
${exportLibs}
|
||||
exec ${tibiaClientWrapper}/bin/tibia-client "$@"
|
||||
TIBIA_WRAPPER
|
||||
chmod +x "$LOCALWRAPPER"
|
||||
|
||||
sed -i 's#"executable": "bin/client"#"executable": "tibia-client-wrapper"#' "$PKGJSON"
|
||||
|
||||
echo "Tibia client patched to use tibia-client-wrapper."
|
||||
'';
|
||||
|
||||
# Uruchamia launcher Tibii (pobrany ręcznie przez tibia-install)
|
||||
tibiaLauncherWrapper = pkgs.writeShellScriptBin "tibia" ''
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
LAUNCHER="$HOME/Gry/Tibia/Tibia"
|
||||
|
||||
if [ ! -x "$LAUNCHER" ]; then
|
||||
echo "Tibia launcher not found at:"
|
||||
echo " $LAUNCHER"
|
||||
echo ""
|
||||
echo "Run 'tibia-install' first, or download manually from:"
|
||||
echo " https://www.tibia.com/download/"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
tibia-patch
|
||||
|
||||
${exportLibs}
|
||||
exec steam-run "$LAUNCHER"
|
||||
'';
|
||||
|
||||
# Pomija launcher, odpala clienta bezpośrednio
|
||||
tibiaDirect = pkgs.writeShellScriptBin "tibia-direct" ''
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CLIENT="$HOME/.local/share/CipSoft GmbH/Tibia/packages/Tibia/bin/client"
|
||||
|
||||
if [ ! -x "$CLIENT" ]; then
|
||||
echo "Tibia client not found."
|
||||
echo "Run 'tibia' once so the launcher downloads the client."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
${exportLibs}
|
||||
exec steam-run "$CLIENT"
|
||||
'';
|
||||
|
||||
# Instaluje launcher Tibii na nowym systemie
|
||||
tibiaInstall = pkgs.writeShellScriptBin "tibia-install" ''
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
URL="https://static.tibia.com/download/tibia.x64.tar.gz"
|
||||
DEST="$HOME/Gry/Tibia"
|
||||
TMPDIR=$(mktemp -d)
|
||||
trap "rm -rf $TMPDIR" EXIT
|
||||
|
||||
echo "Downloading Tibia launcher from $URL ..."
|
||||
wget -q --show-progress -O "$TMPDIR/tibia.tar.gz" "$URL"
|
||||
|
||||
mkdir -p "$DEST"
|
||||
tar xzf "$TMPDIR/tibia.tar.gz" -C "$DEST"
|
||||
chmod +x "$DEST/Tibia"
|
||||
|
||||
echo ""
|
||||
echo "Tibia launcher installed to: $DEST/Tibia"
|
||||
echo "Run 'tibia' to start."
|
||||
'';
|
||||
|
||||
# .desktop entry
|
||||
tibiaDesktop = pkgs.makeDesktopItem {
|
||||
name = "tibia";
|
||||
exec = "tibia-direct";
|
||||
desktopName = "Tibia";
|
||||
comment = "Tibia MMORPG Client";
|
||||
categories = [ "Game" ];
|
||||
};
|
||||
|
||||
in {
|
||||
options.programs.tibia = {
|
||||
enable = lib.mkEnableOption "Tibia game client support";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
steam-run
|
||||
libxml2_2_9
|
||||
wget
|
||||
tibiaClientWrapper
|
||||
tibiaPatcher
|
||||
tibiaLauncherWrapper
|
||||
tibiaDirect
|
||||
tibiaInstall
|
||||
tibiaDesktop
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
|
||||
# paczki
|
||||
environment.systemPackages = with pkgs; [
|
||||
eddie
|
||||
wireguard-tools
|
||||
qbittorrent
|
||||
];
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
|
||||
# paczki
|
||||
environment.systemPackages = with pkgs; [
|
||||
libreoffice-fresh
|
||||
];
|
||||
}
|
||||
|
|
@ -1,20 +1,23 @@
|
|||
{ pkgs, ... }: {
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
# You can disable this if you're only using the Wayland session.
|
||||
# Enable X11 (można wyłączyć przy czystym Waylandzie)
|
||||
services.xserver.enable = true;
|
||||
|
||||
# Enable the KDE Plasma Desktop Environment.
|
||||
# KDE Plasma 6 + SDDM z autologinem
|
||||
services.displayManager.sddm.enable = true;
|
||||
services.displayManager.autoLogin = {
|
||||
enable = true;
|
||||
user = "sasza";
|
||||
};
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
|
||||
# Configure keymap in X11
|
||||
# Polski układ klawiatury w X11
|
||||
services.xserver.xkb = {
|
||||
layout = "pl";
|
||||
variant = "";
|
||||
};
|
||||
|
||||
# Enable sound with pipewire.
|
||||
# Dźwięk — PipeWire zamiast PulseAudio
|
||||
services.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
|
|
@ -22,23 +25,5 @@
|
|||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
# If you want to use JACK applications, uncomment this
|
||||
#jack.enable = true;
|
||||
|
||||
# use the example session manager (no others are packaged yet so this is enabled by default,
|
||||
# no need to redefine it in your config for now)
|
||||
#media-session.enable = true;
|
||||
};
|
||||
|
||||
# paczki graficzne
|
||||
environment.systemPackages = with pkgs; [
|
||||
brave
|
||||
];
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
# Install firefox.
|
||||
# programs.firefox.enable = true;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,105 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
|
||||
# Inline legacy libxml2 (2.9.x) because modern Nixpkgs removed it
|
||||
libxml2_2_9 = pkgs.stdenv.mkDerivation {
|
||||
pname = "libxml2-2.9";
|
||||
version = "2.9.14";
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://download.gnome.org/sources/libxml2/2.9/libxml2-2.9.14.tar.xz";
|
||||
sha256 = "sha256-YNdKJX0czsBHXnScui8hVZ5IE577pv8oIkNXx8eY3+4=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgs.pkg-config ];
|
||||
buildInputs = [ pkgs.zlib pkgs.xz ];
|
||||
|
||||
configureFlags = [
|
||||
"--disable-static"
|
||||
"--without-python"
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
};
|
||||
|
||||
# Wrapper for the real client
|
||||
tibiaClientWrapper = pkgs.writeShellScriptBin "tibia-client" ''
|
||||
#!/usr/bin/env bash
|
||||
export LD_LIBRARY_PATH="${pkgs.nss}/lib:${pkgs.libxkbfile}/lib:${pkgs.nspr}/lib:${libxml2_2_9}/lib:$LD_LIBRARY_PATH"
|
||||
exec steam-run "$HOME/.local/share/CipSoft GmbH/Tibia/packages/Tibia/bin/client" "$@"
|
||||
'';
|
||||
# Script that patches Tibia's package.json
|
||||
tibiaPatcher = pkgs.writeShellScriptBin "tibia-patch" ''
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
PKGDIR="$HOME/.local/share/CipSoft GmbH/Tibia/packages/Tibia"
|
||||
PKGJSON="$PKGDIR/package.json"
|
||||
LOCALWRAPPER="$PKGDIR/tibia-client-wrapper"
|
||||
|
||||
if [ ! -f "$PKGJSON" ]; then
|
||||
echo "package.json not found — run the launcher once first."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Create wrapper INSIDE the Tibia package directory
|
||||
cat > "$LOCALWRAPPER" <<EOF
|
||||
#!/usr/bin/env bash
|
||||
export LD_LIBRARY_PATH="${pkgs.nss}/lib:${pkgs.libxkbfile}/lib:${pkgs.nspr}/lib:${libxml2_2_9}/lib:\$LD_LIBRARY_PATH"
|
||||
exec /run/current-system/sw/bin/tibia-client "\$@"
|
||||
EOF
|
||||
chmod +x "$LOCALWRAPPER"
|
||||
|
||||
# Patch JSON to use the local wrapper (relative path!)
|
||||
sed -i 's#"executable": "bin/client"#"executable": "tibia-client-wrapper"#' "$PKGJSON"
|
||||
|
||||
echo "Tibia client patched to use tibia-client-wrapper."
|
||||
'';
|
||||
|
||||
tibiaLauncherWrapper = pkgs.writeShellScriptBin "tibia" ''
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
LAUNCHER="$HOME/Gry/Tibia/Tibia"
|
||||
|
||||
if [ ! -x "$LAUNCHER" ]; then
|
||||
echo "Tibia launcher not found at:"
|
||||
echo " $LAUNCHER"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
tibia-patch
|
||||
|
||||
export LD_LIBRARY_PATH="${pkgs.nss}/lib:${pkgs.libxkbfile}/lib:${pkgs.nspr}/lib:${libxml2_2_9}/lib:$LD_LIBRARY_PATH"
|
||||
exec steam-run "$LAUNCHER"
|
||||
'';
|
||||
|
||||
tibiaDirect = pkgs.writeShellScriptBin "tibia-direct" ''
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CLIENT="$HOME/.local/share/CipSoft GmbH/Tibia/packages/Tibia/bin/client"
|
||||
|
||||
if [ ! -x "$CLIENT" ]; then
|
||||
echo "Tibia client not found."
|
||||
echo "Run the official launcher once so it downloads the client."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export LD_LIBRARY_PATH="${pkgs.nss}/lib:${pkgs.libxkbfile}/lib:${pkgs.nspr}/lib:${libxml2_2_9}/lib:$LD_LIBRARY_PATH"
|
||||
|
||||
exec steam-run "$CLIENT"
|
||||
'';
|
||||
|
||||
in
|
||||
{
|
||||
environment.systemPackages = [
|
||||
pkgs.steam-run
|
||||
libxml2_2_9
|
||||
tibiaClientWrapper
|
||||
tibiaPatcher
|
||||
tibiaLauncherWrapper
|
||||
tibiaDirect
|
||||
];
|
||||
}
|
||||
|
||||
27
packages/libxml2-2.9/default.nix
vendored
Normal file
27
packages/libxml2-2.9/default.nix
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ stdenv, fetchurl, pkg-config, zlib, xz }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "libxml2-2-9";
|
||||
version = "2.9.14";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://download.gnome.org/sources/libxml2/2.9/libxml2-2.9.14.tar.xz";
|
||||
sha256 = "sha256-YNdKJX0czsBHXnScui8hVZ5IE577pv8oIkNXx8eY3+4=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ zlib xz ];
|
||||
|
||||
configureFlags = [
|
||||
"--disable-static"
|
||||
"--without-python"
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
description = "Legacy libxml2 2.9.14, required by Tibia client";
|
||||
homepage = "http://xmlsoft.org/";
|
||||
license = stdenv.lib.licenses.mit;
|
||||
};
|
||||
}
|
||||
Loading…
Reference in a new issue