diff --git a/.gitignore b/.gitignore index 8f2990d..c62c624 100644 --- a/.gitignore +++ b/.gitignore @@ -47,3 +47,6 @@ nvim-healthcheck.txt private_pid private_security private_fish_variables + +# NixOS local secrets +nixcfgs/secrets/local.nix diff --git a/nixcfgs/flake.lock b/nixcfgs/flake.lock index c43470f..bb80f50 100644 --- a/nixcfgs/flake.lock +++ b/nixcfgs/flake.lock @@ -375,6 +375,24 @@ "type": "indirect" } }, + "flake-utils_2": { + "inputs": { + "systems": "systems_4" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "fromYaml": { "flake": false, "locked": { @@ -582,11 +600,54 @@ "type": "github" } }, + "nix-openclaw": { + "inputs": { + "flake-utils": "flake-utils_2", + "home-manager": [ + "home-manager" + ], + "nix-steipete-tools": "nix-steipete-tools", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1773046894, + "narHash": "sha256-Hf5Q6gkaSXojSu9neW0dxvefUc3aA2T8ZQLTdGKIGOU=", + "owner": "openclaw", + "repo": "nix-openclaw", + "rev": "b39fc7f507097858273bda50834c6ab7367d7b09", + "type": "github" + }, + "original": { + "owner": "openclaw", + "repo": "nix-openclaw", + "type": "github" + } + }, + "nix-steipete-tools": { + "inputs": { + "nixpkgs": "nixpkgs_5" + }, + "locked": { + "lastModified": 1773038583, + "narHash": "sha256-E9Z/7U2ozB7nvCUZp9QlWllFl1yNXaInnuBSiRV5qh4=", + "owner": "openclaw", + "repo": "nix-steipete-tools", + "rev": "561592b0b1aa9b53595618fd867be633a192da54", + "type": "github" + }, + "original": { + "owner": "openclaw", + "repo": "nix-steipete-tools", + "type": "github" + } + }, "nixcord": { "inputs": { "flake-compat": "flake-compat", "flake-parts": "flake-parts_2", - "nixpkgs": "nixpkgs_5" + "nixpkgs": "nixpkgs_6" }, "locked": { "lastModified": 1772671545, @@ -703,6 +764,22 @@ } }, "nixpkgs_10": { + "locked": { + "lastModified": 1768564909, + "narHash": "sha256-Kell/SpJYVkHWMvnhqJz/8DqQg2b6PguxVWOuadbHCc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e4bae1bd10c9c57b2cf517953ab70060a828ee6f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_11": { "locked": { "lastModified": 1767026758, "narHash": "sha256-7fsac/f7nh/VaKJ/qm3I338+wAJa/3J57cOGpXi0Sbg=", @@ -767,6 +844,22 @@ } }, "nixpkgs_5": { + "locked": { + "lastModified": 1767364772, + "narHash": "sha256-fFUnEYMla8b7UKjijLnMe+oVFOz6HjijGGNS1l7dYaQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "16c7794d0a28b5a37904d55bcca36003b9109aaa", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_6": { "locked": { "lastModified": 1772465433, "narHash": "sha256-ywy9troNEfpgh0Ee+zaV1UTgU8kYBVKtvPSxh6clYGU=", @@ -782,7 +875,7 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_7": { "locked": { "lastModified": 1772674223, "narHash": "sha256-/suKbHSaSmuC9UY7G0VRQ3aO+QKqxAQPQ19wG7QNkF8=", @@ -798,7 +891,7 @@ "type": "github" } }, - "nixpkgs_7": { + "nixpkgs_8": { "locked": { "lastModified": 1772624091, "narHash": "sha256-QKyJ0QGWBn6r0invrMAK8dmJoBYWoOWy7lN+UHzW1jc=", @@ -814,7 +907,7 @@ "type": "github" } }, - "nixpkgs_8": { + "nixpkgs_9": { "locked": { "lastModified": 1767767207, "narHash": "sha256-Mj3d3PfwltLmukFal5i3fFt27L6NiKXdBezC1EBuZs4=", @@ -830,26 +923,10 @@ "type": "github" } }, - "nixpkgs_9": { - "locked": { - "lastModified": 1768564909, - "narHash": "sha256-Kell/SpJYVkHWMvnhqJz/8DqQg2b6PguxVWOuadbHCc=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "e4bae1bd10c9c57b2cf517953ab70060a828ee6f", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nur": { "inputs": { "flake-parts": "flake-parts_4", - "nixpkgs": "nixpkgs_7" + "nixpkgs": "nixpkgs_8" }, "locked": { "lastModified": 1772725591, @@ -946,9 +1023,10 @@ "nix-darwin": "nix-darwin", "nix-flatpak": "nix-flatpak", "nix-index-database": "nix-index-database", + "nix-openclaw": "nix-openclaw", "nixcord": "nixcord", "nixpak": "nixpak", - "nixpkgs": "nixpkgs_6", + "nixpkgs": "nixpkgs_7", "nixpkgs-stable": "nixpkgs-stable_2", "nur": "nur", "plasma-manager": "plasma-manager", @@ -988,9 +1066,9 @@ "firefox-gnome-theme": "firefox-gnome-theme", "flake-parts": "flake-parts_5", "gnome-shell": "gnome-shell", - "nixpkgs": "nixpkgs_8", + "nixpkgs": "nixpkgs_9", "nur": "nur_2", - "systems": "systems_4", + "systems": "systems_5", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", "tinted-schemes": "tinted-schemes", @@ -1072,6 +1150,21 @@ } }, "systems_5": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_6": { "locked": { "lastModified": 1689347949, "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", @@ -1172,8 +1265,8 @@ "elephant": [ "elephant" ], - "nixpkgs": "nixpkgs_9", - "systems": "systems_5" + "nixpkgs": "nixpkgs_10", + "systems": "systems_6" }, "locked": { "lastModified": 1771062828, @@ -1210,7 +1303,7 @@ "inputs": { "crane": "crane", "flake-parts": "flake-parts_6", - "nixpkgs": "nixpkgs_10", + "nixpkgs": "nixpkgs_11", "xremap": "xremap" }, "locked": { diff --git a/nixcfgs/flake.nix b/nixcfgs/flake.nix index 9995079..f02a070 100644 --- a/nixcfgs/flake.nix +++ b/nixcfgs/flake.nix @@ -59,6 +59,11 @@ }; stylix.url = "github:nix-community/stylix"; + nix-openclaw = { + url = "github:openclaw/nix-openclaw"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.home-manager.follows = "home-manager"; + }; nixpak = { url = "github:nixpak/nixpak"; inputs.nixpkgs.follows = "nixpkgs"; @@ -86,10 +91,12 @@ nix-index-database, walker, stylix, + nix-openclaw, nixpak, ... } @ inputs: let overlays = [ + nix-openclaw.overlays.default niri-flake.overlays.niri nur.overlays.default firefox-addons.overlays.default @@ -148,6 +155,7 @@ pkgs = forSystem "x86_64-linux"; extraSpecialArgs = specialArgs; modules = [ + nix-openclaw.homeManagerModules.openclaw ./users/js0ny/zephyrus.nix plasma-manager.homeModules.plasma-manager nix-flatpak.homeManagerModules.nix-flatpak @@ -165,6 +173,7 @@ pkgs = forSystem "aarch64-darwin"; extraSpecialArgs = specialArgs; modules = [ + nix-openclaw.homeManagerModules.openclaw ./users/js0ny/zen.nix catppuccin.homeModules.catppuccin betterfox-nix.modules.homeManager.betterfox diff --git a/nixcfgs/hosts/zp/README.md b/nixcfgs/hosts/zp/README.md new file mode 100644 index 0000000..6c1af65 --- /dev/null +++ b/nixcfgs/hosts/zp/README.md @@ -0,0 +1,6 @@ +# zp Host Status + +`zp` is currently idle and not used in daily workflow. + +The host config is intentionally kept as a minimal baseline so flake evaluation/checks do not break. +When `zp` is brought back, replace defaults in `default.nix` with real hardware-specific values. diff --git a/nixcfgs/hosts/zp/default.nix b/nixcfgs/hosts/zp/default.nix index dc90855..e9658a4 100644 --- a/nixcfgs/hosts/zp/default.nix +++ b/nixcfgs/hosts/zp/default.nix @@ -1,45 +1,18 @@ -# Edit this configuration file to define what should be installed on -# your system. Help is available in the configuration.nix(5) man page, on -# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). -{ - config, - lib, - pkgs, - ... -}: { +{lib, ...}: { imports = [ - # Include the results of the hardware scan. - ../common/nixos.nix - ../common/desktop-linux.nix - ../common/packages-fonts.nix - ../common/packages-desktop.nix - ../common/packages-headless.nix - ../common/nvidia.nix - ../common/flatpak.nix - ../common/wine.nix - ../common/firefox.nix - ../common/gnome.nix - ../common/docker.nix + ../../modules/nixos + ../../modules/nixos/programs/zsh.nix ]; - networking.hostName = "zp"; # Define your hostname. + networking.hostName = "zp"; - # This option defines the first version of NixOS you have installed on this particular machine, - # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions. - # - # Most users should NEVER change this value after the initial install, for any reason, - # even if you've upgraded your system to a new NixOS release. - # - # This value does NOT affect the Nixpkgs version your packages and OS are pulled from, - # so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how - # to actually do that. - # - # This value being lower than the current NixOS release does NOT mean your system is - # out of date, out of support, or vulnerable. - # - # Do NOT change this value unless you have manually inspected all the changes it would make to your configuration, - # and migrated your data accordingly. - # - # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion . - system.stateVersion = "25.05"; # Did you read the comment? + boot.loader.systemd-boot.enable = lib.mkDefault true; + boot.loader.efi.canTouchEfiVariables = lib.mkDefault true; + + fileSystems."/" = lib.mkDefault { + device = "/dev/disk/by-label/nixos"; + fsType = "ext4"; + }; + + system.stateVersion = "25.05"; } diff --git a/nixcfgs/secrets/secrets.yaml b/nixcfgs/secrets/secrets.yaml index a5caa74..1bdc43f 100644 --- a/nixcfgs/secrets/secrets.yaml +++ b/nixcfgs/secrets/secrets.yaml @@ -1,6 +1,9 @@ tavily_api: ENC[AES256_GCM,data:2hdsutsj0mqytujPIF1t1gpfSE7ym4WV2/lDbdLUw4yyLv7Rfvgtww8=,iv:kIYZ7ETQtQzyf2ymsgSTrvOh00qLQt6715SEi3dqxt4=,tag:M4qTgeoMlcnfh7D418ppfQ==,type:str] openrouter_api: ENC[AES256_GCM,data:XmsmgAEdiYP90JHnKmdy/jzgaFhmoU/wdYqxahIZ3NMZshgGIWv/fq7apOH8bh+yTytiIMrOdGGP1LZRHWVMeTqoDnWAimpweA==,iv:m2qykUpt9qE4ZAIHzQ0qhFUqEhPG6TiuVZWK+kOP2fg=,tag:Jtr/s17DJMVW215sh2/6+Q==,type:str] anki_sync_key: ENC[AES256_GCM,data:58zVvhbW6DS+CaxYHBUh5w==,iv:f8XOGMHS72p8cEVuburgsWBOpkw+axNjyP09NR4P3lo=,tag:UZzrdhnEfxtxCZwviEM+4g==,type:str] +openclaw_gateway_token: ENC[AES256_GCM,data:htTV/5GmsahHs+3N/L3Q1Kn2y0t0+kPMoH1P5z07xspnTwn+vxQ/QiR+1G506VM0y4Jm93tLk+sZRruLeaSFTw==,iv:mtid4CE2fyDadu2fePs4rcVLR35WUPiiRzuUA9GHWRw=,tag:ICW9ocQwgswwM/yrXMdC1A==,type:str] +openclaw_tgbot_token: ENC[AES256_GCM,data:9q3Q6oYNO6Vj3UryVoS8yDgrO6zrBV6vvXWx7gH3IlG6gVnJ5pqYFSfiyItUsg==,iv:9MBfBK/k/9J6PACvyyhhdCIGrVN0LDeg1viivSZJdaA=,tag:r4w+QkE30O2QraGeXvXySA==,type:str] +telegram_userid_ams: ENC[AES256_GCM,data:3iv2I0KI4j0gTQ==,iv:k8ffNBIERE/NBaq0h2DLEBudqT8+eCOWv5U0fJ65W5Y=,tag:hIhJxZnnN7Va31LHy2V5KQ==,type:str] sops: age: - recipient: age1z2km2vu3mw6usw8p2rhjzkugddmsvk0ypwjw76cscyy3ar3tnufqtrv3nu @@ -21,7 +24,7 @@ sops: MlBBYzA4bWkyOFNzWlFWbWhDMU9VSG8KJGAr3Gjg6+1OUC+d8+Yu+AW+zzfQ2MtX 7RzIvGv4R3YtAHlX79BcIT6XwGMXVIF86Fu2QOoU7u8o4wpyAt0CXA== -----END AGE ENCRYPTED FILE----- - lastmodified: "2025-11-23T15:05:53Z" - mac: ENC[AES256_GCM,data:VBgIJR2RJpaB8sSO/BhNbBdU8QYk2csS07a4mCSBJGonuT9iO3mLr65uTI76uayZS/2uiDCYUMGR635IlBhAc8pvy/bif8FCheVNestUjJeppS44fjatS+Wz+i6hz3ED9ECpEFlgoqi31uG0hzPeECinVXKDZr3o0JJmw4s7ZM8=,iv:0D4YD8C0rtXmJ+Qv7rzMWUJ2CaUogP6sQk6GEJFpnSo=,tag:nlT55c7ikMqq2TImVp9cSA==,type:str] + lastmodified: "2026-03-08T19:00:23Z" + mac: ENC[AES256_GCM,data:SYfoNENCAn7PaztjBB4NeES+gFulDTpFieaaP1Jzi8Td7xfUOFqfTT1DdO0dBdbE66sU/nsDgucNln+92y7BGaE2sCkbUtB9213QTi+gq+A44gzxvibeX4SueakjLC8KwgQxbRZAYYvlLEUVuJ7qIslOqrTPm0APCOxoTMxrgxg=,iv:UlPucS8Y4OFyzI/NVx+OcWYVxBOb+ribbFRc5hmLd80=,tag:5jZ72WV5aqjxL+qzGqB1fQ==,type:str] unencrypted_suffix: _unencrypted - version: 3.11.0 + version: 3.12.1 diff --git a/nixcfgs/users/js0ny/packages/flatpak.nix b/nixcfgs/users/js0ny/packages/flatpak.nix index d8a7af6..e18e33b 100644 --- a/nixcfgs/users/js0ny/packages/flatpak.nix +++ b/nixcfgs/users/js0ny/packages/flatpak.nix @@ -39,7 +39,7 @@ in { "com.qq.QQ" "com.tencent.WeChat" # "eu.betterbird.Betterbird" - # "com.baidu.NetDisk" + "com.baidu.NetDisk" # "com.discordapp.Discord" "com.google.EarthPro" "com.wps.Office" diff --git a/nixcfgs/users/js0ny/packages/gaming.nix b/nixcfgs/users/js0ny/packages/gaming.nix index 307b620..42da3ce 100644 --- a/nixcfgs/users/js0ny/packages/gaming.nix +++ b/nixcfgs/users/js0ny/packages/gaming.nix @@ -121,6 +121,7 @@ in { ]; imports = [ ../programs/retroarch.nix + ../programs/celeste paradoxLauncherUserSettings victoria3Settings pdxSdkSettingsEU5 diff --git a/nixcfgs/users/js0ny/programs/anki.nix b/nixcfgs/users/js0ny/programs/anki.nix index e4a453f..e4eaa66 100644 --- a/nixcfgs/users/js0ny/programs/anki.nix +++ b/nixcfgs/users/js0ny/programs/anki.nix @@ -11,7 +11,7 @@ review-heatmap # recolor # Use stylix ]; - sync = { + profiles."User 1".sync = { autoSync = true; autoSyncMediaMinutes = 15; username = "ankiweb.unusable450@passmail.net"; diff --git a/nixcfgs/users/js0ny/programs/celeste/default.nix b/nixcfgs/users/js0ny/programs/celeste/default.nix new file mode 100644 index 0000000..0cf5f21 --- /dev/null +++ b/nixcfgs/users/js0ny/programs/celeste/default.nix @@ -0,0 +1,11 @@ +{...}: { + imports = [ + ./lib.nix + ]; + programs.celeste = { + enable = true; + withSteam = true; + withOlympus = true; + settingsFile = ./settings.celeste; + }; +} diff --git a/nixcfgs/users/js0ny/programs/celeste/lib.nix b/nixcfgs/users/js0ny/programs/celeste/lib.nix new file mode 100644 index 0000000..a5e07cd --- /dev/null +++ b/nixcfgs/users/js0ny/programs/celeste/lib.nix @@ -0,0 +1,94 @@ +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.programs.celeste; +in { + options.programs.celeste = { + enable = mkEnableOption "Celeste"; + + withOlympus = mkOption { + type = types.bool; + default = false; + description = "Whether to include the Olympus mod manager."; + }; + + withSteam = mkOption { + type = types.bool; + default = true; + description = "Whether the game is installed via Steam (affects mod manager configuration)."; + }; + + withEverest = mkOption { + type = types.bool; + default = false; + description = '' + Whether to install Everest mod loader. + Only applicable when using the celestegame (itch.io) package. + ''; + }; + + writableDir = mkOption { + type = types.nullOr types.str; + default = null; + description = '' + Writable directory for Everest mods and logs. + Required when using celestegame with Everest, since the Nix store is read-only. + Example: "/home/user/Games/Celeste/writable" + ''; + }; + + gameDir = mkOption { + type = types.nullOr types.str; + default = null; + description = '' + Path where a symbolic link to the Celeste installation will be created. + Useful for Olympus to discover the celestegame installation. + Example: "/home/user/Games/Celeste/game" + ''; + }; + + settingsFile = mkOption { + type = types.nullOr types.path; + default = null; + description = '' + Path to the Celeste settings XML file in the dotfiles repository. + Will be symlinked to ~/.local/share/Celeste/Backups/settings.celeste + via mkOutOfStoreSymlink (out-of-store so the file remains mutable). + ''; + }; + }; + + config = mkIf cfg.enable { + home.packages = + # Olympus mod manager + (optional cfg.withOlympus ( + if cfg.withSteam + then pkgs.olympus.override {celesteWrapper = "steam-run";} + else + ( + if cfg.gameDir != null + then pkgs.olympus.override {finderHints = cfg.gameDir;} + else pkgs.olympus + ) + )) + # celestegame (itch.io DRM-free version) + ++ (optional (!cfg.withSteam) ( + pkgs.celestegame.override ( + {} + // (optionalAttrs cfg.withEverest {withEverest = true;}) + // (optionalAttrs (cfg.writableDir != null) {writableDir = cfg.writableDir;}) + // (optionalAttrs (cfg.gameDir != null) {gameDir = cfg.gameDir;}) + ) + )); + + # Symlink settings.celeste from dotfiles repo + home.file = mkIf (cfg.settingsFile != null) { + ".local/share/Celeste/Backups/settings.celeste".source = + config.lib.file.mkOutOfStoreSymlink cfg.settingsFile; + }; + }; +} diff --git a/nixcfgs/users/js0ny/programs/celeste/settings.celeste b/nixcfgs/users/js0ny/programs/celeste/settings.celeste new file mode 100644 index 0000000..ea53cd2 --- /dev/null +++ b/nixcfgs/users/js0ny/programs/celeste/settings.celeste @@ -0,0 +1,222 @@ + + + 1.4.0.0 + + true + 6 + 0 + true + false + false + true + Hold + Press + 10 + 10 + File + 0 + schinese + false + false + true + + + Left + + + LeftThumbstickLeft + DPadLeft + + + + + Right + + + LeftThumbstickRight + DPadRight + + + + + Down + + + LeftThumbstickDown + DPadDown + + + + + Up + + + LeftThumbstickUp + DPadUp + + + + + Left + + + LeftThumbstickLeft + DPadLeft + + + + + Right + + + LeftThumbstickRight + DPadRight + + + + + Down + + + LeftThumbstickDown + DPadDown + + + + + Up + + + LeftThumbstickUp + DPadUp + + + + + Z + V + LeftShift + + + LeftTrigger + RightTrigger + LeftShoulder + RightShoulder + + + + + C + + + A + Y + + + + + X + + + X + B + + + + + OemQuestion + + + B + + + + + Enter + + + Start + + + + + C + + + A + + + + + X + Back + + + B + X + + + + + Tab + + + LeftTrigger + + + + + R + + + + + + S + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + false + + \ No newline at end of file diff --git a/nixcfgs/users/js0ny/programs/desktop/wayland-wm/niri/window-rules.nix b/nixcfgs/users/js0ny/programs/desktop/wayland-wm/niri/window-rules.nix index 4b55678..8d86bb4 100644 --- a/nixcfgs/users/js0ny/programs/desktop/wayland-wm/niri/window-rules.nix +++ b/nixcfgs/users/js0ny/programs/desktop/wayland-wm/niri/window-rules.nix @@ -84,6 +84,21 @@ } ]; + open-floating = true; + default-floating-position = { + x = 50; + y = 50; + relative-to = "bottom-right"; + }; + } + { + matches = [ + { + app-id = "^org.gnome.Loupe$"; + } + ]; + + open-floating = true; default-floating-position = { x = 50; y = 50; diff --git a/nixcfgs/users/js0ny/programs/libmagic.nix b/nixcfgs/users/js0ny/programs/libmagic.nix new file mode 100644 index 0000000..e7624b7 --- /dev/null +++ b/nixcfgs/users/js0ny/programs/libmagic.nix @@ -0,0 +1,33 @@ +{...}: { + home.file.".magic" = { + text = '' + # ---------- Nintendo 3DS CIA ---------- + 0 lelong 0x00002020 Nintendo 3DS CTR Importable Archive (CIA) + !:mime application/x-ctr-importable-archive + !:ext cia + + # ---------- Paradox Mod Descriptor ---------- + 0 search/200 supported_version= Paradox Mod Descriptor + !:mime text/x-pdx-descriptor + !:ext mod + + 0 search/200 tags= Paradox Mod Descriptor + !:mime text/x-pdx-descriptor + !:ext mod + + 0 search/200 version= Paradox Mod Descriptor + !:mime text/x-pdx-descriptor + !:ext mod + + 0 search/200 name= Paradox Mod Descriptor + !:mime text/x-pdx-descriptor + !:ext mod + + # ---------- Nix Source Code ---------- + 0 regex/100 ^[[:space:]]*(\\{|#|let|import) Nix Source Code + !:mime text/x-nix + !:ext nix + ''; + force = true; + }; +} diff --git a/nixcfgs/users/js0ny/programs/openclaw.nix b/nixcfgs/users/js0ny/programs/openclaw.nix new file mode 100644 index 0000000..fb52597 --- /dev/null +++ b/nixcfgs/users/js0ny/programs/openclaw.nix @@ -0,0 +1,140 @@ +# OpenClaw - AI Gateway with Telegram/Discord Integration +# Documentation: https://github.com/openclaw/nix-openclaw +{ + pkgs, + lib, + config, + ... +}: let + # Import local machine-specific values (git-ignored) + # Create nixcfgs/secrets/local.nix with your Telegram User ID + localSecrets = import ../../../secrets/local.nix; +in { + programs.openclaw = { + enable = true; + + # Documents directory containing AGENTS.md, SOUL.md, TOOLS.md, etc. + # Located at ~/.local/share/openclaw-docs + documents = "${config.home.homeDirectory}/.local/share/openclaw-docs"; + + # Core gateway configuration + config = { + gateway = { + mode = "local"; # "local" or "remote" + auth = { + # Gateway authentication token (managed by sops-nix) + token = config.sops.secrets."OPENCLAW_GATEWAY_TOKEN".path; + }; + }; + + # Communication channels + channels = { + telegram = { + # Get bot token from @BotFather on Telegram (managed by sops-nix) + tokenFile = config.sops.secrets."OPENCLAW_TGBOT_TOKEN".path; + + # Your Telegram user ID - get from @userinfobot + # Imported from nixcfgs/secrets/local.nix (git-ignored) + allowFrom = lib.optionals (localSecrets.telegramUserId != 0) [ + localSecrets.telegramUserId + ]; + + # Group chat configuration + groups = { + "*" = {requireMention = true;}; # Default: require @mention in all groups + # "-1001234567890" = { requireMention = false; }; # Specific group without @mention + }; + }; + + # Discord configuration (optional) + # discord = { + # tokenFile = config.sops.secrets."DISCORD_BOT_TOKEN".path; + # allowFrom = [ + # "your-discord-user-id" + # ]; + # }; + }; + + # Provider API keys (managed by sops-nix) + env.vars = { + OPENROUTER_API_KEY = config.sops.secrets."OPENROUTER_API_KEY".path; + # OPENAI_API_KEY = config.sops.secrets."OPENAI_API_KEY".path; + }; + }; + + # Built-in plugins + bundledPlugins = { + summarize.enable = true; # Summarize web pages, PDFs, videos + peekaboo.enable = lib.mkIf pkgs.stdenv.isDarwin true; # Take screenshots (macOS only) + poltergeist.enable = false; # Control macOS UI (macOS only) + sag.enable = false; # Text-to-speech + camsnap.enable = false; # Camera snapshots (macOS only) + gogcli.enable = false; # Google Calendar integration + goplaces.enable = false; # Google Places API + bird.enable = false; # Twitter/X integration + sonoscli.enable = false; # Sonos speaker control + imsg.enable = false; # iMessage integration (macOS only) + + # Example: Plugin with sops-nix configuration + # goplaces = { + # enable = true; + # config.env.GOOGLE_PLACES_API_KEY = config.sops.secrets."GOOGLE_PLACES_API_KEY".path; + # }; + }; + + # Custom/community plugins + # plugins = [ + # # Simple plugin from GitHub + # { source = "github:owner/repo-name"; } + # + # # Plugin with sops-nix managed secrets + # { + # source = "github:owner/plugin-name"; + # config = { + # env = { + # PLUGIN_AUTH_FILE = config.sops.secrets."PLUGIN_AUTH_KEY".path; + # }; + # settings = { + # default_option = "value"; + # retries = 3; + # tags = [ "tag1" "tag2" ]; + # }; + # }; + # } + # + # # Local plugin development + # { source = "path:${config.home.homeDirectory}/code/my-openclaw-plugin"; } + # ]; + + # Tool management (avoid conflicts with system packages) + # excludeTools = [ "git" "jq" "ripgrep" ]; # Exclude tools already installed + }; + + # Multi-instance configuration (advanced) + # Use when you need separate prod/dev environments + # programs.openclaw.instances = { + # prod = { + # enable = true; + # stateDir = "${config.home.homeDirectory}/.openclaw"; + # workspaceDir = "${config.home.homeDirectory}/.openclaw/workspace"; + # config = { + # gateway.auth.token = config.sops.secrets."OPENCLAW_GATEWAY_TOKEN_PROD".path; + # channels.telegram.tokenFile = config.sops.secrets."TELEGRAM_BOT_TOKEN_PROD".path; + # # ... other prod config + # }; + # plugins = [ /* production plugins */ ]; + # }; + # + # dev = { + # enable = true; + # gatewayPort = 18790; + # gatewayPath = "${config.home.homeDirectory}/code/openclaw"; # Local development + # config = { + # gateway.auth.token = config.sops.secrets."OPENCLAW_GATEWAY_TOKEN_DEV".path; + # channels.telegram.tokenFile = config.sops.secrets."TELEGRAM_BOT_TOKEN_DEV".path; + # # ... other dev config + # }; + # plugins = [ /* dev plugins with local overrides */ ]; + # }; + # }; +} diff --git a/nixcfgs/users/js0ny/programs/readest.nix b/nixcfgs/users/js0ny/programs/readest.nix new file mode 100644 index 0000000..638d91c --- /dev/null +++ b/nixcfgs/users/js0ny/programs/readest.nix @@ -0,0 +1,30 @@ +{ + pkgs, + lib, + config, + ... +}: let + mergetools = import ../lib/mergetools.nix {inherit pkgs lib config;}; + mkMergedJson = mergetools.mkMergedJson; + readestSettings = mkMergedJson { + name = "readest-settings"; + target = ".config/com.bilingify.readest/settings.json"; + settings = { + globalViewSettings = { + serifFont = "LXGW WenKai GB Screen"; + defaultCJKFont = "LXGW WenKai GB Screen"; + sansSerifFont = config.stylix.fonts.sansSerif.name; + monospaceFont = "${config.stylix.fonts.monospace.name} Regular"; + uiLanguage = "zh-CN"; + }; + telemetryEnabled = false; + }; + }; +in { + home.packages = [ + pkgs.readest + ]; + imports = [ + readestSettings + ]; +} diff --git a/nixcfgs/users/js0ny/programs/sops.nix b/nixcfgs/users/js0ny/programs/sops.nix index dc56741..e0574d0 100644 --- a/nixcfgs/users/js0ny/programs/sops.nix +++ b/nixcfgs/users/js0ny/programs/sops.nix @@ -42,6 +42,26 @@ in { "ANKI_SYNC_KEY" = { key = "anki_sync_key"; }; + # OpenClaw secrets + "OPENCLAW_GATEWAY_TOKEN" = { + key = "openclaw_gateway_token"; + }; + "OPENCLAW_TGBOT_TOKEN" = { + key = "openclaw_tgbot_token"; + }; + "TELEGRAM_USER_ID_AMS" = { + key = "telegram_userid_ams"; + }; + # Optional OpenClaw secrets (uncomment as needed) + # "DISCORD_BOT_TOKEN" = { + # key = "discord_bot_token"; + # }; + # "OPENAI_API_KEY" = { + # key = "openai_api_key"; + # }; + # "GOOGLE_PLACES_API_KEY" = { + # key = "google_places_api_key"; + # }; }; }; diff --git a/nixcfgs/users/js0ny/zephyrus.nix b/nixcfgs/users/js0ny/zephyrus.nix index 9ab5e0b..6bbe7de 100644 --- a/nixcfgs/users/js0ny/zephyrus.nix +++ b/nixcfgs/users/js0ny/zephyrus.nix @@ -82,6 +82,9 @@ in { ./programs/elisa.nix ./programs/lollypop.nix ./programs/gallery-dl.nix + ./programs/readest.nix + ./programs/openclaw.nix + ./programs/libmagic.nix # Desktop Linux ./programs/desktop/gnome