network: extract nixos module
parent
7c8baf7f32
commit
c8fdfc2f3a
|
@ -63,18 +63,6 @@
|
||||||
# Enable trash:/// support
|
# Enable trash:/// support
|
||||||
services.gvfs.enable = true;
|
services.gvfs.enable = true;
|
||||||
|
|
||||||
# Enable the OpenSSH daemon.
|
|
||||||
services.openssh.enable = true;
|
|
||||||
services.openssh.openFirewall = true;
|
|
||||||
|
|
||||||
services.avahi.enable = true;
|
|
||||||
|
|
||||||
# Open ports in the firewall.
|
|
||||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
|
||||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
|
||||||
# Or disable the firewall altogether.
|
|
||||||
# networking.firewall.enable = false;
|
|
||||||
|
|
||||||
# Before changing this value read the documentation for this option
|
# Before changing this value read the documentation for this option
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||||
system.stateVersion = "23.11"; # Did you read the comment?
|
system.stateVersion = "23.11"; # Did you read the comment?
|
||||||
|
|
|
@ -13,6 +13,7 @@ in
|
||||||
snowhawk.i18n.enable = lib.mkDefault true;
|
snowhawk.i18n.enable = lib.mkDefault true;
|
||||||
snowhawk.audio.enable = lib.mkDefault true;
|
snowhawk.audio.enable = lib.mkDefault true;
|
||||||
snowhawk.env.enable = lib.mkDefault true;
|
snowhawk.env.enable = lib.mkDefault true;
|
||||||
|
snowhawk.network.enable = lib.mkDefault true;
|
||||||
snowhawk.sops.enable = lib.mkDefault true;
|
snowhawk.sops.enable = lib.mkDefault true;
|
||||||
snowhawk.power-button.enable = lib.mkDefault true;
|
snowhawk.power-button.enable = lib.mkDefault true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.snowhawk.network;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.snowhawk.network = {
|
||||||
|
enable = lib.mkEnableOption "network nixos module";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
# Enable the OpenSSH daemon.
|
||||||
|
services.openssh.enable = true;
|
||||||
|
services.openssh.openFirewall = true;
|
||||||
|
|
||||||
|
services.avahi.enable = true;
|
||||||
|
|
||||||
|
# Open ports in the firewall.
|
||||||
|
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||||
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||||
|
# Or disable the firewall altogether.
|
||||||
|
# networking.firewall.enable = false;
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue