Compare commits
No commits in common. "1aed654aaa67f592470beda61e6aed16e2657cc6" and "996ba1cddac8620ef6abebce50aea269f3841451" have entirely different histories.
1aed654aaa
...
996ba1cdda
|
@ -103,14 +103,6 @@ in
|
|||
};
|
||||
my.displayManager.sddm.enable = true;
|
||||
|
||||
my.wakeonwlan.interfaces.phy0.methods = [
|
||||
"magic-packet"
|
||||
"disconnect"
|
||||
"gtk-rekey-failure"
|
||||
"eap-identity-request"
|
||||
"rfkill-release"
|
||||
];
|
||||
|
||||
services.udev.packages = with pkgs; [
|
||||
packages.kaleidoscope-udev-rules
|
||||
];
|
||||
|
|
|
@ -2,6 +2,5 @@
|
|||
{
|
||||
imports = [
|
||||
./sddm.nix
|
||||
./wakeonwlan.nix
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,63 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
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" ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
};
|
||||
script = ''
|
||||
${pkgs.iw}/bin/iw ${name} wowlan enable ${concatStringsSep " " cfg.methods}
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
options.my.wakeonwlan = {
|
||||
interfaces = mkOption {
|
||||
default = { };
|
||||
description = "Wireless interfaces where you want to enable WoWLAN";
|
||||
example = literalExample ''
|
||||
{
|
||||
phy0.methods = [
|
||||
"magic-packet"
|
||||
"disconnect"
|
||||
"gtk-rekey-failure"
|
||||
"eap-identity-request"
|
||||
"rfkill-release"
|
||||
];
|
||||
phy2.methods = [ "any" ];
|
||||
}
|
||||
'';
|
||||
type = types.attrsOf (
|
||||
types.submodule {
|
||||
options = {
|
||||
methods = mkOption {
|
||||
type = types.listOf (types.enum [
|
||||
"4way-handshake"
|
||||
"any"
|
||||
"disconnect"
|
||||
"eap-identity-request"
|
||||
"gtk-rekey-failure"
|
||||
"magic-packet"
|
||||
"rfkill-release"
|
||||
]);
|
||||
description = "Wake-On-WiFiLan methods for this interface.";
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf (cfg.interfaces != {}) {
|
||||
systemd.services = mapAttrs' mkWowlanService cfg.interfaces;
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue