Describe the bug
A clear and concise description of what the bug is.
Steps To Reproduce
Steps to reproduce the behavior:
Create a template unit, like:
{
systemd.services."foo@" = {
scriptArgs = "%i";
script = ''
echo "$1"
'';
};
systemd.services."foo@example" = {};
}
Expected behavior
Starting foo@example should run the foo@example template service.
Actual behavior
Starting a template unit which is not defined by NixOS works fine:
# systemctl start foo@bar
# journalctl -fu foo@bar
-- Journal begins at Wed 2021-08-11 22:25:17 EDT. --
Aug 24 10:01:35 scruffy systemd[1]: Started foo@bar.service.
Aug 24 10:01:35 scruffy foo_-start[3297689]: bar
Aug 24 10:01:35 scruffy systemd[1]: foo@bar.service: Succeeded.
However, starting the foo@example service, defined by NixOS fails:
# systemctl status foo@example
● foo@example.service
Loaded: bad-setting (Reason: Unit foo@example.service has a bad unit file setting.)
Active: inactive (dead)
Aug 24 10:01:41 scruffy systemd[1]: foo@example.service: Service has no ExecStart=, ExecStop=, or SuccessAction=. Refusing.
Notify maintainers
Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.
- system:
"x86_64-linux"
- host os:
Linux 5.10.52, NixOS, 21.11.20210810.6f6ade6 (Porcupine)
- multi-user?:
yes
- sandbox:
yes
- version:
nix-env (Nix) 2.4pre20210813_d581129
- nixpkgs:
/nix/var/nix/profiles/per-user/root/channels/nixos
Maintainer information:
# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:
Describe the bug
A clear and concise description of what the bug is.
Steps To Reproduce
Steps to reproduce the behavior:
Create a template unit, like:
Expected behavior
Starting
foo@exampleshould run thefoo@exampletemplate service.Actual behavior
Starting a template unit which is not defined by NixOS works fine:
However, starting the
foo@exampleservice, defined by NixOS fails:Notify maintainers
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"and paste the result."x86_64-linux"Linux 5.10.52, NixOS, 21.11.20210810.6f6ade6 (Porcupine)yesyesnix-env (Nix) 2.4pre20210813_d581129/nix/var/nix/profiles/per-user/root/channels/nixosMaintainer information: