feat: add vesuvio
This commit is contained in:
parent
5917dab7e7
commit
9eadd0a4d9
21 changed files with 251 additions and 153 deletions
|
@ -3,9 +3,14 @@
|
|||
inputs,
|
||||
...
|
||||
}: let
|
||||
toSystem = name: role:
|
||||
toSystem = name: {
|
||||
role,
|
||||
system,
|
||||
}:
|
||||
inputs.nixpkgs.lib.nixosSystem
|
||||
{
|
||||
inherit system;
|
||||
|
||||
modules = [
|
||||
./${name}
|
||||
./${name}/hardware-configuration.nix
|
||||
|
@ -18,9 +23,29 @@
|
|||
};
|
||||
in {
|
||||
flake.nixosConfigurations = lib.mapAttrs toSystem {
|
||||
fuji = "desktop";
|
||||
fuji-wsl = "client";
|
||||
kilimandjaro = "desktop";
|
||||
etna = "server";
|
||||
fuji = {
|
||||
role = "desktop";
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
|
||||
fuji-wsl = {
|
||||
role = "client";
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
|
||||
kilimandjaro = {
|
||||
role = "desktop";
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
|
||||
etna = {
|
||||
role = "server";
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
|
||||
vesuvio = {
|
||||
role = "server";
|
||||
system = "aarch64-linux";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
21
systems/vesuvio/default.nix
Normal file
21
systems/vesuvio/default.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{config, ...}: {
|
||||
boot.tmp.cleanOnBoot = true;
|
||||
zramSwap.enable = true;
|
||||
|
||||
services.openssh.openFirewall = true;
|
||||
|
||||
services.frp = {
|
||||
enable = true;
|
||||
role = "server";
|
||||
settings = {
|
||||
bindPort = 7000;
|
||||
auth = {
|
||||
method = "token";
|
||||
token = "{{ .Envs.FRP_TOKEN }}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
age.secrets.frpToken.file = ../../secrets/etna/frpToken.age;
|
||||
systemd.services.frp.serviceConfig.EnvironmentFile = config.age.secrets.frpToken.path;
|
||||
}
|
26
systems/vesuvio/hardware-configuration.nix
Normal file
26
systems/vesuvio/hardware-configuration.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{modulesPath, ...}: {
|
||||
imports = [(modulesPath + "/profiles/qemu-guest.nix")];
|
||||
|
||||
boot = {
|
||||
loader.grub = {
|
||||
efiSupport = true;
|
||||
efiInstallAsRemovable = true;
|
||||
device = "nodev";
|
||||
};
|
||||
|
||||
initrd = {
|
||||
availableKernelModules = ["ata_piix" "uhci_hcd" "xen_blkfront"];
|
||||
kernelModules = ["nvme"];
|
||||
};
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/6FB6-65E7";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/sda1";
|
||||
fsType = "ext4";
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue