diff --git a/flake.nix b/flake.nix index b5f59d4..142fa23 100644 --- a/flake.nix +++ b/flake.nix @@ -35,21 +35,28 @@ modules = [ ./hosts/forgenite imports - ]; + ]; }; "forgejo-ci" = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ ./hosts/forgejo-ci imports - ]; + ]; }; "supernova" = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ ./hosts/supernova - imports - ]; + imports + ]; + }; + "wg-gateway" = nixpkgs.lib.nixosSystem { + system = "aarch64-linux"; + modules = [ + ./hosts/wg-gateway + imports + ]; }; }; }; diff --git a/hosts/wg-gateway/default.nix b/hosts/wg-gateway/default.nix new file mode 100644 index 0000000..67b7fa6 --- /dev/null +++ b/hosts/wg-gateway/default.nix @@ -0,0 +1,32 @@ +{ config, lib, pkgs, ... }: + +{ + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + lyn.kernel.latest.enable = true; + lyn.profiles.base.enable = true; + lyn.profiles.secureboot.enable = true; + lyn.users.lyn.enable = true; + + # network + networking.useDHCP = false; + networking.hostName = "wg-gateway"; # Define your hostname. + systemd.network.enable = true; + systemd.network.networks."10-wan" = { + matchConfig.Name = "enp1s0"; + networkConfig.DHCP = "ipv4"; + address = [ + "2a01:4f8:1c1b:d2db::/64" + ]; + routes = [ + { routeConfig.Gateway = "fe80::1"; } + ]; + }; + + system.stateVersion = "24.05"; +} \ No newline at end of file diff --git a/hosts/wg-gateway/hardware-configuration.nix b/hosts/wg-gateway/hardware-configuration.nix new file mode 100644 index 0000000..c601b11 --- /dev/null +++ b/hosts/wg-gateway/hardware-configuration.nix @@ -0,0 +1,34 @@ +# 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.kernelModules = [ "virtio_gpu" ]; + boot.kernelParams = [ "console=tty" ]; + boot.initrd.availableKernelModules = [ "xhci_pci" "virtio_scsi" "sr_mod" ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/7cb49846-af34-40ec-b144-decc9c284e94"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/BEFA-C7BC"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/63e6e56c-9fbd-4bc2-a0e7-8be171565710"; } + ]; + + # networking.interfaces.enp1s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; +} \ No newline at end of file diff --git a/meta/default.nix b/meta/default.nix index f669d22..90405b7 100644 --- a/meta/default.nix +++ b/meta/default.nix @@ -1,7 +1,6 @@ { imports = [ ./mkLocalMods.nix -# ./enable.nix ]; } diff --git a/meta/enable.nix b/meta/enable.nix deleted file mode 100644 index a7ecc46..0000000 --- a/meta/enable.nix +++ /dev/null @@ -1,7 +0,0 @@ -{lib, config, ...}: { - config.lyn.lib.enable = list: lib.genAttrs - list - ( - name: {enable = true;} - ); -}