From 9fabb92d8e71da61b13fa86cf898ae89d2853354 Mon Sep 17 00:00:00 2001 From: paki23 Date: Sat, 4 Jan 2025 13:03:39 +0100 Subject: [PATCH] nixos: fix systemd.services position --- nixos/default.nix | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/nixos/default.nix b/nixos/default.nix index fec84cf42..9dc00a29c 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -48,27 +48,27 @@ in { lib.mkDefault (!cfg.useUserService); }; }]; - - systemd.services = mapAttrs' (_: - { home, programs, ... }: - let inherit (home) username homeDirectory; - in nameValuePair "ssh_config-${utils.escapeSystemdPath username}" { - enable = with programs.ssh; enable && !internallyManaged; - description = "Linking ${username}' ssh config"; - wantedBy = [ "multi-user.target" ]; - before = [ "systemd-user-sessions.service" ]; - - unitConfig.RequiresMountsFor = homeDirectory; - stopIfChanged = false; - serviceConfig = (baseService username) // { - User = username; - ExecStart = [ - "${pkgs.coreutils}/bin/mkdir -p ${homeDirectory}/.ssh" - "${pkgs.coreutils}/bin/ln -s ${programs.ssh.configPath} ${homeDirectory}/.ssh/config" - ]; - }; - }) cfg.users; }; + + systemd.services = mapAttrs' (_: + { home, programs, ... }: + let inherit (home) username homeDirectory; + in nameValuePair "ssh_config-${utils.escapeSystemdPath username}" { + enable = with programs.ssh; enable && !internallyManaged; + description = "Linking ${username}' ssh config"; + wantedBy = [ "multi-user.target" ]; + before = [ "systemd-user-sessions.service" ]; + + unitConfig.RequiresMountsFor = homeDirectory; + stopIfChanged = false; + serviceConfig = (baseService username) // { + User = username; + ExecStart = [ + "${pkgs.coreutils}/bin/mkdir -p ${homeDirectory}/.ssh" + "${pkgs.coreutils}/bin/ln -s ${programs.ssh.configPath} ${homeDirectory}/.ssh/config" + ]; + }; + }) cfg.users; } (mkIf (cfg.users != { } && !cfg.useUserService) { systemd.services = mapAttrs' (_: usercfg: