1
1
Fork 0
nixos-configs/machine/backyard/default.nix

54 lines
1.2 KiB
Nix
Raw Normal View History

{ pkgs, ... }:
2023-08-02 00:13:35 +00:00
{
imports = [
./hardware-configuration.nix
];
2023-08-02 00:13:35 +00:00
boot.loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
2023-08-02 00:13:35 +00:00
2023-08-02 01:59:06 +00:00
beatific.hostName = "backyard";
2023-08-02 00:13:35 +00:00
# Enable networking
networking.networkmanager.enable = true;
2023-08-02 15:18:26 +00:00
users.users.tvb.extraGroups = [ "networkmanager" ];
2023-08-02 00:13:35 +00:00
2023-08-02 15:39:25 +00:00
networking.firewall = {
enable = true;
allowedTCPPorts = [
80 # http
443 # https
2023-09-02 02:55:36 +00:00
8080 # nginx bind backyard.lan
2023-08-02 15:39:25 +00:00
];
};
2023-08-02 00:13:35 +00:00
2023-09-02 02:55:36 +00:00
networking.extraHosts = ''
10.22.20.1 empyrean.vpn
10.22.20.2 catacomb.vpn
10.22.20.8 backyard.vpn
10.22.20.8 git.backyard.vpn
'';
services.nginx.enable = true;
services.nginx.virtualHosts = {
"git.backyard.vpn" = {
#listen = [ { addr = "git.backyard.vpn"; port = 80; } ];
locations."/".return = "200 \"this is the git, yes\"";
};
"default" = {
default = true;
locations."/".return = "444";
};
};
2023-08-02 15:39:25 +00:00
# This value governs how some stateful data, like databases, are handled
# across different versions of NixOS. This should not be changed to a new
# release unless the sysadmin has determined that no services would be
# adversely affected by changing this.
system.stateVersion = "23.05";
2023-08-02 00:13:35 +00:00
}