Restructure systemd services definition. Add environment variables
This commit is contained in:
parent
af1a67df96
commit
bd5ceaba30
@ -54,20 +54,28 @@ in
|
|||||||
./home-manager/fish.nix
|
./home-manager/fish.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
systemd.user.services = {
|
systemd.user = {
|
||||||
ssh-agent = {
|
# user services
|
||||||
Unit = {
|
services = {
|
||||||
Description = "SSH key agent";
|
# ssh-agent user service
|
||||||
};
|
ssh-agent = {
|
||||||
Service = {
|
Unit = {
|
||||||
Type = "simple";
|
Description = "SSH key agent";
|
||||||
Environment = "SSH_AUTH_SOCK=%t/ssh-agent.socket";
|
};
|
||||||
ExecStart = "/run/current-system/sw/bin/ssh-agent -D -a $SSH_AUTH_SOCK";
|
Service = {
|
||||||
};
|
Type = "simple";
|
||||||
Install = {
|
Environment = "SSH_AUTH_SOCK=%t/ssh-agent.socket";
|
||||||
WantedBy = [ "default.target" ];
|
ExecStart = "/run/current-system/sw/bin/ssh-agent -D -a $SSH_AUTH_SOCK";
|
||||||
|
};
|
||||||
|
Install = {
|
||||||
|
WantedBy = [ "default.target" ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
# user environment variables
|
||||||
|
sessionVariables = {
|
||||||
|
SSH_AUTH_SOCK = "/run/user/1000/ssh-agent.socket";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.mako.enable = true;
|
services.mako.enable = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user