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
|
in
|
||||||
{
|
{
|
||||||
systemConfig = self.lib.makeServiceConfig {
|
systemConfig = self.lib.makeSystemConfig {
|
||||||
inherit system;
|
inherit system;
|
||||||
modules = [
|
modules = [
|
||||||
./nix/modules
|
./nix/modules
|
||||||
];
|
];
|
||||||
inherit (self.packages.${system}) system-manager;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
packages = {
|
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
|
let
|
||||||
inherit (nixpkgs) lib;
|
inherit (nixpkgs) lib;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
makeServiceConfig =
|
makeSystemConfig =
|
||||||
{ system
|
{ system
|
||||||
, modules
|
, modules
|
||||||
, system-manager
|
, extraSpecialArgs ? { }
|
||||||
,
|
,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
inherit (self.packages.${system}) system-manager;
|
||||||
|
|
||||||
nixosConfig = (lib.nixosSystem {
|
nixosConfig = (lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
modules = [ ./modules/system-manager.nix ] ++ modules;
|
modules = [ ./modules/system-manager.nix ] ++ modules;
|
||||||
specialArgs = { };
|
specialArgs = extraSpecialArgs;
|
||||||
}).config;
|
}).config;
|
||||||
|
|
||||||
returnIfNoAssertions = drv:
|
returnIfNoAssertions = drv:
|
||||||
|
|
@ -84,7 +88,6 @@ in
|
||||||
text = lib.generators.toJSON { } etcFiles;
|
text = lib.generators.toJSON { } etcFiles;
|
||||||
};
|
};
|
||||||
|
|
||||||
# TODO: remove --ephemeral
|
|
||||||
activationScript = pkgs.writeShellScript "activate" ''
|
activationScript = pkgs.writeShellScript "activate" ''
|
||||||
${system-manager}/bin/system-manager activate \
|
${system-manager}/bin/system-manager activate \
|
||||||
--store-path "$(realpath $(dirname ''${0}))" \
|
--store-path "$(realpath $(dirname ''${0}))" \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue