From e18f1909ed5293ea1bd5d664fcbcc96c3d942b07 Mon Sep 17 00:00:00 2001 From: "Cody Young (horiba)" Date: Mon, 22 Dec 2025 19:52:55 +0000 Subject: [PATCH] Initial commit --- .envrc | 12 ++++++ .gitignore | 10 +++++ Containerfile | 8 ++++ build-ubuntu.patch | 13 ++++++ devenv.lock | 103 +++++++++++++++++++++++++++++++++++++++++++++ devenv.nix | 49 +++++++++++++++++++++ devenv.yaml | 15 +++++++ install.sh | 14 ++++++ post-install.sh | 9 ++++ 9 files changed, 233 insertions(+) create mode 100644 .envrc create mode 100644 .gitignore create mode 100644 Containerfile create mode 100644 build-ubuntu.patch create mode 100644 devenv.lock create mode 100644 devenv.nix create mode 100644 devenv.yaml create mode 100755 install.sh create mode 100755 post-install.sh diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..cc5c18b --- /dev/null +++ b/.envrc @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +export DIRENV_WARN_TIMEOUT=20s + +eval "$(devenv direnvrc)" + +# `use devenv` supports the same options as the `devenv shell` command. +# +# To silence all output, use `--quiet`. +# +# Example usage: use devenv --quiet --impure --option services.postgres.enable:bool true +use devenv diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ae49879 --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +# Devenv +.devenv* +devenv.local.nix +devenv.local.yaml + +# direnv +.direnv + +# pre-commit +.pre-commit-config.yaml diff --git a/Containerfile b/Containerfile new file mode 100644 index 0000000..38cbaa6 --- /dev/null +++ b/Containerfile @@ -0,0 +1,8 @@ +# FROM docker.io/archlinux/archlinux:latest +# run pacman -Sy --noconfirm fcitx5 fcitx5-configtool fcitx5-qt fcitx5-gtk cmake extra-cmake-modules gcc +FROM docker.io/library/ubuntu:24.04 +run apt update && apt install -y fcitx5 fcitx5-configtool fcitx5-frontend-qt5 fcitx5-frontend-qt6 fcitx5-frontend-gtk3 fcitx5-frontend-gtk4 cmake extra-cmake-modules gcc git make build-essential libfcitx5core-dev fcitx5-modules-dev gettext +run git clone https://github.com/Maik-0000FF/schnelle-umlaute.git +copy build-ubuntu.patch build-ubuntu.patch +run patch schnelle-umlaute/addon/build.sh < build-ubuntu.patch +workdir schnelle-umlaute/addon diff --git a/build-ubuntu.patch b/build-ubuntu.patch new file mode 100644 index 0000000..155d2d5 --- /dev/null +++ b/build-ubuntu.patch @@ -0,0 +1,13 @@ +--- build.sh 2025-12-22 16:35:08.000000000 +0000 ++++ build-ubuntu.sh 2025-12-22 16:37:14.665426491 +0000 +@@ -7,8 +7,8 @@ + # Check dependencies + echo "Checking dependencies..." + command -v cmake >/dev/null 2>&1 || { echo "Error: cmake not found. Install with: sudo pacman -S cmake"; exit 1; } +-pacman -Q extra-cmake-modules >/dev/null 2>&1 || { echo "Error: extra-cmake-modules not found. Install with: sudo pacman -S extra-cmake-modules"; exit 1; } +-pacman -Q fcitx5 >/dev/null 2>&1 || { echo "Error: fcitx5 not found. Install with: sudo pacman -S fcitx5"; exit 1; } ++dpkg -s extra-cmake-modules >/dev/null 2>&1 || { echo "Error: extra-cmake-modules not found. Install with: sudo apt install extra-cmake-modules"; exit 1; } ++dpkg -s fcitx5 >/dev/null 2>&1 || { echo "Error: fcitx5 not found. Install with: sudo apt install fcitx5"; exit 1; } + + echo "✓ All dependencies found" + echo diff --git a/devenv.lock b/devenv.lock new file mode 100644 index 0000000..6281ccc --- /dev/null +++ b/devenv.lock @@ -0,0 +1,103 @@ +{ + "nodes": { + "devenv": { + "locked": { + "dir": "src/modules", + "lastModified": 1766415291, + "owner": "cachix", + "repo": "devenv", + "rev": "445843843575c324f56f46e0a54c2fef1332f3cc", + "type": "github" + }, + "original": { + "dir": "src/modules", + "owner": "cachix", + "repo": "devenv", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1765121682, + "owner": "edolstra", + "repo": "flake-compat", + "rev": "65f23138d8d09a92e30f1e5c87611b23ef451bf3", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "git-hooks": { + "inputs": { + "flake-compat": "flake-compat", + "gitignore": "gitignore", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1765911976, + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "b68b780b69702a090c8bb1b973bab13756cc7a27", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "git-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1762808025, + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "cb5e3fdca1de58ccbc3ef53de65bd372b48f567c", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1764580874, + "owner": "cachix", + "repo": "devenv-nixpkgs", + "rev": "dcf61356c3ab25f1362b4a4428a6d871e84f1d1d", + "type": "github" + }, + "original": { + "owner": "cachix", + "ref": "rolling", + "repo": "devenv-nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "devenv": "devenv", + "git-hooks": "git-hooks", + "nixpkgs": "nixpkgs", + "pre-commit-hooks": [ + "git-hooks" + ] + } + } + }, + "root": "root", + "version": 7 +} diff --git a/devenv.nix b/devenv.nix new file mode 100644 index 0000000..b7d48a6 --- /dev/null +++ b/devenv.nix @@ -0,0 +1,49 @@ +{ pkgs, lib, config, inputs, ... }: + +{ + # https://devenv.sh/basics/ + env.GREET = "devenv"; + + # https://devenv.sh/packages/ + packages = [ + pkgs.git + pkgs.podman + ]; + + # https://devenv.sh/languages/ + # languages.rust.enable = true; + + # https://devenv.sh/processes/ + # processes.dev.exec = "${lib.getExe pkgs.watchexec} -n -- ls -la"; + + # https://devenv.sh/services/ + # services.postgres.enable = true; + + # https://devenv.sh/scripts/ + scripts.hello.exec = '' + echo hello from $GREET + ''; + + # https://devenv.sh/basics/ + enterShell = '' + hello # Run scripts directly + git --version # Use packages + ''; + + # https://devenv.sh/tasks/ + # tasks = { + # "myproj:setup".exec = "mytool build"; + # "devenv:enterShell".after = [ "myproj:setup" ]; + # }; + + # https://devenv.sh/tests/ + enterTest = '' + echo "Running tests" + git --version | grep --color=auto "${pkgs.git.version}" + ''; + + # https://devenv.sh/git-hooks/ + # git-hooks.hooks.shellcheck.enable = true; + + # See full reference at https://devenv.sh/reference/options/ +} diff --git a/devenv.yaml b/devenv.yaml new file mode 100644 index 0000000..116a2ad --- /dev/null +++ b/devenv.yaml @@ -0,0 +1,15 @@ +# yaml-language-server: $schema=https://devenv.sh/devenv.schema.json +inputs: + nixpkgs: + url: github:cachix/devenv-nixpkgs/rolling + +# If you're using non-OSS software, you can set allowUnfree to true. +# allowUnfree: true + +# If you're willing to use a package that's vulnerable +# permittedInsecurePackages: +# - "openssl-1.1.1w" + +# If you have more than one devenv you can merge them +#imports: +# - ./backend diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..779ffb6 --- /dev/null +++ b/install.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash +sudo apt update && apt install -y fcitx5 fcitx5-configtool fcitx5-frontend-qt5 fcitx5-frontend-qt6 fcitx5-frontend-gtk3 fcitx5-frontend-gtk4 cmake extra-cmake-modules gcc git make build-essential libfcitx5core-dev fcitx5-modules-dev gettext git + +git clone https://github.com/Maik-0000FF/schnelle-umlaute.git + +patch schnelle-umlaute/addon/build.sh < build-ubuntu.patch + +cd schnelle-umlaute/addon + +./build.sh + +cd build + +sudo make install diff --git a/post-install.sh b/post-install.sh new file mode 100755 index 0000000..6567a6c --- /dev/null +++ b/post-install.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +mkdir -p ~/.config/environment.d +cat > ~/.config/environment.d/fcitx5.conf << 'EOF' +GTK_IM_MODULE=fcitx5 +QT_IM_MODULE=fcitx5 +XMODIFIERS=@im=fcitx5 +GLFW_IM_MODULE=ibus +EOF