This commit is contained in:
do butterflies cry? 2026-03-21 10:25:31 +10:00
parent 2d677a19ac
commit e3453b0a87
Signed by: cry
GPG key ID: F68745A836CA0412
20 changed files with 668 additions and 274 deletions

View file

@ -1,7 +1,9 @@
keys:
- &cry age1e5e32alqa20cf40wt9jq8aaa2x3gh32207xj6ea5veszlpxnzgjqd2htm7
- &idk age1tc9j8mxetvhzeq2razwvgwyy8xdlpu4d9jrp76ga929w9vxjwetq7zwtnq
creation_rules:
- path_regex: secrets/[^/]+\.(yaml|json|env|ini)$
key_groups:
- age:
- *cry
- *idk

123
flake.lock generated
View file

@ -105,14 +105,18 @@
]
},
"locked": {
"lastModified": 1772890888,
"narHash": "sha256-fJ73wGR6h71ItlUIXlHvQpGbbwE6WA5Bjjs3n4kJ6tM=",
"path": "/home/me/cry/mk/cerulean",
"type": "path"
"lastModified": 1773743879,
"narHash": "sha256-z81Jxe1CGJXCl1tqPa2wixbgm2qbaNtSsd09Qu182Uo=",
"owner": "cry128",
"repo": "cerulean",
"rev": "6c1a0a5d3395c5416d39e67a47bcdf7c1762613e",
"type": "github"
},
"original": {
"path": "/home/me/cry/mk/cerulean",
"type": "path"
"owner": "cry128",
"ref": "refactor/snowflake",
"repo": "cerulean",
"type": "github"
}
},
"curl-src": {
@ -142,11 +146,11 @@
"utils": "utils"
},
"locked": {
"lastModified": 1766051518,
"narHash": "sha256-znKOwPXQnt3o7lDb3hdf19oDo0BLP4MfBOYiWkEHoik=",
"lastModified": 1770019181,
"narHash": "sha256-hwsYgDnby50JNVpTRYlF3UR/Rrpt01OrxVuryF40CFY=",
"owner": "serokell",
"repo": "deploy-rs",
"rev": "d5eff7f948535b9c723d60cd8239f8f11ddc90fa",
"rev": "77c906c0ba56aabdbc72041bf9111b565cdd6171",
"type": "github"
},
"original": {
@ -263,7 +267,10 @@
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_2"
"nixpkgs-lib": [
"mcsr",
"nixpkgs"
]
},
"locked": {
"lastModified": 1769996383,
@ -280,6 +287,24 @@
}
},
"flake-parts_3": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_2"
},
"locked": {
"lastModified": 1769996383,
"narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "57928607ea566b5db3ad13af0e57e921e6b12381",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_4": {
"inputs": {
"nixpkgs-lib": [
"nt",
@ -811,6 +836,25 @@
"type": "github"
}
},
"mcsr": {
"inputs": {
"flake-parts": "flake-parts_2",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1771756753,
"narHash": "sha256-8+yCKpZr+BFdVFjvZZVzkZem/ggafyGsOxX5nhqtLvY=",
"rev": "657da45185894ef03709e4c100bb8038a972dc59",
"type": "tarball",
"url": "https://git.uku3lig.net/api/v1/repos/uku/mcsr-nixos/archive/657da45185894ef03709e4c100bb8038a972dc59.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://git.uku3lig.net/uku/mcsr-nixos/archive/main.tar.gz"
}
},
"microvm": {
"inputs": {
"nixpkgs": [
@ -820,11 +864,11 @@
"spectrum": "spectrum"
},
"locked": {
"lastModified": 1771365290,
"narHash": "sha256-1XJOslVyF7yzf6yd/yl1VjGLywsbtwmQh3X1LuJcLI4=",
"lastModified": 1773018425,
"narHash": "sha256-fpgZBmZpKoEXEowBK/6m8g9FcOLWQ4UxhXHqCw2CpSM=",
"owner": "microvm-nix",
"repo": "microvm.nix",
"rev": "789c90b164b55b4379e7a94af8b9c01489024c18",
"rev": "25ebda3c558e923720c965832dc9a04f559a055c",
"type": "github"
},
"original": {
@ -979,7 +1023,7 @@
},
"nix-unit": {
"inputs": {
"flake-parts": "flake-parts_3",
"flake-parts": "flake-parts_4",
"nix-github-actions": "nix-github-actions",
"nixpkgs": [
"nt",
@ -1019,7 +1063,7 @@
"nixcord": {
"inputs": {
"flake-compat": "flake-compat_4",
"flake-parts": "flake-parts_2",
"flake-parts": "flake-parts_3",
"nixpkgs": [
"nixpkgs"
]
@ -1139,11 +1183,11 @@
"systems": "systems_2"
},
"locked": {
"lastModified": 1770975056,
"narHash": "sha256-ZXTz/P3zUbbM6lNXzt91u8EwfNqhXpYMu8+wvFZqQHE=",
"lastModified": 1773738366,
"narHash": "sha256-oH22HyNHEdCoCQo734sQCHUr6C0jmGQJMZ13dsgEHkk=",
"ref": "refs/heads/main",
"rev": "f42dcdd49a7921a7f433512e83d5f93696632412",
"revCount": 205,
"rev": "f32c3a726a3d608d30aaaa1df2301c1eaf5ef8f4",
"revCount": 206,
"type": "git",
"url": "https://tearforge.net/cry/nt"
},
@ -1201,6 +1245,7 @@
"home-manager": "home-manager",
"hyprland": "hyprland",
"mango": "mango",
"mcsr": "mcsr",
"millennium": "millennium",
"nix-flatpak": "nix-flatpak",
"nixcats": "nixcats",
@ -1211,7 +1256,8 @@
"nt": "nt",
"sddm-silent": "sddm-silent",
"spicetify-nix": "spicetify-nix",
"systems": "systems_3"
"systems": "systems_3",
"zen-browser": "zen-browser"
}
},
"rust-overlay": {
@ -1284,11 +1330,11 @@
]
},
"locked": {
"lastModified": 1772495394,
"narHash": "sha256-hmIvE/slLKEFKNEJz27IZ8BKlAaZDcjIHmkZ7GCEjfw=",
"lastModified": 1773096132,
"narHash": "sha256-M3zEnq9OElB7zqc+mjgPlByPm1O5t2fbUrH3t/Hm5Ag=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "1d9b98a29a45abe9c4d3174bd36de9f28755e3ff",
"rev": "d1ff3b1034d5bab5d7d8086a7803c5a5968cd784",
"type": "github"
},
"original": {
@ -1300,11 +1346,11 @@
"spectrum": {
"flake": false,
"locked": {
"lastModified": 1759482047,
"narHash": "sha256-H1wiXRQHxxPyMMlP39ce3ROKCwI5/tUn36P8x6dFiiQ=",
"lastModified": 1772189877,
"narHash": "sha256-i1p90Rgssb//aNiTDFq46ZG/fk3LmyRLChtp/9lddyA=",
"ref": "refs/heads/main",
"rev": "c5d5786d3dc938af0b279c542d1e43bce381b4b9",
"revCount": 996,
"rev": "fe39e122d898f66e89ffa17d4f4209989ccb5358",
"revCount": 1255,
"type": "git",
"url": "https://spectrum-os.org/git/spectrum"
},
@ -1479,6 +1525,29 @@
"type": "github"
}
},
"zen-browser": {
"inputs": {
"home-manager": [
"home-manager"
],
"nixpkgs": [
"nixpkgs-unstable"
]
},
"locked": {
"lastModified": 1772945022,
"narHash": "sha256-Fv14NttjL/7xfi6eVwrSEBAyBvDjI00RLiRNqA5apcw=",
"owner": "0xc000022070",
"repo": "zen-browser-flake",
"rev": "3a6a5ca7fb48cc8fd8183386506a06579d1d79dc",
"type": "github"
},
"original": {
"owner": "0xc000022070",
"repo": "zen-browser-flake",
"type": "github"
}
},
"zlib-src": {
"flake": false,
"locked": {

View file

@ -16,8 +16,9 @@
nt.url = "git+https://tearforge.net/cry/nt";
cerulean = {
# url = "github:cry128/cerulean/bleeding";
url = "/home/me/cry/mk/cerulean";
# url = "github:cry128/cerulean/v0.2.5-alpha";
url = "github:cry128/cerulean/refactor/snowflake";
# url = "/home/me/cry/mk/cerulean";
inputs = {
nt.follows = "nt";
systems.follows = "systems";
@ -94,6 +95,11 @@
systems.follows = "systems";
};
};
mcsr = {
url = "https://git.uku3lig.net/uku/mcsr-nixos/archive/main.tar.gz";
inputs.nixpkgs.follows = "nixpkgs";
};
};
nixConfig = {

View file

@ -10,7 +10,7 @@
../../hosts/modules/bashistrans.nix
../../hosts/modules/wm/hyprland.nix
../../hosts/modules/steam.nix
../../hosts/modules/gaming/steam.nix
../../hosts/modules/obsidian.nix
];

View file

@ -24,10 +24,12 @@
vlc
# Games
prismlauncher # minecraft
upkgs.olympus # celeste
discord
discordo
upkgs.ekphos
prismlauncher # minecraft
libxtst # used for MCSR modpack
];
}

View file

@ -105,6 +105,8 @@
doc.enable = true; # install /share/doc packages
man = {
enable = true; # install manpages
# https://discourse.nixos.org/t/slow-build-at-building-man-cache/52365/4
generateCaches = false;
};
info.enable = true; # install GNU info

View file

@ -78,6 +78,7 @@
btop
eza
yazi
exiftool # for yazi
ripgrep
viddy # modern `watch` command
timg # terminal image (sixel) viewer
@ -92,6 +93,7 @@
vim
powertop
imagemagick
ffmpeg
usbutils
# "Standard" Unix Commands

View file

@ -1,8 +1,4 @@
{
lib,
pkgs,
...
}: {
{pkgs, ...}: {
imports = [
../modules/fish.nix
../modules/btop.nix
@ -30,8 +26,7 @@
home = {
shellAliases = {
# rebuild = "sudo nixos-rebuild switch --flake /home/me/flake --show-trace";
# trybuild = "sudo nixos-rebuild test --flake /home/me/flake --show-trace";
nd = "nix develop";
rebuild = "nh os switch ~/flake";
trybuild = "nh os test ~/flake";
brip = "batgrep"; # bat + ripgrep
@ -90,14 +85,21 @@
hyfetch = {
enable = true;
settings = {
preset = "nonbinary";
mode = "rgb";
backend = "fastfetch";
color_align = {
mode = "vertical";
};
auto_detect_light_dark = true;
backend = "neofetch";
args = null;
distro = null;
preset = "transfeminine"; # "nonbinary";
pride_month_disable = false;
custom_ascii_path = null;
mode = "rgb";
light_dark = "dark";
auto_detect_light_dark = true;
lightness = 0.65;
color_align = {
mode = "horizontal";
};
};
};

View file

@ -196,6 +196,10 @@ in {
formatter.command = "${pkgs.clang-tools}/bin/clang-format";
language-servers = ["clangd"];
}
{
name = "cpp";
file-types = ["cc" "hh" "cpp" "hpp" "cxx" "hxx"];
}
{
name = "haskell";
auto-format = true;

View file

@ -2,8 +2,7 @@
# https://github.com/BirdeeHub/nix-wrapper-modules
{
inputs,
pkgs,
mpkgs,
lib,
...
}: let
inherit
@ -15,230 +14,220 @@ in {
inputs.nixcats.homeModule
];
config = {
# this value, nixCats is the defaultPackageName you pass to mkNixosModules
# it will be the namespace for your options.
nixCats = {
enable = true;
nixpkgs_version = inputs.nixpkgs-unstable;
# this will add the overlays from ./overlays and also,
# add any plugins in inputs named "plugins-pluginName" to pkgs.neovimPlugins
# It will not apply to overall system, just nixCats.
addOverlays =
# (import ./overlays inputs) ++
[
(utils.standardPluginOverlay inputs)
nixCats = {
enable = true;
nixpkgs_version = inputs.nixpkgs-unstable;
addOverlays =
[
(utils.standardPluginOverlay inputs)
]
++ lib.optional (builtins.pathExists ./overlays.nix) ./overlays.nix;
# see the packageDefinitions below.
# This says which of those to install.
packageNames = ["cryvim"];
luaPath = ./.;
# NOTE: the .replace vs .merge options are for modules based on existing configurations,
# NOTE: they refer to how multiple categoryDefinitions get merged together by the module.
# NOTE: for useage of this section, refer to :h nixCats.flake.outputs.categories
categoryDefinitions.replace = {
pkgs,
settings,
categories,
extra,
name,
mkNvimPlugin,
...
} @ packageDef: {
lspsAndRuntimeDeps = with pkgs; {
general = [
ripgrep
fd
];
# see the packageDefinitions below.
# This says which of those to install.
packageNames = ["cryvim"];
luaPath = "${./.}";
# the .replace vs .merge options are for modules based on existing configurations,
# they refer to how multiple categoryDefinitions get merged together by the module.
# for useage of this section, refer to :h nixCats.flake.outputs.categories
categoryDefinitions.replace = {
pkgs,
settings,
categories,
extra,
name,
mkNvimPlugin,
...
} @ packageDef: {
lspsAndRuntimeDeps = with pkgs; {
general = [
ripgrep
fd
treesitter = [
tree-sitter
];
lang = {
lua = [
lua-language-server
stylua
];
treesitter = [
tree-sitter
nix = [
nil
nix-doc # TODO: i forgot what this is for
nixfmt
];
lang = {
lua = [
lua-language-server
stylua
];
nix = [
nil
nix-doc # TODO: i forgot what this is for
nixfmt
];
rust = [
cargo
mpkgs.rust-analyzer
rustfmt
];
zig = [
pkgs.zls # FIX: using spkgs version as zls is broken rn ;-;
];
elixir = [
elixir-ls
];
gleam = [
gleam
];
haskell = [
haskell-language-server
ormolu
];
java = [
jdt-language-server
javaPackages.compiler.openjdk17
javaPackages.compiler.openjdk21
];
protobuf = [
protols
buf
];
};
};
startupPlugins = with pkgs.vimPlugins; {
general = [
lze
plenary-nvim
nvim-notify
nvim-web-devicons
base16-nvim
mini-nvim
rust = [
rust-analyzer
rustfmt
];
treesitter = [
nvim-treesitter-textobjects
nvim-treesitter.withAllGrammars
zig = [
zls
];
elixir = [
elixir-ls
];
gleam = [
gleam
];
haskell = [
haskell-language-server
ormolu
];
java = [
jdt-language-server
javaPackages.compiler.openjdk17
javaPackages.compiler.openjdk21
];
protobuf = [
protols
buf
];
};
optionalPlugins = with pkgs.vimPlugins; {
general = [
];
ui = [
dressing-nvim
];
qol = [
undotree
mini-hipatterns
];
telescope = [
telescope-nvim
telescope-fzf-native-nvim
telescope-ui-select-nvim
];
fyler = [
fyler-nvim
];
lsp = [
nvim-lspconfig
];
completion = [
blink-cmp
nvim-cmp
luasnip
friendly-snippets
cmp_luasnip
cmp-buffer
cmp-path
cmp-nvim-lua
cmp-nvim-lsp
cmp-cmdline
cmp-nvim-lsp-signature-help
cmp-cmdline-history
lspkind-nvim
];
format = [
conform-nvim
];
comment = [
comment-nvim
];
lang = {
java = [
nvim-jdtls
];
};
};
# shared libraries to be added to LD_LIBRARY_PATH
# variable available to nvim runtime
sharedLibraries = {
general = with pkgs; [
# libgit2
];
};
environmentVariables = {
lang = {
rust.lsp = {
# it literally won't see the rust-analyzer provided to it
# if you don't use an envrionment variable to tell it
RUST_ANALYZER_CMD = "${mpkgs.rust-analyzer}/bin/rust-analyzer";
};
elixir.lsp = {
ELIXIR_LS_CMD = "${pkgs.elixir-ls}/scripts/language_server.sh";
};
java.lsp = {
JAVA_HOME = "${pkgs.javaPackages.compiler.openjdk17}";
OPENJDK_17 = "${pkgs.javaPackages.compiler.openjdk17}";
OPENJDK_21 = "${pkgs.javaPackages.compiler.openjdk21}";
};
};
};
extraWrapperArgs = {};
# lists of the functions you would have passed to
# python.withPackages or lua.withPackages
# get the path to this python environment
# in your lua config via
# vim.g.python3_host_prog
# or run from nvim terminal via :!<packagename>-python3
extraPython3Packages = {};
# populates $LUA_PATH and $LUA_CPATH
extraLuaPackages = {};
};
# see :help nixCats.flake.outputs.packageDefinitions
packageDefinitions.replace = {
# these are the names of your packages
# you can include as many as you wish.
cryvim = {pkgs, ...}: {
# they contain a settings set defined above
# see :help nixCats.flake.outputs.settings
settings = {
wrapRc = true;
# IMPORTANT:
# your alias may not conflict with your other packages.
aliases = [
"cvim"
];
startupPlugins = with pkgs.vimPlugins; {
general = [
lze
plenary-nvim
nvim-notify
nvim-web-devicons
base16-nvim
mini-nvim
];
treesitter = [
nvim-treesitter-textobjects
nvim-treesitter.withAllGrammars
];
};
optionalPlugins = with pkgs.vimPlugins; {
general = [
];
ui = [
dressing-nvim
];
qol = [
undotree
mini-hipatterns
];
telescope = [
telescope-nvim
telescope-fzf-native-nvim
telescope-ui-select-nvim
];
fyler = [
fyler-nvim
];
lsp = [
nvim-lspconfig
];
completion = [
blink-cmp
nvim-cmp
luasnip
friendly-snippets
cmp_luasnip
cmp-buffer
cmp-path
cmp-nvim-lua
cmp-nvim-lsp
cmp-cmdline
cmp-nvim-lsp-signature-help
cmp-cmdline-history
lspkind-nvim
];
format = [
conform-nvim
];
comment = [
comment-nvim
];
lang = {
java = [
nvim-jdtls
];
};
};
# shared libraries to be added to nvim runtime's LD_LIBRARY_PATH
sharedLibraries = {
general = with pkgs; [
# libgit2
];
};
environmentVariables = {
lang = {
rust.lsp = {
# it literally won't see the rust-analyzer provided to it
RUST_ANALYZER_CMD = "${pkgs.rust-analyzer}/bin/rust-analyzer";
};
# and a set of categories that you want
# (and other information to pass to lua)
categories = {
general = true;
elixir.lsp = {
ELIXIR_LS_CMD = "${pkgs.elixir-ls}/scripts/language_server.sh";
};
java.lsp = {
JAVA_HOME = "${pkgs.javaPackages.compiler.openjdk17}";
OPENJDK_17 = "${pkgs.javaPackages.compiler.openjdk17}";
OPENJDK_21 = "${pkgs.javaPackages.compiler.openjdk21}";
};
};
};
ui = true;
qol = true;
telescope = true;
fyler = true;
lsp = true;
completion = true;
treesitter = true;
format = true;
comment = true;
extraWrapperArgs = {};
# lists of the functions you would have passed to
# python.withPackages or lua.withPackages
lang = {
lua = true;
nix = true;
rust = true;
zig = true;
elixir = true;
gleam = true;
haskell = true;
java = true;
protobuf = true;
};
# get the path to this python environment
# in your lua config via
# vim.g.python3_host_prog
# or run from nvim terminal via :!<packagename>-python3
extraPython3Packages = {};
# populates $LUA_PATH and $LUA_CPATH
extraLuaPackages = {};
};
# REF: :help nixCats.flake.outputs.packageDefinitions
packageDefinitions.replace = {
# these are the names of your packages
# you can include as many as you wish.
cryvim = {pkgs, ...}: {
# they contain a settings set defined above
# REF: :help nixCats.flake.outputs.settings
settings = {
wrapRc = true;
aliases = [
"ce"
];
};
# and a set of categories that you want
# (and other information to pass to lua)
categories = {
general = true;
ui = true;
qol = true;
telescope = true;
fyler = true;
lsp = true;
completion = true;
treesitter = true;
format = true;
comment = true;
lang = {
lua = true;
nix = true;
rust = true;
zig = true;
elixir = true;
gleam = true;
haskell = true;
java = true;
protobuf = true;
};
};
};

View file

@ -6,8 +6,15 @@
}: {
imports = [
./hardware.nix
./modules/gamergrl
];
# services.wa2k = {
# enable = true;
# port = 8080;
# openFirewall = true;
# };
networking = {
hostName = "myputer";

View file

@ -1,11 +1,10 @@
{...}: {
services.flatpak = {
packages = [
{
# Linux Runtime for Roblox
appId = "org.vinegarhq.Sober";
origin = "flathub";
}
];
};
{upkgs, ...}: {
imports = [
./flatpak.nix
./mcsr
];
environment.systemPackages = with upkgs; [
hydralauncher
];
}

View file

@ -0,0 +1,11 @@
{...}: {
services.flatpak = {
packages = [
{
# Linux Runtime for Roblox
appId = "org.vinegarhq.Sober";
origin = "flathub";
}
];
};
}

View file

@ -0,0 +1,52 @@
{
inputs,
pkgs,
lib,
config,
...
}: let
cfg = config.programs.waywall;
inherit (inputs) mcsr;
mcsrPkgs = mcsr.packages.${pkgs.stdenv.hostPlatform.system};
in {
imports = [mcsr.nixosModules.waywall];
options = {
programs.waywall = {
width = lib.mkOption {
type = lib.types.int;
default = 1920;
};
height = lib.mkOption {
type = lib.types.int;
default = 1080;
};
};
};
config = {
environment.systemPackages = [
mcsrPkgs.ninjabrain-bot
(pkgs.prismlauncher.override {
jdks = [mcsrPkgs.graalvm-21];
})
];
programs.waywall = {
enable = true;
config = {
enableWaywork = true;
programs = [mcsrPkgs.ninjabrain-bot];
files = {
thin_bg = ./vibing-on-my-puter.png;
wide_bg = ./vibing-on-my-puter.png;
};
source = ./waywall.lua;
};
};
};
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 MiB

View file

@ -0,0 +1,233 @@
-- vim: foldmethod=marker
local waywall = require("waywall")
local helpers = require("waywall.helpers")
local Scene = require("waywork.scene")
local Modes = require("waywork.modes")
local Keys = require("waywork.keys")
local Processes = require("waywork.processes")
local scene = Scene.SceneManager.new(waywall)
local ModeManager = Modes.ModeManager.new(waywall)
-- config --
local thin_res = { w = resolution.h * 0.28, h = resolution.h }
local wide_res = { w = resolution.w, h = resolution.h / 3.6 }
local tall_res = { w = 384, h = 16384 }
local pie_colors = {
{ input = "#e145c2", output = "#a000a0" },
{ input = "#e96d4d", output = "#aa3310" },
{ input = "#45cb65", output = "#00a000" },
{ input = "#4de1ca", output = "#1a7286" },
{ input = "#c46de1", output = "#ff55ff" },
}
-- https://arjuncgore.github.io/waywall-boat-eye-calc/
-- https://github.com/Esensats/mcsr-calcsens
local normal_sens = 13.117018998967824
local tall_sens = 0.88486625532087
-- utils {{{
function smart_enable_group(mode, status)
scene:enable_group(mode, status)
scene:enable_group("normal", not status)
end
function mode_guard()
return not waywall.get_key("F3") and waywall.state().screen == "inworld" and waywall.state().inworld == "unpaused"
end
function piechart_src(res)
return { x = res.w - 93, y = res.h - 221, w = 33, h = 42 }
end
function piechart_dst(res)
-- x = right_of_thin - 11 (gap between edge and pie) - 160 (pie width / 2) - 99 (mirror width / 2)
if res.w == resolution.w and res.h == resolution.h then
return { x = res.w - 270, y = res.h - 390, w = 33 * 6, h = 42 * 6 }
else
return { x = (resolution.w + res.w) / 2 - 270, y = (resolution.h + res.h) / 2 - 390, w = 33 * 6, h = 42 * 6 }
end
end
local ensure_ninjabrain = Processes.ensure_application(waywall, programs.ninjabrain_bot)("ninjabrain.*\\.jar")
-- }}}
-- background images {{{
for _, name in ipairs({ "wide", "thin", "tall" }) do
scene:register(name .. "_bg", {
kind = "image",
path = files[name],
options = {
dst = { x = 0, y = 0, w = resolution.w, h = resolution.h },
depth = -1,
},
groups = { name },
})
end
-- }}}
-- thin {{{
local e_scale = resolution.w > 2560 and 20 or 10
local left_middle = (resolution.w - thin_res.w) / 4
scene:register("e_counter", {
kind = "mirror",
options = {
src = { x = 1, y = 37, w = 49, h = 9 },
dst = { x = left_middle - (49 * e_scale / 2), y = resolution.h / 10.8, w = 49 * e_scale, h = 9 * e_scale },
depth = 0,
},
groups = { "thin" },
})
for _, ck in ipairs(pie_colors) do
scene:register("prct_mirror_" .. ck.input, {
kind = "mirror",
options = {
src = piechart_src(thin_res),
dst = piechart_dst(thin_res),
depth = 1,
color_key = ck,
},
groups = { "thin" },
})
end
ModeManager:define("thin", {
width = thin_res.w,
height = thin_res.h,
on_enter = function()
smart_enable_group("thin", true)
end,
on_exit = function()
smart_enable_group("thin", false)
end,
toggle_guard = mode_guard,
})
-- }}}
-- wide {{{
ModeManager:define("wide", {
width = wide_res.w,
height = wide_res.h,
on_enter = function()
smart_enable_group("wide", true)
end,
on_exit = function()
smart_enable_group("wide", false)
end,
toggle_guard = mode_guard,
})
-- }}}
-- tall {{{
local measure_w = (resolution.w - tall_res.w) / 2
local measure_h = (resolution.h * measure_w) / resolution.w
local measure_dst = { x = 0, y = (resolution.h - measure_h) / 2, w = measure_w, h = measure_h }
scene:register("eye_measure", {
kind = "mirror",
options = {
src = { x = (tall_res.w - 60) / 2, y = (tall_res.h - 580) / 2, w = 60, h = 580 },
dst = measure_dst,
depth = 0,
},
groups = { "tall" },
})
scene:register("eye_overlay", {
kind = "image",
path = files.eye_overlay,
options = { dst = measure_dst, depth = 1 },
groups = { "tall" },
})
ModeManager:define("tall", {
width = tall_res.w,
height = tall_res.h,
on_enter = function()
smart_enable_group("tall", true)
waywall.set_sensitivity(tall_sens)
end,
on_exit = function()
smart_enable_group("tall", false)
waywall.set_sensitivity(0)
end,
toggle_guard = function()
return not waywall.get_key("F3") and waywall.state().screen == "inworld"
end,
})
-- }}}
-- normal res mirrors {{{
for _, ck in ipairs(pie_colors) do
scene:register("prct_mirror_normal_" .. ck.input, {
kind = "mirror",
options = {
src = piechart_src(resolution),
dst = piechart_dst(resolution),
depth = 1,
color_key = ck,
},
groups = { "normal" },
})
end
-- }}}
-- startup actions
waywall.listen("load", function()
-- wait for title screen
repeat
local error, state = pcall(waywall.state)
waywall.sleep(1000)
until error == true and state.screen == "title"
-- actual actions
ensure_ninjabrain()
scene:enable_group("normal", true)
end)
local config = {
input = {
layout = "us",
repeat_rate = 40,
repeat_delay = 300,
sensitivity = normal_sens,
confine_pointer = false,
remaps = {
["MB5"] = "F3",
},
},
theme = {
background = "#303030ff",
-- https://github.com/Smithay/smithay/issues/1894
ninb_anchor = "right",
},
window = {
fullscreen_width = resolution.w,
fullscreen_height = resolution.h,
},
actions = Keys.actions({
["Ctrl-Super-F"] = waywall.toggle_fullscreen,
["*-N"] = function()
return ModeManager:toggle("thin")
end,
["*-P"] = function()
return ModeManager:toggle("tall")
end,
["*-G"] = function()
return ModeManager:toggle("wide")
end,
["Ctrl-Shift-M"] = function()
ensure_ninjabrain()
helpers.toggle_floating()
end,
}),
}
return config

View file

@ -12,6 +12,7 @@
source = inputs.nixpkgs;
overlays = [
inputs.dobutterfliescry-net.overlays.default
# inputs.wa2k.overlays.default
(import ./overlays args)
];
config = {

View file

@ -30,10 +30,10 @@
inherit pkgs;
};
# in wake of CVE-2022-3602/CVE-2022-3786
nginxStable = super.nginxStable.override {openssl = super.libressl;};
nginx = super.nginx.override {openssl = super.libressl;};
nginxStable = pkgs.nginxStable.override {openssl = pkgs.libressl;};
nginx = pkgs.nginx.override {openssl = pkgs.libressl;};
element-desktop = super.element-desktop.overrideAttrs (final: prev: {
element-desktop = pkgs.element-desktop.overrideAttrs (final: prev: {
desktopItems = [
((builtins.elemAt prev.desktopItems 0).override {
exec = "element-desktop %u --password-store=\"gnome-libsecret\"";
@ -43,7 +43,7 @@
awww = inputs.awww.packages.${system}.awww;
melonloader = import ../packages/melonloader/package.nix super;
melonloader = import ../packages/melonloader/package.nix pkgs;
xdg-desktop-portal-hyprland =
lib.mkIf (inputs?hyprland)
@ -76,5 +76,17 @@
''
];
}));
prismlauncher = pkgs.prismlauncher.overrideAttrs (final: prev: {
buildInputs =
prev.buildInputs
++ (with pkgs; [
libxtst
]);
});
bottles = pkgs.bottles.override {
removeWarningPopup = true;
};
}
)

View file

@ -38,6 +38,7 @@
grub2-themes.nixosModules.default
nix-flatpak.nixosModules.nix-flatpak
inputs.mango.nixosModules.mango
# inputs.wa2k.nixosModules.default
];
};