Compare commits
46 Commits
3867276cfc
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 2f7142135f | |||
| 38f6ec8305 | |||
| 3dadc29a37 | |||
| 48535bb6d4 | |||
| 087a924e5a | |||
| 2e7541e5c3 | |||
| 0c2d3329cb | |||
| 80f5b4a8f2 | |||
| 4f14a61b6b | |||
| ae3dbafe8b | |||
| 63862ae5d9 | |||
| fea8fde271 | |||
| cba857e830 | |||
| 2e7fa85c5a | |||
| deb946154f | |||
| 27285a33e2 | |||
| 454977900e | |||
| 8ca322be98 | |||
| 96452d4a90 | |||
| 74fe377b0c | |||
| 8118984fac | |||
| 911930bcc3 | |||
| f3d247f8ca | |||
| 2dff283566 | |||
| 5d02f49c43 | |||
| 3be9cbe622 | |||
| 94f0e793d7 | |||
| 72221d9157 | |||
| f117c77624 | |||
| 8553a02ca6 | |||
| e3650d5adb | |||
| cd9716a7f2 | |||
| 37e89dbe28 | |||
| f9adbedd20 | |||
| d4624bd695 | |||
| da43fd90fd | |||
| be4f4c26a2 | |||
| 435929b431 | |||
| 7edfa1ebfa | |||
| 0100678032 | |||
| 75362d2319 | |||
| 7f7fd3669c | |||
| caf1d5cd60 | |||
| 0243cb0b18 | |||
| 6c4b9c5433 | |||
| 251762f5dd |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +1,2 @@
|
||||
.session
|
||||
modules/chataigne/squashfs-root
|
||||
|
||||
@@ -9,16 +9,34 @@
|
||||
{
|
||||
imports = [
|
||||
/etc/nixos/hardware-configuration.nix
|
||||
inputs.walker.nixosModules.default
|
||||
];
|
||||
|
||||
# Allow Nix command and flakes (ofc)
|
||||
nix.settings.experimental-features = [
|
||||
# Nix settings
|
||||
## Limit Cores on rebuild and enable Flakes
|
||||
nix = {
|
||||
registry = {
|
||||
voidarc = {
|
||||
from = {
|
||||
id = "voidarc";
|
||||
type = "indirect";
|
||||
};
|
||||
to = {
|
||||
type = "git";
|
||||
url = "https://git.voidarc.co.uk/voidarc/flakes.git";
|
||||
};
|
||||
};
|
||||
};
|
||||
settings = {
|
||||
cores = 6;
|
||||
download-buffer-size = 524288000;
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# Allow unfree packages
|
||||
## Allow unfree packages and add pkgs.unstable
|
||||
nixpkgs = {
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
@@ -32,7 +50,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
# Nix store shit
|
||||
## Optimise Nix store on rebuild and collect garbage as a service
|
||||
nix.optimise.automatic = true;
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
@@ -40,7 +58,7 @@
|
||||
options = "--delete-older-than 5d";
|
||||
};
|
||||
|
||||
# Boot
|
||||
# Bootloader theming and plymouth
|
||||
boot = {
|
||||
loader = {
|
||||
timeout = 2;
|
||||
@@ -65,9 +83,13 @@
|
||||
};
|
||||
};
|
||||
|
||||
# Use latest kernel.
|
||||
## Use latest kernel
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
# Bluetooth and Networking
|
||||
hardware.bluetooth.enable = true;
|
||||
hardware.xpadneo.enable = true;
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
networking.networkmanager.dns = "none";
|
||||
networking.nameservers = [
|
||||
@@ -75,14 +97,8 @@
|
||||
"8.8.8.8"
|
||||
];
|
||||
|
||||
# Enable bluetooth
|
||||
hardware.bluetooth.enable = true;
|
||||
hardware.xpadneo.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/London";
|
||||
|
||||
# Locale
|
||||
time.timeZone = "Europe/London";
|
||||
i18n.defaultLocale = "en_GB.UTF-8";
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_GB.UTF-8";
|
||||
@@ -96,23 +112,23 @@
|
||||
LC_TIME = "en_GB.UTF-8";
|
||||
};
|
||||
|
||||
# Windowing Systems
|
||||
services.xserver.enable = true;
|
||||
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
package = pkgs.unstable.hyprland;
|
||||
};
|
||||
security.polkit.enable = true;
|
||||
|
||||
# Keymap
|
||||
# Userspace Stuff
|
||||
## Keymap
|
||||
services.xserver.xkb = {
|
||||
layout = "gb";
|
||||
variant = "";
|
||||
};
|
||||
console.keyMap = "uk";
|
||||
|
||||
# Pipewire
|
||||
## Desktop
|
||||
services.xserver.enable = true;
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
||||
};
|
||||
security.polkit.enable = true;
|
||||
|
||||
## Audio Server
|
||||
services.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
@@ -123,6 +139,7 @@
|
||||
};
|
||||
|
||||
# Local User
|
||||
## User config
|
||||
users.users.user01 = {
|
||||
isNormalUser = true;
|
||||
shell = pkgs.zsh;
|
||||
@@ -136,67 +153,118 @@
|
||||
"docker"
|
||||
"wheel"
|
||||
];
|
||||
packages = with pkgs; [
|
||||
packages =
|
||||
with pkgs;
|
||||
let
|
||||
input =
|
||||
{
|
||||
package,
|
||||
output ? "default",
|
||||
}:
|
||||
inputs.${package}.packages.${pkgs.stdenv.hostPlatform.system}.${output};
|
||||
wrap =
|
||||
{
|
||||
name,
|
||||
pkg,
|
||||
modules,
|
||||
}:
|
||||
pkgs.symlinkJoin {
|
||||
inherit name;
|
||||
paths = [ pkg ];
|
||||
nativeBuildInputs = [ pkgs.makeWrapper ];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/${name} \
|
||||
--prefix PATH : ${pkgs.lib.makeBinPath modules}
|
||||
'';
|
||||
};
|
||||
in
|
||||
[
|
||||
# Ricing
|
||||
## Desktop
|
||||
bibata-cursors
|
||||
catppuccin-gtk
|
||||
waybar
|
||||
hyprlock
|
||||
cava
|
||||
cmatrix
|
||||
swaynotificationcenter
|
||||
inputs.chataigne.packages.${stdenv.hostPlatform.system}.chataigne
|
||||
dunst
|
||||
wlogout
|
||||
wpaperd
|
||||
kando
|
||||
oh-my-posh
|
||||
|
||||
## Desktop Utilities
|
||||
grimblast
|
||||
gsettings-desktop-schemas
|
||||
wl-clipboard
|
||||
(wrap {
|
||||
name = "otter-launcher";
|
||||
pkg = (
|
||||
input {
|
||||
package = "otter-launcher";
|
||||
}
|
||||
);
|
||||
modules = [
|
||||
chafa
|
||||
jq
|
||||
];
|
||||
})
|
||||
(input { package = "fsel"; })
|
||||
|
||||
# Terminal
|
||||
## Styling / Functionality
|
||||
oh-my-posh
|
||||
carapace
|
||||
kitty
|
||||
github-cli
|
||||
p7zip
|
||||
bluetuith
|
||||
wget
|
||||
playerctl
|
||||
git
|
||||
fastfetch
|
||||
lsd
|
||||
inputs.doot.packages.${stdenv.hostPlatform.system}.default
|
||||
stow
|
||||
zsh-autocomplete
|
||||
bat
|
||||
|
||||
## Tools
|
||||
lazygit
|
||||
p7zip-rar
|
||||
any-nix-shell
|
||||
dysk
|
||||
bluetui
|
||||
fzf
|
||||
ripgrep
|
||||
zsh-autocomplete
|
||||
nodejs
|
||||
lazygit
|
||||
tailscale
|
||||
wget
|
||||
htop
|
||||
playerctl
|
||||
git
|
||||
lsd
|
||||
(input {
|
||||
package = "doot";
|
||||
})
|
||||
|
||||
# Thunar stuff
|
||||
xfce.thunar
|
||||
xfce.thunar-volman
|
||||
xfce.thunar-vcs-plugin
|
||||
xfce.thunar-archive-plugin
|
||||
## Other CLI Apps
|
||||
nodejs
|
||||
fastfetch
|
||||
zellij
|
||||
cava
|
||||
cmatrix
|
||||
opencode
|
||||
tailscale
|
||||
syncthing
|
||||
(input { package = "norgolith"; })
|
||||
jellyfin-tui
|
||||
|
||||
# Apps
|
||||
pavucontrol
|
||||
## Actual Useful Stuff
|
||||
nemo
|
||||
kitty
|
||||
firefox
|
||||
htop
|
||||
input-remapper
|
||||
tor-browser
|
||||
gotify-desktop
|
||||
techmino
|
||||
pavucontrol
|
||||
mpv
|
||||
input-remapper
|
||||
|
||||
## Other Nonsense
|
||||
tor-browser
|
||||
techmino
|
||||
prismlauncher
|
||||
delfin
|
||||
libreoffice-qt6
|
||||
syncthing
|
||||
xremap
|
||||
blueman
|
||||
(input {
|
||||
package = "chataigne";
|
||||
})
|
||||
];
|
||||
};
|
||||
|
||||
# Zsh
|
||||
## Zsh
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
@@ -213,87 +281,54 @@
|
||||
];
|
||||
};
|
||||
};
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
|
||||
# User programs
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
package = pkgs.unstable.steam;
|
||||
## User programs
|
||||
programs = {
|
||||
dconf.enable = true;
|
||||
xfconf.enable = true;
|
||||
gdk-pixbuf.modulePackages = [ pkgs.librsvg ]; # For wlogout svgs
|
||||
};
|
||||
programs.walker.enable = true;
|
||||
programs.dconf.enable = true;
|
||||
programs.xfconf.enable = true;
|
||||
|
||||
# User Services
|
||||
services.gvfs.enable = true;
|
||||
services.tailscale.enable = true;
|
||||
services.printing.enable = true;
|
||||
services.upower.enable = true;
|
||||
services.openssh.enable = true;
|
||||
services.elephant.enable = true;
|
||||
services.avahi.enable = true;
|
||||
## User Services
|
||||
services = {
|
||||
gvfs.enable = true;
|
||||
input-remapper.enable = true;
|
||||
tailscale.enable = true;
|
||||
printing.enable = true;
|
||||
upower.enable = true;
|
||||
openssh.enable = true;
|
||||
avahi.enable = true;
|
||||
};
|
||||
|
||||
# Fonts
|
||||
## Fonts
|
||||
fonts.packages = with pkgs; [
|
||||
nerd-fonts.fira-mono
|
||||
];
|
||||
|
||||
fonts.fontconfig.defaultFonts.serif = [ "Fira Mono Nerd Font" ];
|
||||
|
||||
# System Packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
||||
(pkgs.symlinkJoin {
|
||||
name = "nvim-with-lsp";
|
||||
paths = [ pkgs.neovim ];
|
||||
buildInputs = [ pkgs.makeWrapper ];
|
||||
postBuild = ''
|
||||
export TREE_SITTER_LIB_PATH="/run/current-system/sw/lib"
|
||||
wrapProgram $out/bin/nvim \
|
||||
--prefix PATH : ${
|
||||
pkgs.lib.makeBinPath [
|
||||
# lsps
|
||||
pkgs.lua-language-server
|
||||
pkgs.vscode-langservers-extracted
|
||||
pkgs.emmet-ls
|
||||
pkgs.prettier
|
||||
pkgs.black
|
||||
pkgs.nixfmt
|
||||
pkgs.nil
|
||||
pkgs.typescript-language-server
|
||||
pkgs.tailwindcss-language-server
|
||||
pkgs.stylua
|
||||
pkgs.nixd
|
||||
|
||||
# other shit
|
||||
pkgs.lua5_1
|
||||
inputs.tree-sitter.packages.${stdenv.hostPlatform.system}.default
|
||||
pkgs.ripgrep
|
||||
pkgs.gcc
|
||||
pkgs.gnumake
|
||||
]
|
||||
}
|
||||
'';
|
||||
})
|
||||
# Utilities
|
||||
inputs.nvim-wrapped.packages.${stdenv.hostPlatform.system}.default
|
||||
vim
|
||||
unzip
|
||||
python310 # Its python like come on
|
||||
python310
|
||||
usbutils
|
||||
curlWithGnuTls
|
||||
|
||||
# Graphics Drivers
|
||||
# System
|
||||
mesa
|
||||
vulkan-tools
|
||||
|
||||
# FileSystem Dependancies
|
||||
gvfs
|
||||
|
||||
# C copmpiler
|
||||
clang
|
||||
|
||||
# XDG Desktop Portal Etc
|
||||
xdg-desktop-portal
|
||||
xdg-desktop-portal-hyprland
|
||||
|
||||
# Other things (from gnome)
|
||||
glib
|
||||
gnutls
|
||||
liblzf
|
||||
librsvg
|
||||
appimage-run
|
||||
libnotify
|
||||
gsettings-desktop-schemas
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
packages = with pkgs; [
|
||||
# Ricing
|
||||
inputs.way-edges.packages.${stdenv.hostPlatform.system}.way-edges
|
||||
inputs.chataigne.packages.${stdenv.hostPlatform.system}.chataigne
|
||||
|
||||
# Terminal
|
||||
light
|
||||
@@ -48,4 +47,6 @@
|
||||
];
|
||||
};
|
||||
|
||||
programs.steam.enable = true;
|
||||
|
||||
}
|
||||
|
||||
@@ -54,6 +54,61 @@
|
||||
};
|
||||
};
|
||||
|
||||
# Pipewire stuff
|
||||
services.pipewire.extraConfig.pipewire."97-null-sink" = {
|
||||
"context.objects" = [
|
||||
{
|
||||
factory = "adapter";
|
||||
args = {
|
||||
"factory.name" = "support.null-audio-sink";
|
||||
"node.name" = "Null-Sink";
|
||||
"node.description" = "Null Sink";
|
||||
"media.class" = "Audio/Sink";
|
||||
"audio.position" = "FL,FR";
|
||||
};
|
||||
}
|
||||
{
|
||||
factory = "adapter";
|
||||
args = {
|
||||
"factory.name" = "support.null-audio-sink";
|
||||
"node.name" = "Null-Source";
|
||||
"node.description" = "Null Source";
|
||||
"media.class" = "Audio/Source";
|
||||
"audio.position" = "FL,FR";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
services.pipewire.extraConfig.pipewire."98-virtual-mic" = {
|
||||
"context.modules" = [
|
||||
{
|
||||
name = "libpipewire-module-loopback";
|
||||
args = {
|
||||
"audio.position" = "FL,FR";
|
||||
"node.description" = "Mumble as Microphone";
|
||||
"capture.props" = {
|
||||
# Mumble's output node name.
|
||||
"node.target" = "Mumble";
|
||||
"node.passive" = true;
|
||||
};
|
||||
"playback.props" = {
|
||||
"node.name" = "Virtual-Mumble-Microphone";
|
||||
"media.class" = "Audio/Source";
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
# Mumble server
|
||||
services.murmur = {
|
||||
enable = true;
|
||||
bandwidth = 540000;
|
||||
bonjour = true;
|
||||
password = "mumblepass";
|
||||
autobanTime = 0;
|
||||
};
|
||||
|
||||
# Local User
|
||||
users.users.user01 = {
|
||||
extraGroups = [
|
||||
@@ -62,22 +117,45 @@
|
||||
];
|
||||
packages = with pkgs; [
|
||||
bottles
|
||||
mumble
|
||||
ferdium
|
||||
android-tools
|
||||
anki
|
||||
vesktop
|
||||
wine64
|
||||
delfin
|
||||
docker
|
||||
jellyfin-tui
|
||||
orca-slicer
|
||||
exiftool
|
||||
ffmpeg
|
||||
];
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
inputs.sls-steam.packages.${pkgs.stdenv.hostPlatform.system}.wrapped
|
||||
];
|
||||
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
package = pkgs.steam.override {
|
||||
extraEnv = {
|
||||
LD_AUDIT = "${
|
||||
inputs.sls-steam.packages.${pkgs.stdenv.hostPlatform.system}.sls-steam
|
||||
}/library-inject.so:${
|
||||
inputs.sls-steam.packages.${pkgs.stdenv.hostPlatform.system}.sls-steam
|
||||
}/SLSsteam.so";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.unbound = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
services.wivrn = {
|
||||
enable = true;
|
||||
package = pkgs.unstable.wivrn;
|
||||
openFirewall = true;
|
||||
defaultRuntime = true;
|
||||
};
|
||||
|
||||
virtualisation.docker = {
|
||||
|
||||
958
flake.lock
generated
958
flake.lock
generated
File diff suppressed because it is too large
Load Diff
68
flake.nix
68
flake.nix
@@ -2,22 +2,34 @@
|
||||
description = "Master flake for Voidarc nix config";
|
||||
|
||||
inputs = {
|
||||
# System
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
||||
nvim-wrapped = {
|
||||
url = "git+file:///home/user01/.dotfiles/.config/nvim";
|
||||
};
|
||||
hyprland.url = "github:hyprwm/Hyprland";
|
||||
|
||||
elephant.url = "github:abenz1267/elephant";
|
||||
walker = {
|
||||
url = "github:abenz1267/walker";
|
||||
inputs.elephant.follows = "elephant";
|
||||
# Apps
|
||||
sls-steam.url = "github:AceSLS/SLSsteam";
|
||||
chataigne.url = "./modules/chataigne";
|
||||
norgolith = {
|
||||
url = "github:NTBBloodbath/norgolith";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
chataigne.url = "./modules/chataigne";
|
||||
|
||||
tree-sitter.url = "github:tree-sitter/tree-sitter?ref=8b8199775f96ca8642cf7860da46100875b38453";
|
||||
|
||||
# Utils
|
||||
doot.url = "github:voidarclabs/nixos.doot";
|
||||
way-edges.url = "github:way-edges/way-edges";
|
||||
otter-launcher.url = "github:kuokuo123/otter-launcher";
|
||||
fsel.url = "github:Mjoyufull/fsel";
|
||||
|
||||
# Davinci-resolve
|
||||
mesa-davinci.url = "github:nixos/nixpkgs?ref=599ddd2b79331c1e6153e1659bdaab65d62c4c82";
|
||||
|
||||
omnisearch = {
|
||||
url = "git+https://git.voidarc.co.uk/voidarc/omnisearch";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
@@ -28,34 +40,32 @@
|
||||
}@inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
|
||||
hardwareConfig = import /etc/nixos/hardware-configuration.nix;
|
||||
common = import ./configs/common.nix;
|
||||
|
||||
mkSystem =
|
||||
extraModules:
|
||||
nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
common
|
||||
hardwareConfig
|
||||
]
|
||||
++ extraModules;
|
||||
};
|
||||
in
|
||||
{
|
||||
nixosConfigurations.mobile02 = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = { inherit inputs; };
|
||||
|
||||
modules = [
|
||||
./configs/configuration-laptop.nix
|
||||
./configs/common.nix
|
||||
hardwareConfig
|
||||
{
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
nixosConfigurations.hackstation = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = { inherit inputs; };
|
||||
|
||||
modules = [
|
||||
nixosConfigurations = {
|
||||
mobile02 = mkSystem [ ./configs/configuration-laptop.nix ];
|
||||
hackstation = mkSystem [
|
||||
./configs/configuration-pc.nix
|
||||
./configs/common.nix
|
||||
./modules/davinci/davinci.nix
|
||||
./modules/i3/i3.nix
|
||||
hardwareConfig
|
||||
inputs.omnisearch.nixosModules.default
|
||||
{
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
services.omnisearch.enable = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
Binary file not shown.
@@ -1,131 +0,0 @@
|
||||
{ pkgs, pinnedPkgs, ... }:
|
||||
|
||||
let
|
||||
# 1. Define the AppImage source.
|
||||
appImageSrc = ./Chataigne-linux-x64-bleedingedge.AppImage;
|
||||
|
||||
# 2a. Libraries pulled from the modern, current Nixpkgs (for small size).
|
||||
modernLibs = with pkgs; [
|
||||
alsa-lib
|
||||
freetype
|
||||
avahi
|
||||
libglvnd
|
||||
curl
|
||||
SDL2
|
||||
hidapi
|
||||
xorg.libXrandr
|
||||
];
|
||||
|
||||
# 2b. Libraries pulled from the older, pinned package set (ONLY the ones that failed).
|
||||
pinnedCurlLibs = with pinnedPkgs; [
|
||||
curlWithGnuTls # This is the critical component for the CURL_GNUTLS_3 symbol.
|
||||
gnutls
|
||||
];
|
||||
|
||||
# 3. Combine the modern runtime dependencies with the pinned compatibility libraries.
|
||||
appImageDeps = [
|
||||
pkgs.steam-run
|
||||
pkgs.stdenv.cc.cc.lib # Ensures the modern C++ runtime is available
|
||||
]
|
||||
++ modernLibs
|
||||
++ pinnedCurlLibs;
|
||||
|
||||
chataigneDesktopItem = {
|
||||
desktopName = "Chataigne";
|
||||
name = "chataigne";
|
||||
exec = "chataigne"; # The name of the wrapper script in $out/bin
|
||||
icon = "chataigne"; # The name of the icon file (without extension)
|
||||
genericName = "Creative Control Software";
|
||||
comment = "Control and experiment with creative applications, hardware, and media.";
|
||||
categories = [
|
||||
"AudioVideo"
|
||||
"Development"
|
||||
];
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
# 4. Create the final runnable derivation
|
||||
pkgs.stdenv.mkDerivation {
|
||||
pname = "chataigne-runner";
|
||||
version = "1.0";
|
||||
|
||||
# --- Attributes needed for AppImage running (not compiling) ---
|
||||
src = ./.;
|
||||
dontUnpack = true;
|
||||
dontBuild = true;
|
||||
# --------------------------------------------------
|
||||
|
||||
# Inject the combined dependencies into the environment
|
||||
buildInputs = appImageDeps;
|
||||
|
||||
# The install phase creates an executable wrapper script, extracts the AppImage,
|
||||
# and now handles the desktop file and icon.
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
|
||||
# --- STRATEGY: Extract AppImage contents to bypass FUSE, then fix LD_LIBRARY_PATH ---
|
||||
echo "Extracting AppImage contents to bypass FUSE requirement..."
|
||||
|
||||
# Use the absolute Nix Store path of the AppImage
|
||||
${appImageSrc} --appimage-extract
|
||||
echo "appimage extracted"
|
||||
|
||||
# 2. Check if extraction worked and move the content to $out
|
||||
if [ ! -d "squashfs-root" ]; then
|
||||
echo "Extraction failed. The AppImage may not support --appimage-extract."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 2. CRITICAL FIX: Manually create and install the .desktop file
|
||||
mkdir -p $out/share/applications
|
||||
|
||||
# pkgs.lib.makeDesktopItem takes the metadata and creates a small derivation
|
||||
# We copy the resulting .desktop file from that derivation's output path ($desktop_file_path)
|
||||
local desktop_file_path="${pkgs.makeDesktopItem chataigneDesktopItem}"
|
||||
|
||||
# The file is typically named $name.desktop inside the share/applications folder of the new derivation
|
||||
cp $desktop_file_path/share/applications/chataigne.desktop $out/share/applications/
|
||||
|
||||
# Copy the extracted contents into the output directory
|
||||
cp -r squashfs-root $out/
|
||||
|
||||
# --- DESKTOP ENTRY & ICON (NEW) ---
|
||||
echo "Processing icon and desktop file..."
|
||||
|
||||
# AppImages usually place the icon in squashfs-root/.DirIcon or similar
|
||||
# We will assume it's in the root of the extracted content.
|
||||
local icon_source="$out/squashfs-root/.DirIcon"
|
||||
local icon_target="$out/share/icons/hicolor/128x128/apps/chataigne.png" # Standard location
|
||||
|
||||
# Use the icon if it exists (AppImages often use a .png or .svg)
|
||||
if [ -f "$icon_source" ]; then
|
||||
mkdir -p "$(dirname "$icon_target")"
|
||||
cp "$icon_source" "$icon_target"
|
||||
else
|
||||
echo "Warning: Could not find icon at $icon_source. Using default/no icon."
|
||||
fi
|
||||
# ----------------------------------
|
||||
|
||||
# 3. Create the 'chataigne' executable wrapper
|
||||
cat > $out/bin/chataigne << EOF
|
||||
#!${pkgs.stdenv.shell}
|
||||
|
||||
# The LD_LIBRARY_PATH is created using all dependencies (excluding the wrapper 'steam-run').
|
||||
# This ensures the AppImage finds the pinned CURL library.
|
||||
export LD_LIBRARY_PATH="${pkgs.lib.makeLibraryPath (pkgs.lib.remove pkgs.steam-run appImageDeps)}:$LD_LIBRARY_PATH"
|
||||
|
||||
# Use steam-run to launch the main execution script inside the extracted folder.
|
||||
exec ${pkgs.steam-run}/bin/steam-run "$out/squashfs-root/AppRun" "\$@"
|
||||
EOF
|
||||
|
||||
chmod +x $out/bin/chataigne
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Declarative runner for the Chataigne AppImage, providing necessary dependencies.";
|
||||
homepage = "https://chataigne.io/"; # Example: Add the actual homepage
|
||||
license = pkgs.lib.licenses.unfree; # AppImages are often proprietary/unfree
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
}
|
||||
27
modules/chataigne/flake.lock
generated
Normal file
27
modules/chataigne/flake.lock
generated
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1773222311,
|
||||
"narHash": "sha256-BHoB/XpbqoZkVYZCfXJXfkR+GXFqwb/4zbWnOr2cRcU=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "0590cd39f728e129122770c029970378a79d076a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-25.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
@@ -1,51 +1,82 @@
|
||||
{
|
||||
description = "A flake for running the Chataigne AppImage with necessary patched dependencies.";
|
||||
description = "Local wrapper for Chataigne AppImage";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; # Modern Nixpkgs
|
||||
|
||||
# Pinned Nixpkgs for compatibility (the commit that fixes the CURL_GNUTLS_3 issue)
|
||||
pinned-nixpkgs = {
|
||||
url = "github:NixOS/nixpkgs/5171d7b0a9fbaaf216c873622eb5115b6db97957";
|
||||
flake = false; # Treat as a tarball input, not a flake
|
||||
};
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
pinned-nixpkgs,
|
||||
...
|
||||
}:
|
||||
{ self, nixpkgs }:
|
||||
let
|
||||
# Supported systems
|
||||
supportedSystems = [ "x86_64-linux" ];
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
|
||||
# The main package definition logic is imported as a function
|
||||
chataigne-appimage-runner = import ./chataigne.nix;
|
||||
# The libraries you requested
|
||||
deps = with pkgs; [
|
||||
curlFull
|
||||
gnutls
|
||||
libxrandr
|
||||
alsa-lib
|
||||
freetype
|
||||
avahi
|
||||
libglvnd
|
||||
curl
|
||||
SDL2
|
||||
hidapi
|
||||
libpulseaudio
|
||||
lz4
|
||||
openssl
|
||||
libcap
|
||||
libxcrypt
|
||||
libgcrypt
|
||||
libbsd
|
||||
zlib
|
||||
glib
|
||||
];
|
||||
|
||||
# Function to generate the package set for each system
|
||||
forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f system);
|
||||
in
|
||||
{
|
||||
packages = forAllSystems (
|
||||
system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
pinnedPkgs = import pinned-nixpkgs { inherit system; };
|
||||
in
|
||||
{
|
||||
chataigne = chataigne-appimage-runner {
|
||||
inherit pkgs pinnedPkgs;
|
||||
# Wrap the local AppImage file
|
||||
chataigne-bin = pkgs.appimageTools.wrapType2 {
|
||||
pname = "chataigne";
|
||||
version = "1.10.3";
|
||||
# This points to the file in the same directory as flake.nix
|
||||
src = ./Chataigne-linux-x64-1.10.3.AppImage;
|
||||
extraPkgs = pkgs: deps;
|
||||
};
|
||||
|
||||
# Also expose the default package for convenience
|
||||
default = self.packages.${system}.chataigne;
|
||||
}
|
||||
);
|
||||
# Create the Desktop Entry
|
||||
chataigne-desktop = pkgs.makeDesktopItem {
|
||||
name = "chataigne";
|
||||
exec = "chataigne";
|
||||
icon = "chataigne";
|
||||
comment = "Modular machine for art and technology";
|
||||
desktopName = "Chataigne";
|
||||
categories = [
|
||||
"AudioVideo"
|
||||
"Development"
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
# packages.${system}.default = chataigne-bin;
|
||||
|
||||
devShells.${system}.default = pkgs.mkShell {
|
||||
# Packages you want available in your shell
|
||||
buildInputs = [
|
||||
chataigne-bin
|
||||
];
|
||||
|
||||
# Environmental variables or shell hooks
|
||||
shellHook = ''
|
||||
echo "something"
|
||||
'';
|
||||
};
|
||||
# This allows you to run 'nix run' or install it via system config
|
||||
packages.${system}.default = pkgs.symlinkJoin {
|
||||
name = "chataigne";
|
||||
paths = [
|
||||
chataigne-bin
|
||||
chataigne-desktop
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ let
|
||||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
|
||||
ffmpeg-encoder-plugin = pkgs.stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "ffmpeg-encoder-plugin";
|
||||
version = "1.2.1";
|
||||
@@ -25,24 +26,16 @@ let
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "EdvinNilsson";
|
||||
repo = "ffmpeg_encoder_plugin";
|
||||
tag = "v${finalAttrs.version}";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-F4Q8YCXD5UldTwLbWK4nHacNPQ/B+4yLL96sq7xZurM=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
cmake
|
||||
ffmpeg-full
|
||||
];
|
||||
|
||||
buildInputs = with pkgs; [ ffmpeg ];
|
||||
nativeBuildInputs = [ pkgs.cmake ];
|
||||
buildInputs = [ pkgs.ffmpeg-full ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out
|
||||
cp ffmpeg_encoder_plugin.dvcp $out/
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
});
|
||||
|
||||
@@ -64,7 +57,7 @@ let
|
||||
touch $out/.license/blackmagic.lic
|
||||
echo -e "LICENSE blackmagic davinciresolvestudio 999999 permanent uncounted\n hostid=ANY issuer=CGP customer=CGP issued=28-dec-2023\n akey=0000-0000-0000-0000 _ck=00 sig=\"00\"" > $out/.license/blackmagic.lic
|
||||
|
||||
mkdir -p $out/IOPlugins/ffmpeg_encoder_plugin.dvcp.bundle/Contents/Linux-x86-64/
|
||||
mkdir -p $out/IOPlugins/ffmpeg_encoder_plugin.dvcp.bundle/Contents/Linux-x86-64
|
||||
cp ${ffmpeg-encoder-plugin}/ffmpeg_encoder_plugin.dvcp $out/IOPlugins/ffmpeg_encoder_plugin.dvcp.bundle/Contents/Linux-x86-64/
|
||||
'';
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user