Git Product home page Git Product logo

selfhostblocks's People

Contributors

github-actions[bot] avatar ibizaman avatar sivertism avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

selfhostblocks's Issues

Add a secrets block

This would allow blocks or services to define what secrets they need and the user could just fill-in the path to the secret.

Upstream *arr configuration

Quoting from the README:

One important goal of SHB is to be the smallest amount of code above what is available in nixpkgs. It should be the minimum necessary to make packages available there conform with the contracts. This way, there are less chance of breakage when nixpkgs gets updated.

However, it looks like the *arr configuration modules go against that ethos:

  • the XML generator could be upstreamed to nixpkgs.
  • the various configuration options could be upstreamed to each of the *arr modules.

Have SHB pin nixpkgs version

This requires a few things:

NixOS test for SSO forward auth

This test should spin up Nginx, Authelia and a stub upstream server that returns in a json response all the headers of requests it receives.

The test should configure Authelia to protect some endpoints of the stub server.

The test should make requests to the Nginx instance and validate the received payload from the stub server ha the correct headers.

Interesting links:
https://www.authelia.com/integration/trusted-header-sso/introduction/
https://openidconnect.net/
https://oidcdebugger.com/

Jellyfin service missing some directories

No big deal, but thought I'd file this here so we remember to fix it at some point.

There are two missing directories preventing successful start of the jellyfin service when running on a fresh install.

/var/lib/jellyfin/config
/var/lib/jellyfin/plugins/configurations

For anyone who might run into this, you can get around it with

> sudo mkdir -p /var/lib/jellyfin/config
> sudo mkdir -p /var/lib/jellyfin/plugins/configurations
> sudo chown -R jellyfin:jellyfin  /var/lib/jellyfin

Automatically update flake inputs of demos

The GitHub job to update the root flake inputs should be extended to also update the demos.

There might be an issue because the demos have their selfhostblocks input URI pointing to the GitHub repository directly. That will of course not have the update just done by the GitHub job. So we'll need to run the following command for each demo but not commit that:

nix flake lock --override-input selfhostblocks ../.. --update-input selfhostblocks

Now that I'm writing this, maybe the above command should instead live inside the GitHub job testing the demos?

Add renewal timer for self-signed certs

Split from #134. They are currently generated only once. Also, the options related to this should follow the acme options from nixpkgs. And the options should be added to the contract.

nginx lacks permissions to access certs

Certs are created with read-only group permissions for acme:acme. However, nginx is not part of the acme group, so it does not have access.

Fixed this temporarily on my server by adding nginx to the acme group, but maybe it makes more sense to add a new group?

Use nvd and nix-diff on output of flake update job

nix run nixpkgs#nvd -- diff \
  /nix/store/l4amfd3q5xq4kdsn3rp7xjrqdhlywp47-nixos-system-laptop-23.11pre-git \
  /nix/store/cdvfhh5l9nl5xmx78pbimpp7zplgmyfw-nixos-system-laptop-24.05pre-git

nix run nixpkgs#nix-diff \
  /nix/store/l4amfd3q5xq4kdsn3rp7xjrqdhlywp47-nixos-system-laptop-23.11pre-git \
  /nix/store/cdvfhh5l9nl5xmx78pbimpp7zplgmyfw-nixos-system-laptop-24.05pre-git

Add a DNS block

The implementation would use dnsmasq as a starter backend (because I know it well).

Functionality should be:

  • User defines where a reachable service lives. For example, the Nextcloud service lives on the host 192.168.1.50.
  • User defines what the fqdn is to reach the services. For example, the Nextcloud service is accessible at nextcloud.mydomain.com.
  • This blocks creates a DNS server that answers to the question nextcloud.mydomain.com with 192.168.1.50.

Provision Grafana

We should automatically datasources and optionally dashboards and alerts.

Provide per backup tool for managing backup

Essentially, there should be a wrapper around restic or borgmatic so we don’t need to put in the credentials.

Also, we should have a way to fix errors like:

  • a file that’s going to be backed up cannot be read by the backup user. This leads to restic bailing out.
  • repository is locked by unlocking it. Sometimes there’s a good reason for it being locked but sometimes it’s just a lock that’s not removed after an aborted job. Example:
    RESTIC_PASSWORD_FILE=/run/secrets/restic/passphrases/<name> RESTIC_REPOSITORY=<repo> restic unlock
  • cache cleanups, same as above but with cache --cleanup
  • running repair-index to fix restic/restic#2191

deployment options

An impressive piece of work!

I read that your are having problem with nixops2, that projects seems have be forgotton about.

May i recommend you have a look at nixinate.

It's just a shell script, but it uses nix primitives to deploy machines. I think it would be idea for selfhostblocks.

https://github.com/MatthewCroughan/nixinate

give it a try and see what you think, there are other more sophisticated tools, but for this job it's perfect and simple!!

Making a flake which can deploy to multiple systems should be very easy.

reach out if you got questions!

I see your using colmena for deployment , so that also might be a great option.

Authelia clients override eachother

Issue

The authelia OIDC clients each get written to their own yaml files, and Authelia is launched with
authelia --config config.yaml,client1.yaml,client2.yaml,client3.yaml

However, it seems like authelia reads the yamls as if they were all in the same file, meaning that each OIDC client overrides the previous one because each client defines the sequence identity_providers.oidc.clients. I.e. Authelia doesn't implement any merging logic (like nix does).

I've checked that this is the case by removing one and one OIDC client from my SHB config, and checking that only the last one works. (tested through openidconnect.net, and by checking the authelia debug log, which prints registered clients).

The solution would probably be to write out one clients.yaml file containing all clients instead of one file per client.

Make demos work without colmena

It would be great to allow the demos to be deployed to without requiring to deploy through Colmena. Or at least keeping that optionally.

A few reasons:

  • If we include all the configuration in configuration.nix, we can share the nix store between the VM and the host. This makes for much faster demos to run.
  • Some users experienced issues when running build-vm-with-bootloader and could not run the demos.
  • Would make #53 possible.

Add pgbouncer in front of postgresql

From what I’ve seen on my own server as far as Nextcloud performance goes… having a pooling mechanism in front of Postrgres will be very valuable.

Add Immich

It should probably integrate with Nextcloud.

Remove deprecated usage of Postgres' ensurePermissions

Got the following warning while running nix build .#checks.x86_64-linux.vm_postgresql_peerAuth:

trace: warning: 
      `services.postgresql.ensureUsers.*.ensurePermissions` is used in your expressions,
      this option is known to be broken with newer PostgreSQL versions,
      consider migrating to `services.postgresql.ensureUsers.*.ensureDBOwnership` or
      consult the release notes or manual for more migration guidelines.

      This option will be removed in NixOS 24.05 unless it sees significant
      maintenance improvements.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.