I had a similar situation when we moved to Switzerland last year.
My spouse started a job in Geneva (we are living in VD though) and I planned to continue working for my Finnish employer remotely. The process wasn't very easy as the information is scattered around but it is doable. However in my case my employer used a Swiss legal counsel to do all the work.
Your case can be different due to Brexit but generally with EU countries the process should go like this:
- ask your employer to amend your work contract to state that Swiss law is applied.
- ask your employer to sign a form Employer-Employee Agreement in accordance with Article 21, para. 2 of Regulation (EC) No. 987/09. This form states that the employer must pay you in addition to your salary all the necessary Swiss social security contributions which you will then pay to the relevant authority.
- Register to the relevant Social Security Authority (in my case Caisse Cantonale Vaudoise). There should be a registration form available. Include your work contract and the agreement above. In my case in addition to the registration form I had to fill our additional "Questionnaire d'affiliation"
- Submit your application for B permit with request for "Activité salariée de longue durée". You might want to attach all the previous documents to this. This can be done at the same time you register to your Commune. In any case it is important to let them know you have submitted your application to the Social Security Authority because paying the fees is a requirement for getting the permit. You might also want to attach your spouse's B permit and proof that you are married.
- Apply for the required insurances for work: Daily Benefits insurance and accident insurance. These will be paid both you and your employer, usually 50/50. There are many companies that can provide these. I used an agent to handle this (quite cheap).
- Apply for the Pillar 2 pension. This requires quite a lot of paperwork but an insurance agent helped again with it.
That should do it. In addition your salary calculation will need to be done in a Swiss way. My company uses a local legal firm to do it but I don't know if it's a requirement. In any case a yearly "Certificat de salaire" needs to be issued for tax purposes.
Then there is the matter of taxation. This varies greatly between countries so you should ask your UK tax office for help. Usually there are tax treaties that govern who has the right to tax your income. I had to provide proof of residence to the tax authority of my country so that I wouldn't be required to pay any taxes to them. You'll need to also register to the Swiss tax authority (amazingly in my case this could be done by email). The important thing is that you'll be taxed in a "regular manner", the source taxation, which is usually the case with B permit, does not apply to foreign employers (at least in VD). I have checked this numerous times. So you'll have to pay your taxes by yourself. The Swiss tax authority will send you the payment slips.
I'd also recommend using a fiduciaire to do your tax declaration. This is very inexpensive in Switzerland.
As you can see there are several steps. Hiring a local legal counsel will make things very easy but can cost quite a bit. But in any case the arrangement is possible if you submit the necessary paperwork.