)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"5ce1d86cfb1ee10d7d976ab869ab4d0bf507022c","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":25,"id":"379889bc_3bf2d5bd","updated":"2021-12-20 15:36:36.000000000","message":"it looks like you may have re-pushed the first patchset as patchset 25?","commit_id":"40a07606027adcb428bb45fa2f28e140841efb9f"},{"author":{"_account_id":1000045,"name":"wpcarro","email":"wpcarro@gmail.com","username":"wpcarro"},"change_message_id":"d4f2b3e88f9cdf6de9ca612f0def79d171735ada","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":25,"id":"3887b764_925c1f3b","in_reply_to":"379889bc_3bf2d5bd","updated":"2021-12-24 01:53:23.000000000","message":"Done","commit_id":"40a07606027adcb428bb45fa2f28e140841efb9f"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":1000045,"name":"wpcarro","email":"wpcarro@gmail.com","username":"wpcarro"},"change_message_id":"a29fe61a81f0b19d2384b071b65e6a47c00cb252","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"9649e21c_8b18c3a8","updated":"2021-12-17 00:54:09.000000000","message":"Looking to start the conversation","commit_id":"9d600e35d7be433ca5dac14bc6bdcb5e2b72dd24"},{"author":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"change_message_id":"569271e5afab16145f66abd57c6c11272490ceac","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":20,"id":"659f31bb_20eed92c","updated":"2021-12-18 10:33:02.000000000","message":"I think you are trying to reinvent channels here. I think it would be worthwhile to actually support generating some kind of \u003cdepot\u003e channel by creating a tarball after a successful canon build.\n\nUsing channels we would get auto update functionality for free and also would get the guarantee that CI is green instead of effectively verifying that the system builds by trying to build it periodically downstream.","commit_id":"2b7c4168e8c3ea60a57e2f1037acfabaf2359c97"},{"author":{"_account_id":1000045,"name":"wpcarro","email":"wpcarro@gmail.com","username":"wpcarro"},"change_message_id":"312c99588214f5e3654b92b72c7f634b95f461b6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":20,"id":"daa1aa58_736c1982","updated":"2021-12-18 01:38:05.000000000","message":"One outstanding TODO, and this should be feature-complete.","commit_id":"2b7c4168e8c3ea60a57e2f1037acfabaf2359c97"},{"author":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"change_message_id":"7088b9869f30957e6211728df6534282b1ce0baf","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":20,"id":"2d3e9a27_35b26479","in_reply_to":"0ff1fc80_d0a51970","updated":"2021-12-25 10:44:31.000000000","message":"To elaborate, the advantages would basically be:\n\n* We don\u0027t need to evaluate a system hourly (or at some kind of schedule) to see if we need to redeploy which I can imagine could be a nuisance, since evaluating the module system is quite resource hungry.\n* If there\u0027s a bad canon revision due to some unfortunate flakiness, we would avoid building a bad revision.\n\nIn any case, we could probably just replace auto-deploy with a channel based solution later if we so desire.","commit_id":"2b7c4168e8c3ea60a57e2f1037acfabaf2359c97"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"684c646b8407be34f7372af21853475bfdabf659","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":20,"id":"c0804323_eb2493f7","in_reply_to":"2d3e9a27_35b26479","updated":"2021-12-25 11:44:10.000000000","message":"I\u0027d like to figure out how this channel system works exactly (see also sterni\u0027s cl/4517), but I think we can figure that out independently from this CL since all machines that use this CL will be in the depot - so refactoring is easy.","commit_id":"2b7c4168e8c3ea60a57e2f1037acfabaf2359c97"},{"author":{"_account_id":1000045,"name":"wpcarro","email":"wpcarro@gmail.com","username":"wpcarro"},"change_message_id":"9dc00f764a0c387851ef08a9ba94eaf8aa360df6","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":20,"id":"0ff1fc80_d0a51970","in_reply_to":"659f31bb_20eed92c","updated":"2021-12-24 23:56:21.000000000","message":"@tazjin - any thoughts?","commit_id":"2b7c4168e8c3ea60a57e2f1037acfabaf2359c97"},{"author":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"change_message_id":"3251183d4da349a38a0c137b898ad9c6431c9497","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":20,"id":"972a844d_a6af1283","in_reply_to":"c0804323_eb2493f7","updated":"2021-12-26 08:52:43.000000000","message":"Ack","commit_id":"2b7c4168e8c3ea60a57e2f1037acfabaf2359c97"},{"author":{"_account_id":1000046,"name":"fogti","email":"fogti+devel@ytrizja.de","username":"fogti"},"change_message_id":"dbe69666a00d18fcfba2faa8148f4780422f0690","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":28,"id":"41af0a5d_a9b2ba97","updated":"2021-12-23 00:01:45.000000000","message":"(undo CR modification)","commit_id":"00a68f754942c64a8f8d490df0cf586fcc143b31"},{"author":{"_account_id":1000045,"name":"wpcarro","email":"wpcarro@gmail.com","username":"wpcarro"},"change_message_id":"cb2cbad5e08c0958dc88d1ca4636b28e77a554e3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":28,"id":"3a81f869_4994f3c9","updated":"2021-12-22 23:42:38.000000000","message":"Should be ready to submit 😎","commit_id":"00a68f754942c64a8f8d490df0cf586fcc143b31"},{"author":{"_account_id":1000045,"name":"wpcarro","email":"wpcarro@gmail.com","username":"wpcarro"},"change_message_id":"97949a704faab86a0bf0133ba787c5f9e20cd4da","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":30,"id":"8d1bda05_35659f3a","updated":"2021-12-24 18:17:44.000000000","message":"Resolving since I haven\u0027t heard anything in awhile and IIUC this doesn\u0027t seem like a blocking issue.","commit_id":"92c85c6e8bee30215175056a24fb054bd51273fb"}],"ops/modules/auto-deploy.nix":[{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"f5240af4a4b3b876c50aa0cb6c4e91763f2beef8","unresolved":true,"context_lines":[{"line_number":9,"context_line":"  deployScript \u003d pkgs.writeShellScript \"auto-deploy\" \u0027\u0027"},{"line_number":10,"context_line":"    set -ueo pipefail"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"    system\u003d# ask binary cache for latest $HOSTNAME"},{"line_number":13,"context_line":"    nix-env p /nix/var/nix/profiles/system --set $system"},{"line_number":14,"context_line":"    $system/bin/switch-to-configuration switch"},{"line_number":15,"context_line":"  \u0027\u0027;"}],"source_content_type":"text/x-nix","patch_set":1,"id":"7c4c4577_ef09497d","line":12,"range":{"start_line":12,"start_character":11,"end_line":12,"end_character":50},"updated":"2021-12-17 20:15:34.000000000","message":"This seems like the bulk of things here, and is the thing I\u0027m least clear on how it\u0027s going to happen - specifically, is the idea that every host would have credentials to clone the depot? or would we have some sort of metadata service for fetching the current outPath of a particular depot build taarget? The latter seems kinda cool (albeit unfortunately pretty mutability-based), but I\u0027m moderately worried about the overhead of the former. Maybe it\u0027s fine though","commit_id":"9d600e35d7be433ca5dac14bc6bdcb5e2b72dd24"},{"author":{"_account_id":1000045,"name":"wpcarro","email":"wpcarro@gmail.com","username":"wpcarro"},"change_message_id":"042516a7c5b99fd1b64de4eedf1ba89dacebfed5","unresolved":true,"context_lines":[{"line_number":9,"context_line":"  deployScript \u003d pkgs.writeShellScript \"auto-deploy\" \u0027\u0027"},{"line_number":10,"context_line":"    set -ueo pipefail"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"    system\u003d# ask binary cache for latest $HOSTNAME"},{"line_number":13,"context_line":"    nix-env p /nix/var/nix/profiles/system --set $system"},{"line_number":14,"context_line":"    $system/bin/switch-to-configuration switch"},{"line_number":15,"context_line":"  \u0027\u0027;"}],"source_content_type":"text/x-nix","patch_set":1,"id":"fee8c974_38c75ac8","line":12,"range":{"start_line":12,"start_character":11,"end_line":12,"end_character":50},"in_reply_to":"7c4c4577_ef09497d","updated":"2021-12-17 21:42:23.000000000","message":"\u003e [..] is the idea that every host would have credentials to clone the depot\n\nI was thinking `git clone` https.\n\nAs for the registry idea of mapping target-specs (i.e. //foo/bar:baz) to store paths, maybe that can be something to look at for supporting remote builds via rebuild-system. Wdyt?","commit_id":"9d600e35d7be433ca5dac14bc6bdcb5e2b72dd24"},{"author":{"_account_id":1000045,"name":"wpcarro","email":"wpcarro@gmail.com","username":"wpcarro"},"change_message_id":"47025b3762e8ad068595c4ec771a0549de60ba74","unresolved":false,"context_lines":[{"line_number":9,"context_line":"  deployScript \u003d pkgs.writeShellScript \"auto-deploy\" \u0027\u0027"},{"line_number":10,"context_line":"    set -ueo pipefail"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"    system\u003d# ask binary cache for latest $HOSTNAME"},{"line_number":13,"context_line":"    nix-env p /nix/var/nix/profiles/system --set $system"},{"line_number":14,"context_line":"    $system/bin/switch-to-configuration switch"},{"line_number":15,"context_line":"  \u0027\u0027;"}],"source_content_type":"text/x-nix","patch_set":1,"id":"57970254_44795479","line":12,"range":{"start_line":12,"start_character":11,"end_line":12,"end_character":50},"in_reply_to":"e4a1f251_58976c94","updated":"2021-12-17 22:00:32.000000000","message":"Done","commit_id":"9d600e35d7be433ca5dac14bc6bdcb5e2b72dd24"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"82e1ddb024e8145b8396aa9199bc09c633377aaf","unresolved":true,"context_lines":[{"line_number":9,"context_line":"  deployScript \u003d pkgs.writeShellScript \"auto-deploy\" \u0027\u0027"},{"line_number":10,"context_line":"    set -ueo pipefail"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"    system\u003d# ask binary cache for latest $HOSTNAME"},{"line_number":13,"context_line":"    nix-env p /nix/var/nix/profiles/system --set $system"},{"line_number":14,"context_line":"    $system/bin/switch-to-configuration switch"},{"line_number":15,"context_line":"  \u0027\u0027;"}],"source_content_type":"text/x-nix","patch_set":1,"id":"e4a1f251_58976c94","line":12,"range":{"start_line":12,"start_character":11,"end_line":12,"end_character":50},"in_reply_to":"fee8c974_38c75ac8","updated":"2021-12-17 21:43:12.000000000","message":"yeah, I think remote builds can happen later - as a change to rebuild system","commit_id":"9d600e35d7be433ca5dac14bc6bdcb5e2b72dd24"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"f5240af4a4b3b876c50aa0cb6c4e91763f2beef8","unresolved":true,"context_lines":[{"line_number":40,"context_line":"    systemd.services.auto-deploy \u003d {"},{"line_number":41,"context_line":"      inherit description;"},{"line_number":42,"context_line":"      script \u003d \"${deployScript}\";"},{"line_number":43,"context_line":"      # TODO(wpcarro): Ensure this value is correct"},{"line_number":44,"context_line":"      serviceConfig.Type \u003d \"oneshot\";"},{"line_number":45,"context_line":"    };"},{"line_number":46,"context_line":""}],"source_content_type":"text/x-nix","patch_set":1,"id":"d580a853_ffbd854f","line":43,"updated":"2021-12-17 20:15:34.000000000","message":"90% sure it is","commit_id":"9d600e35d7be433ca5dac14bc6bdcb5e2b72dd24"},{"author":{"_account_id":1000045,"name":"wpcarro","email":"wpcarro@gmail.com","username":"wpcarro"},"change_message_id":"042516a7c5b99fd1b64de4eedf1ba89dacebfed5","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    systemd.services.auto-deploy \u003d {"},{"line_number":41,"context_line":"      inherit description;"},{"line_number":42,"context_line":"      script \u003d \"${deployScript}\";"},{"line_number":43,"context_line":"      # TODO(wpcarro): Ensure this value is correct"},{"line_number":44,"context_line":"      serviceConfig.Type \u003d \"oneshot\";"},{"line_number":45,"context_line":"    };"},{"line_number":46,"context_line":""}],"source_content_type":"text/x-nix","patch_set":1,"id":"22d8b78b_eda737c6","line":43,"in_reply_to":"d580a853_ffbd854f","updated":"2021-12-17 21:42:23.000000000","message":"Ack","commit_id":"9d600e35d7be433ca5dac14bc6bdcb5e2b72dd24"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"85cfd31e1699f835c5e85142b8ca23605e2be462","unresolved":true,"context_lines":[{"line_number":4,"context_line":""},{"line_number":5,"context_line":"let"},{"line_number":6,"context_line":"  cfg \u003d config.services.depot.auto-deploy;"},{"line_number":7,"context_line":"  description \u003d \"Automatically build Nix things\";"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"  deployScript \u003d pkgs.writeShellScript \"auto-deploy\" \u0027\u0027"},{"line_number":10,"context_line":"    set -ueo pipefail"}],"source_content_type":"text/x-nix","patch_set":2,"id":"74cb7b41_dbe01529","line":7,"range":{"start_line":7,"start_character":31,"end_line":7,"end_character":47},"updated":"2021-12-17 21:42:27.000000000","message":"perhaps \"rebuild the current system\u0027s NixOS config from the latest checkout of depot\"","commit_id":"4e6a8c5d8499c360ee4a782687ef4b7751502a45"},{"author":{"_account_id":1000045,"name":"wpcarro","email":"wpcarro@gmail.com","username":"wpcarro"},"change_message_id":"47025b3762e8ad068595c4ec771a0549de60ba74","unresolved":false,"context_lines":[{"line_number":4,"context_line":""},{"line_number":5,"context_line":"let"},{"line_number":6,"context_line":"  cfg \u003d config.services.depot.auto-deploy;"},{"line_number":7,"context_line":"  description \u003d \"Automatically build Nix things\";"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"  deployScript \u003d pkgs.writeShellScript \"auto-deploy\" \u0027\u0027"},{"line_number":10,"context_line":"    set -ueo pipefail"}],"source_content_type":"text/x-nix","patch_set":2,"id":"bc2e310c_1ad6e80f","line":7,"range":{"start_line":7,"start_character":31,"end_line":7,"end_character":47},"in_reply_to":"74cb7b41_dbe01529","updated":"2021-12-17 22:00:32.000000000","message":"Done","commit_id":"4e6a8c5d8499c360ee4a782687ef4b7751502a45"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"85cfd31e1699f835c5e85142b8ca23605e2be462","unresolved":true,"context_lines":[{"line_number":14,"context_line":"      exit 1"},{"line_number":15,"context_line":"    fi"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"    readonly git\u003d${pkgs.git}/bin/git"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"    # find-or-create depot"},{"line_number":20,"context_line":"    if [ -d /run/depot ]; then"}],"source_content_type":"text/x-nix","patch_set":2,"id":"763144ae_a7833862","line":17,"updated":"2021-12-17 21:42:27.000000000","message":"usually I\u0027d set `git` to include the git directory itself, so:\n```\nreadonly git\u003d\"${pkgs.git}/bin/git -C /run/depot\"\n```\n\nsubstituting /run/depot for what the actual bare checkout ends up being","commit_id":"4e6a8c5d8499c360ee4a782687ef4b7751502a45"},{"author":{"_account_id":1000045,"name":"wpcarro","email":"wpcarro@gmail.com","username":"wpcarro"},"change_message_id":"47025b3762e8ad068595c4ec771a0549de60ba74","unresolved":false,"context_lines":[{"line_number":14,"context_line":"      exit 1"},{"line_number":15,"context_line":"    fi"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"    readonly git\u003d${pkgs.git}/bin/git"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"    # find-or-create depot"},{"line_number":20,"context_line":"    if [ -d /run/depot ]; then"}],"source_content_type":"text/x-nix","patch_set":2,"id":"3142da6e_0e4a2184","line":17,"in_reply_to":"763144ae_a7833862","updated":"2021-12-17 22:00:32.000000000","message":"Done","commit_id":"4e6a8c5d8499c360ee4a782687ef4b7751502a45"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"85cfd31e1699f835c5e85142b8ca23605e2be462","unresolved":true,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"    # find-or-create depot"},{"line_number":20,"context_line":"    if [ -d /run/depot ]; then"},{"line_number":21,"context_line":"      $git clone --bare https://cl.tvl.fyi/depot.git /run/depot"},{"line_number":22,"context_line":"    fi"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    cd /run/depot"}],"source_content_type":"text/x-nix","patch_set":2,"id":"76cce767_68e24dfc","line":21,"range":{"start_line":21,"start_character":53,"end_line":21,"end_character":63},"updated":"2021-12-17 21:42:27.000000000","message":"convention is that bare checkouts are suffixed with .git\n\nalso, it\u0027d be nice if all the runtime state for this was nested in one directory - I\u0027m kinda thinking something like\n\n- `/run/depot/depot.git`\n- `/run/depot/deploy`","commit_id":"4e6a8c5d8499c360ee4a782687ef4b7751502a45"},{"author":{"_account_id":1000045,"name":"wpcarro","email":"wpcarro@gmail.com","username":"wpcarro"},"change_message_id":"47025b3762e8ad068595c4ec771a0549de60ba74","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"    # find-or-create depot"},{"line_number":20,"context_line":"    if [ -d /run/depot ]; then"},{"line_number":21,"context_line":"      $git clone --bare https://cl.tvl.fyi/depot.git /run/depot"},{"line_number":22,"context_line":"    fi"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    cd /run/depot"}],"source_content_type":"text/x-nix","patch_set":2,"id":"e95dca48_fa157426","line":21,"range":{"start_line":21,"start_character":53,"end_line":21,"end_character":63},"in_reply_to":"76cce767_68e24dfc","updated":"2021-12-17 22:00:32.000000000","message":"Agreed 😊","commit_id":"4e6a8c5d8499c360ee4a782687ef4b7751502a45"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"85cfd31e1699f835c5e85142b8ca23605e2be462","unresolved":true,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    cd /run/depot"},{"line_number":25,"context_line":"    $git fetch origin"},{"line_number":26,"context_line":"    $git worktree add ../deploy"},{"line_number":27,"context_line":"    cd ../deploy"},{"line_number":28,"context_line":"    ./bin/rebuild-system"},{"line_number":29,"context_line":"    $git worktree remove ../deploy"}],"source_content_type":"text/x-nix","patch_set":2,"id":"9c1f6354_968ca34c","line":26,"range":{"start_line":26,"start_character":25,"end_line":26,"end_character":31},"updated":"2021-12-17 21:42:27.000000000","message":"one advantage of doing this with a bare checkout + worktree is that we can have different worktrees for different deploys - it\u0027d be kinda neat to suffix the actual directory with a timestamp or something like that.","commit_id":"4e6a8c5d8499c360ee4a782687ef4b7751502a45"},{"author":{"_account_id":1000045,"name":"wpcarro","email":"wpcarro@gmail.com","username":"wpcarro"},"change_message_id":"47025b3762e8ad068595c4ec771a0549de60ba74","unresolved":true,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    cd /run/depot"},{"line_number":25,"context_line":"    $git fetch origin"},{"line_number":26,"context_line":"    $git worktree add ../deploy"},{"line_number":27,"context_line":"    cd ../deploy"},{"line_number":28,"context_line":"    ./bin/rebuild-system"},{"line_number":29,"context_line":"    $git worktree remove ../deploy"}],"source_content_type":"text/x-nix","patch_set":2,"id":"c8527243_0c2069a5","line":26,"range":{"start_line":26,"start_character":25,"end_line":26,"end_character":31},"in_reply_to":"9c1f6354_968ca34c","updated":"2021-12-17 22:00:32.000000000","message":"Tempting, but do we need this? I don\u0027t think we\u0027ll have two simultaneous auto-deploys occurring. Plus the git worktree remove at the end should prevents us from have multiple worktrees. No?","commit_id":"4e6a8c5d8499c360ee4a782687ef4b7751502a45"},{"author":{"_account_id":1000045,"name":"wpcarro","email":"wpcarro@gmail.com","username":"wpcarro"},"change_message_id":"97949a704faab86a0bf0133ba787c5f9e20cd4da","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    cd /run/depot"},{"line_number":25,"context_line":"    $git fetch origin"},{"line_number":26,"context_line":"    $git worktree add ../deploy"},{"line_number":27,"context_line":"    cd ../deploy"},{"line_number":28,"context_line":"    ./bin/rebuild-system"},{"line_number":29,"context_line":"    $git worktree remove ../deploy"}],"source_content_type":"text/x-nix","patch_set":2,"id":"c513a2c4_1e8bcedd","line":26,"range":{"start_line":26,"start_character":25,"end_line":26,"end_character":31},"in_reply_to":"c8527243_0c2069a5","updated":"2021-12-24 18:17:44.000000000","message":"Done","commit_id":"4e6a8c5d8499c360ee4a782687ef4b7751502a45"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"85cfd31e1699f835c5e85142b8ca23605e2be462","unresolved":true,"context_lines":[{"line_number":26,"context_line":"    $git worktree add ../deploy"},{"line_number":27,"context_line":"    cd ../deploy"},{"line_number":28,"context_line":"    ./bin/rebuild-system"},{"line_number":29,"context_line":"    $git worktree remove ../deploy"},{"line_number":30,"context_line":"  \u0027\u0027;"},{"line_number":31,"context_line":"in {"},{"line_number":32,"context_line":"  options.services.depot.auto-deploy \u003d {"}],"source_content_type":"text/x-nix","patch_set":2,"id":"a563a135_346d2238","line":29,"range":{"start_line":29,"start_character":18,"end_line":29,"end_character":24},"updated":"2021-12-17 21:42:27.000000000","message":"I think you want -f here","commit_id":"4e6a8c5d8499c360ee4a782687ef4b7751502a45"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"85cfd31e1699f835c5e85142b8ca23605e2be462","unresolved":true,"context_lines":[{"line_number":26,"context_line":"    $git worktree add ../deploy"},{"line_number":27,"context_line":"    cd ../deploy"},{"line_number":28,"context_line":"    ./bin/rebuild-system"},{"line_number":29,"context_line":"    $git worktree remove ../deploy"},{"line_number":30,"context_line":"  \u0027\u0027;"},{"line_number":31,"context_line":"in {"},{"line_number":32,"context_line":"  options.services.depot.auto-deploy \u003d {"}],"source_content_type":"text/x-nix","patch_set":2,"id":"ef1b487c_4c75c75c","line":29,"updated":"2021-12-17 21:42:27.000000000","message":"this cleanup should go in a `trap EXIT` so if other parts of the script fail the worktree gets cleaned up","commit_id":"4e6a8c5d8499c360ee4a782687ef4b7751502a45"},{"author":{"_account_id":1000045,"name":"wpcarro","email":"wpcarro@gmail.com","username":"wpcarro"},"change_message_id":"47025b3762e8ad068595c4ec771a0549de60ba74","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    $git worktree add ../deploy"},{"line_number":27,"context_line":"    cd ../deploy"},{"line_number":28,"context_line":"    ./bin/rebuild-system"},{"line_number":29,"context_line":"    $git worktree remove ../deploy"},{"line_number":30,"context_line":"  \u0027\u0027;"},{"line_number":31,"context_line":"in {"},{"line_number":32,"context_line":"  options.services.depot.auto-deploy \u003d {"}],"source_content_type":"text/x-nix","patch_set":2,"id":"f05a9d65_4c0474e1","line":29,"range":{"start_line":29,"start_character":18,"end_line":29,"end_character":24},"in_reply_to":"a563a135_346d2238","updated":"2021-12-17 22:00:32.000000000","message":"I\u0027m dropping `cd` calls","commit_id":"4e6a8c5d8499c360ee4a782687ef4b7751502a45"},{"author":{"_account_id":1000045,"name":"wpcarro","email":"wpcarro@gmail.com","username":"wpcarro"},"change_message_id":"47025b3762e8ad068595c4ec771a0549de60ba74","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    $git worktree add ../deploy"},{"line_number":27,"context_line":"    cd ../deploy"},{"line_number":28,"context_line":"    ./bin/rebuild-system"},{"line_number":29,"context_line":"    $git worktree remove ../deploy"},{"line_number":30,"context_line":"  \u0027\u0027;"},{"line_number":31,"context_line":"in {"},{"line_number":32,"context_line":"  options.services.depot.auto-deploy \u003d {"}],"source_content_type":"text/x-nix","patch_set":2,"id":"67474ee5_ec40882b","line":29,"in_reply_to":"ef1b487c_4c75c75c","updated":"2021-12-17 22:00:32.000000000","message":"Done","commit_id":"4e6a8c5d8499c360ee4a782687ef4b7751502a45"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"85cfd31e1699f835c5e85142b8ca23605e2be462","unresolved":true,"context_lines":[{"line_number":30,"context_line":"  \u0027\u0027;"},{"line_number":31,"context_line":"in {"},{"line_number":32,"context_line":"  options.services.depot.auto-deploy \u003d {"},{"line_number":33,"context_line":"    enable \u003d lib.mkEnableOption description;"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    interval \u003d lib.mkOption {"},{"line_number":36,"context_line":"      type \u003d lib.types.str;"}],"source_content_type":"text/x-nix","patch_set":2,"id":"f89e18a4_c842deca","line":33,"range":{"start_line":33,"start_character":32,"end_line":33,"end_character":43},"updated":"2021-12-17 21:42:27.000000000","message":"the description passed to a `mkEnableOption` gets put after the word \"Enable\", so should make sense grammatically and not start with a capital letter.","commit_id":"4e6a8c5d8499c360ee4a782687ef4b7751502a45"},{"author":{"_account_id":1000045,"name":"wpcarro","email":"wpcarro@gmail.com","username":"wpcarro"},"change_message_id":"47025b3762e8ad068595c4ec771a0549de60ba74","unresolved":false,"context_lines":[{"line_number":30,"context_line":"  \u0027\u0027;"},{"line_number":31,"context_line":"in {"},{"line_number":32,"context_line":"  options.services.depot.auto-deploy \u003d {"},{"line_number":33,"context_line":"    enable \u003d lib.mkEnableOption description;"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    interval \u003d lib.mkOption {"},{"line_number":36,"context_line":"      type \u003d lib.types.str;"}],"source_content_type":"text/x-nix","patch_set":2,"id":"79b91344_0a3cbd21","line":33,"range":{"start_line":33,"start_character":32,"end_line":33,"end_character":43},"in_reply_to":"f89e18a4_c842deca","updated":"2021-12-17 22:00:32.000000000","message":"TIL. ty","commit_id":"4e6a8c5d8499c360ee4a782687ef4b7751502a45"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"85cfd31e1699f835c5e85142b8ca23605e2be462","unresolved":true,"context_lines":[{"line_number":36,"context_line":"      type \u003d lib.types.str;"},{"line_number":37,"context_line":"      example \u003d \"1h\";"},{"line_number":38,"context_line":"      description \u003d \u0027\u0027"},{"line_number":39,"context_line":"        Interval between Nix builds, specified systemd.time(7) format."},{"line_number":40,"context_line":"      \u0027\u0027;"},{"line_number":41,"context_line":"    };"},{"line_number":42,"context_line":"  };"}],"source_content_type":"text/x-nix","patch_set":2,"id":"4bf1cc45_aa9f46d7","line":39,"range":{"start_line":39,"start_character":37,"end_line":39,"end_character":47},"updated":"2021-12-17 21:42:27.000000000","message":"specified *in*, probably","commit_id":"4e6a8c5d8499c360ee4a782687ef4b7751502a45"},{"author":{"_account_id":1000045,"name":"wpcarro","email":"wpcarro@gmail.com","username":"wpcarro"},"change_message_id":"47025b3762e8ad068595c4ec771a0549de60ba74","unresolved":false,"context_lines":[{"line_number":36,"context_line":"      type \u003d lib.types.str;"},{"line_number":37,"context_line":"      example \u003d \"1h\";"},{"line_number":38,"context_line":"      description \u003d \u0027\u0027"},{"line_number":39,"context_line":"        Interval between Nix builds, specified systemd.time(7) format."},{"line_number":40,"context_line":"      \u0027\u0027;"},{"line_number":41,"context_line":"    };"},{"line_number":42,"context_line":"  };"}],"source_content_type":"text/x-nix","patch_set":2,"id":"dd72d2b3_30ecf473","line":39,"range":{"start_line":39,"start_character":37,"end_line":39,"end_character":47},"in_reply_to":"4bf1cc45_aa9f46d7","updated":"2021-12-17 22:00:32.000000000","message":"Done","commit_id":"4e6a8c5d8499c360ee4a782687ef4b7751502a45"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"49ae6941a5a1501578959a2e933288862e36694f","unresolved":true,"context_lines":[{"line_number":24,"context_line":"    cd $STATE_DIRECTORY"},{"line_number":25,"context_line":"    $git fetch origin"},{"line_number":26,"context_line":"    $git worktree add ../deploy"},{"line_number":27,"context_line":"    cd ../deploy"},{"line_number":28,"context_line":"    ./bin/rebuild-system"},{"line_number":29,"context_line":"    $git worktree remove ../deploy"},{"line_number":30,"context_line":"  \u0027\u0027;"}],"source_content_type":"text/x-nix","patch_set":3,"id":"2344a2ff_8b78b514","line":27,"updated":"2021-12-17 21:46:15.000000000","message":"probably want to `pushd ../deploy`, then `popd` after rebuild-system finishes, both for cleanliness and so you\u0027re not trying to remove the current directory","commit_id":"3b07a3df33efc911cd8424854bff589d843ae5a0"},{"author":{"_account_id":1000045,"name":"wpcarro","email":"wpcarro@gmail.com","username":"wpcarro"},"change_message_id":"47025b3762e8ad068595c4ec771a0549de60ba74","unresolved":true,"context_lines":[{"line_number":24,"context_line":"    cd $STATE_DIRECTORY"},{"line_number":25,"context_line":"    $git fetch origin"},{"line_number":26,"context_line":"    $git worktree add ../deploy"},{"line_number":27,"context_line":"    cd ../deploy"},{"line_number":28,"context_line":"    ./bin/rebuild-system"},{"line_number":29,"context_line":"    $git worktree remove ../deploy"},{"line_number":30,"context_line":"  \u0027\u0027;"}],"source_content_type":"text/x-nix","patch_set":3,"id":"94bb50c7_0399d604","line":27,"in_reply_to":"2344a2ff_8b78b514","updated":"2021-12-17 22:00:32.000000000","message":"Agree that pushd and popd are preferable. Latest patchset has a different approach. Lmk what you think","commit_id":"3b07a3df33efc911cd8424854bff589d843ae5a0"},{"author":{"_account_id":1000045,"name":"wpcarro","email":"wpcarro@gmail.com","username":"wpcarro"},"change_message_id":"cb2cbad5e08c0958dc88d1ca4636b28e77a554e3","unresolved":false,"context_lines":[{"line_number":24,"context_line":"    cd $STATE_DIRECTORY"},{"line_number":25,"context_line":"    $git fetch origin"},{"line_number":26,"context_line":"    $git worktree add ../deploy"},{"line_number":27,"context_line":"    cd ../deploy"},{"line_number":28,"context_line":"    ./bin/rebuild-system"},{"line_number":29,"context_line":"    $git worktree remove ../deploy"},{"line_number":30,"context_line":"  \u0027\u0027;"}],"source_content_type":"text/x-nix","patch_set":3,"id":"8f6e59d4_9c47e4c1","line":27,"in_reply_to":"94bb50c7_0399d604","updated":"2021-12-22 23:42:38.000000000","message":"Done","commit_id":"3b07a3df33efc911cd8424854bff589d843ae5a0"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"e0448e87716ef88db72204b2bfb34e69d8da1575","unresolved":true,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"    # find-or-create depot"},{"line_number":22,"context_line":"    if [ ! -d $depot ]; then"},{"line_number":23,"context_line":"      $git clone --bare https://cl.tvl.fyi/depot.git $depot"},{"line_number":24,"context_line":"    fi"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    # clean-up in case things go sideways"}],"source_content_type":"text/x-nix","patch_set":4,"id":"0d0387f6_08e996ad","line":23,"range":{"start_line":23,"start_character":24,"end_line":23,"end_character":52},"updated":"2021-12-17 22:06:15.000000000","message":"can this be a (nix-level) config option?","commit_id":"72157fe08ee2a041fa12a0957e24d55629021a01"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"e0448e87716ef88db72204b2bfb34e69d8da1575","unresolved":true,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"    # find-or-create depot"},{"line_number":22,"context_line":"    if [ ! -d $depot ]; then"},{"line_number":23,"context_line":"      $git clone --bare https://cl.tvl.fyi/depot.git $depot"},{"line_number":24,"context_line":"    fi"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    # clean-up in case things go sideways"}],"source_content_type":"text/x-nix","patch_set":4,"id":"2eb8494f_55a24a1e","line":23,"range":{"start_line":23,"start_character":6,"end_line":23,"end_character":10},"updated":"2021-12-17 22:06:15.000000000","message":"this will have to be regular old `${pkgs.git}/bin/git`, since the directory we\u0027re -C\u0027ing doesn\u0027t exist yet","commit_id":"72157fe08ee2a041fa12a0957e24d55629021a01"},{"author":{"_account_id":1000045,"name":"wpcarro","email":"wpcarro@gmail.com","username":"wpcarro"},"change_message_id":"bed082000c0b4a538b8d77d7624ef121181a29a2","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"    # find-or-create depot"},{"line_number":22,"context_line":"    if [ ! -d $depot ]; then"},{"line_number":23,"context_line":"      $git clone --bare https://cl.tvl.fyi/depot.git $depot"},{"line_number":24,"context_line":"    fi"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    # clean-up in case things go sideways"}],"source_content_type":"text/x-nix","patch_set":4,"id":"766ce306_b96c5cc4","line":23,"range":{"start_line":23,"start_character":24,"end_line":23,"end_character":52},"in_reply_to":"0d0387f6_08e996ad","updated":"2021-12-19 19:36:37.000000000","message":"Done.","commit_id":"72157fe08ee2a041fa12a0957e24d55629021a01"},{"author":{"_account_id":1000045,"name":"wpcarro","email":"wpcarro@gmail.com","username":"wpcarro"},"change_message_id":"bed082000c0b4a538b8d77d7624ef121181a29a2","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"    # find-or-create depot"},{"line_number":22,"context_line":"    if [ ! -d $depot ]; then"},{"line_number":23,"context_line":"      $git clone --bare https://cl.tvl.fyi/depot.git $depot"},{"line_number":24,"context_line":"    fi"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    # clean-up in case things go sideways"}],"source_content_type":"text/x-nix","patch_set":4,"id":"fb825cfb_5aa1881e","line":23,"range":{"start_line":23,"start_character":6,"end_line":23,"end_character":10},"in_reply_to":"2eb8494f_55a24a1e","updated":"2021-12-19 19:36:37.000000000","message":"Done","commit_id":"72157fe08ee2a041fa12a0957e24d55629021a01"},{"author":{"_account_id":1000010,"name":"aspen","email":"root@gws.fyi","username":"aspen"},"change_message_id":"e0448e87716ef88db72204b2bfb34e69d8da1575","unresolved":true,"context_lines":[{"line_number":24,"context_line":"    fi"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    # clean-up in case things go sideways"},{"line_number":27,"context_line":"    trap \"$git worktree remove $deploy\" EXIT"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    $git fetch origin"},{"line_number":30,"context_line":"    $git worktree add $deploy"}],"source_content_type":"text/x-nix","patch_set":4,"id":"6811016a_9c402816","line":27,"updated":"2021-12-17 22:06:15.000000000","message":"I think traps should basically always be functions.","commit_id":"72157fe08ee2a041fa12a0957e24d55629021a01"},{"author":{"_account_id":1000045,"name":"wpcarro","email":"wpcarro@gmail.com","username":"wpcarro"},"change_message_id":"bed082000c0b4a538b8d77d7624ef121181a29a2","unresolved":false,"context_lines":[{"line_number":24,"context_line":"    fi"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    # clean-up in case things go sideways"},{"line_number":27,"context_line":"    trap \"$git worktree remove $deploy\" EXIT"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    $git fetch origin"},{"line_number":30,"context_line":"    $git worktree add $deploy"}],"source_content_type":"text/x-nix","patch_set":4,"id":"fe7f7253_81eaf1cf","line":27,"in_reply_to":"6811016a_9c402816","updated":"2021-12-19 19:36:37.000000000","message":"Done","commit_id":"72157fe08ee2a041fa12a0957e24d55629021a01"},{"author":{"_account_id":1000045,"name":"wpcarro","email":"wpcarro@gmail.com","username":"wpcarro"},"change_message_id":"312c99588214f5e3654b92b72c7f634b95f461b6","unresolved":true,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":"      # We need to prevent NixOS from interrupting us while it attempts to"},{"line_number":58,"context_line":"      # restart systemd units."},{"line_number":59,"context_line":"      restartIfChanged \u003d false;"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"      serviceConfig \u003d {"},{"line_number":62,"context_line":"        Type \u003d \"oneshot\";"}],"source_content_type":"text/x-nix","patch_set":20,"id":"8790f7c7_bd6f067b","line":59,"updated":"2021-12-18 01:38:05.000000000","message":"For some reason, even with this set to false, nix sends a SIGINT to the service. Any ideas?","commit_id":"2b7c4168e8c3ea60a57e2f1037acfabaf2359c97"},{"author":{"_account_id":1000045,"name":"wpcarro","email":"wpcarro@gmail.com","username":"wpcarro"},"change_message_id":"cb2cbad5e08c0958dc88d1ca4636b28e77a554e3","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":"      # We need to prevent NixOS from interrupting us while it attempts to"},{"line_number":58,"context_line":"      # restart systemd units."},{"line_number":59,"context_line":"      restartIfChanged \u003d false;"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"      serviceConfig \u003d {"},{"line_number":62,"context_line":"        Type \u003d \"oneshot\";"}],"source_content_type":"text/x-nix","patch_set":20,"id":"c87ae585_b98dd661","line":59,"in_reply_to":"8790f7c7_bd6f067b","updated":"2021-12-22 23:42:38.000000000","message":"I figured out the problem: `git fetch origin \u0026\u0026 git worktree add $deploy` stopped `auto-deploy.{service,timer}` because neither are part of origin/canon (yet), so this was a false negative result for the test.","commit_id":"2b7c4168e8c3ea60a57e2f1037acfabaf2359c97"},{"author":{"_account_id":1000046,"name":"fogti","email":"fogti+devel@ytrizja.de","username":"fogti"},"change_message_id":"1628ea0fd51a140b9a97a3988707b50fb0897d97","unresolved":true,"context_lines":[{"line_number":9,"context_line":"  deployScript \u003d pkgs.writeShellScript \"auto-deploy\" \u0027\u0027"},{"line_number":10,"context_line":"    set -ueo pipefail"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"    system\u003d# ask binary cache for latest $HOSTNAME"},{"line_number":13,"context_line":"    nix-env p /nix/var/nix/profiles/system --set $system"},{"line_number":14,"context_line":"    $system/bin/switch-to-configuration switch"},{"line_number":15,"context_line":"  \u0027\u0027;"}],"source_content_type":"text/x-nix","patch_set":25,"id":"cac19ab1_80e5c661","line":12,"updated":"2021-12-20 15:05:16.000000000","message":"How should/does this differentiate between \"change to $HOSTNAME in not-yet-merged PR, shouldn\u0027t be deployed\" (especially because this would be a security vulnerability) and \"change to $HOSTNAME merged into canon, should be deployed\"? I am unsure how the binary cache can/could know that.","commit_id":"40a07606027adcb428bb45fa2f28e140841efb9f"},{"author":{"_account_id":1000045,"name":"wpcarro","email":"wpcarro@gmail.com","username":"wpcarro"},"change_message_id":"6d5cdd6fafc6d4072d095cac2d4e43e83157ac66","unresolved":false,"context_lines":[{"line_number":9,"context_line":"  deployScript \u003d pkgs.writeShellScript \"auto-deploy\" \u0027\u0027"},{"line_number":10,"context_line":"    set -ueo pipefail"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"    system\u003d# ask binary cache for latest $HOSTNAME"},{"line_number":13,"context_line":"    nix-env p /nix/var/nix/profiles/system --set $system"},{"line_number":14,"context_line":"    $system/bin/switch-to-configuration switch"},{"line_number":15,"context_line":"  \u0027\u0027;"}],"source_content_type":"text/x-nix","patch_set":25,"id":"aae04de4_06ca03c4","line":12,"in_reply_to":"cac19ab1_80e5c661","updated":"2021-12-22 17:35:24.000000000","message":"patchset 25 was a mistake - sorry for the noise","commit_id":"40a07606027adcb428bb45fa2f28e140841efb9f"},{"author":{"_account_id":1000046,"name":"fogti","email":"fogti+devel@ytrizja.de","username":"fogti"},"change_message_id":"1237cf0c8bcc54e19603ea129d51b0337c997a4d","unresolved":true,"context_lines":[{"line_number":71,"context_line":"      # restart systemd units."},{"line_number":72,"context_line":"      restartIfChanged \u003d false;"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"      serviceConfig \u003d {"},{"line_number":75,"context_line":"        Type \u003d \"oneshot\";"},{"line_number":76,"context_line":"        StateDirectory \u003d \"auto-deploy\";"},{"line_number":77,"context_line":"      };"}],"source_content_type":"text/x-nix","patch_set":28,"id":"86b6ede3_e41cb288","line":74,"updated":"2021-12-22 23:55:25.000000000","message":"The script uses network, so I think it should depend (`Require`?) on some appropriate network target; I don\u0027t know if `network-online` would be an appropriate dependency.","commit_id":"00a68f754942c64a8f8d490df0cf586fcc143b31"},{"author":{"_account_id":1000045,"name":"wpcarro","email":"wpcarro@gmail.com","username":"wpcarro"},"change_message_id":"fdcf3412784f9e7a99e77cd1a8e3905de59a104a","unresolved":false,"context_lines":[{"line_number":71,"context_line":"      # restart systemd units."},{"line_number":72,"context_line":"      restartIfChanged \u003d false;"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"      serviceConfig \u003d {"},{"line_number":75,"context_line":"        Type \u003d \"oneshot\";"},{"line_number":76,"context_line":"        StateDirectory \u003d \"auto-deploy\";"},{"line_number":77,"context_line":"      };"}],"source_content_type":"text/x-nix","patch_set":28,"id":"2138f276_6134c200","line":74,"in_reply_to":"86b6ede3_e41cb288","updated":"2021-12-23 02:13:32.000000000","message":"Good thinking. Adding:\n\n{After,Wants}\u003dnetwork-online.target\n\nsource: https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/","commit_id":"00a68f754942c64a8f8d490df0cf586fcc143b31"},{"author":{"_account_id":1000046,"name":"fogti","email":"fogti+devel@ytrizja.de","username":"fogti"},"change_message_id":"5a88f084f9b285ef0fb23e70fd4b88fa49388022","unresolved":true,"context_lines":[{"line_number":82,"context_line":"      wantedBy \u003d [ \"multi-user.target\" ];"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"      timerConfig \u003d {"},{"line_number":85,"context_line":"        OnActiveSec \u003d \"1\";"},{"line_number":86,"context_line":"        OnUnitActiveSec \u003d cfg.interval;"},{"line_number":87,"context_line":"      };"},{"line_number":88,"context_line":"    };"}],"source_content_type":"text/x-nix","patch_set":28,"id":"dc9e05be_390b5580","line":85,"updated":"2021-12-23 00:00:38.000000000","message":"what exactly should `OnActiveSec` do? (not what it does, but what the purpose/intention is).\n\n(systemd.timer(5) snip follows)\n\u003e OnActiveSec\u003d\tDefines a timer relative to the moment the timer unit itself is activated.","commit_id":"00a68f754942c64a8f8d490df0cf586fcc143b31"},{"author":{"_account_id":1000046,"name":"fogti","email":"fogti+devel@ytrizja.de","username":"fogti"},"change_message_id":"91aa5d79d02523f4c0a2889c69af7404800575b5","unresolved":false,"context_lines":[{"line_number":82,"context_line":"      wantedBy \u003d [ \"multi-user.target\" ];"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"      timerConfig \u003d {"},{"line_number":85,"context_line":"        OnActiveSec \u003d \"1\";"},{"line_number":86,"context_line":"        OnUnitActiveSec \u003d cfg.interval;"},{"line_number":87,"context_line":"      };"},{"line_number":88,"context_line":"    };"}],"source_content_type":"text/x-nix","patch_set":28,"id":"2b17e25f_181828d6","line":85,"in_reply_to":"6b5df441_b8b3be13","updated":"2021-12-23 16:09:04.000000000","message":"Ack","commit_id":"00a68f754942c64a8f8d490df0cf586fcc143b31"},{"author":{"_account_id":1000045,"name":"wpcarro","email":"wpcarro@gmail.com","username":"wpcarro"},"change_message_id":"fdcf3412784f9e7a99e77cd1a8e3905de59a104a","unresolved":true,"context_lines":[{"line_number":82,"context_line":"      wantedBy \u003d [ \"multi-user.target\" ];"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"      timerConfig \u003d {"},{"line_number":85,"context_line":"        OnActiveSec \u003d \"1\";"},{"line_number":86,"context_line":"        OnUnitActiveSec \u003d cfg.interval;"},{"line_number":87,"context_line":"      };"},{"line_number":88,"context_line":"    };"}],"source_content_type":"text/x-nix","patch_set":28,"id":"6b5df441_b8b3be13","line":85,"in_reply_to":"dc9e05be_390b5580","updated":"2021-12-23 02:13:32.000000000","message":"I\u0027m not sure I fully understand your question, but I\u0027ll take a stab at it nonetheless.\n\nafaiu OnActiveSec represents the offset at which to trigger the service unit from the interval when the timer begins.\n\nE.g. if a timer runs every 1h and is activated at 3:03 then:\n\n3:03:00 timer activated\n3:03:01 triggers service\n4:03:00 timer activated\n4:03:01 triggers service\n...\n\n\nDoes that answer your question?","commit_id":"00a68f754942c64a8f8d490df0cf586fcc143b31"},{"author":{"_account_id":1000046,"name":"fogti","email":"fogti+devel@ytrizja.de","username":"fogti"},"change_message_id":"91aa5d79d02523f4c0a2889c69af7404800575b5","unresolved":true,"context_lines":[{"line_number":83,"context_line":"      inherit description;"},{"line_number":84,"context_line":"      wantedBy \u003d [ \"multi-user.target\" ];"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"      timerConfig \u003d {"},{"line_number":87,"context_line":"        OnActiveSec \u003d \"1\";"},{"line_number":88,"context_line":"        OnUnitActiveSec \u003d cfg.interval;"},{"line_number":89,"context_line":"      };"}],"source_content_type":"text/x-nix","patch_set":30,"id":"6abb9015_eb0bb49b","line":86,"updated":"2021-12-23 16:09:04.000000000","message":"how does this get initially activated?","commit_id":"92c85c6e8bee30215175056a24fb054bd51273fb"},{"author":{"_account_id":1000046,"name":"fogti","email":"fogti+devel@ytrizja.de","username":"fogti"},"change_message_id":"2efa2fb1074c1547c933881481804582e512fc1c","unresolved":true,"context_lines":[{"line_number":83,"context_line":"      inherit description;"},{"line_number":84,"context_line":"      wantedBy \u003d [ \"multi-user.target\" ];"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"      timerConfig \u003d {"},{"line_number":87,"context_line":"        OnActiveSec \u003d \"1\";"},{"line_number":88,"context_line":"        OnUnitActiveSec \u003d cfg.interval;"},{"line_number":89,"context_line":"      };"}],"source_content_type":"text/x-nix","patch_set":30,"id":"8f20695e_a9a05963","line":86,"in_reply_to":"5b388598_42c9cfda","updated":"2021-12-24 08:19:32.000000000","message":"oh sorry, I think I meant something else: how does the timer get activated by systemd after reboots? (assuming that it is already present in the system derivation and linked into /etc).\n\ne.g. I usually use \"OnCalender\" for activation on my own hosts, but if that is not used, and the timer only restarts itself automatically after an initial timer activation, it is afaik not automatically activated, but I don\u0027t know if timer activation information is persisted across reboots (in this case no change is necessary).","commit_id":"92c85c6e8bee30215175056a24fb054bd51273fb"},{"author":{"_account_id":1000045,"name":"wpcarro","email":"wpcarro@gmail.com","username":"wpcarro"},"change_message_id":"d4f2b3e88f9cdf6de9ca612f0def79d171735ada","unresolved":true,"context_lines":[{"line_number":83,"context_line":"      inherit description;"},{"line_number":84,"context_line":"      wantedBy \u003d [ \"multi-user.target\" ];"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"      timerConfig \u003d {"},{"line_number":87,"context_line":"        OnActiveSec \u003d \"1\";"},{"line_number":88,"context_line":"        OnUnitActiveSec \u003d cfg.interval;"},{"line_number":89,"context_line":"      };"}],"source_content_type":"text/x-nix","patch_set":30,"id":"95e6fb34_8f6d78d6","line":86,"in_reply_to":"6abb9015_eb0bb49b","updated":"2021-12-24 01:53:23.000000000","message":"e.g. -  diogenes/default.nix (in this CL)\n\nBasically: enable \u003d true","commit_id":"92c85c6e8bee30215175056a24fb054bd51273fb"},{"author":{"_account_id":1000046,"name":"fogti","email":"fogti+devel@ytrizja.de","username":"fogti"},"change_message_id":"13c312877718bac26c9f987df6e429b12f54b3bc","unresolved":false,"context_lines":[{"line_number":83,"context_line":"      inherit description;"},{"line_number":84,"context_line":"      wantedBy \u003d [ \"multi-user.target\" ];"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"      timerConfig \u003d {"},{"line_number":87,"context_line":"        OnActiveSec \u003d \"1\";"},{"line_number":88,"context_line":"        OnUnitActiveSec \u003d cfg.interval;"},{"line_number":89,"context_line":"      };"}],"source_content_type":"text/x-nix","patch_set":30,"id":"65af4341_037a7523","line":86,"in_reply_to":"6b3a1124_daab0847","updated":"2021-12-24 10:21:16.000000000","message":"Done","commit_id":"92c85c6e8bee30215175056a24fb054bd51273fb"},{"author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"change_message_id":"ce46fb2e8145af73576c8159daffa90b7c7dd584","unresolved":true,"context_lines":[{"line_number":83,"context_line":"      inherit description;"},{"line_number":84,"context_line":"      wantedBy \u003d [ \"multi-user.target\" ];"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"      timerConfig \u003d {"},{"line_number":87,"context_line":"        OnActiveSec \u003d \"1\";"},{"line_number":88,"context_line":"        OnUnitActiveSec \u003d cfg.interval;"},{"line_number":89,"context_line":"      };"}],"source_content_type":"text/x-nix","patch_set":30,"id":"6b3a1124_daab0847","line":86,"in_reply_to":"8f20695e_a9a05963","updated":"2021-12-24 10:20:28.000000000","message":"OnActiveSec \u003d 1 will activate 1 second after the timer unit itself is started; OnUnitActiveSec will then activate it at the interval whenever the activation of the started unit is activated.\n\nwantedBy \u003d [ \"multi-user.target\" ] will cause the timer target to activate, and thus start the loop.","commit_id":"92c85c6e8bee30215175056a24fb054bd51273fb"},{"author":{"_account_id":1000045,"name":"wpcarro","email":"wpcarro@gmail.com","username":"wpcarro"},"change_message_id":"663c016a00f96617dff0b189bca56f3c25329ea0","unresolved":false,"context_lines":[{"line_number":83,"context_line":"      inherit description;"},{"line_number":84,"context_line":"      wantedBy \u003d [ \"multi-user.target\" ];"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"      timerConfig \u003d {"},{"line_number":87,"context_line":"        OnActiveSec \u003d \"1\";"},{"line_number":88,"context_line":"        OnUnitActiveSec \u003d cfg.interval;"},{"line_number":89,"context_line":"      };"}],"source_content_type":"text/x-nix","patch_set":30,"id":"5b388598_42c9cfda","line":86,"in_reply_to":"95e6fb34_8f6d78d6","updated":"2021-12-24 01:53:35.000000000","message":"Done","commit_id":"92c85c6e8bee30215175056a24fb054bd51273fb"}]}
