If you edit other things in your configuraton.nix do they apply after nixos-rebuild switch?
For example adding services.nginx.enable = true; inside your config and then checking if systemctl status nginx returns the service as running.
You don’t need to do systemctl enable ... on NixOS, since the system itself will take care of that.
Could you also paste the output of nix-channel --list
I tried changing something in my configuration.nix file then executed nixos-rebuild switch. It applied the changes but not for strongswan. I still dont have strongswan running…
I’m no expert by any means, but running nix-channel --list should return the channels you are subscribed to. If you don’t have any channels nothing will probably work.
Since you don’t have any channels to fetch packages or updates I hardly think that your strongswan changes will ever take effect, as that package definition normally lives in a nixos channel.