makemake: Convert to a plain NixOS config
Eelco Dolstra committed
Jun 29, 2023 at 14:47 UTC
d2a9870bbab586476242bc1f075e05d5cfbc6b46
2 files changed
+51
-11
ngi0/hydra/flake.nix
+13
-11
@@ -5,18 +5,17 @@
5
6
outputs = { self, nixpkgs, nix, hydra }: {
7
8
- nixopsConfigurations.default = {
9
- inherit nixpkgs;
8
+ nixosConfigurations.makemake = nixpkgs.lib.nixosSystem {
9
+ system = "x86_64-linux";
10
11
- makemake =
12
- { config, lib, pkgs, ... }:
11
+ modules = [
12
+ ../../modules/common.nix
13
+ hydra.nixosModules.hydra
14
+ ./hydra.nix
15
+ ./hydra-proxy.nix
16
+ ./hardware.nix
17
14
- { imports =
15
- [ ../../modules/common.nix
16
- hydra.nixosModules.hydra
17
- ./hydra.nix
18
- ./hydra-proxy.nix
19
- ];
18
+ ({ config, lib, pkgs, ... }: {
19
20
nixpkgs.overlays =
21
[ nix.overlay
@@ -28,6 +27,7 @@
27
nix.registry.nixpkgs.flake = nixpkgs;
28
nix.nixPath = [ "nixpkgs=${nixpkgs}" ];
29
30
+ /*
31
deployment.targetEnv = "hetzner";
32
deployment.hetzner.mainIPv4 = "116.202.113.248"; # 2a01:4f8:231:4187::2
33
deployment.hetzner.createSubAccount = false;
@@ -71,6 +71,7 @@
71
mkdir -p /mnt/boot
72
mount /dev/disk/by-label/boot0 /mnt/boot
73
'';
74
+ */
75
76
fileSystems."/" =
77
{ device = "rpool/root";
@@ -99,7 +100,8 @@
100
101
users.extraUsers.root.openssh.authorizedKeys.keys =
102
with import ../../ssh-keys.nix; [ zimbatm regnat ];
102
- };
103
+ })
104
+ ];
105
};
106
107
};
ngi0/hydra/hardware.nix
new
+38
@@ -0,0 +1,38 @@
1
+{ lib, ... }:
2
+
3
+{
4
+ system.stateVersion = lib.mkDefault "19.09";
5
+
6
+ networking = {
7
+ defaultGateway = {
8
+ address = "116.202.113.193";
9
+ interface = "eth0";
10
+ };
11
+ defaultGateway6 = { address = "fe80::1"; interface = "eth0"; };
12
+ interfaces.eth0 = {
13
+ ipv4.addresses = [
14
+ { address = "116.202.113.248"; prefixLength = 26; }
15
+ ];
16
+ ipv6.addresses = [
17
+ { address = "2a01:4f8:231:4187::"; prefixLength = 64; }
18
+ ];
19
+ };
20
+ nameservers = [
21
+ "213.133.98.98"
22
+ "213.133.99.99"
23
+ "213.133.100.100"
24
+ "2a01:4f8:0:a0a1::add:1010"
25
+ "2a01:4f8:0:a102::add:9999"
26
+ "2a01:4f8:0:a111::add:9898"
27
+ ];
28
+ };
29
+
30
+ services.udev.extraRules = ''
31
+ ACTION=="add", SUBSYSTEM=="net", ATTR{address}=="70:85:c2:f4:7d:27", NAME="eth0"
32
+ '';
33
+
34
+ boot.initrd.availableKernelModules = [ "ahci" "nvme" ];
35
+ boot.kernelModules = [ "kvm-amd" ];
36
+
37
+ nix.maxJobs = lib.mkDefault 16;
38
+}