a
This commit is contained in:
@@ -1,213 +0,0 @@
|
||||
# https://github.com/NixOS/nixpkgs/issues/209545
|
||||
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
dpkg,
|
||||
autoPatchelfHook,
|
||||
makeWrapper,
|
||||
pkgs,
|
||||
wrapGAppsHook,
|
||||
gobject-introspection,
|
||||
glibc_multi,
|
||||
gsettings-desktop-schemas,
|
||||
}:
|
||||
|
||||
let
|
||||
gds = gsettings-desktop-schemas;
|
||||
# Create LSB Release File
|
||||
lsbRelease = pkgs.writeText "lsb-release" ''
|
||||
DISTRIB_ID=nixos
|
||||
DISTRIB_RELEASE=${pkgs.lib.version}
|
||||
DISTRIB_CODENAME=nixos
|
||||
DISTRIB_DESCRIPTION="NixOS"
|
||||
'';
|
||||
|
||||
# Remove Python Ads
|
||||
pythonSetup = pkgs.writeText "crossover-python-setup.py" ''
|
||||
import warnings
|
||||
import locale
|
||||
import os
|
||||
|
||||
# Skip Ads
|
||||
warnings.filterwarnings("ignore", category=DeprecationWarning, module="fileupdate")
|
||||
warnings.filterwarnings("ignore", category=DeprecationWarning, module="distversion")
|
||||
warnings.filterwarnings("ignore", category=DeprecationWarning, module="multiprocessing.popen_fork")
|
||||
|
||||
# Local
|
||||
try:
|
||||
locale.setlocale(locale.LC_ALL, "")
|
||||
except:
|
||||
locale.setlocale(locale.LC_ALL, "C")
|
||||
'';
|
||||
|
||||
# Script for install crossover
|
||||
setupScript = pkgs.writeScript "setup-crossover.sh" ''
|
||||
#!${pkgs.bash}/bin/bash
|
||||
set -e
|
||||
|
||||
mkdir -p "$HOME/.cxoffice"
|
||||
mkdir -p "$HOME/.local/share/cxoffice"
|
||||
mkdir -p "$HOME/.local/share/applications/cxoffice"
|
||||
mkdir -p "$HOME/.local/share/icons"
|
||||
mkdir -p "$HOME/.cache/cxoffice"
|
||||
|
||||
if [ ! -f "$HOME/.local/share/cxoffice/crossover.conf" ]; then
|
||||
echo "Create crossover.conf..."
|
||||
cat > "$HOME/.local/share/cxoffice/crossover.conf" << EOF
|
||||
[CrossOver]
|
||||
autoinstall=true
|
||||
check_for_updates=false
|
||||
EOF
|
||||
fi
|
||||
|
||||
chmod -R u+rw "$HOME/.cxoffice"
|
||||
chmod -R u+rw "$HOME/.local/share/cxoffice"
|
||||
chmod -R u+rw "$HOME/.local/share/applications/cxoffice"
|
||||
chmod -R u+rw "$HOME/.cache/cxoffice"
|
||||
|
||||
'';
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "crossover";
|
||||
version = "22.0.1-1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://media.codeweavers.com/pub/crossover/cxlinux/demo/crossover_${version}.deb";
|
||||
sha256 = "sha256-0wpM/4LCfjeZLgt0ECGdRuL3YPE0gQ/2otzUkJ9B/dY=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
dpkg
|
||||
autoPatchelfHook
|
||||
wrapGAppsHook
|
||||
gobject-introspection
|
||||
makeWrapper
|
||||
pkgs.unzip
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
# graphics
|
||||
pkgs.gtk3
|
||||
pkgs.gtkdialog
|
||||
pkgs.vte
|
||||
pkgs.libnotify
|
||||
pkgs.shared-mime-info
|
||||
|
||||
# System
|
||||
glibc_multi
|
||||
pkgs.glibc.dev
|
||||
pkgs.libxcrypt-legacy
|
||||
|
||||
# Audio
|
||||
pkgs.alsa-lib
|
||||
pkgs.alsa-plugins
|
||||
pkgs.pulseaudio
|
||||
pkgs.openal
|
||||
|
||||
# Multimedia
|
||||
pkgs.gst_all_1.gstreamer
|
||||
pkgs.gst_all_1.gst-plugins-base
|
||||
pkgs.gst_all_1.gst-plugins-good
|
||||
pkgs.gst_all_1.gst-plugins-ugly
|
||||
|
||||
# Network
|
||||
pkgs.gnutls
|
||||
pkgs.libgpg-error
|
||||
pkgs.openldap
|
||||
pkgs.openssl
|
||||
pkgs.openssl.dev
|
||||
pkgs.libpcap
|
||||
pkgs.cacert
|
||||
|
||||
# Image
|
||||
pkgs.libgphoto2
|
||||
pkgs.sane-backends
|
||||
pkgs.cups
|
||||
|
||||
# Other
|
||||
pkgs.gmp
|
||||
pkgs.libunwind
|
||||
pkgs.ocl-icd
|
||||
pkgs.vulkan-loader
|
||||
pkgs.sqlite
|
||||
pkgs.desktop-file-utils
|
||||
|
||||
# Python
|
||||
(pkgs.python3.withPackages (
|
||||
p: with p; [
|
||||
pygobject3
|
||||
gst-python
|
||||
dbus-python
|
||||
pycairo
|
||||
requests
|
||||
urllib3
|
||||
]
|
||||
))
|
||||
];
|
||||
|
||||
runtimeDependencies = [
|
||||
pkgs.vulkan-loader
|
||||
pkgs.cups.lib
|
||||
pkgs.openssl
|
||||
];
|
||||
|
||||
unpackCmd = "dpkg -x $src source";
|
||||
|
||||
autoPatchelfIgnoreMissingDeps = [
|
||||
"libcapi20.so.3"
|
||||
"libpcap.so.0.8"
|
||||
];
|
||||
|
||||
preFixup = ''
|
||||
gappsWrapperArgs+=(
|
||||
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath buildInputs}
|
||||
--prefix GST_PLUGIN_PATH : "$GST_PLUGIN_SYSTEM_PATH_1_0"
|
||||
--prefix VK_LAYER_PATH : ${pkgs.vulkan-validation-layers}/share/vulkan/explicit_layer.d
|
||||
--set OPENSSL_CONF "${pkgs.openssl.out}/etc/ssl/openssl.cnf"
|
||||
--set SSL_CERT_FILE "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"
|
||||
--prefix PATH : ${
|
||||
lib.makeBinPath [
|
||||
pkgs.openssl
|
||||
pkgs.desktop-file-utils
|
||||
]
|
||||
}
|
||||
--set PYTHONWARNINGS "ignore"
|
||||
--set PYTHONSTARTUP "${pythonSetup}"
|
||||
--set GSETTINGS_SCHEMA_DIR "${gds}/share/gsettings-schemas/${gds.pname}-${gds.version}/glib-2.0/schemas"
|
||||
--set CXOFFICE_HOME "$HOME/.cxoffice"
|
||||
--set XDG_DATA_HOME "$HOME/.local/share"
|
||||
--set XDG_CACHE_HOME "$HOME/.cache"
|
||||
)
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/{bin,opt,usr,etc,libexec}
|
||||
cp -r opt/* $out/opt/
|
||||
cp -r usr/* $out/usr/
|
||||
|
||||
cp ${lsbRelease} $out/etc/lsb-release
|
||||
|
||||
install -Dm755 ${setupScript} $out/libexec/setup-crossover.sh
|
||||
|
||||
makeWrapper $out/opt/cxoffice/bin/crossover $out/bin/crossover \
|
||||
--run "$out/libexec/setup-crossover.sh" \
|
||||
--set LSB_RELEASE "$out/etc/lsb-release" \
|
||||
"''${gappsWrapperArgs[@]}"
|
||||
|
||||
chmod +x $out/opt/cxoffice/bin/*
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Run your Windows® apps on Linux";
|
||||
homepage = "https://www.codeweavers.com/crossover";
|
||||
license = licenses.unfree;
|
||||
maintainers = with maintainers; [ ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
}
|
||||
@@ -1,80 +0,0 @@
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
import { exec } from "child_process";
|
||||
|
||||
const stateFilePath = path.join(
|
||||
process.env.HOME || "~",
|
||||
".regretevator-challenge-state"
|
||||
);
|
||||
|
||||
const regretevatorStateFile = path.join(
|
||||
process.env.HOME || "~",
|
||||
".regretevator_state"
|
||||
);
|
||||
|
||||
if (fs.existsSync(regretevatorStateFile)) process.exit(0);
|
||||
|
||||
function sendReminderNotification() {
|
||||
exec(
|
||||
`notify-send -a "tuxstrap" -u low "OCbwoy3's Dotfiles" "It's time for Regretevator!"`
|
||||
);
|
||||
}
|
||||
|
||||
function sendReminderNotificationPlayed(floors: number) {
|
||||
exec(
|
||||
`notify-send -a "tuxstrap" -u low "OCbwoy3's Dotfiles" "Man... Only ${floors} floors, really? You can do better than that."`
|
||||
);
|
||||
}
|
||||
|
||||
function sendSpamNotifications() {
|
||||
for (let i = 0; i < 2; i++) {
|
||||
exec(
|
||||
`notify-send -a "tuxstrap" -u low "OCbwoy3's Dotfiles" "HURRY UP!!!!!"`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function writeState(floorsSurvived: number) {
|
||||
const state = {
|
||||
date: new Date().toLocaleString("en-CA", { timeZoneName: "short" }).split(",")[0],
|
||||
floors: floorsSurvived,
|
||||
};
|
||||
fs.writeFileSync(stateFilePath, JSON.stringify(state, null, 2));
|
||||
}
|
||||
|
||||
function checkChallengeState() {
|
||||
if (fs.existsSync(stateFilePath)) {
|
||||
const state = JSON.parse(fs.readFileSync(stateFilePath, "utf-8"));
|
||||
const today = new Date().toLocaleString("en-CA", { timeZoneName: "short" }).split(",")[0];
|
||||
const stateDate = state.date;
|
||||
const floorsSurvived = state.floors;
|
||||
|
||||
const now = new Date();
|
||||
const hoursLeft = 24 - now.getHours();
|
||||
|
||||
if (stateDate === today) {
|
||||
if (floorsSurvived < 25) {
|
||||
/*
|
||||
if (floorsSurvived === 0) {
|
||||
sendReminderNotification();
|
||||
} else {
|
||||
sendReminderNotificationPlayed(floorsSurvived);
|
||||
}
|
||||
if (hoursLeft <= 4) {
|
||||
sendSpamNotifications();
|
||||
}
|
||||
*/
|
||||
sendReminderNotification();
|
||||
}
|
||||
} else {
|
||||
sendReminderNotification();
|
||||
writeState(0);
|
||||
}
|
||||
} else {
|
||||
sendReminderNotification();
|
||||
writeState(0);
|
||||
}
|
||||
}
|
||||
|
||||
// Run the check
|
||||
checkChallengeState();
|
||||
@@ -1,23 +0,0 @@
|
||||
{ pkgs ? import <nixpkgs> { } }:
|
||||
|
||||
pkgs.stdenv.mkDerivation {
|
||||
name = "tuxstrap-cron-executable";
|
||||
src = ./files/crontab-executable.ts;
|
||||
|
||||
unpackPhase = ''
|
||||
mkdir -p $out
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
mkdir -p $out
|
||||
mkdir -p $out/lib
|
||||
cp $src $out/lib/crontab-executable.ts
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
echo "#!/bin/bash" > $out/bin/tuxstrap-crontab
|
||||
echo '${pkgs.bun}/bin/bun run $(dirname "$(realpath "$0")")/../lib/crontab-executable.ts' >> $out/bin/tuxstrap-crontab
|
||||
chmod +x $out/bin/tuxstrap-crontab
|
||||
'';
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
{ lib, stdenv, fetchgit, pkg-config, wayland, wayland-protocols, wlr-protocols, wayland-scanner, libspng }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "wl_shimeji";
|
||||
version = "1.0.0"; # Change to the appropriate version
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://github.com/CluelessCatBurger/wl_shimeji.git";
|
||||
rev = "392a83d5658f283ace77b0c839d5a201cebc8784"; # Change to the appropriate commit
|
||||
sha256 = "sha256-T7sWuKOsc0vEfkcGbRXLHit24db97crEhYadOMq4MDM="; # Put the correct sha256 hash
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config wayland wayland-protocols wlr-protocols libspng wayland-scanner ];
|
||||
|
||||
buildInputs = [ ];
|
||||
|
||||
installPhase = ''
|
||||
make install PREFIX=$out
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Shimeji reimplementation for Wayland in C";
|
||||
homepage = "https://github.com/CluelessCatBurger/wl_shimeji";
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ ];
|
||||
};
|
||||
}
|
||||
16
modules/home-manager/fastfetch.nix
Normal file
16
modules/home-manager/fastfetch.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
programs.fastfetch = {
|
||||
enable = true;
|
||||
settings = {
|
||||
# Example: Change colors and add custom options
|
||||
logo = "nixos";
|
||||
color = "blue";
|
||||
keyColor = "cyan";
|
||||
separator = " => ";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
7
modules/home-manager/main.nix
Normal file
7
modules/home-manager/main.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./fastfetch.nix
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user