1
0

feat: TETR.IO (+ TETR.IO PLUS integration)

This commit does feature a _few_ changes to my general NixOS config
(namely the ideology switch from importing things everywhere to having
my own custom "`mpkgs`").

However most of this effort was all thanks to TETR.IO. The former
maintainer of `pkgs.tetrio-desktop` and `pkgs.tetrio-plus` seems to not
have been playing recently enough to update the packages to v10. Making
them unusuable.

`mpkgs.tetrio.desktop` is a patched `pkgs.tetrio-desktop` that updates
to v10. Alongside this, and a quick discovery that you could make custom
home-manager modules, I took it upon myself to make TETR.IO
configurations (including those of TETR.IO PLUS) fully generated from
Nix.

This effort took way too long, and feels slightly hacky (the way
injecting configurations works is by generating a LevelDB (Chromium
IndexedDB) for the electron instance's Local Storage) and it involves
some custom stuff. (LevelDB deriviation, plus home-manager module for
copying files rather than linking them `home.initialFile`.)

I'm proud of the result, and Tetris is now fully deterministic,
reproducible, and Nix-y.
This commit is contained in:
2026-01-14 21:49:20 +01:00
parent af86c0c1e5
commit 134fe16393
9 changed files with 1157 additions and 16 deletions

View File

@@ -8,18 +8,19 @@
let
stateVersion = "25.05";
env = import ./.env.nix { inherit pkgs; };
mpkgs = import ./pkgs/default.nix {
config = {
system.stateVersion = stateVersion;
};
};
in
{
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
(import (./. + "/${env.hostname}.nix"))
(
let
home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/release-${stateVersion}.tar.gz";
in
import "${home-manager}/nixos"
)
mpkgs.home-manager.module
];
nixpkgs.config.allowUnfree = true;
@@ -59,6 +60,7 @@ in
clang
llvmPackages.bintools
stylua
go
];
fonts.packages = with pkgs; [
@@ -69,7 +71,7 @@ in
nerd-fonts.symbols-only
inter
times-newer-roman
(import ./pkgs/monaco-font/default.nix { inherit pkgs; })
(mpkgs.font.monaco)
];
fonts.fontconfig = {
@@ -153,9 +155,12 @@ in
];
};
home-manager.useUserPackages = true;
home-manager.useGlobalPkgs = true;
home-manager.users.anton = import ./home.nix;
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
sharedModules = [ ] ++ (mpkgs.home-manager.sharedModules);
users.anton = import ./home.nix;
};
# programs.home-manager.enable = true;
programs.dconf.enable = true;
@@ -165,7 +170,15 @@ in
style = "adwaita-dark";
};
hardware.graphics.enable = true;
hardware.graphics = {
enable = true;
extraPackages = with pkgs; [
intel-media-driver
intel-vaapi-driver
libvdpau-va-gl
mesa
];
};
hardware.bluetooth = {
enable = true;