Fix the makeServiceConfig function.

This commit is contained in:
R-VdP 2023-02-14 13:39:10 +01:00
parent b3c7f71456
commit cf7d0f76d3
No known key found for this signature in database
2 changed files with 12 additions and 8 deletions

View file

@ -1,21 +1,25 @@
{ nixpkgs }:
{ nixpkgs
, self
,
}:
let
inherit (nixpkgs) lib;
in
{
makeServiceConfig =
makeSystemConfig =
{ system
, modules
, system-manager
, extraSpecialArgs ? { }
,
}:
let
pkgs = nixpkgs.legacyPackages.${system};
inherit (self.packages.${system}) system-manager;
nixosConfig = (lib.nixosSystem {
inherit system;
modules = [ ./modules/system-manager.nix ] ++ modules;
specialArgs = { };
specialArgs = extraSpecialArgs;
}).config;
returnIfNoAssertions = drv:
@ -84,7 +88,6 @@ in
text = lib.generators.toJSON { } etcFiles;
};
# TODO: remove --ephemeral
activationScript = pkgs.writeShellScript "activate" ''
${system-manager}/bin/system-manager activate \
--store-path "$(realpath $(dirname ''${0}))" \