lkjlkjdsalkj
This commit is contained in:
40
hosts/system-manager/furiphoneflx1/modules/networking.nix
Normal file
40
hosts/system-manager/furiphoneflx1/modules/networking.nix
Normal file
@@ -0,0 +1,40 @@
|
||||
{ lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.networking;
|
||||
in
|
||||
|
||||
{
|
||||
options = {
|
||||
# from https://github.com/NixOS/nixpkgs/blob/799ba5bffed04ced7067a91798353d360788b30d/nixos/modules/tasks/network-interfaces.nix
|
||||
|
||||
networking.hostName = mkOption {
|
||||
default = config.system.nixos.distroId;
|
||||
defaultText = literalExpression "config.system.nixos.distroId";
|
||||
type = types.strMatching
|
||||
"^$|^[[:alnum:]]([[:alnum:]_-]{0,61}[[:alnum:]])?$";
|
||||
};
|
||||
|
||||
networking.fqdn = mkOption {
|
||||
readOnly = true;
|
||||
type = types.str;
|
||||
default = if (cfg.hostName != "" && cfg.domain != null)
|
||||
then "${cfg.hostName}.${cfg.domain}"
|
||||
else throw ''
|
||||
The FQDN is required but cannot be determined. Please make sure that
|
||||
both networking.hostName and networking.domain are set properly.
|
||||
'';
|
||||
defaultText = literalExpression ''"''${networking.hostName}.''${networking.domain}"'';
|
||||
description = ''
|
||||
The fully qualified domain name (FQDN) of this host. It is the result
|
||||
of combining `networking.hostName` and `networking.domain.` Using this
|
||||
option will result in an evaluation error if the hostname is empty or
|
||||
no domain is specified.
|
||||
|
||||
Modules that accept a mere `networking.hostName` but prefer a fully qualified
|
||||
domain name may use `networking.fqdnOrHostName` instead.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
1
hosts/system-manager/furiphoneflx1/modules/udev.nix
Normal file
1
hosts/system-manager/furiphoneflx1/modules/udev.nix
Normal file
@@ -0,0 +1 @@
|
||||
# TODO
|
||||
Reference in New Issue
Block a user