nixpkgs-bootstrap: update (2024-12-20 -> 2024-12-20)
This commit is contained in:
6
TODO.md
6
TODO.md
@@ -30,10 +30,8 @@
|
|||||||
- can gocryptfs support nested filesystems, each with different perms (for desko, moby, etc)?
|
- can gocryptfs support nested filesystems, each with different perms (for desko, moby, etc)?
|
||||||
|
|
||||||
### upstreaming
|
### upstreaming
|
||||||
- upstream `bonsaid` service -> nixpkgs
|
- upstream blueprint-compiler cross fixes -> nixpkgs
|
||||||
- out for review: <https://github.com/NixOS/nixpkgs/pull/347818>
|
- upstream cargo cross fixes -> nixpkgs
|
||||||
- upstream `buffybox`/`buffyboard` package/service -> nixpkgs
|
|
||||||
- out for review: <https://github.com/NixOS/nixpkgs/pull/358941>
|
|
||||||
- upstream `gps-share` package -> nixpkgs
|
- upstream `gps-share` package -> nixpkgs
|
||||||
- upstream PinePhonePro device trees -> linux
|
- upstream PinePhonePro device trees -> linux
|
||||||
|
|
||||||
|
@@ -1,139 +0,0 @@
|
|||||||
# this is a version of the bonsaid service which i intend to upstream to nixpkgs.
|
|
||||||
# it runs as a user service, so i'd need to wrap it for my own setup in some other module.
|
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
let
|
|
||||||
json = pkgs.formats.json { };
|
|
||||||
transitionType = with lib; types.submodule {
|
|
||||||
freeformType = json.type;
|
|
||||||
options.type = mkOption {
|
|
||||||
type = types.enum [ "delay" "event" "exec" ];
|
|
||||||
};
|
|
||||||
options.command = mkOption {
|
|
||||||
type = types.nullOr (types.listOf types.str);
|
|
||||||
default = null;
|
|
||||||
description = ''
|
|
||||||
Command to run when this transition is taken.
|
|
||||||
This is executed inline by `bonsaid` and blocks handling of any other events until completion.
|
|
||||||
To perform the command asynchronously, specify it like `[ "setsid" "-f" "my-command" ]`.
|
|
||||||
|
|
||||||
Only effects transitions with `type = "exec"`.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
options.delay_duration = mkOption {
|
|
||||||
type = types.nullOr types.int;
|
|
||||||
default = null;
|
|
||||||
description = ''
|
|
||||||
Nanoseconds to wait after the previous state change before performing this transition.
|
|
||||||
This can be placed at the same level as a `type = "event"` transition to achieve a
|
|
||||||
timeout mechanism.
|
|
||||||
|
|
||||||
Only effects transitions with `type = "delay"`.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
options.event_name = mkOption {
|
|
||||||
type = types.nullOr types.str;
|
|
||||||
default = null;
|
|
||||||
description = ''
|
|
||||||
Name of the event which should trigger this transition when received by `bonsaid`.
|
|
||||||
Events are sent to `bonsaid` by running `bonsaictl -e <event_name>`.
|
|
||||||
|
|
||||||
Only effects transitions with `type = "event"`.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
options.transitions = mkOption {
|
|
||||||
type = types.listOf transitionType;
|
|
||||||
default = [];
|
|
||||||
description = ''
|
|
||||||
List of transitions out of this state.
|
|
||||||
If left empty, then this state is considered a terminal state and entering it will
|
|
||||||
trigger an immediate transition back to the root state (after processing side effects).
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
cfg = config.services.bonsaid;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
meta.maintainers = with lib.maintainers; [ colinsane ];
|
|
||||||
|
|
||||||
options.services.bonsaid = with lib; {
|
|
||||||
enable = mkEnableOption "bonsaid";
|
|
||||||
package = mkPackageOption pkgs "bonsai" { };
|
|
||||||
extraFlags = mkOption {
|
|
||||||
type = types.listOf types.str;
|
|
||||||
default = [];
|
|
||||||
description = ''
|
|
||||||
Extra flags to pass to `bonsaid`, such as `[ "-v" ]` to enable verbose logging.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
settings = mkOption {
|
|
||||||
type = types.listOf transitionType;
|
|
||||||
default = [];
|
|
||||||
description = ''
|
|
||||||
State transition definitions. See the upstream [[README]](https://git.sr.ht/~stacyharper/bonsai)
|
|
||||||
for extended documentation and a more complete example.
|
|
||||||
'';
|
|
||||||
example = [
|
|
||||||
{
|
|
||||||
type = "event";
|
|
||||||
event_name = "power_button_pressed";
|
|
||||||
transitions = [
|
|
||||||
{
|
|
||||||
# Hold power button for 600ms to trigger a command
|
|
||||||
type = "delay";
|
|
||||||
delay_duration = 600000000;
|
|
||||||
transitions = [
|
|
||||||
{
|
|
||||||
type = "exec";
|
|
||||||
command = [ "swaymsg" "--" "output" "*" "power" "off" ];
|
|
||||||
# `transitions = []` marks this as a terminal state,
|
|
||||||
# so bonsai will return to the root state immediately after executing the above command.
|
|
||||||
transitions = [];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
# If the power button is released before the 600ms elapses, return to the root state.
|
|
||||||
type = "event";
|
|
||||||
event_name = "power_button_released";
|
|
||||||
transitions = [];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
configFile = mkOption {
|
|
||||||
type = types.path;
|
|
||||||
default = let
|
|
||||||
filterNulls = v: if lib.isAttrs v then
|
|
||||||
lib.mapAttrs (_: filterNulls) (lib.filterAttrs (_: a: a != null) v)
|
|
||||||
else if lib.isList v then
|
|
||||||
lib.map filterNulls (lib.filter (a: a != null) v)
|
|
||||||
else
|
|
||||||
v
|
|
||||||
;
|
|
||||||
in
|
|
||||||
json.generate "bonsai_tree.json" (filterNulls cfg.settings);
|
|
||||||
description = ''
|
|
||||||
Path to a .json file specifying the state transitions.
|
|
||||||
You don't need to set this unless you prefer to provide the json file
|
|
||||||
yourself instead of using the `settings` option.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
systemd.user.services.bonsaid = {
|
|
||||||
description = "Bonsai Finite State Machine daemon";
|
|
||||||
unitConfig.Documentation = [ "https://git.sr.ht/~stacyharper/bonsai" ];
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
serviceConfig = {
|
|
||||||
ExecStart = lib.escapeShellArgs (
|
|
||||||
[ (lib.getExe' cfg.package "bonsaid") "-t" cfg.configFile ] ++ cfg.extraFlags
|
|
||||||
);
|
|
||||||
Type = "simple";
|
|
||||||
Restart = "on-failure";
|
|
||||||
RestartSec = "5s";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@@ -1,7 +1,6 @@
|
|||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
# ./bonsaid.nix #< UPSTREAMING IN PROGRESS: <https://github.com/NixOS/nixpkgs/pull/347818>
|
|
||||||
./dropbear.nix
|
./dropbear.nix
|
||||||
./clightning.nix
|
./clightning.nix
|
||||||
./dyn-dns.nix
|
./dyn-dns.nix
|
||||||
|
@@ -8,8 +8,8 @@
|
|||||||
mkNixpkgs ? import ./mkNixpkgs.nix {}
|
mkNixpkgs ? import ./mkNixpkgs.nix {}
|
||||||
}:
|
}:
|
||||||
mkNixpkgs {
|
mkNixpkgs {
|
||||||
rev = "ce33a954a95172a8f56206feb9f825f9f4a1dc49";
|
rev = "a01b0bf2fe47fc48c5faae6bd7cd2565024c6889";
|
||||||
sha256 = "sha256-YB1l0M3FAaBer8jyOnNm2mnfDbwleyovWTazI2Jm2eg=";
|
sha256 = "sha256-WzfZbADLsSvmAoMvr25COFsfCngqhsirHwqq+noQ4kw=";
|
||||||
version = "0-unstable-2024-12-20";
|
version = "0-unstable-2024-12-20";
|
||||||
branch = "master";
|
branch = "master";
|
||||||
}
|
}
|
||||||
|
@@ -46,13 +46,6 @@ in
|
|||||||
hash = "sha256-Dur6EFuc3uqMuJyXBKKIaj2Y0jA227y8U6lK06cQ718=";
|
hash = "sha256-Dur6EFuc3uqMuJyXBKKIaj2Y0jA227y8U6lK06cQ718=";
|
||||||
})
|
})
|
||||||
|
|
||||||
(fetchpatch' {
|
|
||||||
name = "nixos/bonsaid: init";
|
|
||||||
prUrl = "https://github.com/NixOS/nixpkgs/pull/347818";
|
|
||||||
hash = "sha256-/0TXZVqXd4ckAtcJNSrZLJcLOZJAhpCAiykuHALHMWA=";
|
|
||||||
# saneCommit = "bc3d311bdc11a26b8b0a95806c0ea7b80554548d";
|
|
||||||
})
|
|
||||||
|
|
||||||
(fetchpatch' {
|
(fetchpatch' {
|
||||||
# TODO: send to upstream nixpkgs once tested (branch: lappy: pr-stepmania-wrapper)
|
# TODO: send to upstream nixpkgs once tested (branch: lappy: pr-stepmania-wrapper)
|
||||||
name = "stepmania: wrap the program so it knows where to find its data files";
|
name = "stepmania: wrap the program so it knows where to find its data files";
|
||||||
@@ -83,14 +76,6 @@ in
|
|||||||
# hash = "sha256-frSOcOQs6n+++w95DWz92H8SVwrs8ZJyJ1KHwOQ6ql8=";
|
# hash = "sha256-frSOcOQs6n+++w95DWz92H8SVwrs8ZJyJ1KHwOQ6ql8=";
|
||||||
# })
|
# })
|
||||||
|
|
||||||
(fetchpatch' {
|
|
||||||
name = "nixos/networkmanager: split ModemManager bits into own module";
|
|
||||||
prUrl = "https://github.com/NixOS/nixpkgs/pull/316824";
|
|
||||||
hash = "sha256-IsZUots6+qv2+6J3i8TiS8isrYszEmtL6Q0u2lBrPho=";
|
|
||||||
# saneCommit = "23bfba9b76757ffc00fc2be810009dcf92e2eaf2";
|
|
||||||
# hash = "sha256-cn6ihwO3MyzdpVoJoQNKAHyo8GuGvFP6vr//7r9pzjE=";
|
|
||||||
})
|
|
||||||
|
|
||||||
# (fetchpatch' {
|
# (fetchpatch' {
|
||||||
# # TODO: send for review once hspell fix is merged <https://github.com/NixOS/nixpkgs/pull/263182>
|
# # TODO: send for review once hspell fix is merged <https://github.com/NixOS/nixpkgs/pull/263182>
|
||||||
# # this patch works as-is, but hspell keeps a ref to build perl and thereby pollutes this closure as well.
|
# # this patch works as-is, but hspell keeps a ref to build perl and thereby pollutes this closure as well.
|
||||||
|
@@ -2,8 +2,8 @@
|
|||||||
mkNixpkgs ? import ./mkNixpkgs.nix {}
|
mkNixpkgs ? import ./mkNixpkgs.nix {}
|
||||||
}:
|
}:
|
||||||
mkNixpkgs {
|
mkNixpkgs {
|
||||||
rev = "4c90bb551c13f308a9798f0f0d5f1fa2bbf6e2df";
|
rev = "59ce48c98b4794da1a7bc3971563b82af70f3afd";
|
||||||
sha256 = "sha256-3ySlbOSAjeNchnptCxn8SEAAkflltInMwKgdQZti9uQ=";
|
sha256 = "sha256-saqfJEUgnrznctnLl7iGFD++oPgaWC4wum+bf3rfvUM=";
|
||||||
version = "0-unstable-2024-12-17";
|
version = "0-unstable-2024-12-20";
|
||||||
branch = "staging-next";
|
branch = "staging-next";
|
||||||
}
|
}
|
||||||
|
@@ -2,8 +2,8 @@
|
|||||||
mkNixpkgs ? import ./mkNixpkgs.nix {}
|
mkNixpkgs ? import ./mkNixpkgs.nix {}
|
||||||
}:
|
}:
|
||||||
mkNixpkgs {
|
mkNixpkgs {
|
||||||
rev = "9e59c661dc1c71ddc76f94105d328a48601cd26f";
|
rev = "fea626d2983c1fe88932013222a44f8e09645f76";
|
||||||
sha256 = "sha256-XyNYKao8hVACA4hgSu4TUPIfHzx+P3bqB4vWyWLHIYM=";
|
sha256 = "sha256-OPL2nbYRjzD3gPa/oPMxX/CSYNeTxiQGpr3KJtwe9VU=";
|
||||||
version = "0-unstable-2024-12-19";
|
version = "0-unstable-2024-12-20";
|
||||||
branch = "staging";
|
branch = "staging";
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user