Fix formatting using nixpgks-fmt
This commit is contained in:
parent
942ed011c9
commit
add2910abf
2 changed files with 19 additions and 13 deletions
26
nix/lib.nix
26
nix/lib.nix
|
|
@ -3,7 +3,11 @@ let
|
|||
inherit (nixpkgs) lib;
|
||||
in
|
||||
{
|
||||
makeServiceConfig = { system, module }:
|
||||
makeServiceConfig =
|
||||
{ system
|
||||
, module
|
||||
,
|
||||
}:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
|
||||
|
|
@ -12,17 +16,17 @@ in
|
|||
specialArgs = { };
|
||||
modules = [ module ];
|
||||
};
|
||||
services = lib.flip lib.genAttrs
|
||||
(serviceName:
|
||||
nixosConfig.config.systemd.units."${serviceName}.service".unit)
|
||||
nixosConfig.config.service-manager.services;
|
||||
services =
|
||||
lib.flip lib.genAttrs
|
||||
(serviceName:
|
||||
nixosConfig.config.systemd.units."${serviceName}.service".unit)
|
||||
nixosConfig.config.service-manager.services;
|
||||
|
||||
servicesPath =
|
||||
pkgs.writeTextFile {
|
||||
name = "services";
|
||||
destination = "/services.json";
|
||||
text = lib.generators.toJSON { } services;
|
||||
};
|
||||
servicesPath = pkgs.writeTextFile {
|
||||
name = "services";
|
||||
destination = "/services.json";
|
||||
text = lib.generators.toJSON { } services;
|
||||
};
|
||||
activationScript = pkgs.writeShellScript "activate" ''
|
||||
echo "${servicesPath}"
|
||||
'';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
{ lib, pkgs, ... }:
|
||||
|
||||
{ lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
service-1 = "service-1";
|
||||
service-2 = "service-2";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue