Skip to content

Commit

Permalink
feat(wip): add vesuvio
Browse files Browse the repository at this point in the history
  • Loading branch information
uku3lig committed Mar 24, 2024
1 parent 863207a commit 710549a
Show file tree
Hide file tree
Showing 7 changed files with 122 additions and 3 deletions.
2 changes: 0 additions & 2 deletions configs/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,6 @@ in {
openFirewall = lib.mkDefault false;
};

vscode-server.enable = true;

resolved = {
enable = lib.mkDefault true;
dnssec = "allow-downgrade";
Expand Down
7 changes: 6 additions & 1 deletion systems/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
../configs/common.nix
agenix.nixosModules.default
home-manager.nixosModules.home-manager
vscode-server.nixosModules.default
];

desktop = with inputs;
Expand All @@ -50,6 +49,7 @@ in {
nixos
++ (with inputs; [
nixos-wsl.nixosModules.default
vscode-server.nixosModules.default
]);
};

Expand All @@ -68,5 +68,10 @@ in {
self.nixosModules.reposilite
]);
};

vesuvio = {
system = "aarch64-linux";
modules = nixos;
};
};
}
1 change: 1 addition & 0 deletions systems/etna/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

reposilite.enable = true;

vscode-server.enable = true;
tailscale.extraUpFlags = ["--advertise-exit-node"];

vaultwarden = {
Expand Down
8 changes: 8 additions & 0 deletions systems/vesuvio/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
imports = [
./networking.nix
];

boot.tmp.cleanOnBoot = true;
zramSwap.enable = true;
}
24 changes: 24 additions & 0 deletions systems/vesuvio/hardware-configuration.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{modulesPath, ...}: {
imports = [(modulesPath + "/profiles/qemu-guest.nix")];

boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "xen_blkfront"];
boot.initrd.kernelModules = ["nvme"];

boot.loader.grub = {
efiSupport = true;
efiInstallAsRemovable = true;
device = "nodev";
};

fileSystems."/boot" = {
device = "/dev/disk/by-uuid/D951-0FE6";
fsType = "vfat";
};

fileSystems."/" = {
device = "/dev/disk/by-uuid/ae52778a-0099-4263-9bdc-a07abf37920c";
fsType = "ext4";
};

nixpkgs.hostPlatform = "aarch64-linux";
}
52 changes: 52 additions & 0 deletions systems/vesuvio/networking-stock.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{lib, ...}: {
# This file was populated at runtime with the networking
# details gathered from the active system.
networking = {
nameservers = [
"8.8.8.8"
];
defaultGateway = "172.31.1.1";
defaultGateway6 = {
address = "fe80::1";
interface = "eth0";
};
dhcpcd.enable = false;
usePredictableInterfaceNames = lib.mkForce false;
interfaces = {
eth0 = {
ipv4.addresses = [
{
address = "49.13.148.129";
prefixLength = 32;
}
];
ipv6.addresses = [
{
address = "2a01:4f8:1c1c:8b12::1";
prefixLength = 64;
}
{
address = "fe80::9400:3ff:fe24:4aab";
prefixLength = 64;
}
];
ipv4.routes = [
{
address = "172.31.1.1";
prefixLength = 32;
}
];
ipv6.routes = [
{
address = "fe80::1";
prefixLength = 128;
}
];
};
};
};
services.udev.extraRules = ''
ATTR{address}=="96:00:03:24:4a:ab", NAME="eth0"
'';
}
31 changes: 31 additions & 0 deletions systems/vesuvio/networking.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{lib, ...}: {
# mac address
services.udev.extraRules = ''ATTR{address}=="96:00:03:24:4a:ab", NAME="eth0"'';

networking = {
dhcpcd.enable = false;
usePredictableInterfaceNames = lib.mkForce false;
nameservers = ["1.1.1.1"];

defaultGateway = "172.31.1.1";
defaultGateway6 = {
address = "fe80::1";
interface = "eth0";
};

interfaces.eth0 = {
ipv4.addresses = [
{
address = "49.13.148.129";
prefixLength = 32;
}
];
ipv6.addresses = [
{
address = "2a01:4f8:1c1c:8b12::1";
prefixLength = 64;
}
];
};
};
}

0 comments on commit 710549a

Please sign in to comment.