wireguard gateway draft added
This commit is contained in:
parent
dcbfb0be74
commit
7a450258d4
3 changed files with 61 additions and 4 deletions
15
flake.nix
15
flake.nix
|
@ -35,21 +35,28 @@
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/forgenite
|
./hosts/forgenite
|
||||||
imports
|
imports
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
"forgejo-ci" = nixpkgs.lib.nixosSystem {
|
"forgejo-ci" = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/forgejo-ci
|
./hosts/forgejo-ci
|
||||||
imports
|
imports
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
"supernova" = nixpkgs.lib.nixosSystem {
|
"supernova" = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/supernova
|
./hosts/supernova
|
||||||
imports
|
imports
|
||||||
];
|
];
|
||||||
|
};
|
||||||
|
"wg_gateway" = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
modules = [
|
||||||
|
./hosts/wg_gateway
|
||||||
|
imports
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
17
hosts/wg_gateway/default.nix
Normal file
17
hosts/wg_gateway/default.nix
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[ # Include the results of the hardware scan.
|
||||||
|
./hardware-configuration.nix
|
||||||
|
];
|
||||||
|
boot.loader.grub.enable = true;
|
||||||
|
boot.loader.grub.device = "/dev/sda";
|
||||||
|
|
||||||
|
lyn.kernel.latest.enable = true;
|
||||||
|
lyn.kernel.hardened.enable =true;
|
||||||
|
lyn.profiles.base.enable = true;
|
||||||
|
lyn.users.lyn.enable = true;
|
||||||
|
|
||||||
|
networking.hostName = "wg_gateway"; # Define your hostname.
|
||||||
|
}
|
33
hosts/wg_gateway/hardware_configuration.nix
Normal file
33
hosts/wg_gateway/hardware_configuration.nix
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
|
# and may be overwritten by future invocations. Please make changes
|
||||||
|
# to /etc/nixos/configuration.nix instead.
|
||||||
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/8585b573-d3d6-48a3-91cf-76d198ea3046";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices =
|
||||||
|
[ { device = "/dev/disk/by-uuid/0e0e9cca-0017-47aa-93f8-3231a29fd772"; }
|
||||||
|
];
|
||||||
|
|
||||||
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
}
|
Loading…
Reference in a new issue