Fix formatting using nixpgks-fmt

This commit is contained in:
Jean-François Roche 2023-02-02 00:20:23 +01:00
parent 942ed011c9
commit add2910abf
No known key found for this signature in database
GPG key ID: D1D09DE169EA19A0
2 changed files with 19 additions and 13 deletions

View file

@ -3,7 +3,11 @@ let
inherit (nixpkgs) lib; inherit (nixpkgs) lib;
in in
{ {
makeServiceConfig = { system, module }: makeServiceConfig =
{ system
, module
,
}:
let let
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
@ -12,13 +16,13 @@ in
specialArgs = { }; specialArgs = { };
modules = [ module ]; modules = [ module ];
}; };
services = lib.flip lib.genAttrs services =
lib.flip lib.genAttrs
(serviceName: (serviceName:
nixosConfig.config.systemd.units."${serviceName}.service".unit) nixosConfig.config.systemd.units."${serviceName}.service".unit)
nixosConfig.config.service-manager.services; nixosConfig.config.service-manager.services;
servicesPath = servicesPath = pkgs.writeTextFile {
pkgs.writeTextFile {
name = "services"; name = "services";
destination = "/services.json"; destination = "/services.json";
text = lib.generators.toJSON { } services; text = lib.generators.toJSON { } services;

View file

@ -1,5 +1,7 @@
{ lib, pkgs, ... }: { lib
, pkgs
, ...
}:
let let
service-1 = "service-1"; service-1 = "service-1";
service-2 = "service-2"; service-2 = "service-2";