Fix the makeServiceConfig function.
This commit is contained in:
parent
b3c7f71456
commit
cf7d0f76d3
2 changed files with 12 additions and 8 deletions
|
|
@ -100,12 +100,11 @@
|
|||
};
|
||||
in
|
||||
{
|
||||
systemConfig = self.lib.makeServiceConfig {
|
||||
systemConfig = self.lib.makeSystemConfig {
|
||||
inherit system;
|
||||
modules = [
|
||||
./nix/modules
|
||||
];
|
||||
inherit (self.packages.${system}) system-manager;
|
||||
};
|
||||
|
||||
packages = {
|
||||
|
|
@ -184,6 +183,8 @@
|
|||
}))
|
||||
//
|
||||
{
|
||||
lib = import ./nix/lib.nix { inherit nixpkgs; };
|
||||
lib = import ./nix/lib.nix {
|
||||
inherit nixpkgs self;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
13
nix/lib.nix
13
nix/lib.nix
|
|
@ -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}))" \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue