about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
* ref(tools/perf-flamegraph): move to a proper shell scriptFranck Cuny2022-10-254-15/+48
| | | | | | | | I don't want to inline shell scripts inside nix configuration, as it prevents me to use `shellcheck` to validate them for example. The script is now moved into the tool directory, and is a tiny bit more flexible, so that I can run it as my own user.
* ref(ops/github): finished the migration of my repositoriesFranck Cuny2022-10-251-54/+59
| | | | | All the repositories should be on GitHub now, and archived if they are not relevant anymore.
* feat(ops/github): import more repositoriesFranck Cuny2022-10-241-0/+184
|
* fix(ops/github): create resources in correct orderFranck Cuny2022-10-241-0/+2
| | | | | | | | | We first need to create a repository before we can create the default branch. For the default branch to be set, we also need the repository to contain a commit, which is achieved with the `auto_init' attribute. We can always push with `--force' to overwrite that initial commit when doing the migration.
* feat(system/fonts): add cascadiaFranck Cuny2022-10-241-0/+1
|
* ref(tools/mpd-stats): delete the projectFranck Cuny2022-10-2413-490/+3
| | | | | | | It's been moved to its own repository at https://github.com/fcuny/mpd-stats Update the list of repositories managed by terraform.
* feat(home/packages): install git-broomFranck Cuny2022-10-231-0/+1
|
* ref(ops/github): only allow merge commitFranck Cuny2022-10-231-3/+3
| | | | | While not great, this is the default workflow on GitHub. It's also what allows my `git-broom` CLI to work with branches on GitHub.
* feat(tools/git-broom): CLI to delete local and remote branchesFranck Cuny2022-10-233-0/+376
| | | | | | This tool helps to keep only the branches that are relevant: the ones that have not been merged yet into the main branch on the principal remote repository.
* ref(tools/git-bootstrap): this is replaced by terraformFranck Cuny2022-10-224-250/+0
|
* fix(flake): remove unstable URL for nixpkgsFranck Cuny2022-10-222-18/+0
| | | | I was not using it.
* feat(home/packages): install the tool x509-infoFranck Cuny2022-10-224-4/+122
|
* feat(ops/github): new repository: x509-infoFranck Cuny2022-10-221-0/+4
|
* fix(ops/github): some fixes related to repositories creationFranck Cuny2022-10-221-3/+3
|
* feat(templates): add a template for rustFranck Cuny2022-10-2210-0/+188
| | | | | | | To use it, run: ``` nix flake init -t github:fcuny/world#rust ```
* ref(tools/python): make mypy happyFranck Cuny2022-10-173-21/+28
|
* feat(home/python): add lsp/mypy packagesFranck Cuny2022-10-171-3/+4
|
* flake.lock: UpdateFranck Cuny2022-10-171-37/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Flake lock file updates: • Updated input 'agenix': 'github:ryantm/agenix/6acb1fe5f8597d5ce63fc82bc7fcac7774b1cdf0' (2022-09-25) → 'github:ryantm/agenix/a630400067c6d03c9b3e0455347dc8559db14288' (2022-10-15) • Updated input 'emacs-overlay': 'github:nix-community/emacs-overlay/8e54a8980aa438c4f35807ad676acbf7578acce3' (2022-09-20) → 'github:nix-community/emacs-overlay/f8d2c22b0714629bb7f8e90071b12fa56cd620be' (2022-10-17) • Updated input 'emacs-overlay/nixpkgs': 'github:NixOS/nixpkgs/8e0f159ff2d17faabbce0d60b14f50710e882eab' (2022-10-02) → 'github:NixOS/nixpkgs/d0f9857448e77df50d1e0b518ba0e835b797532a' (2022-10-17) • Updated input 'gh-ssh-keys': 'git+ssh://git@github.com/fcuny/gh-ssh-keys?ref=main&rev=de753cd61c1b75879010c4d2452598ada629e489' (2022-10-03) → 'git+ssh://git@github.com/fcuny/gh-ssh-keys?ref=main&rev=b1b7df6d529835d97734c3cb214d2be5ea593900' (2022-10-16) • Updated input 'home-manager': 'github:nix-community/home-manager/4a3d01fb53f52ac83194081272795aa4612c2381' (2022-06-25) → 'github:nix-community/home-manager/b81e128fc053ab3159d7b464d9b7dedc9d6a6891' (2022-10-17) • Updated input 'naersk/nixpkgs': 'github:NixOS/nixpkgs/8e0f159ff2d17faabbce0d60b14f50710e882eab' (2022-10-02) → 'github:NixOS/nixpkgs/d0f9857448e77df50d1e0b518ba0e835b797532a' (2022-10-17) • Updated input 'nixpkgs': 'github:nixos/nixpkgs/2a57890da5727cafa0607a27a5e2f4201645dfba' (2022-10-02) → 'github:nixos/nixpkgs/1935dd8fdab8e022a9d958419663162fd840014c' (2022-10-17) • Updated input 'nixpkgs-unstable': 'github:nixos/nixpkgs/8e0f159ff2d17faabbce0d60b14f50710e882eab' (2022-10-02) → 'github:nixos/nixpkgs/d0f9857448e77df50d1e0b518ba0e835b797532a' (2022-10-17) • Updated input 'nur': 'github:nix-community/NUR/392b26288ad1cdebd03eac17adb70491f9f392d3' (2022-10-02) → 'github:nix-community/NUR/5b866cfe1ffcb2dc004c862d7da2ff5c6dc66e51' (2022-10-17) • Updated input 'pre-commit-hooks': 'github:cachix/pre-commit-hooks.nix/2e4a708918e14fdbd534cc94aaa9470cd19b2464' (2022-10-02) → 'github:cachix/pre-commit-hooks.nix/94b0f300dd9a23d4e851aa2a947a1511d3410e2d' (2022-10-12) • Updated input 'rust': 'github:oxalica/rust-overlay/5db6b63124ccedd61e896ec98def85fb4e6668f4' (2022-10-02) → 'github:oxalica/rust-overlay/ae87512a3e8ee5bfffd42dadce041e7bdcd05a38' (2022-10-17) • Updated input 'rust/flake-utils': 'github:numtide/flake-utils/7e2a3b3dfd9af950a856d66b0a7d01e3c18aa249' (2022-07-04) → 'github:numtide/flake-utils/c0e246b9b83f637f4681389ecabcb2681b4f3af0' (2022-08-07)
* build(deps): bump cachix/install-nix-action from 17 to 18dependabot[bot]2022-10-171-1/+1
| | | | | | | | | | | | | | Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 17 to 18. - [Release notes](https://github.com/cachix/install-nix-action/releases) - [Commits](https://github.com/cachix/install-nix-action/compare/v17...v18) --- updated-dependencies: - dependency-name: cachix/install-nix-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
* ref(tools/git-blame-stats): rewrite the tool in pythonFranck Cuny2022-10-166-101/+113
| | | | | | The tool can calculate some stats about authors in a git repository. It computes the number of lines that are authored by authors at a given revision (HEAD by default), and the number of commits.
* ops(github): archive the repository govanityFranck Cuny2022-10-151-3/+1
|
* ref(seqstat): rewrite from go to pythonFranck Cuny2022-10-158-194/+53
| | | | | | This is a simple script, there's no benefit in having this in go. Having it Python makes it easier to extend with panda or other libraries in the future if I need more statistics too.
* ci: update the flake once a weekFranck Cuny2022-10-101-3/+1
| | | | | | | | | This is going to fail anyway since it will try to update a flake from a private repository and it won't work. But once I make the repository public it will start working. Also remove the token, want the PR to be open as the github-actions bot.
* feat(ops/github): set the name of the default branchFranck Cuny2022-10-091-0/+13
| | | | | From now on we should always be using 'main'. If a project requires 'master', it will need to be set explicitly.
* ref(ops/github): simplify the configurationFranck Cuny2022-10-094-373/+125
| | | | | | Move all the repositories in a YAML file, instead of declaring each repository. This will simplify the management as I'll be introducing more resources to manage my repositories.
* feat(ops/github): add the repository twitter-backupFranck Cuny2022-10-081-0/+14
|
* ref(tools/govanity): moved back to its own repositoryFranck Cuny2022-10-0813-313/+14
| | | | It's back at https://github.com/fcuny/govanity
* ci: add GitHub action to update flakes and dependabotFranck Cuny2022-10-072-0/+28
|
* fix(flake): set the correct path for various pre-commit binariesFranck Cuny2022-10-071-4/+4
|
* ref(fcuny/exp): delete containerd-to-vmFranck Cuny2022-10-057-1510/+0
| | | | The code is in https://github.com/fcuny/containerd-to-vm
* ref(fcuny/notes): delete notesFranck Cuny2022-10-0524-1608/+0
| | | | The notes are at https://github.com/fcuny/notes.fcuny.net
* ref(fcuny/blog): delete the blogFranck Cuny2022-10-0529-1007/+0
| | | | The blog moved back to https://github.com/fcuny/fcuny.net
* feat(ops/github): add notes.fcuny.net and containerd-to-vmFranck Cuny2022-10-042-0/+28
|
* feat(ops/github): add repository for fcuny.netFranck Cuny2022-10-041-0/+14
|
* ref(tools/ipconverter): rewrite the tool in pythonFranck Cuny2022-10-046-124/+55
| | | | | | | No need to do this with Go, a python script is fine. We also don't need to set shell aliases for this: when we install the tool, we can create symbolic links to `ip2int` and `int2ip`.
* ops(terraform): individual actions for init/plan/applyFranck Cuny2022-10-044-5/+43
| | | | | Don't do all of these actions together, instead provide helpers for both init, plan, and apply.
* ref(tools/ssh-key-to-forge): replaced by gh-ssh-keysFranck Cuny2022-10-034-591/+0
| | | | See https://github.com/fcuny/gh-ssh-keys
* feat(home/packages): install gh-ssh-keysFranck Cuny2022-10-034-5/+132
| | | | Add a new input to the flake configuration to install `gh-ssh-keys`.
* fix(home/rust): switch to the latest stable toolchainFranck Cuny2022-10-021-1/+1
|
* meta: bump flake dependenciesFranck Cuny2022-10-021-26/+30
|
* feat(ops/github): new repository: gh-ssh-keysFranck Cuny2022-10-021-0/+14
|
* ops(github): terraform configuration to manage GitHubFranck Cuny2022-09-305-0/+354
| | | | | | Import current GitHub repositories into terraform. This should be the main way (going forward) to interact with GitHub to create / manage the repositories and ensuring I'm consistent in the ways I want to use it.
* fix(home/element): I want the wayland versionFranck Cuny2022-09-261-1/+1
|
* feat(naersk): use naersk to build packages with rustFranck Cuny2022-09-266-12/+52
| | | | | | | | | | | | | naersk makes it simple to build rust project in nix. For this to work, `mkSystem` and `mkHomeManagerConfiguration` needs to pass naersk to my overlays. I dropped the support to run the tools with `nix run .#tools...`: I don't use this in practice and it's not making things simpler. I dropped `nix-linter` from the check, it's reporting many errors without helping me to fix them.
* fix(flake): call some programs with `nix run .#tools.<name>`Franck Cuny2022-09-251-12/+10
|
* fix(user/blog): update list of ssh keysFranck Cuny2022-09-241-2/+2
|
* fix(home/wm): unlock gnome-keyring when loggingFranck Cuny2022-09-243-17/+19
|
* fix(modules/home): delete the moduleFranck Cuny2022-09-242-36/+1
| | | | | The configuration for home-manager is set using `home-manager' directly, instead of applying updates all at once (OS and home-manager).
* fix(home/shell): set value for PKG_CONFIG_PATHFranck Cuny2022-09-241-0/+4
| | | | | I don't know why I need to do this, but otherwise I can't build rust packages with `cargo build' if it's not set ...
* fix(system/packages): install openssl-dev packageFranck Cuny2022-09-241-0/+1
| | | | | I don't think I should have to do this, it's also not solving the problem I have, but it should not hurt either ...
* fix(hosts): the WM manager needs to be in home.nixFranck Cuny2022-09-234-6/+8
|
* fix(home/waybar): fix the configuration after 22.05Franck Cuny2022-09-231-29/+27
| | | | | | | The configuration for the modules has changed as of 22.05 (see [1]). This change is to remove the `modules` section from the settings. [1] https://github.com/nix-community/home-manager/commit/7c320a53254609d9814280a34e312b7f00fd160b
* feat(flake): add nix-linter to the checksFranck Cuny2022-09-221-0/+1
|
* ref(home-manager): don't use home-manager when building the hostFranck Cuny2022-09-2210-132/+191
| | | | | | | | | | | | | | | | | | | When rebuilding the host (through `nixos-rebuild switch --flake`) I don't want to rebuild also my home-manager configuration. I want these to be two different steps. I rebuild the home-manager configuration more frequently and it's a waste of time and CPU to rebuild the world every time. This is a pretty large refactoring: - move checks back into the flake: if I modify a check, the configuration for `pre-commits` is not regenerated, as the file with the checks is not monitored with `direnv` (I could probably configure it for it, but not now) - remove `home.nix` from the host level configuration - introduce a `mkHomeManagerConfiguration` function to manage the different user@host - fix a warning with the rust overlay
* ref(flake): move all the checks to external moduleFranck Cuny2022-09-182-33/+34
| | | | | This improve the readability of the flake configuration, the check can be in their own module.
* ref(flake): drop naersk for nowFranck Cuny2022-09-184-53/+11
| | | | | I'll go and refactor correctly and properly the support for rust packages, this is not working and I'm doing something stupid.
* ref(flake): remove pre-commit for golangFranck Cuny2022-09-181-34/+1
| | | | | There has to be a nicer way, and I might just completely drop golang support anyway in this repo.
* feat(home/python): add a few more packagesFranck Cuny2022-09-181-2/+8
| | | | | Having requests installed by default is useful to write quickly a script, and the black formatter is to enforce consistency.
* feat(home/git): sign commits with my ssh keyFranck Cuny2022-09-171-0/+4
| | | | | | | | | | | | GitHub supports signing commits with a ssh key now (git has supported this feature for a while but it was not yet available on GitHub). More details at [1]. I used the steps documented in [2] for nix. [1] https://github.blog/changelog/2022-08-23-ssh-commit-verification-now-supported/ [2] https://jeppesen.io/git-commit-sign-nix-home-manager-ssh/
* feat(tools/sendsms): build sendsms with nix via naerskFranck Cuny2022-09-073-4/+23
| | | | | | | I can now run `nix build .#tools.sendsms` to build the tool, or get it deployed on a machine. Change-Id: I82c733be466adb229d98414fd1229e05f355dd7d
* feat(flake): use naersk to build rust projectsFranck Cuny2022-09-073-2/+37
| | | | | | The flake naersk is used to build rust crates with nix. Change-Id: Ia1c95de34fe802ae6a6b623dc169ca502fa72f12
* feat(tool/sendsms): a CLI to send SMSFranck Cuny2022-09-076-0/+1382
| | | | | | | | | | | This is a new tool to send SMS via Twilio's API. For now it supports a single subcommand: reboot. Using that subcommand, a SMS will be send with the name of the host and the IP address for the defined network interface. This is useful to be notified when one of my machine reboot, and what's the IP for the main interface (this is useful since my ISP does not provide a static IP). Change-Id: I5886a2c77ebd344ab3befa51a6bdd3d65bcc85d4
* meta: ignore build for rust projectsFranck Cuny2022-09-071-0/+1
| | | | Change-Id: I0235d851df781430abe87d503c652bd97b6e1f1a
* fix(home/rust): better setupFranck Cuny2022-09-071-5/+11
| | | | | | Configure the latest beta for rust and pull some tools with it. Change-Id: Icd7e3a7efd2a5485ab7380a9d077613c03617905
* feat(modules/packages): install pkg-configFranck Cuny2022-09-071-1/+1
| | | | Change-Id: Iaa041a70b386d25c581a3a3c2afe860b86740618
* fix(home/email): remove inbox tag for archived emailsFranck Cuny2022-09-071-1/+4
| | | | Change-Id: If0b49ce46875f9f5bd35b792596796bcdb85b3e9
* feat(home/terraform): install the LSP serverFranck Cuny2022-09-041-1/+4
| | | | Change-Id: I436d66239d25e69e90c43c036afde5dd3bf18915
* feat(rust): add an overlay to install rustFranck Cuny2022-08-226-1/+63
| | | | | | | | Installing the rust overlay to get the various tools installed. This is done by a new module for home-manager, and is installed only on my laptop at the moment. Change-Id: I80c1633ca04da82f4321a0687a05d1df7c523702
* ref(modules/backup): only keep 4 weeks worth of backupsFranck Cuny2022-08-151-1/+1
| | | | | | | Change-Id: I9aa813d57c80f431468d97dfc945d9a0439723f1 Reviewed-on: https://cl.fcuny.net/c/world/+/719 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* ref(modules/sourcegraph): stop backing upFranck Cuny2022-08-151-15/+0
| | | | | | | | | | There's no need to make a backup for sourcegraph, all the things I might care about (at this stage at least) can be easily regenerated. Change-Id: I4b592c9007ce57b56b04a94b43ad2ab8759ce891 Reviewed-on: https://cl.fcuny.net/c/world/+/718 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* ci(pre-commit): add a few more checksFranck Cuny2022-08-151-2/+40
| | | | | | | | | | | | Add a mechanism to run checks for go (fmt/mod tidy) and one for terraform. Fix the configuration for shellcheck (it was not checking the files). Change-Id: I1d250b96bd22838eddf624fda6b4d78d5da3e39f Reviewed-on: https://cl.fcuny.net/c/world/+/715 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(fmt): apply gofmt on some filesFranck Cuny2022-08-151-2/+1
| | | | | | | Change-Id: I9d1ff1b7de5cb89ffcf40bc91e794f7ff420c1e8 Reviewed-on: https://cl.fcuny.net/c/world/+/717 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(shellcheck): apply recommendations from shellcheckFranck Cuny2022-08-151-3/+3
| | | | | | | Change-Id: Id11ad998c30d6e863ab3b43552b9fe248a0d6c7f Reviewed-on: https://cl.fcuny.net/c/world/+/716 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* feat(ops/gcp-backups): add terraform configuration for GCP bucketsFranck Cuny2022-08-155-0/+193
| | | | | | | | | | | | | This terraform configuration is to create the buckets that I'm using for various buckets. Doing this through the UI is difficult, as there are too many options, it's easy to have different buckets with different settings when I need them to be identical, no way to review what the change is going to look like, etc. Change-Id: I8ee15939559e7632e2df9d17cfaec75d756930b6 Reviewed-on: https://cl.fcuny.net/c/world/+/713 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(home/terminal): use alacritty's default colorsFranck Cuny2022-08-101-6/+0
| | | | Change-Id: I8e08d5ee8649f31e52bfdedda8083a2b78dba54d
* fix(ops/tf): remove commentsFranck Cuny2022-08-101-8/+0
| | | | | | | Change-Id: Ifb970bc6835fbc0de1943349739524331b6dba76 Reviewed-on: https://cl.fcuny.net/c/world/+/712 Reviewed-by: Franck Cuny <franck@fcuny.net> Tested-by: CI
* feat(ops/tf): script to create GCP service accounts and set rolesFranck Cuny2022-08-101-0/+113
| | | | | | | | | | | | | | | Since I'm using terraform for a few things, I want to store the state in a GCP bucket. This script takes care of creating the bucket, creating the service account for terraform, setting the roles, and enabling impersonation. The script is (or at least is intended) to be idempotent. If a new project is created, running will update only what is needed. Change-Id: Ie92703be6d17749dc76dabcf9e73e7b274e8d2ac Reviewed-on: https://cl.fcuny.net/c/world/+/711 Reviewed-by: Franck Cuny <franck@fcuny.net> Tested-by: CI
* ref(ops/buildkite): use service account impersonation for GCPFranck Cuny2022-08-103-8/+30
| | | | | | | | | | | | | | | Instead of using a key for the terraform service account, use delegation. This simplifies a bit the setup: - no need to have a local key - principle of least privilege - no need to setup some environment variables Update the documentation in case something goes wrong in the future. Change-Id: I430bdf6816419da35ae8a36cec55ce56491b985c Reviewed-on: https://cl.fcuny.net/c/world/+/710 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(tahoe/secrets): configuration for rclone-sync to GCPFranck Cuny2022-08-081-0/+0
| | | | | | | | | | | | The configuration needs to be updated, we set the value for `bucket_policy_only` to true now that we've set the bucket to use uniform bucket level access (https://cloud.google.com/storage/docs/uniform-bucket-level-access). Change-Id: I7e9516709af4be35a3964937c1dbd728bcfe1f01 Reviewed-on: https://cl.fcuny.net/c/world/+/709 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* feat(home/terraform): install terraform when neededFranck Cuny2022-08-083-0/+12
| | | | | | | Change-Id: Ie87672629ff23eeb93f5308898014cc737490b7c Reviewed-on: https://cl.fcuny.net/c/world/+/708 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* feat(ops/buildkite): use terraform to manage buildkiteFranck Cuny2022-08-077-1/+74
| | | | | | | Change-Id: I63fc8fd81679457f7dbeafc2bd10c0eded0de991 Reviewed-on: https://cl.fcuny.net/c/world/+/707 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* ci(pipeline): the pipeline to be executed with a new buildFranck Cuny2022-08-073-3/+28
| | | | | | | | | | | This is the pipeline that is executed when a new build starts. It wait for all the steps to be completed, and if one of them fail, the build is marked as failed. Change-Id: I1eb22b27749944de78d44e49586a1db1fe07b460 Reviewed-on: https://cl.fcuny.net/c/world/+/706 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* feat(hosts/tahoe): add a token for graphql for buildkite agentsFranck Cuny2022-08-062-0/+16
| | | | | | | Change-Id: I17ea0baab0d74888ed1b21342c583495d3f52643 Reviewed-on: https://cl.fcuny.net/c/world/+/705 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(modules/buildkite): rename a shell scriptFranck Cuny2022-08-061-1/+1
| | | | | | | Change-Id: I2b495c55191f3192b871cfb9d06445817c16e0de Reviewed-on: https://cl.fcuny.net/c/world/+/704 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* ref(flake): tools and users packages are managed the same wayFranck Cuny2022-08-062-5/+10
| | | | | | | | | | Configure the way we import these packages the same way, that way it's consistent and easy to use. Change-Id: I0e218f8fe9dd4cd2045bfee11c80de84ff769fe1 Reviewed-on: https://cl.fcuny.net/c/world/+/703 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(tools): add gerrit-hook to the list of toolsFranck Cuny2022-08-061-0/+2
| | | | | | | Change-Id: I9bf0524ec12c4d554fc4c7ded458aab8a9cf5ef6 Reviewed-on: https://cl.fcuny.net/c/world/+/702 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(modules/secrets): call correct function for groupFranck Cuny2022-08-061-2/+3
| | | | | | | | | | The function `groupExists` returns a boolean, what we want is `groupIfExists` which returns the actual name of the group. Change-Id: I7db50066e13932dd617ffccb9dae40ecb1d383a5 Reviewed-on: https://cl.fcuny.net/c/world/+/701 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* ref(tools): simplify the import of toolsFranck Cuny2022-08-066-17/+14
| | | | | | | | | | | In the `mkSystem` function, instead of defining each tools, let's import all of them at once. This works both with installing a tool from a module or running them from the CLI. Change-Id: Ia44ff9a45b54a1ecea6f6b02b4cad2956799f627 Reviewed-on: https://cl.fcuny.net/c/world/+/682 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* ref(ci): delete custom scripts for formattingFranck Cuny2022-08-064-61/+1
| | | | | | | | | | Since I have configured the pre-commit hooks, I can use them instead of my custom scripts: less things to maintain and easier to read output. Change-Id: Ic833ec88ed9fbcbe52b1b1680f978da3a5a08b31 Reviewed-on: https://cl.fcuny.net/c/world/+/681 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* meta(flake): bump dependenciesFranck Cuny2022-07-201-3/+3
| | | | | | | | | | | | | | | ``` fcuny@aptos ~/w/world (main)> nix flake lock --update-input nixpkgs warning: updating lock file '/home/fcuny/workspace/world/flake.lock': • Updated input 'nixpkgs': 'github:nixos/nixpkgs/f961520b1f163beb178ad2af448832985c7f8417' (2022-06-09) → 'github:nixos/nixpkgs/d2ff0167ce734340e745ca1f53b11a0996ff17a4' (2022-07-20) ``` Change-Id: I8e5efd490cf7f15e84c99ccb27d75660080813a4 Reviewed-on: https://cl.fcuny.net/c/world/+/663 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(modules/secrets): call correct function for group validationFranck Cuny2022-07-201-1/+1
| | | | | | | Change-Id: I84deb43c422668719157a5027e8dbea9a1ec92cf Reviewed-on: https://cl.fcuny.net/c/world/+/662 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* docs(gerrit): how to edit the secretsFranck Cuny2022-07-201-1/+3
| | | | | | | Change-Id: Ibc81727971cfbd7b05c383a1c58ca02b907683f7 Reviewed-on: https://cl.fcuny.net/c/world/+/661 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(modules/secrets): set correctly all possible attributesFranck Cuny2022-07-201-5/+10
| | | | | | | | | | | | | | | | Secrets can have multiple attributes: the owner, group, mode and path. So far, we were setting the file (path where it should be read from), the owner (if it exists), the group (if it exists) and the mode. The attribute 'path' was not propagated correctly. We now check for all these attributes (as optional) and if they exists we set them. We still validate that the user and group exist before setting them. Change-Id: Ifeccf2ee9d0acd17a3cd05de8d08968cea49550b Reviewed-on: https://cl.fcuny.net/c/world/+/641 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* feat(modules/gerrit): manage secure configuration with nixFranck Cuny2022-07-184-1/+8
| | | | | | | | | | | | Currently the secure configuration for gerrit is not managed by nix. This is likely going to break in the future and I'll hate myself for that. Let's move it into nix and encrypt it with age, like we do for other secrets. Change-Id: Ia7a006748a3ad64fa4b97ca9e8cbd98c99433982 Reviewed-on: https://cl.fcuny.net/c/world/+/622 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(modules/backup): reduce verbosity for resticFranck Cuny2022-07-081-1/+1
| | | | | | | | | It's spamming journald, and I don't need that level of details. Change-Id: If6bd8338cf3ed5d7981500e0f3001a3dc4c14870 Reviewed-on: https://cl.fcuny.net/c/world/+/621 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(tahoe/backups): don't backup some directoriesFranck Cuny2022-07-081-0/+1
| | | | | | | | | I don't need to backup these directories in my home. Change-Id: Ia2302f2ebe74033090b86b52864787d2a63ecb4b Reviewed-on: https://cl.fcuny.net/c/world/+/620 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(home/email): correct rule to move emails with afewFranck Cuny2022-07-071-1/+1
| | | | | | | | | | If an email has the tag 'archive' while in the Inbox folder, it needs to be moved to the archive directory. Change-Id: I44efc9e51fe0e749a5a2ffa15fe32b8b945d12f0 Reviewed-on: https://cl.fcuny.net/c/world/+/609 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(home/email): remove a filter from afewFranck Cuny2022-07-071-6/+0
| | | | | | | | | | | | I do not need this filter anymore, it was a one time thing to make sure all emails in the archive directory are tagged properly. Running this every 5 minutes is not needed, but it also trigger the fans on the XPS, so let's remove this. Change-Id: I6ab3669b5708997e4e3681a5d7b0416efe8a1dd9 Reviewed-on: https://cl.fcuny.net/c/world/+/608 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* feat(home/mail): enable smtp to send emailsFranck Cuny2022-07-071-0/+3
| | | | | | | Change-Id: Ia651a1821c44ec45a2dae033e44c91c9eab8459e Reviewed-on: https://cl.fcuny.net/c/world/+/607 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* feat(home/mail): run afew before mbsyncFranck Cuny2022-07-021-0/+1
| | | | | | | | | | Move the mails based on some rules, then we can synchronize local and remote stores. Change-Id: Iae46d94b14606c54a05efa0aa7eb5ca1eb1deb90 Reviewed-on: https://cl.fcuny.net/c/world/+/603 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* feat(home/mail): add more rules for afewFranck Cuny2022-07-021-0/+18
| | | | | | | Change-Id: Ieaa3163db8f73bb6e299304099e3325bba99cc10 Reviewed-on: https://cl.fcuny.net/c/world/+/602 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(home/email): remove the environment variable NOTMUCH_CONFIGFranck Cuny2022-07-021-1/+0
| | | | | | | | | | The path is incorrect, and it's not needed. Instead of fixing the path let's drop the variable. Change-Id: I0b86add1739769810ec8369aac8da60ba38fa0bd Reviewed-on: https://cl.fcuny.net/c/world/+/601 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* feat(flake): add more pre-commit hooksFranck Cuny2022-07-021-0/+12
| | | | | | | | | | | Add pre-commit hooks for: - trailing white spaces - new lines at the end of files Change-Id: I02b5c125064b1cc43e3dfcd7504f60df50846c36 Reviewed-on: https://cl.fcuny.net/c/world/+/593 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(new-lines): add or remove new lines where neededFranck Cuny2022-07-0213-13/+2
| | | | | | | | | | | The pre-commit hook for new lines reported and correct a number of issues, so let's commit them now and after that we ca enable the hook for the repository. Change-Id: I5bb882d3c2cca870ef94301303f029acfb308740 Reviewed-on: https://cl.fcuny.net/c/world/+/592 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(home/git): install pre-commit toolFranck Cuny2022-07-021-1/+1
| | | | | | | | | | | | | | | The tool `pre-commit' is installed as part of the nix shell for this repository, but not on the host (or in my profile). It means that if I try to make a commit via Emacs/magit, it fails, since it's not in my path. By installing it with home-manager, it's in the path, and it can be used by magit when creating a commit. Change-Id: Ifa61d0be1027043eecaf11dd40fbba1ed2f5a9a6 Reviewed-on: https://cl.fcuny.net/c/world/+/591 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* feat(flake): add pre-commit hooksFranck Cuny2022-06-283-1/+56
| | | | | | | | | And configure them to run nixpkgs-fmt and shellcheck. Change-Id: I0aa2025e368b80c5e7d90a4dc05448494525e31e Reviewed-on: https://cl.fcuny.net/c/world/+/590 Reviewed-by: Franck Cuny <franck@fcuny.net> Tested-by: CI
* ref(flake): import tools top-level moduleFranck Cuny2022-06-281-6/+1
| | | | | | | Change-Id: I22fad8e0dcdc7c678ea4d7b9235fa5fe4fcdd84d Reviewed-on: https://cl.fcuny.net/c/world/+/589 Reviewed-by: Franck Cuny <franck@fcuny.net> Tested-by: CI
* ref(tools): top level module to manage all the toolsFranck Cuny2022-06-281-0/+10
| | | | | | | | | | Don't make it harder to maintain the flake.nix, just add the tools to this module and import it in the flake configuration. Change-Id: I62237b996b1c8319c48b9ca4a80e7a3062ef92ec Reviewed-on: https://cl.fcuny.net/c/world/+/588 Reviewed-by: Franck Cuny <franck@fcuny.net> Tested-by: CI
* ref(flake): move `nixosConfigurations` at the bottomFranck Cuny2022-06-281-43/+48
| | | | | | | | | This is more readable. Change-Id: Ibdb6cf2f880f8fe3be80f9049bdf18b2d9120b91 Reviewed-on: https://cl.fcuny.net/c/world/+/587 Reviewed-by: Franck Cuny <franck@fcuny.net> Tested-by: CI
* ref(flake): be specific about which systems we supportFranck Cuny2022-06-281-2/+8
| | | | | | | | | For now the only system we support with nix is linux on x86. Change-Id: Ia7d6173ab0be674e9be706f9c0eb02937aa87ac6 Reviewed-on: https://cl.fcuny.net/c/world/+/586 Reviewed-by: Franck Cuny <franck@fcuny.net> Tested-by: CI
* ref(flake): rename utils to futilsFranck Cuny2022-06-282-19/+19
| | | | | | | | | This name is more specific (f is for flake in this case). Change-Id: Iaad98d8325b81cfe1af8b692ef7cd13586f251e6 Reviewed-on: https://cl.fcuny.net/c/world/+/585 Reviewed-by: Franck Cuny <franck@fcuny.net> Tested-by: CI
* fix(flake): remove duplicated definition of flake-utilsFranck Cuny2022-06-282-18/+0
| | | | | | | Change-Id: I8cb6cfcc89fd2c4167a99a27f8e50d954bacdf6a Reviewed-on: https://cl.fcuny.net/c/world/+/584 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(tools/gerrit-hook): exit on errorFranck Cuny2022-06-261-0/+1
| | | | | | | Change-Id: Ia09983533b3527e50eb4c0828d675e72a782c146 Reviewed-on: https://cl.fcuny.net/c/world/+/581 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(modules/cgit): don't log blackbox exporter requestsFranck Cuny2022-06-261-0/+3
| | | | | | | Change-Id: I60d1d552d028a4b2db2e0c62c1d2d580a4e58e1a Reviewed-on: https://cl.fcuny.net/c/world/+/562 Reviewed-by: Franck Cuny <franck@fcuny.net> Tested-by: CI
* fix(tools/gerrit-hook): replace `.' with `-dot-' in project's nameFranck Cuny2022-06-261-0/+5
| | | | | | | | | | | | If the name of the project has a `.' in it's name (for example `Emacs.d'), buildKite automatically replace it with `-dot'. Which means that we also have to do this conversion here otherwise we're trying to build against a pipeline that does not exists. Change-Id: I54a7dce40da854f125ff43bfbd252b0cd5bfcb29 Reviewed-on: https://cl.fcuny.net/c/world/+/561 Reviewed-by: Franck Cuny <franck@fcuny.net> Tested-by: CI
* feat(tools/gerrit-hook): run CI pipeline for all the repositoriesFranck Cuny2022-06-261-3/+3
| | | | | | | Change-Id: Ib0e376366ea684a254b7993a746e082e38849daa Reviewed-on: https://cl.fcuny.net/c/world/+/521 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(modules/cgit): correct alias configuration for robots.txtFranck Cuny2022-06-231-1/+3
| | | | | | | | | | | | | | | As noted in https://github.com/yandex/gixy/blob/master/docs/en/plugins/aliastraversal.md > if you want to map a single file make sure the location starts with a > =, e.g =/i.gif instead of /i.gif Without a leading `=`, the configuration refuses to build. Change-Id: Ib49f68fbe26441ff6c3ee91efa1d12c3778a0248 Reviewed-on: https://cl.fcuny.net/c/world/+/489 Reviewed-by: Franck Cuny <franck@fcuny.net> Tested-by: CI
* fix(modules/cgit): exclude all web crawlersFranck Cuny2022-06-231-0/+6
| | | | | | | Change-Id: I96db1763dcc85d43ca5913a95d702cf96830c7b0 Reviewed-on: https://cl.fcuny.net/c/world/+/488 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(modules/grafana): configure nginx to bind to tailscale IPFranck Cuny2022-06-231-0/+12
| | | | | | | | | | | | Only serve a response if the request is coming from tailscale. To ensure this is the case, let's configure nginx to only listen on the tailscale IP of the host for that server. Note: the IP for tailscale is hard coded, there has to be a better way. Change-Id: I83952484f60206df215e8c03017cfe7722d32697 Reviewed-on: https://cl.fcuny.net/c/world/+/487 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(modules/sourcegraph): configure nginx to bind to tailscale IPFranck Cuny2022-06-231-0/+12
| | | | | | | | | | | | Only serve a response if the request is coming from tailscale. To ensure this is the case, let's configure nginx to only listen on the tailscale IP of the host for that server. Note: the IP for tailscale is hard coded, there has to be a better way. Change-Id: I684f2da60a128652fac2f7004bec22ce4bf959d0 Reviewed-on: https://cl.fcuny.net/c/world/+/486 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(modules/unifi): configure nginx to bind to tailscale IPFranck Cuny2022-06-231-0/+12
| | | | | | | | | | | | Only serve a response if the request is coming from tailscale. To ensure this is the case, let's configure nginx to only listen on the tailscale IP of the host for that server. Note: the IP for tailscale is hard coded, there has to be a better way. Change-Id: I75978866eb978439df76cede5bf993762f7cd5ab Reviewed-on: https://cl.fcuny.net/c/world/+/485 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(modules/navidrome): configure nginx to bind to tailscale IPFranck Cuny2022-06-231-0/+12
| | | | | | | | | | | | Only serve a response if the request is coming from tailscale. To ensure this is the case, let's configure nginx to only listen on the tailscale IP of the host for that server. Note: the IP for tailscale is hard coded, there has to be a better way. Change-Id: I8b497507b2c8548d824c2e2bb693b38768b355b9 Reviewed-on: https://cl.fcuny.net/c/world/+/484 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(modules/transmission): configure nginx to bind on tailscale IPFranck Cuny2022-06-231-0/+12
| | | | | | | | | | | | Only serve a response if the request is coming from tailscale. To ensure this is the case, let's configure nginx to only listen on the tailscale IP of the host for that server. Note: the IP is currently hard coded, there has to be a better way. Change-Id: I21b6db5e94070024c1ff8d6cea852aafd6952b55 Reviewed-on: https://cl.fcuny.net/c/world/+/483 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(modules/cgit): make cgit the default server for nginxFranck Cuny2022-06-231-0/+4
| | | | | | | | | | | | | | If a request goes through nginx without a Host header set, the default site we serve is cgit. Without this option, nginx will pick the first site defined in the configuration, which is not what I want. I want to be specific about what is the default. Change-Id: If131b80c1488510e79d60ef6de5bb9db4fa18d58 Reviewed-on: https://cl.fcuny.net/c/world/+/482 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* feat(hosts/home): use fish as my default shell everywhereFranck Cuny2022-06-232-2/+2
| | | | | | | Change-Id: I75df9d3ba133e3f7380a518e1b8c70a564f60482 Reviewed-on: https://cl.fcuny.net/c/world/+/481 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(modules/unifi): only backup the backup directoryFranck Cuny2022-06-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | `/var/lib/unifi` is almost 1GB. The data directory contains a lot of files that are changing constantly, which creates a significant amount of data to backup everyday. Overall if I need to restore a backup for unifi, I don't care about metrics and other application data, I only need to restore a backup, which contains the network configuration. `/var/lib/unifi/data/backup` is smaller: ``` fcuny@tahoe ~> sudo du -sh /var/lib/unifi/data/backup 332M /var/lib/unifi/data/backup ``` and each backup is about 12MB: ``` fcuny@tahoe ~> sudo ls -ltrh /var/lib/unifi/data/backup/autobackup|tail -2 -rw------- 1 unifi unifi 12M Jun 22 18:15 autobackup_6.5.55_20220623_0115_1655946900001.unf -rw------- 1 unifi unifi 5.0K Jun 22 18:15 autobackup_meta.json ``` This will reduce the churn in our daily backup significantly. Change-Id: Ie39ffa9055605298a82ba6731acc34fd4e29309c Reviewed-on: https://cl.fcuny.net/c/world/+/471 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* feat(home/shell): add alias to search nix packagesFranck Cuny2022-06-231-0/+1
| | | | | | | Change-Id: I394d4cd05ff763aed28e91d86e2905f6ad414336 Reviewed-on: https://cl.fcuny.net/c/world/+/470 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* ref(tools/gerrit-hook): more idiomatic codeFranck Cuny2022-06-231-3/+4
| | | | | | | | | As reported by the linter. Change-Id: I649fc3d90387bda28efe025dd7ccb54d4296d1bd Reviewed-on: https://cl.fcuny.net/c/world/+/469 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* feat(home/go): install go-tools packageFranck Cuny2022-06-231-1/+1
| | | | | | | | | This package contains a number of go tools, like staticcheck. Change-Id: I4c923137a430b782ef3ed090bc252586e2ed36ef Reviewed-on: https://cl.fcuny.net/c/world/+/468 Reviewed-by: Franck Cuny <franck@fcuny.net> Tested-by: CI
* fix(tools/ipconverter): add missing new lines to print statementsFranck Cuny2022-06-201-4/+4
| | | | | | | Change-Id: I2dffe70dae5ef287c49d3504f9db438661adc16b Reviewed-on: https://cl.fcuny.net/c/world/+/465 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(tools/ipconverter): fail if number of arguments is insufficientFranck Cuny2022-06-201-0/+5
| | | | | | | Change-Id: Ifa382713e3f7cf2360b58d6c05a8a200258921f2 Reviewed-on: https://cl.fcuny.net/c/world/+/464 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* feat(home/shell): add aliases for ip2int and int2ipFranck Cuny2022-06-201-0/+2
| | | | | | | Change-Id: I309e378a9cd1871fc84b395a6e077757106d2628 Reviewed-on: https://cl.fcuny.net/c/world/+/463 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(home/emacs): don't create frame for emacsclientFranck Cuny2022-06-201-2/+2
| | | | | | | | | Use the existing one. Change-Id: I3983aa234528a97ebab87982c8af88472a5a2933 Reviewed-on: https://cl.fcuny.net/c/world/+/462 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* doc(home/git): comment some of the optionsFranck Cuny2022-06-201-0/+4
| | | | | | | Change-Id: I7c898923c423a30cbc5ba8ba79fb8b9e8e4d2d21 Reviewed-on: https://cl.fcuny.net/c/world/+/461 Reviewed-by: Franck Cuny <franck@fcuny.net> Tested-by: CI
* feat(home/git): add a few more options in the default configurationFranck Cuny2022-06-201-0/+5
| | | | | | | Change-Id: I14c7b3349973db99c01c102c57f453840f284612 Reviewed-on: https://cl.fcuny.net/c/world/+/460 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(home/emacs): install the package nixpkgs-fmtFranck Cuny2022-06-201-0/+1
| | | | | | | | | | | | | | | nixpkgs-fmt is a tool to format nix code. This is the one the nix community seems to recommend (https://github.com/nix-community/nixpkgs-fmt) so I should use it. I'm installing this with Emacs because that's how I interact with this code, and I'll configure Emacs to use it for formatting the code. Change-Id: I4364a898c54c75ace12d07636085faa7e9c050c7 Reviewed-on: https://cl.fcuny.net/c/world/+/459 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* feat(home/shell): manage fish's functions directoryFranck Cuny2022-06-203-0/+14
| | | | | | | Change-Id: I03a35a211c7563e65770b39b140099291efafab9 Reviewed-on: https://cl.fcuny.net/c/world/+/458 Reviewed-by: Franck Cuny <franck@fcuny.net> Tested-by: CI
* ref(home/shell): switch default shell to fishFranck Cuny2022-06-202-2/+2
| | | | | | | Change-Id: I905ce6eddc35e4c51a0ab27c8984e0da0fdee7a7 Reviewed-on: https://cl.fcuny.net/c/world/+/457 Reviewed-by: Franck Cuny <franck@fcuny.net> Tested-by: CI
* ref(home/shell): move all shell aliases to a shared configurationFranck Cuny2022-06-204-6/+20
| | | | | | | | | | By moving the aliases to a shared module, they can be used between zsh and fish. Change-Id: Ifcfe0af3b90825fe3a67bc1796d4cf65a58d3ff2 Reviewed-on: https://cl.fcuny.net/c/world/+/456 Reviewed-by: Franck Cuny <franck@fcuny.net> Tested-by: CI
* ref(home/shell): make it easier to share common things between shellsFranck Cuny2022-06-2015-43/+53
| | | | | | | | | | | | | | | | | | | | I'm considering trying again fish, and there are a number of things that should be common between zsh and fish (aliases, environment variables, ...). Instead of duplicating these settings multiple time, I'm consolidating the shell configurations under `home/shell`, and I can set the shell I want to use with `my.home.shell.name`. The first step is to move the modules for fish and zsh under `home/shell`, add an interface to pick which one I want to use, and modify the `host/home.nix` configuration to keep using zsh with the new interface. Change-Id: Idb66b1a6fcc11a6eeaf5fd2d32dd3698d2d85bdf Reviewed-on: https://cl.fcuny.net/c/world/+/455 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* feat(tools/seqstat): add a tool to report stats about a sequenceFranck Cuny2022-06-194-0/+194
| | | | | | | | | | | | | | | | | | | | | For example: ``` % echo 1 20 12 32 19 2 | ./seqstat -S ▁▅▃█▅▁ min: 1.000000 max: 32.000000 avg: 14.333333 p50: 19.000000 p90: 32.000000 p99: 32.000000 p999: 32.000000 ordered sequence: [1 2 12 19 20 32] ``` Change-Id: I9303bd7d0e964948143e77c868de8777cd7a9951 Reviewed-on: https://cl.fcuny.net/c/world/+/454 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* feat(tools/numap): add a tool to report NUMA topology of a hostFranck Cuny2022-06-197-0/+512
| | | | | | | | | | | | The tool maps the various PCI devices to the NUMA node they are attached to and print the result to STDOUT in JSON. Only ethernet, NVMe and GPU devices are accounted for at the moment. Change-Id: If32c805e61211f0ef4838a82eabc70d7fc1985fe Reviewed-on: https://cl.fcuny.net/c/world/+/453 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* feat(tools/schedlatency): add a tool to report scheduler latencyFranck Cuny2022-06-192-0/+258
| | | | | | | | | Given a PID, the tool reports the scheduler latency for it. Change-Id: I52e1de81a91f53ac74734dfd808fd4d7ac00c685 Reviewed-on: https://cl.fcuny.net/c/world/+/452 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* feat(tools/scheddomain): add a tool to report on scheduler domainsFranck Cuny2022-06-192-0/+156
| | | | | | | Change-Id: Ia4e1aa1e7fc48b8bfb619aba9ba71037ffcc69f8 Reviewed-on: https://cl.fcuny.net/c/world/+/451 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* feat(tools/git-bootstrap): initialize a git repository with my defaultsFranck Cuny2022-06-184-0/+250
| | | | | | | | | | This tool can be used to create a new git repository. It will create a README, add the license file, and a few other things I expect. Change-Id: I14123c8f5b7e2d23373a505a146d2c9f6c08615e Reviewed-on: https://cl.fcuny.net/c/world/+/450 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* feat(tools/ssh-key-to-forge): import a SSH key to a forgeFranck Cuny2022-06-184-0/+591
| | | | | | | | | | This can be useful if I need to import a SSH key to one of the forge (only GitHub is supported for now). Change-Id: Ieb5143a670cd75f1fbe51c0f3ae763dd1d667bef Reviewed-on: https://cl.fcuny.net/c/world/+/449 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* feat(tools/music-organizer): add a CLI to organize my musicFranck Cuny2022-06-185-0/+318
| | | | | | | | | | This CLI can be used on the NAS to import an album in my music collection. Change-Id: I5749e34b55bead846e9341fca29e648d3859fc8f Reviewed-on: https://cl.fcuny.net/c/world/+/448 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* feat(tools/git-blame-stats): add the CLI with default git configurationFranck Cuny2022-06-181-1/+2
| | | | | | | Change-Id: I59fed38dca010d6aeac48b5066021ca61ba69db9 Reviewed-on: https://cl.fcuny.net/c/world/+/447 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* feat(tools/git-blame-stats): add the tool to nix configurationFranck Cuny2022-06-182-0/+2
| | | | | | | Change-Id: Iea045c74a32dc26b9a39da79f49308a85ec237cc Reviewed-on: https://cl.fcuny.net/c/world/+/446 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* feat(tools/git-blame-stats): add a CLI to report git blame statisticsFranck Cuny2022-06-183-0/+104
| | | | | | | | | | | Running this command in a repository will report how many lines in the current paths were created by different author, for a given revision. If no revision is specific, HEAD is assumed. Change-Id: I3fbed4f35a05e12fef22a72d7231727c05c50c96 Reviewed-on: https://cl.fcuny.net/c/world/+/445 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* ref(gerrit): add the plugin to delete projectsFranck Cuny2022-06-181-0/+2
| | | | | | | | | | I need to remove some repositories I created by mistake, this will make it easier than messing up with the database. Change-Id: Ia9357226532fe943d15eaec43413502849e39d3d Reviewed-on: https://cl.fcuny.net/c/world/+/444 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* feat(ipconverter): install the tool with my other packagesFranck Cuny2022-06-181-1/+2
| | | | | | | Change-Id: I8a7e0aa493f26bec11772f48ed481781df72cbe1 Reviewed-on: https://cl.fcuny.net/c/world/+/443 Reviewed-by: Franck Cuny <franck@fcuny.net> Tested-by: CI
* feat(ipconverter): add the tool to nixFranck Cuny2022-06-182-1/+5
| | | | | | | Change-Id: Ie98ad07ac4de61fc25f9a9821fb5617d12ea5f70 Reviewed-on: https://cl.fcuny.net/c/world/+/442 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* feat(ipconverter): add a tool to convert IPv4 to int and vice-versaFranck Cuny2022-06-184-0/+120
| | | | | | | | | | | | | | | | | It's sometimes useful to store IPv4 addresses as an integer. This tool helps with the conversion, and also does the reverse conversion. ``` % go run . int2ip 3232235521 3232235521 192.168.0.1 % go run . ip2int 192.168.0.1 192.168.0.1 3232235521 ``` Change-Id: Ic1e44057bca3539b4c183d387c635f69f5bf3f36 Reviewed-on: https://cl.fcuny.net/c/world/+/441 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* ref(scripts): remove the module for scriptsFranck Cuny2022-06-166-46/+31
| | | | | | | | | | The scripts should be part of other modules. If there's no good place for them, they should be part of the packages module. Change-Id: Ic6c678fbe981444848a0ac7015c6c2e450f3b1c1 Reviewed-on: https://cl.fcuny.net/c/world/+/424 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* docs(tools/govanity): update instructionsFranck Cuny2022-06-151-5/+1
| | | | | | | Change-Id: I212635346d2244d9aa1648d02391d192f33c8a1f Reviewed-on: https://cl.fcuny.net/c/world/+/423 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* ref(tools/govanity): simplify the deployment scriptFranck Cuny2022-06-152-13/+11
| | | | | | | | | | No need for an external script, there's only a need to run the tests and deploy with `flyctl`. Change-Id: I05400f6b813573b26af884d784fe407d4435429f Reviewed-on: https://cl.fcuny.net/c/world/+/421 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* ref(home/go): update to go version 1.18, ensure goplsFranck Cuny2022-06-151-1/+3
| | | | | | | Change-Id: I7b8a48c8cfdab1bc6e9a95a999f4add1fc07ebc1 Reviewed-on: https://cl.fcuny.net/c/world/+/420 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* ref(tools/govanity): add a function to load the configurationFranck Cuny2022-06-152-18/+22
| | | | | | | Change-Id: I36c6da7eba64e6f877d1a17c700c56a70434625a Reviewed-on: https://cl.fcuny.net/c/world/+/422 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(tools/govanity): add a test for the repo URLFranck Cuny2022-06-151-0/+40
| | | | | | | | | | | | | | | | | This test does an HTTP request to ensure the URL for the repository does not return an error. The test tries first to do a DNS resolution to see if we have network access. When we build the binary in the nix sandbox we don't have network access, so we don't want to fail in this situation, we only want to skip. The test is going to be run before we do a deployment. Change-Id: I184f9208210432a5394158d728e556c949e63a24 Reviewed-on: https://cl.fcuny.net/c/world/+/419 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(tools/govanity): remove one repo and fix URL for the other twoFranck Cuny2022-06-151-4/+2
| | | | | | | Change-Id: Id8ad45afc710e1bc5fef5704deb9d8b4c7559b4b Reviewed-on: https://cl.fcuny.net/c/world/+/418 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* feat(home/beet): import albums on the NASFranck Cuny2022-06-143-30/+60
| | | | | | | | | | | | Two new scripts are created. The first one is to copy an album (usually in zip format) from my desktop to the NAS. Once the file is copied, the script calls the second script, which extract the album and call beet to get it imported in my music collection. Change-Id: I93509e0cc213ba884a9282e1f474a0f9298a1fb7 Reviewed-on: https://cl.fcuny.net/c/world/+/417 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* delete reference to namespacesFranck Cuny2022-06-136-27/+21
| | | | | | We don't need namespaces, a better abstraction is to use different buckets, as this provides a better abstraction to manage quotas and permissions.
* github: don't install libpcapFranck Cuny2022-06-131-3/+0
| | | | There's no need to install the libpcap-dev package for this repo.
* github: fix workflow configurationFranck Cuny2022-06-131-1/+1
| | | | There's no `cmd` directory in this repo.
* github: add workflow configurationFranck Cuny2022-06-131-0/+38
| | | | | Let's ensure we test and build a binary when pushing to main and when we create a pull-request.
* add stub commands for buckitFranck Cuny2022-06-138-0/+130
| | | | | | | | | Add the stub commands for the binary. Each command will be in its own file (with the exception of delete/un-delete). This will make it easier to navigate the code. We use `github/urfave/cli` for generating the sub commands, as the module is well documented and easy to use.
* git: ignore the generated binary buckitFranck Cuny2022-06-131-0/+1
|
* initial documentationFranck Cuny2022-06-132-1/+63
| | | | This is a high level description of what buckit is and how it works.
* Add README.md, LICENSE.txtFranck Cuny2022-06-132-0/+21
|
* Initial commitFranck Cuny2022-06-130-0/+0
| | | | This commit is empty on purpose.
* ref(sourcegraph): exclude more directories from backupFranck Cuny2022-06-131-2/+6
| | | | | | | | | | | | | | I don't need to backup the observability data for sourcegraph. I also don't need to backup the cache. These files change a lot and are about ~300M of data every day, which creates a lot of churn for our backup. All I need if I restore a backup is the content of the database and the indexes. Change-Id: Ifaddda7626ecae32162503bc14aa8d1ffa716622 Reviewed-on: https://cl.fcuny.net/c/world/+/416 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* ref(nginx): delete unused moduleFranck Cuny2022-06-121-81/+0
| | | | | | | Change-Id: Ie69e250c7a63e2f5bea360b5ac62fcd748f48735 Reviewed-on: https://cl.fcuny.net/c/world/+/415 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* mpd: we only want events from the player subsystemFranck Cuny2022-06-112-2/+8
| | | | | Store the name of the subsystem in a constant, add some comments on where to find the list.
* doc: update README with instruction for installingFranck Cuny2022-06-111-0/+8
|
* build: install the binary and systemd unitFranck Cuny2022-06-111-0/+12
| | | | | | Add a Makefile to install the binary in GOPATH and the unit file for the service. When the binary is installed, systemd is reloaded and the service is also started.
* scrobbler: add a systemd unit fileFranck Cuny2022-06-111-0/+43
| | | | | | | | | | | | As I want the scrobbler to be started automatically when I log into my session, the easiest way to do this is by having a systemd unit file that I run for my own user. The unit expects that the binary for the scrobbler is under my $GOPATH, which is hard coded for now. We also ensure that the binary exists before starting the unit. We harness the service with a number of directives.
* scrobbler: read mpd status before processing songFranck Cuny2022-06-111-4/+21
| | | | | | | | If the status of the player is "stop", we don't have a new song to handle. In this case, if there's a current song, let's update the status and clear our state. Closes #1.
* scrobbler: record how long a song was playedFranck Cuny2022-06-112-1/+16
| | | | | | | | Add a column `playtime` to the records table to keep track of how long a song was played. With this information, in the future, we will be able to sum up how long we listen to music, but also which songs were skipped.
* mpd-scrobbler: proper default argumentsFranck Cuny2022-06-111-2/+31
| | | | | | | | The program needs two arguments: the mpd host and port, which can be passed as flags (default is to use the local instance of mpd). We store the database in `XDG_CONFIG_HOME/mpd-scrobbler`, and we create the path if needed.
* scrobbler: use helper function EqualAttrsFranck Cuny2022-06-111-3/+1
| | | | | | To compare the current attributes with the current record, we can use the helper `EqualAttrs` which will tell us if we need to create a new record or not.
* record: add some basic testingFranck Cuny2022-06-112-0/+59
|
* mpd-stats: pass database path to the scrobblerFranck Cuny2022-06-112-5/+31
| | | | | | | | When creating a scrobbler, we provide the path to the database. The scrobbler then get a handler to the database. When a new record is created, we persist it to the database using the `save` function.
* scrobbler: add timestamp to the recordFranck Cuny2022-06-111-9/+11
| | | | When we create a new record, let's capture when this was created.
* scrobbler: add interface to the sqlite3 databaseFranck Cuny2022-06-113-0/+57
| | | | | | | | | We want to persist the records in a database, so we can extract statistics and an history. The module for the database is straightforward: it opens the database if it exists and return an handler to it. If the database does not exists, we create it and we create the only table we need (records).
* mpd-stats: create and run the scrobblerFranck Cuny2022-06-111-39/+4
|
* scrobbler: add functions to create and run itFranck Cuny2022-06-111-0/+66
| | | | | | | | | | | | Add a new function to create a scrobbler. The function takes care of creating the mpd client. Add a function to run the scrobbler, which takes care of creating a new record when needed. This will simplify the interface for the caller, as all they really care about is: create the scrobbler, close it when we're done, and collect songs information while we listen to our music.
* mpd: export the type PlayerFranck Cuny2022-06-111-4/+4
|
* mpd: add function `Close` to the playerFranck Cuny2022-06-112-2/+15
| | | | | Let's close both the watcher and the client, instead of leaking this interface to the user.
* mpd: rename function to create the playerFranck Cuny2022-06-112-2/+2
|
* scrobbler: create a record on new songFranck Cuny2022-06-111-5/+27
| | | | | | When we receive an event from the player, we look if the song is different from the previous one, and we create a new record if that's the case. If the song is similar, there's nothing to do.
* scrobbler: initial log record typeFranck Cuny2022-06-113-1/+40
| | | | | Define the type for a log record and add an helper function to create a new record.
* scrobbler: watch for events and print song detailsFranck Cuny2022-06-114-0/+77
| | | | | | | | | | We create a module "mpd" to interact with our MPD instance. For now we only have a single function to create a new client, which creates an actual client for mpd (and we ping the instance every 30 seconds), and a watcher to receive new events. The tool "scrobbler" then wait for new events and display songs information.
* README: add some information about loggingFranck Cuny2022-06-111-1/+14
| | | | Describe what is being collected.
* add initial go.modFranck Cuny2022-06-111-0/+3
|
* Add README.org, LICENSE.txtFranck Cuny2022-06-112-0/+21
|
* Initial commitFranck Cuny2022-06-110-0/+0
| | | | This commit is empty on purpose.
* fix(cgit): update title and descriptionFranck Cuny2022-06-111-1/+2
| | | | | | | Change-Id: I0a8bbe976687a8408e1a931ecf2a90cbaa4926e2 Reviewed-on: https://cl.fcuny.net/c/world/+/414 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(notes): correct the URL to containerd-to-vm codeFranck Cuny2022-06-111-1/+1
| | | | | | | Change-Id: Ifcd265c515b0fc5e1999eed0d7594475e84a346a Reviewed-on: https://cl.fcuny.net/c/world/+/413 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* repo(containerd-to-vm): remove unneeded filesFranck Cuny2022-06-112-40/+0
| | | | | | | Change-Id: I4d229d0f4a9142e3bd427a8e63733426f5ca5bd9 Reviewed-on: https://cl.fcuny.net/c/world/+/412 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* publish firecracker metrics in a FIFOFranck Cuny2022-06-111-2/+4
| | | | | We add a new argument to the CLI to collect the path where we want to publish the firecracker metrics.
* Makefile: install binaries and configsFranck Cuny2022-06-111-6/+23
| | | | | | | To help working on this project in the future, let's try to install dependencies and configurations with `make`. For now we know that we need the firecracker binary, the CNI configuration and the CNI plugin for TAP.
* rename the variable for the linux kernelFranck Cuny2022-06-111-7/+7
|
* c2vm: fix kernel boot optionsFranck Cuny2022-06-111-1/+1
| | | | | | | By specifying these options we can speed up the boot process from 0.9 second to 0.15 seconds. Without these options, the linux kernel spends a few milliseconds probing the device, which is useless in our context (see https://github.com/firecracker-microvm/firecracker/blob/main/docs/api_requests/actions.md#intel-and-amd-only-sendctrlaltdel)
* readme: update instructionsFranck Cuny2022-06-111-0/+16
|
* boot the VMFranck Cuny2022-06-113-4/+256
| | | | | | | | | The binary needs a few more arguments: the path to the firecracker binary, the path to a linux kernel. Using the image that was generated, we can now boot the VM with firecracker. This will rely on a CNI configuration to create the network, and will use the provided kernel to boot.
* hack: firecracker binary and CNI configurationFranck Cuny2022-06-113-0/+35
| | | | | | | | | Add a target to the Makefile to download a version of firecracker and extract it under the repository hack/firecracker. We will then use this binary for running the VM. Add a CNI configuration under hack/cni. This configuration will need to be copied to `/etc/cni/conf.d`.
* git: ignore binaryFranck Cuny2022-06-111-0/+1
|
* add MakefileFranck Cuny2022-06-111-0/+3
|
* check for errorFranck Cuny2022-06-111-0/+3
| | | | | When reading the configuration for the container, if there's an error we return the error to the caller.
* github: add workflowsFranck Cuny2022-06-111-0/+35
| | | | Add a workflows to perform some validation when pushing new commits.
* inject a script for initFranck Cuny2022-06-111-0/+43
| | | | | | | | | Once we will be ready to boot our VM, we will need an init script in place. For this, we create a simple shell script which we populate using the environment variables and command extracted from the container. The init script is stored in /init.sh within the new image, and we will configure the boot parameter to find it there.
* extract layers to a mounted loop deviceFranck Cuny2022-06-113-1/+128
| | | | | | | | | | | | | We create a loop device by pre-allocating space to a file on disk. This file is then converted to an ext4 partition, which we mount to a temporary path on the host. Once this is done, we extract all the layers from the given container on that mounted path. We also add a few extra files to the image (`/etc/hosts` and `/etc/resolv.conf`). When we're done extracting and writing, we run resize2fs in order to resize the image to a more reasonable size.
* add a lease to the Go contextFranck Cuny2022-06-111-0/+6
| | | | | | | | | | | | This will ensure that our container will not be deleted while we work on it. In addition, a default expiry of 24 hours will be set on it once the lease is released (once the program is completed). See [1] for more details. [1] https://github.com/containerd/containerd/blob/261c107ffc4ff681bc73988f64e3f60c32233b37/docs/garbage-collection.md Signed-off-by: Franck Cuny <franck@fcuny.net>
* pull a container into a namespaceFranck Cuny2022-06-114-0/+975
| | | | | | | | | | | | | | | | | | | | Pull an image provided as an argument to the program. We're only interested in images for Linux/amd64 at the moment. We setup a default namespace for containerd named `c2vm`. Images that will be pulled by containerd will be stored inside that namespace. Once the program is build it can be run like this: ``` ; sudo ./c2vm -container docker.io/library/redis:latest pulled docker.io/library/redis:latest (38667897 bytes) ``` And the image is indeed in the namespace: ``` ; sudo ctr -n c2vm images ls -q docker.io/library/redis:latest ```
* doc: update READMEFranck Cuny2022-06-112-1/+15
|
* Add README.md, LICENSE.txtFranck Cuny2022-06-112-0/+21
|
* Initial commitFranck Cuny2022-06-110-0/+0
| | | | This commit is empty on purpose.
* ref(drone): remove all modules and configurationsFranck Cuny2022-06-1110-207/+0
| | | | | | | | | I do not use drone anymore, no need to keep this around. Change-Id: I8f9564747939a6d1a2b95bcfe8e2c70e46d8bc1e Reviewed-on: https://cl.fcuny.net/c/world/+/411 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* ref(gitea): remove all modules for giteaFranck Cuny2022-06-113-1241/+0
| | | | | | | | | I do not use it anymore, I don't need to keep this around. Change-Id: I42af32eec4ee8ab4c2a8c60b5a8306a4eb418f51 Reviewed-on: https://cl.fcuny.net/c/world/+/410 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* ci(default): add `apps.ci.shellcheck` to flake.nixFranck Cuny2022-06-102-2/+11
| | | | | | | | | | | | I can now run `nix run .#ci.shellcheck` to validate the shell scripts with shellcheck in the repository. The pipeline in buildKite will need to be updated. Change-Id: Ia52ede86adfa58c9615b0f9e290ef5d5b8adb303 Reviewed-on: https://cl.fcuny.net/c/world/+/409 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(scripts): no need to create tags when deploying to fly.ioFranck Cuny2022-06-103-23/+5
| | | | | | | | | | | | | I don't need tags in this repository. There's no need to create them after a deploy. Before stopping the fly.io agent, checks that we're in the CI environment. Change-Id: I6208b70023c6ae74d58e535e24b44221956dbe63 Reviewed-on: https://cl.fcuny.net/c/world/+/408 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* ci(shellcheck): add a script to check shell scriptsFranck Cuny2022-06-101-0/+24
| | | | | | | | | | | | The script uses shellcheck to validates that the shell scripts are correct. This is not used by anything yet. Change-Id: Ia96b132143fa0824eaf23420a72e5b518d618250 Reviewed-on: https://cl.fcuny.net/c/world/+/407 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(flake): install nixpkgs-fmt by defaultFranck Cuny2022-06-101-0/+1
| | | | | | | Change-Id: Ifc199c19e80f0c4f6beb5d04d981580c8edaadf6 Reviewed-on: https://cl.fcuny.net/c/world/+/405 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* ci(fmt): add a script to check the formattingFranck Cuny2022-06-102-2/+34
| | | | | | | | | | | | | | | | Add a script for CI to check that all the files are formatted correctly. This is done by using `treefmt' with a configuration for go and nix files (for now). Running `nix run .#ci.fmt' in the repository will check all the files, and fail if there's any problems. It will not modify any files. The pipeline in builKite needs to be updated to run that command. Change-Id: Iec91163f1ab56ceb0cfff6db8f8ce93367ebeefe Reviewed-on: https://cl.fcuny.net/c/world/+/403 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(fmt): correct formatting for all nix filesFranck Cuny2022-06-1089-156/+256
| | | | | | | | | This was done by running `nixpkgs-fmt .'. Change-Id: I4ea6c1e759bf468d08074be2111cbc7af72df295 Reviewed-on: https://cl.fcuny.net/c/world/+/404 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* docs(gerrit): document various thingsFranck Cuny2022-06-101-0/+59
| | | | | | | Change-Id: I79075be119258eb8ee28bf99f404480a646d2583 Reviewed-on: https://cl.fcuny.net/c/world/+/402 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(bluetooth): write proper configuration for wireplumberFranck Cuny2022-06-101-1/+1
| | | | | | | | | | | | | | | The missing comma resulted in the following error: ``` Jun 10 08:57:09 aptos wireplumber[2303]: Failed to compile: [string "50-bluez-config.lua"]:4: '}' expected (to close '{' at line 1) near '[' ``` As a result, the service would not start, which prevented the sound to work (and overall videos were extremely slow). Change-Id: If6ff7a29a9cf294f9e8d3f6a44abf2423ecfb6e9 Reviewed-on: https://cl.fcuny.net/c/world/+/401 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(backups): exclude more files from the backupsFranck Cuny2022-06-102-1/+11
| | | | | | | | | We don't need to backup log files for grafana and sourcegraph. Change-Id: I8ed6f6ce1270a12233cad268bcd12e28ac2785cf Reviewed-on: https://cl.fcuny.net/c/world/+/383 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(unifi): configure correctly services.unifi for nixos 22.05Franck Cuny2022-06-101-1/+1
| | | | | | | Change-Id: Ide8e479bc88689e052a372825bc90b23b426a89a Reviewed-on: https://cl.fcuny.net/c/world/+/382 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(nginx): configure correctly security.acme for nixos 22.05Franck Cuny2022-06-101-1/+1
| | | | | | | Change-Id: I94cb29510cbb85c769947dc26c33f9d767e2f0c8 Reviewed-on: https://cl.fcuny.net/c/world/+/381 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* feat(cgit): adjust configurationFranck Cuny2022-06-091-0/+9
| | | | | | | | | | | - list up to 150 repositories per page - limit stats to a year - snapshots are in tar.gz format Change-Id: Ifc52d47893737862d89d24b797ec28f32e5076e9 Reviewed-on: https://cl.fcuny.net/c/world/+/366 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* feat(nix): update nix to version 22.05Franck Cuny2022-06-096-39/+36
| | | | | | | | | | | | | NixOS 22.05 was released last month. Bump the versions for both nixos and home-manager. I also need to make a few changes for this update work (packages were renamed, options were addded to tailscale, ...) Change-Id: I84ed9f21915b769c9f7b8e21988b2b021715c982 Reviewed-on: https://cl.fcuny.net/c/world/+/365 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(blog): set the correct URL to my git serverFranck Cuny2022-06-091-1/+1
| | | | | | | Change-Id: I0911c07d5ab0e17a09e587ba4507d0202f6c7ff3 Reviewed-on: https://cl.fcuny.net/c/world/+/364 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(navidrome): don't backup the cache directoryFranck Cuny2022-06-091-1/+4
| | | | | | | Change-Id: I45a42543d7fb5071022a77382e925b55568e2c2d Reviewed-on: https://cl.fcuny.net/c/world/+/363 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(restic): actually exclude files from the backupFranck Cuny2022-06-091-2/+8
| | | | | | | | | | | The option `exclude' was defined but unused. Add a function to generate a text file containing all the paths that we want to exclude, and provide that file as an option when we call `restic'. Change-Id: I647db892a8a77c589cec1fc975808c5c9ad0b757 Reviewed-on: https://cl.fcuny.net/c/world/+/362 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(gerrit): don't backup tmp,logs,cache directoriesFranck Cuny2022-06-091-1/+8
| | | | | | | Change-Id: I73087942ed86fd2ad3575a4776dba97fac693468 Reviewed-on: https://cl.fcuny.net/c/world/+/361 Tested-by: CI Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(GTK): delete commented codeFranck Cuny2022-06-091-6/+0
| | | | | | Change-Id: Ia942b32b9eef3d5205a7845ef4945d42af8a0862 Reviewed-on: https://cl.fcuny.net/c/world/+/321 Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(secrets): buildKite agents can read gerrit secretsFranck Cuny2022-06-091-0/+4
| | | | | | | | | We need to ensure the agents can read the secrets / tokens to vote after a build. Change-Id: I066c2482a795b21badaa9cc3c525373d7945b084 Reviewed-on: https://cl.fcuny.net/c/world/+/341 Reviewed-by: Franck Cuny <franck@fcuny.net>
* feat(gerrit-hook): propagate gerrit information in the environmentFranck Cuny2022-06-091-3/+17
| | | | | | | | | The buildKite agents need this information in order to vote after a build. Change-Id: If03ba51d55f4d1155c6b7fdadace3b4643480258 Reviewed-on: https://cl.fcuny.net/c/world/+/342 Reviewed-by: Franck Cuny <franck@fcuny.net>
* feat(buildkite): configure the post-command hookFranck Cuny2022-06-091-0/+12
| | | | | | Change-Id: I7b00987382ef05e032d88cf00e916cdc27511eb1 Reviewed-on: https://cl.fcuny.net/c/world/+/306 Reviewed-by: Franck Cuny <franck@fcuny.net>
* feat(gerrit): update CL when buildKite build is finishedFranck Cuny2022-06-092-0/+46
| | | | | | | | | | | | | | | buildKite can call specific hooks at various stages ([1]). We add a hook to run after each command. For now we only care if the label of the command is `:hammer:', since this is what we've defined for our pipeline. After a successful build, the agent will post a review with +1 if it's a success, or -1 if the build results in failure. [1] https://buildkite.com/docs/agent/v3/hooks#job-lifecycle-hooks Change-Id: I6b2b886c13e6f23ddbc96fd3e865f0d50d625446 Reviewed-on: https://cl.fcuny.net/c/world/+/305 Reviewed-by: Franck Cuny <franck@fcuny.net>
* feat(gtk): add bookmarksFranck Cuny2022-06-091-0/+2
| | | | | | Change-Id: Icb3bd8cf01850aa9d35fd574cc18543df5b71fca Reviewed-on: https://cl.fcuny.net/c/world/+/304 Reviewed-by: Franck Cuny <franck@fcuny.net>
* ref(zsh): ensure home-manager variables are set before starting swayFranck Cuny2022-06-092-6/+10
| | | | | | Change-Id: I820a636bcdeb6abf7ff8a25ec409c08916e94c42 Reviewed-on: https://cl.fcuny.net/c/world/+/303 Reviewed-by: Franck Cuny <franck@fcuny.net>
* ref(git): remove git.fcuny.net from configurationFranck Cuny2022-06-091-1/+0
| | | | | | | | | I don't have credentials for that URL anymore, everything goes through cl.fcuny.net. Change-Id: I2361444c2ea42679ab4f28758f708e53eb9c8c06 Reviewed-on: https://cl.fcuny.net/c/world/+/302 Reviewed-by: Franck Cuny <franck@fcuny.net>
* fix(pass-git-helper): remove mapping for git.fcuny.netFranck Cuny2022-06-091-4/+1
| | | | | | Change-Id: I5211647802a08e9984dffb6247249ec608688d8c Reviewed-on: https://cl.fcuny.net/c/world/+/301 Reviewed-by: Franck Cuny <franck@fcuny.net>
* feat(gerrit): add plugin 'reviewnotes'Franck Cuny2022-06-091-1/+9
| | | | | | | | | This plugin stores review information for Gerrit changes in the `refs/notes/review' branch. Change-Id: I51c7fe1f8764617e0bff5455d3fe713b0e2f446e Reviewed-on: https://cl.fcuny.net/c/world/+/300 Reviewed-by: Franck Cuny <franck@fcuny.net>
* ref(nix): move the mkSystem function to its own fileFranck Cuny2022-06-093-47/+31
| | | | | | | | Make the default system be x86-linux. Change-Id: I13e00e4d4cb8b7c49cc549509e37a6d0f022a051 Reviewed-on: https://cl.fcuny.net/c/world/+/299 Reviewed-by: Franck Cuny <franck@fcuny.net>
* ref(nix): rename lib/ to nix/Franck Cuny2022-06-093-1/+1
| | | | | | Change-Id: If1e608b89b39bd5a53a37b873833a7ea881cb418 Reviewed-on: https://cl.fcuny.net/c/world/+/298 Reviewed-by: Franck Cuny <franck@fcuny.net>
* ref(profiles): get rid of all the profilesFranck Cuny2022-06-0910-50/+30
| | | | | | | | | | | | | | All the modules that are setup by the profiles are now managed at the host level. This simplify some configuration, and will make it easier to adjust things at the host instead of trying to squeeze everything into profiles. This will also help the refactoring later, when I'll split nixos and home-manager configuration. Change-Id: I17ffda8b0b5d15bf1915c6fae5030380523d74b5 Reviewed-on: https://cl.fcuny.net/c/world/+/297 Reviewed-by: Franck Cuny <franck@fcuny.net>