Skip to content

Commit c8d7bbc

Browse files
committed
Fix usage of user in systemd services
- All NixOS module configurations allowed the configuration of user, but never actually used that option. Fix this to allow the user to configure the name of the user used when running the systemd service.
1 parent 8ebf937 commit c8d7bbc

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

nix/nixos/metadata-server.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ in {
105105
serviceConfig = {
106106
ExecStart = config.services.metadata-server.script;
107107
DynamicUser = true;
108+
User = config.services.metadata-server.user;
108109
RuntimeDirectory = "metadata-server";
109110
StateDirectory = "metadata-server";
110111
};

nix/nixos/metadata-sync.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ in {
111111
serviceConfig = {
112112
ExecStart = config.services.metadata-sync.script;
113113
DynamicUser = true;
114+
User = config.services.metadata-sync.user;
114115
RuntimeDirectory = "metadata-sync";
115116
StateDirectory = "metadata-sync";
116117
};

nix/nixos/metadata-webhook.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ in {
111111
serviceConfig = {
112112
ExecStart = config.services.metadata-webhook.script;
113113
DynamicUser = true;
114+
User = config.services.metadata-webhook.user;
114115
RuntimeDirectory = "metadata-webhook";
115116
StateDirectory = "metadata-webhook";
116117
StandardOutput = "journal";

0 commit comments

Comments
 (0)