Unverified Commit dea8f756 authored by nixpkgs-ci[bot]'s avatar nixpkgs-ci[bot] Committed by GitHub
Browse files

Merge master into staging-nixos

parents e1788f59 2e4fae04
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -637,6 +637,7 @@
  ./services/hardware/actkbd.nix
  ./services/hardware/amdgpu.nix
  ./services/hardware/argonone.nix
  ./services/hardware/arsenik.nix
  ./services/hardware/asusd.nix
  ./services/hardware/auto-cpufreq.nix
  ./services/hardware/auto-epp.nix
+130 −0
Original line number Diff line number Diff line
{
  lib,
  config,
  pkgs,
  ...
}:
let
  cfg = config.services.arsenik;
in
{
  options.services.arsenik = {
    enable = lib.mkEnableOption "A 33-key layout that works with all keyboards.";
    package = lib.mkPackageOption pkgs "arsenik" { };
    tap_timeout = lib.mkOption {
      default = 200;
      description = "The key must be pressed twice in XX ms to enable repetitions.";
      type = lib.types.int;
    };
    hold_timeout = lib.mkOption {
      default = 200;
      description = "The key must be held XX ms to become a layer shift.";
      type = lib.types.int;
    };
    long_hold_timeout = lib.mkOption {
      default = 300;
      description = "Slightly higher value for typing keys, to prevent unexpected hold effect.";
      type = lib.types.int;
    };
    mac = lib.mkOption {
      default = false;
      description = "Original key arrangement on your keyboard: Mac or PC.";
      type = lib.types.bool;
    };
    anglemod = lib.mkOption {
      default = false;
      description = ''
        Choose here if you want to add an angle mod: ZXCVB are shifted to the left.
        See https://colemakmods.github.io/ergonomic-mods/angle.html for more details.
      '';
      type = lib.types.bool;
    };
    wide = lib.mkOption {
      default = false;
      description = "The right hand is moved one key to the right.";
      type = lib.types.bool;
    };
    lt = lib.mkOption {
      default = false;
      description = "Enable layer-taps.";
      type = lib.types.bool;
    };
    hrm = lib.mkOption {
      default = false;
      description = "Enable homerow.";
      type = lib.types.bool;
    };
    lafayette = lib.mkOption {
      default = false;
      description = "Add AltGr programmation layer like Ergo‑L";
      type = lib.types.bool;
    };
    num = lib.mkOption {
      default = false;
      description = "Add NumRow layer";
      type = lib.types.bool;
    };
    vim = lib.mkOption {
      default = false;
      description = "Navigation layer: ESDF or HJKL?";
      type = lib.types.bool;
    };
    run = lib.mkOption {
      default = "M-p";
      description = "The keyboard shortcut of your application launcher.";
      type = lib.types.str;
    };
    layout = lib.mkOption {
      default = "ergol";
      description = ''
        Your keyboard layout. Possible values are:
        ergol qwerty-lafayette qwerty azerty qwertz bepo optimot
      '';
      type = lib.types.str;
    };
  };

  config = lib.mkIf cfg.enable {

    assertions = [
      {
        assertion = cfg.wide -> cfg.anglemod;
        message = "service.arsenik.wide requires service.arsenik.anglemod";
      }
      {
        assertion = cfg.hrm -> cfg.lt;
        message = "service.arsenik.hrm requires service.arsenik.lt";
      }
    ];

    services.kanata =
      let
        src = "${cfg.package}/share/arsenik";
        defsrc = "${if cfg.mac then "mac" else "pc"}${if cfg.wide then "_wide" else ""}${
          if cfg.anglemod then "_anglemod" else ""
        }";
        base = "base${if cfg.lt then "_lt" else ""}${if cfg.hrm then "_hrm" else ""}";
        symbols = "symbols_${if cfg.lafayette then "lafayette" else "noop"}${
          if cfg.num then "_num" else ""
        }";
        navigation = "navigation${if cfg.vim then "_vim" else ""}";
        alias = "${cfg.layout}_${if cfg.mac then "mac" else "pc"}";
      in
      {
        enable = true;
        keyboards.arsenik.config = ''
          (defvar
            tap_timeout ${builtins.toString cfg.tap_timeout}
            hold_timeout ${builtins.toString cfg.hold_timeout}
            long_hold_timeout ${builtins.toString cfg.long_hold_timeout}
          )
          (include ${src}/defsrc/${defsrc}.kbd)
          (include ${src}/deflayer/${base}.kbd)
          (include ${src}/deflayer/${symbols}.kbd)
          (include ${src}/deflayer/${navigation}.kbd)
          (defalias run ${cfg.run})
          (include ${src}/defalias/${alias}.kbd)
        '';
      };
  };
}
+1 −1
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ in
        Specify the bypass parameters for Zapret binary.
        There are no universal parameters as they vary between different networks, so you'll have to find them yourself.

        This can be done by running the `blockcheck` binary from zapret package, i.e. `nix-shell -p zapret --command blockcheck`.
        This can be done by running the `blockcheck` binary from zapret package, i.e. `nix-shell -p nftables zapret --command blockcheck` (or `iptables` instead of `nftables` if that is what your firewall is using).
        It'll try different params and then tell you which params are working for your network.
      '';
    };
+13 −0
Original line number Diff line number Diff line
@@ -14500,6 +14500,19 @@ final: prev: {
    meta.hydraPlatforms = [ ];
  };
  stringbreaker-nvim = buildVimPlugin {
    pname = "stringbreaker.nvim";
    version = "2025-09-24";
    src = fetchFromGitHub {
      owner = "duqcyxwd";
      repo = "stringbreaker.nvim";
      rev = "f6310ad154063151078548b21e8de05bec1f6ac9";
      sha256 = "14k7cvjh9kz3p33np275qp2p2aipbxm934kqz2yc7l08fag9sg3x";
    };
    meta.homepage = "https://github.com/duqcyxwd/stringbreaker.nvim/";
    meta.hydraPlatforms = [ ];
  };
  styler-nvim = buildVimPlugin {
    pname = "styler.nvim";
    version = "2025-10-28";
+1 −0
Original line number Diff line number Diff line
@@ -1113,6 +1113,7 @@ https://github.com/darfink/starsearch.vim/,,
https://github.com/max397574/startup.nvim/,HEAD,
https://github.com/luukvbaal/statuscol.nvim/,,
https://github.com/arnamak/stay-centered.nvim/,HEAD,
https://github.com/duqcyxwd/stringbreaker.nvim/,HEAD,
https://github.com/folke/styler.nvim/,,
https://github.com/teto/stylish.nvim/,HEAD,
https://github.com/gbprod/substitute.nvim/,HEAD,
Loading