format all code with alejandra

This commit is contained in:
Antoine Martin 2022-04-10 11:54:58 +02:00
parent fa0cda2673
commit 4f0d45e4d5
89 changed files with 1605 additions and 1298 deletions

View file

@ -1,23 +1,27 @@
{ config, lib, pkgs, ... }:
let
inherit (lib)
{
config,
lib,
pkgs,
...
}: let
inherit
(lib)
concatStringsSep
literalExample
mapAttrs'
mkIf
mkOption
nameValuePair
;
;
cfg = config.my.wakeonwlan;
mkWowlanService = name: cfg:
nameValuePair "wowlan-${name}" {
description = "Enable WoWLAN for interface ${name}";
requires = [ "network.target" ];
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
requires = ["network.target"];
after = ["network.target"];
wantedBy = ["multi-user.target"];
serviceConfig = {
Type = "oneshot";
};
@ -25,11 +29,12 @@ let
${pkgs.iw}/bin/iw ${name} wowlan enable ${concatStringsSep " " cfg.methods}
'';
};
in
{
options.my.wakeonwlan = let inherit (lib) types; in {
in {
options.my.wakeonwlan = let
inherit (lib) types;
in {
interfaces = mkOption {
default = { };
default = {};
description = "Wireless interfaces where you want to enable WoWLAN";
example = literalExample ''
{