modules: hardware: move 'ergodox'
This commit is contained in:
parent
ec1bc63de7
commit
abbe1bb203
4 changed files with 3 additions and 3 deletions
|
|
@ -4,5 +4,6 @@
|
|||
{
|
||||
imports = [
|
||||
./bluetooth.nix
|
||||
./ergodox.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
14
modules/hardware/ergodox.nix
Normal file
14
modules/hardware/ergodox.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
# ZSA keyboard udev rules
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.my.hardware.ergodox;
|
||||
in
|
||||
{
|
||||
options.my.hardware.ergodox = with lib; {
|
||||
enable = mkEnableOption "ZSA udev rules and user group configuration";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
hardware.keyboard.zsa.enable = true;
|
||||
};
|
||||
}
|
||||
27
modules/hardware/networking.nix
Normal file
27
modules/hardware/networking.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.my.networking;
|
||||
in
|
||||
{
|
||||
options.my.networking = with lib; {
|
||||
externalInterface = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
example = "eth0";
|
||||
description = ''
|
||||
Name of the network interface that egresses to the internet. Used for
|
||||
e.g. NATing internal networks.
|
||||
'';
|
||||
};
|
||||
|
||||
wireless = {
|
||||
enable = mkEnableOption "wireless configuration";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf cfg.wireless.enable {
|
||||
networking.networkmanager.enable = true;
|
||||
})
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue