oracle-lon01: add my first aarch64-linux boxen
This commit is contained in:
parent
dca96efffe
commit
b5fbf1f472
7 changed files with 69 additions and 7 deletions
|
@ -31,6 +31,10 @@ let
|
||||||
factorio = depot.ops.factorio;
|
factorio = depot.ops.factorio;
|
||||||
home-manager = depot.ops.home-manager-ext.built;
|
home-manager = depot.ops.home-manager-ext.built;
|
||||||
};
|
};
|
||||||
|
aarch64-linux = builtins.removeAttrs x86_64-linux [ "home-manager" ] // {
|
||||||
|
pkgs = builtins.removeAttrs x86_64-linux.pkgs [ "lutris" ];
|
||||||
|
|
||||||
|
};
|
||||||
x86_64-darwin = {
|
x86_64-darwin = {
|
||||||
home-manager = depot.ops.home-manager-ext.built;
|
home-manager = depot.ops.home-manager-ext.built;
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
{ pkgs, ... }:
|
{ pkgs, lib, system, ... }:
|
||||||
let
|
let
|
||||||
bazelTop = pkgs.buildFHSUserEnv {
|
bazelTop = pkgs.buildFHSUserEnv {
|
||||||
name = "bazel-wrap";
|
name = "bazel-wrap";
|
||||||
|
@ -15,9 +15,8 @@ let
|
||||||
pkgs.nodejs
|
pkgs.nodejs
|
||||||
pkgs.yarn
|
pkgs.yarn
|
||||||
pkgs.git
|
pkgs.git
|
||||||
pkgs.jetbrains.idea-community
|
|
||||||
pkgs.gcc
|
pkgs.gcc
|
||||||
];
|
] ++ lib.optional (system == "x86_64-linux") pkgs.jetbrains.idea-community;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
bazelTop // { override = x: bazelTop; }
|
bazelTop // { override = x: bazelTop; }
|
||||||
|
|
|
@ -2,9 +2,10 @@
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
{ depot, lib, pkgs, ... }@args:
|
{ depot, lib, pkgs, system, ... }@args:
|
||||||
let
|
let
|
||||||
inherit (builtins) foldl' mapAttrs;
|
inherit (builtins) foldl' mapAttrs;
|
||||||
|
inherit (lib) filterAttrs;
|
||||||
baseModule = name: { ... }: {
|
baseModule = name: { ... }: {
|
||||||
_module.args = args // {
|
_module.args = args // {
|
||||||
rebuilder = rebuilder name;
|
rebuilder = rebuilder name;
|
||||||
|
@ -13,7 +14,7 @@ let
|
||||||
};
|
};
|
||||||
systemFor = systemName: config:
|
systemFor = systemName: config:
|
||||||
(depot.third_party.nixeval {
|
(depot.third_party.nixeval {
|
||||||
system = builtins.currentSystem;
|
inherit system;
|
||||||
modules = [ (baseModule systemName) (args: { imports = [ lib/common.nix config ]; }) ];
|
modules = [ (baseModule systemName) (args: { imports = [ lib/common.nix config ]; }) ];
|
||||||
});
|
});
|
||||||
systems = [
|
systems = [
|
||||||
|
@ -44,11 +45,12 @@ let
|
||||||
"bvm-heptapod"
|
"bvm-heptapod"
|
||||||
"bvm-logger"
|
"bvm-logger"
|
||||||
"bvm-paperless"
|
"bvm-paperless"
|
||||||
|
"oracle-lon01"
|
||||||
];
|
];
|
||||||
rebuilder = system: (import ./lib/rebuilder.nix (args // { system = system; }));
|
rebuilder = system: (import ./lib/rebuilder.nix (args // { system = system; }));
|
||||||
systemCfgs = lib.genAttrs systems
|
systemCfgs = lib.genAttrs systems
|
||||||
(name: import (./. + "/${name}"));
|
(name: import (./. + "/${name}"));
|
||||||
evaledSystems = mapAttrs systemFor systemCfgs;
|
evaledSystems = lib.filterAttrs (n: v: v.config.my.systemType == system) (mapAttrs systemFor systemCfgs);
|
||||||
systemDrvs = mapAttrs (_: sys: sys.config.system.build.toplevel) evaledSystems;
|
systemDrvs = mapAttrs (_: sys: sys.config.system.build.toplevel) evaledSystems;
|
||||||
systemTailscaleIPs = lib.mapAttrs' (n: v: lib.nameValuePair v [n]) (lib.filterAttrs (n: v: v != null) (mapAttrs (_: sys: sys.config.my.ip.tailscale) evaledSystems));
|
systemTailscaleIPs = lib.mapAttrs' (n: v: lib.nameValuePair v [n]) (lib.filterAttrs (n: v: v != null) (mapAttrs (_: sys: sys.config.my.ip.tailscale) evaledSystems));
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,10 @@ in
|
||||||
type = lib.types.nullOr lib.types.str;
|
type = lib.types.nullOr lib.types.str;
|
||||||
default = null;
|
default = null;
|
||||||
};
|
};
|
||||||
|
options.my.systemType = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "x86_64-linux";
|
||||||
|
};
|
||||||
|
|
||||||
options.my.rundeck.hostname = lib.mkOption {
|
options.my.rundeck.hostname = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
; SPDX-License-Identifier: Apache-2.0
|
; SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
; MNAME RNAME SERIAL REFRESH RETRY EXPIRE TTL
|
; MNAME RNAME SERIAL REFRESH RETRY EXPIRE TTL
|
||||||
@ 600 IN SOA frantech-lux01.as205479.net. hostmaster.lukegb.com. 47 600 450 3600 300
|
@ 600 IN SOA frantech-lux01.as205479.net. hostmaster.lukegb.com. 48 600 450 3600 300
|
||||||
|
|
||||||
; NB: this are also glue records in Google Domains.
|
; NB: this are also glue records in Google Domains.
|
||||||
$INCLUDE tmpl.ns
|
$INCLUDE tmpl.ns
|
||||||
|
@ -54,6 +54,10 @@ etheroute-lon01 3600 IN A 83.97.19.68
|
||||||
etheroute-lon01 3600 IN AAAA 2a07:242:800:64::68
|
etheroute-lon01 3600 IN AAAA 2a07:242:800:64::68
|
||||||
etheroute-lon01.int 3600 IN A 100.111.191.21
|
etheroute-lon01.int 3600 IN A 100.111.191.21
|
||||||
|
|
||||||
|
oracle-lon01 3600 IN A 130.162.184.67
|
||||||
|
; oracle-lon01 has no AAAA yet :(
|
||||||
|
oracle-lon01.int 3600 IN A 100.93.85.40
|
||||||
|
|
||||||
kusakabe 3600 IN A 188.165.197.49
|
kusakabe 3600 IN A 188.165.197.49
|
||||||
kusakabe 3600 IN AAAA 2001:41d0:2:8e31::1
|
kusakabe 3600 IN AAAA 2001:41d0:2:8e31::1
|
||||||
kusakabe.int 3600 IN A 100.101.38.52
|
kusakabe.int 3600 IN A 100.101.38.52
|
||||||
|
|
44
ops/nixos/oracle-lon01/default.nix
Normal file
44
ops/nixos/oracle-lon01/default.nix
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
# SPDX-FileCopyrightText: 2022 Luke Granger-Brown <depot@lukegb.com>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
{ depot, lib, pkgs, config, modulesPath, ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
"${modulesPath}/profiles/qemu-guest.nix"
|
||||||
|
];
|
||||||
|
|
||||||
|
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
|
||||||
|
|
||||||
|
fileSystems = {
|
||||||
|
"/" = { device = "/dev/mapper/ocivolume-root"; fsType = "xfs"; };
|
||||||
|
"/boot" = { device = "/dev/sda2"; fsType = "xfs"; };
|
||||||
|
"/boot/efi" = { device = "/dev/sda1"; fsType = "vfat"; };
|
||||||
|
};
|
||||||
|
|
||||||
|
nix.settings.max-jobs = lib.mkDefault 4;
|
||||||
|
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
|
||||||
|
networking = {
|
||||||
|
hostName = "oracle-lon01";
|
||||||
|
domain = "as205479.net";
|
||||||
|
hostId = "3a5eb800";
|
||||||
|
|
||||||
|
nameservers = [
|
||||||
|
"2001:4860:4860::8888"
|
||||||
|
"2001:4860:4860::8844"
|
||||||
|
"8.8.8.8"
|
||||||
|
"8.8.4.4"
|
||||||
|
];
|
||||||
|
interfaces.enp0s3.useDHCP = true;
|
||||||
|
};
|
||||||
|
my.ip.tailscale = "100.93.85.40";
|
||||||
|
my.systemType = "aarch64-linux";
|
||||||
|
|
||||||
|
nix.gc.automatic = false;
|
||||||
|
|
||||||
|
system.stateVersion = "22.05";
|
||||||
|
}
|
5
third_party/default.nix
vendored
5
third_party/default.nix
vendored
|
@ -12,6 +12,11 @@ let
|
||||||
packageOverrides = pkgs: {
|
packageOverrides = pkgs: {
|
||||||
factorio = pkgs.factorio.override depot.ops.secrets.factorio;
|
factorio = pkgs.factorio.override depot.ops.secrets.factorio;
|
||||||
factorio-experimental = pkgs.factorio-experimental.override depot.ops.secrets.factorio;
|
factorio-experimental = pkgs.factorio-experimental.override depot.ops.secrets.factorio;
|
||||||
|
delve = pkgs.delve.overrideAttrs (oldAttrs: {
|
||||||
|
meta = oldAttrs.meta // {
|
||||||
|
platforms = oldAttrs.meta.platforms ++ [ "aarch64-linux" ];
|
||||||
|
};
|
||||||
|
});
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
nixpkgs = import ./nixpkgs {
|
nixpkgs = import ./nixpkgs {
|
||||||
|
|
Loading…
Reference in a new issue