Skip to content

Commit 94bed03

Browse files
committed
nix my nix
setup few users, uaq host. next is terraform scripts and setting up the matrix roles
1 parent 9191f41 commit 94bed03

File tree

11 files changed

+103
-3
lines changed

11 files changed

+103
-3
lines changed

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
## GoUAE/org: Documents and Infrastructure
2+
This repository hosts the NixOS servers, terraform scripts, and documents relating to the GoUAE organization.
3+
4+
You'll find the documents in the `meta/` folder. Everything else is top level.

flake.nix

+11-3
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,15 @@
88
...
99
}:
1010
flake-parts.lib.mkFlake {inherit inputs;} {
11-
flake.nixosConfigurations.gouae = nixpkgs.lib.nixosSystem {
11+
flake.nixosConfigurations.uaq = nixpkgs.lib.nixosSystem {
1212
system = "x86_64-linux";
13-
specialArgs = {inherit self inputs;};
14-
modules = [];
13+
specialArgs = {inherit inputs self;};
14+
modules = [./hosts/uaq ./users/rmu.nix];
15+
};
16+
17+
flake.nixosModules = {
18+
roles-matrix-bridge = ./modules/roles/matrix-bridge.nix;
19+
roles-matrix-homeserver = ./modules/roles/matrix-homeserver.nix;
1520
};
1621

1722
systems = ["x86_64-linux"];
@@ -20,5 +25,8 @@
2025
inputs = {
2126
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
2227
flake-parts.url = "github:hercules-ci/flake-parts";
28+
29+
disko.url = "github:nix-community/disko";
30+
srvos.url = "github:nix-community/srvos/63ea710b10c88f2158251d49eec7cc286cefbd68";
2331
};
2432
}

hosts/uaq/default.nix

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
lib,
3+
self,
4+
config,
5+
inputs,
6+
...
7+
}: {
8+
time.timeZone = "Asia/Dubai";
9+
networking.hostName = "uaq";
10+
11+
imports = [
12+
inputs.srvos.nixosModules.server
13+
14+
inputs.srvos.nixosModules.mixins-terminfo
15+
inputs.srvos.nixosModules.mixins-systemd-boot
16+
17+
# self.nixosModules.roles-matrix-bridge
18+
# self.nixosModules.roles-matrix-homeserver
19+
];
20+
21+
networking.useNetworkd = true;
22+
networking.useDHCP = false;
23+
24+
systemd.network.networks."10-uplink" = {
25+
matchConfig.Name = "eno1";
26+
networkConfig.DHCP = "ipv4";
27+
};
28+
29+
fileSystems."/" = {
30+
device = "/dev/disk/by-uuid/c1fd00f1-9eee-4081-96d8-daee263f0bd2";
31+
fsType = "ext4";
32+
};
33+
34+
fileSystems."/boot" = {
35+
device = "/dev/disk/by-uuid/AA29-543C";
36+
fsType = "vfat";
37+
options = ["fmask=0077" "dmask=0077"];
38+
};
39+
40+
boot.initrd.systemd.network.networks."10-uplink" = config.systemd.network.networks."10-uplink";
41+
42+
boot.kernelModules = ["kvm-intel"];
43+
boot.initrd.availableKernelModules = [
44+
"ahci"
45+
"ehci_pci"
46+
"megaraid_sas"
47+
"usb_storage"
48+
"usbhid"
49+
"sd_mod"
50+
];
51+
52+
hardware.cpu.intel.updateMicrocode =
53+
lib.mkDefault config.hardware.enableRedistributableFirmware;
54+
55+
system.stateVersion = "24.05";
56+
}
File renamed without changes.
File renamed without changes.

modules/roles/matrix-bridge.nix

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

modules/roles/matrix-homeserver.nix

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

users/default.nix

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

users/gaurav.nix

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
users.users.gaurav = {
3+
isNormalUser = true;
4+
description = "Gaurav Gosain";
5+
extraGroups = ["wheel"];
6+
7+
openssh.authorizedKeys.keys = [];
8+
};
9+
}

users/rmu.nix

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
users.users.rmu = {
3+
isNormalUser = true;
4+
description = "Rashid Almheiri";
5+
extraGroups = ["wheel"];
6+
7+
openssh.authorizedKeys.keys = [
8+
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEIniejxbTn4cW/0iTk2eLin7ZTQfpCIP3hiNP318kS8 uaq"
9+
];
10+
};
11+
}

users/shaher.nix

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
users.users.shaher = {
3+
isNormalUser = true;
4+
description = "Shaher Tayfour";
5+
extraGroups = ["wheel"];
6+
7+
openssh.authorizedKeys.keys = [];
8+
};
9+
}

0 commit comments

Comments
 (0)