How to use `services.self-deploy`?

It looks like the issue is with your configuration to me – more specifically, it looks like the file you’re referencing is what would normally be in your configuration.nix file exactly, aka a function. I’ve been meaning to document the self-deploy service for some time, but it requires the configuration be a “system closure”, which is created by using the methodology Gabriella Gonzalez describes here: Haskell for all: NixOS in production

The article is a bit out of date in a handful of regards, but the actual methodology of creating a buildable system closure is not. The parts you need to look at are “building the closure” (specifically the syntax used to create the closure, self-deploy does the building) and “pinning nixpkgs” (likely something you’d like to do when using self-deploy), self-deploy handles all of the other parts.