Six months top. All done in parallel, by different people. For example, how much time would you need to set up a postal service if you already have local carriers and trucks and offices? (I don't think that any of that is done by personnel that drives to work every morning from London.)
All this had been done on more than one occasion in history. It will be easier today because you can borrow best practices from similar systems of other countries. They will be even happy, for a small fee, to send you some of their experienced people to get you started. None of this is rocket science. It's actually rather trivial. In many cases all that needs to change in the org chart is reporting. Do not forget, human resources are plentiful, and most are already familiar with their jobs, no matter if they are "separate entities" or subdivisions of some department of UK. Physically, the social worker and the mail carrier and the policeman are all local people. Now they will have a local boss, and the local Treasury will be financing them.
it’s not just the employees, it’s the computer systems and databases
eg, let walk thru the steps of setting up an income tax:
-need a list of all taxpayers with their names, addresses and employers names and addresses: HM Revenue has that, supposed they are hard asses and won’t give it (now what, do you start going thru the phone book? voters list?)
-need a unique identifier for both taxpayers and businesses: HM Revenue has a taxpayer identifier, suppose they won’t share that database (now you need to set up a Social Security number registry)
ok so now we need a social security number registry. that number would be an identifier for payroll tax, nhs, unemployment etc. as well
creating a social security number registry would require all 5+ million scottish residents to turn up at a government office with their paper birth certificates, & have them data captured: what offices? captured by which employees? on what computer system?
and, we also need an employer registry as well...
that’s just one program...